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 TypeMethodDescriptionboolean
Returns 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, ornull
if its fully addressable by the FeatureType.boolean
isList()
Returns whether this attribute should be treated as a list valued property.boolean
Returns whether this attribute should be treated as a single or multi valued property.void
putAnonymousAttribute
(String name, String expression) void
putClientProperty
(String name, String expression) void
setAnonymousAttributes
(Map<String, String> anonymousAttributes) void
setClientProperties
(Map<String, String> clientProperties) void
setEncodeIfEmpty
(boolean encodeIfEmpty) Returns whether this attribute should encode when empty;void
setEncodeIfEmpty
(String encodeIfEmpty) Returns whether this attribute should encode when empty;void
setIdentifierExpression
(String identifierExpression) void
setIdentifierPath
(String identifierPath) void
setIndexField
(String indexField) void
setInputAttributePath
(String inputAttributePath) Set the input XPath expression where we are getting the features from a data access instead of a data store.void
setInstancePath
(String instancePath) void
void
setLinkElement
(String linkElement) Sets the name of the linked element type of which this attribute is nesting/targeting.void
setLinkField
(String linkField) Sets the XPath expression addressing the target attribute in the linked target feature typevoid
setList
(boolean isList) Sets whether this attribute should be treated as a list valued property.void
Helper method to allow config digester passing a string.void
setMultiple
(boolean isMultiple) Sets whether this attribute should be treated as a single or multi valued property.void
setMultiple
(String isMultiple) Helper method to allow config digester passing a string.void
setMultipleValue
(MultipleValue multipleValue) void
setParentLabel
(String parentLabel) void
setSourceExpression
(String sourceExpression) Sets the OGC CQL expression for the attribute value.void
setSourceIndex
(String sourceIndex) Sets the OGC CQL expression index for the attribute value.void
setTargetAttributePath
(String targetAttributePath) Sets the XPath expression addressing the target attribute in a target FeatureType.void
setTargetAttributeSchemaElement
(String targetAttributeSchemaElement) Sets the name of the target element instance in the output schema.void
setTargetQueryString
(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, ornull
if 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
null
if 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:
true
if this attribute corresponds to a multivalued property,false
otherwise.
-
setMultiple
public void setMultiple(boolean isMultiple) Sets whether this attribute should be treated as a single or multi valued property.- Parameters:
isMultiple
-true
if this attribute corresponds to a multivalued property,false
otherwise.
-
encodeIfEmpty
public boolean encodeIfEmpty()Returns whether this attribute should encode when empty;- Returns:
true
encode when the value is empty,false
otherwise.
-
setEncodeIfEmpty
public void setEncodeIfEmpty(boolean encodeIfEmpty) Returns whether this attribute should encode when empty;- Parameters:
encodeIfEmpty
-true
encode when the value is empty,false
otherwise.
-
setEncodeIfEmpty
Returns whether this attribute should encode when empty;- Parameters:
encodeIfEmpty
-true
encode when the value is empty,false
otherwise.
-
setList
public void setList(boolean isList) Sets whether this attribute should be treated as a list valued property.- Parameters:
isList
-true
if this attribute corresponds to a list valued property,false
otherwise.
-
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:
true
if this attribute corresponds to a list valued property,false
otherwise.
-
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
-