Package org.geotools.data.complex.config
Class AttributeMapping
- Object
- 
- AttributeMapping
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class AttributeMapping extends Object implements Serializable Configuration object for the mapping of a community schema attribute.- Since:
- 2.4
- Author:
- Gabriel Roldan (Axios Engineering), Rini Angreani (CSIRO Earth Science and Resource Engineering), Russell Petty (GeoScience Victoria)
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description AttributeMapping()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanencodeIfEmpty()Returns whether this attribute should encode when empty;Map<String,String>getAnonymousAttributes()Attribute definition map for anonymous unbounded sequences on complexType Elements.Map<String,String>getClientProperties()StringgetIdentifierExpression()StringgetIdentifierPath()StringgetIndexField()StringgetInputAttributePath()Return the input XPath expressionStringgetInstancePath()StringgetLabel()StringgetLinkElement()Returns the name of the linked element type of which this attribute is nesting/targeting.StringgetLinkField()Returns the XPath expression addressing the target attribute in the linked target feature typeMultipleValuegetMultipleValue()StringgetParentLabel()StringgetSourceExpression()Returns the expression whose evaluation result against a Feature of the source FeatureType is going to be the value of the target attribute in output FeatureType.StringgetSourceIndex()Returns the expression whose evaluation result in numeric value to indicate row number to extract {@link this#sourceExpression} from denormalised database rows.StringgetTargetAttributePath()Returns the XPath expression addressing the target attribute in a target FeatureType.StringgetTargetAttributeSchemaElement()Returns the name of the target element instance this attribute mapping applies to, ornullif its fully addressable by the FeatureType.StringgetTargetQueryString()booleanisList()Returns whether this attribute should be treated as a list valued property.booleanisMultiple()Returns whether this attribute should be treated as a single or multi valued property.voidputAnonymousAttribute(String name, String expression)voidputClientProperty(String name, String expression)voidsetAnonymousAttributes(Map<String,String> anonymousAttributes)voidsetClientProperties(Map<String,String> clientProperties)voidsetEncodeIfEmpty(boolean encodeIfEmpty)Returns whether this attribute should encode when empty;voidsetEncodeIfEmpty(String encodeIfEmpty)Returns whether this attribute should encode when empty;voidsetIdentifierExpression(String identifierExpression)voidsetIdentifierPath(String identifierPath)voidsetIndexField(String indexField)voidsetInputAttributePath(String inputAttributePath)Set the input XPath expression where we are getting the features from a data access instead of a data store.voidsetInstancePath(String instancePath)voidsetLabel(String label)voidsetLinkElement(String linkElement)Sets the name of the linked element type of which this attribute is nesting/targeting.voidsetLinkField(String linkField)Sets the XPath expression addressing the target attribute in the linked target feature typevoidsetList(boolean isList)Sets whether this attribute should be treated as a list valued property.voidsetList(String list)Helper method to allow config digester passing a string.voidsetMultiple(boolean isMultiple)Sets whether this attribute should be treated as a single or multi valued property.voidsetMultiple(String isMultiple)Helper method to allow config digester passing a string.voidsetMultipleValue(MultipleValue multipleValue)voidsetParentLabel(String parentLabel)voidsetSourceExpression(String sourceExpression)Sets the OGC CQL expression for the attribute value.voidsetSourceIndex(String sourceIndex)Sets the OGC CQL expression index for the attribute value.voidsetTargetAttributePath(String targetAttributePath)Sets the XPath expression addressing the target attribute in a target FeatureType.voidsetTargetAttributeSchemaElement(String targetAttributeSchemaElement)Sets the name of the target element instance in the output schema.voidsetTargetQueryString(String targetQueryString)StringtoString()Returns a string representation of this config object.
 
- 
- 
- 
Method Detail- 
getSourceExpressionpublic String getSourceExpression() Returns the expression whose evaluation result against a Feature of the source FeatureType is going to be the value of the target attribute in output FeatureType.At this stage, the expression must be a valid OpenGIS Common Query Language expression. - Returns:
- OGC CQL expression for the attribute value
 
 - 
setSourceExpressionpublic void setSourceExpression(String sourceExpression) Sets the OGC CQL expression for the attribute value.- Parameters:
- sourceExpression- OGC CQL expression for the attribute value.
 
 - 
getSourceIndexpublic String getSourceIndex() Returns the expression whose evaluation result in numeric value to indicate row number to extract {@link this#sourceExpression} from denormalised database rows.At this stage, the expression must be a valid integer, or LAST would work to get the last dynamic result. - Returns:
- OGC CQL expression for the attribute value
 
 - 
setSourceIndexpublic void setSourceIndex(String sourceIndex) Sets the OGC CQL expression index for the attribute value.- Parameters:
- sourceIndex- OGC CQL expression index for the attribute value.
 
 - 
getInputAttributePathpublic String getInputAttributePath() Return the input XPath expression- Returns:
- the input XPath expression
 
 - 
setInputAttributePathpublic void setInputAttributePath(String inputAttributePath) Set the input XPath expression where we are getting the features from a data access instead of a data store.
 - 
getLabelpublic String getLabel() 
 - 
setLabelpublic void setLabel(String label) 
 - 
getParentLabelpublic String getParentLabel() 
 - 
setParentLabelpublic void setParentLabel(String parentLabel) 
 - 
getTargetQueryStringpublic String getTargetQueryString() 
 - 
setTargetQueryStringpublic void setTargetQueryString(String targetQueryString) 
 - 
getInstancePathpublic String getInstancePath() 
 - 
setInstancePathpublic void setInstancePath(String instancePath) 
 - 
getIdentifierPathpublic String getIdentifierPath() 
 - 
setIdentifierPathpublic void setIdentifierPath(String identifierPath) 
 - 
getLinkElementpublic String getLinkElement() Returns the name of the linked element type of which this attribute is nesting/targeting.- Returns:
- the link element name
 
 - 
setLinkElementpublic void setLinkElement(String linkElement) Sets the name of the linked element type of which this attribute is nesting/targeting.
 - 
getLinkFieldpublic String getLinkField() Returns the XPath expression addressing the target attribute in the linked target feature type- Returns:
- the linked field
 
 - 
setLinkFieldpublic void setLinkField(String linkField) Sets the XPath expression addressing the target attribute in the linked target feature type
 - 
getTargetAttributePathpublic String getTargetAttributePath() Returns the XPath expression addressing the target attribute in a target FeatureType.- Returns:
- the XPath location path for the target attribute of the mapping.
 
 - 
setTargetAttributePathpublic void setTargetAttributePath(String targetAttributePath) Sets the XPath expression addressing the target attribute in a target FeatureType.- Parameters:
- targetAttributePath- the XPath location path for the target attribute of the mapping.
 
 - 
getTargetAttributeSchemaElementpublic String getTargetAttributeSchemaElement() Returns the name of the target element instance this attribute mapping applies to, ornullif its fully addressable by the FeatureType.For example, the target FeatureType may define a property as GeometryAttributeType, but the actual instance should be PointPropertyType. In which case, it should be set to "gml:PointPropertyType" so AppSchemaDataAccess knows it should create a point property an thus its subelements are to be addressable by subsequent mappings. - Returns:
- name of the target element instance in the output schema or nullif not set.
 
 - 
setTargetAttributeSchemaElementpublic void setTargetAttributeSchemaElement(String targetAttributeSchemaElement) Sets the name of the target element instance in the output schema.- Parameters:
- targetAttributeSchemaElement- name of the target element instance in the output schema. Could be prefixed, in which case the prefix mapping has to be available in the corresponding- AppSchemaDataAccessDTO.getNamespaces()
 
 - 
isMultiplepublic boolean isMultiple() Returns whether this attribute should be treated as a single or multi valued property.- Returns:
- trueif this attribute corresponds to a multivalued property,- falseotherwise.
 
 - 
setMultiplepublic void setMultiple(boolean isMultiple) Sets whether this attribute should be treated as a single or multi valued property.- Parameters:
- isMultiple-- trueif this attribute corresponds to a multivalued property,- falseotherwise.
 
 - 
encodeIfEmptypublic boolean encodeIfEmpty() Returns whether this attribute should encode when empty;- Returns:
- trueencode when the value is empty,- falseotherwise.
 
 - 
setEncodeIfEmptypublic void setEncodeIfEmpty(boolean encodeIfEmpty) Returns whether this attribute should encode when empty;- Parameters:
- encodeIfEmpty-- trueencode when the value is empty,- falseotherwise.
 
 - 
setEncodeIfEmptypublic void setEncodeIfEmpty(String encodeIfEmpty) Returns whether this attribute should encode when empty;- Parameters:
- encodeIfEmpty-- trueencode when the value is empty,- falseotherwise.
 
 - 
setListpublic void setList(boolean isList) Sets whether this attribute should be treated as a list valued property.- Parameters:
- isList-- trueif this attribute corresponds to a list valued property,- falseotherwise.
 
 - 
setListpublic void setList(String list) Helper method to allow config digester passing a string.- See Also:
- setList(boolean)
 
 - 
isListpublic boolean isList() Returns whether this attribute should be treated as a list valued property.- Returns:
- trueif this attribute corresponds to a list valued property,- falseotherwise.
 
 - 
setMultiplepublic void setMultiple(String isMultiple) Helper method to allow config digester passing a string.- See Also:
- setMultiple(boolean)
 
 - 
toStringpublic String toString() Returns a string representation of this config object.
 - 
getIdentifierExpressionpublic String getIdentifierExpression() 
 - 
setIdentifierExpressionpublic void setIdentifierExpression(String identifierExpression) 
 - 
getMultipleValuepublic MultipleValue getMultipleValue() 
 - 
setMultipleValuepublic void setMultipleValue(MultipleValue multipleValue) 
 - 
getIndexFieldpublic String getIndexField() 
 - 
setIndexFieldpublic void setIndexField(String indexField) 
 - 
getAnonymousAttributespublic Map<String,String> getAnonymousAttributes() Attribute definition map for anonymous unbounded sequences on complexType Elements.
 
- 
 
-