Package org.geotools.data.complex.config
Class AttributeMapping
Object
AttributeMapping
- All Implemented Interfaces:
- 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:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns whether this attribute should encode when empty;Attribute definition map for anonymous unbounded sequences on complexType Elements.Return the input XPath expressiongetLabel()Returns the name of the linked element type of which this attribute is nesting/targeting.Returns the XPath expression addressing the target attribute in the linked target feature typeReturns 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.Returns the expression whose evaluation result in numeric value to indicate row number to extract {@link this#sourceExpression} from denormalised database rows.Returns the XPath expression addressing the target attribute in a target FeatureType.Returns the name of the target element instance this attribute mapping applies to, ornullif its fully addressable by the FeatureType.booleanisList()Returns whether this attribute should be treated as a list valued property.booleanReturns 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) voidvoidsetLinkElement(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.voidHelper 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) toString()Returns a string representation of this config object.
- 
Constructor Details- 
AttributeMappingpublic AttributeMapping()
 
- 
- 
Method Details- 
getSourceExpressionReturns 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
 
- 
setSourceExpressionSets the OGC CQL expression for the attribute value.- Parameters:
- sourceExpression- OGC CQL expression for the attribute value.
 
- 
getSourceIndexReturns 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
 
- 
setSourceIndexSets the OGC CQL expression index for the attribute value.- Parameters:
- sourceIndex- OGC CQL expression index for the attribute value.
 
- 
getInputAttributePathReturn the input XPath expression- Returns:
- the input XPath expression
 
- 
setInputAttributePathSet the input XPath expression where we are getting the features from a data access instead of a data store.
- 
getLabel
- 
setLabel
- 
getParentLabel
- 
setParentLabel
- 
getTargetQueryString
- 
setTargetQueryString
- 
getInstancePath
- 
setInstancePath
- 
getIdentifierPath
- 
setIdentifierPath
- 
getLinkElementReturns the name of the linked element type of which this attribute is nesting/targeting.- Returns:
- the link element name
 
- 
setLinkElementSets the name of the linked element type of which this attribute is nesting/targeting.
- 
getLinkFieldReturns the XPath expression addressing the target attribute in the linked target feature type- Returns:
- the linked field
 
- 
setLinkFieldSets the XPath expression addressing the target attribute in the linked target feature type
- 
getTargetAttributePathReturns the XPath expression addressing the target attribute in a target FeatureType.- Returns:
- the XPath location path for the target attribute of the mapping.
 
- 
setTargetAttributePathSets the XPath expression addressing the target attribute in a target FeatureType.- Parameters:
- targetAttributePath- the XPath location path for the target attribute of the mapping.
 
- 
getTargetAttributeSchemaElementReturns 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.
 
- 
setTargetAttributeSchemaElementSets 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.
 
- 
setEncodeIfEmptyReturns 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.
 
- 
setListHelper method to allow config digester passing a string.- See Also:
 
- 
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.
 
- 
setMultipleHelper method to allow config digester passing a string.- See Also:
 
- 
toStringReturns a string representation of this config object.
- 
getClientProperties
- 
setClientProperties
- 
putClientProperty
- 
getIdentifierExpression
- 
setIdentifierExpression
- 
getMultipleValue
- 
setMultipleValue
- 
getIndexField
- 
setIndexField
- 
getAnonymousAttributesAttribute definition map for anonymous unbounded sequences on complexType Elements.
- 
setAnonymousAttributes
- 
putAnonymousAttribute
 
-