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 Summary
Constructors -
Method Summary
Modifier 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
-
AttributeMapping
public AttributeMapping()
-
-
Method Details
-
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
-
setSourceExpression
Sets the OGC CQL expression for the attribute value.- Parameters:
sourceExpression- OGC CQL expression for the attribute value.
-
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
-
setSourceIndex
Sets the OGC CQL expression index for the attribute value.- Parameters:
sourceIndex- OGC CQL expression index for the attribute value.
-
getInputAttributePath
Return the input XPath expression- Returns:
- the input XPath expression
-
setInputAttributePath
Set 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
-
getLinkElement
Returns the name of the linked element type of which this attribute is nesting/targeting.- Returns:
- the link element name
-
setLinkElement
Sets the name of the linked element type of which this attribute is nesting/targeting. -
getLinkField
Returns the XPath expression addressing the target attribute in the linked target feature type- Returns:
- the linked field
-
setLinkField
Sets the XPath expression addressing the target attribute in the linked target feature type -
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.
-
setTargetAttributePath
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.
-
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.
-
setTargetAttributeSchemaElement
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 correspondingAppSchemaDataAccessDTO.getNamespaces()
-
isMultiple
public 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.
-
setMultiple
public 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.
-
encodeIfEmpty
public boolean encodeIfEmpty()Returns whether this attribute should encode when empty;- Returns:
trueencode when the value is empty,falseotherwise.
-
setEncodeIfEmpty
public void setEncodeIfEmpty(boolean encodeIfEmpty) Returns whether this attribute should encode when empty;- Parameters:
encodeIfEmpty-trueencode when the value is empty,falseotherwise.
-
setEncodeIfEmpty
Returns whether this attribute should encode when empty;- Parameters:
encodeIfEmpty-trueencode when the value is empty,falseotherwise.
-
setList
public 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.
-
setList
Helper method to allow config digester passing a string.- See Also:
-
isList
public 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.
-
setMultiple
Helper method to allow config digester passing a string.- See Also:
-
toString
Returns a string representation of this config object. -
getClientProperties
-
setClientProperties
-
putClientProperty
-
getIdentifierExpression
-
setIdentifierExpression
-
getMultipleValue
-
setMultipleValue
-
getIndexField
-
setIndexField
-
getAnonymousAttributes
Attribute definition map for anonymous unbounded sequences on complexType Elements. -
setAnonymousAttributes
-
putAnonymousAttribute
-