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:
  • Constructor Details

    • AttributeMapping

      public AttributeMapping()
  • Method Details

    • getSourceExpression

      public 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
    • setSourceExpression

      public void setSourceExpression(String sourceExpression)
      Sets the OGC CQL expression for the attribute value.
      Parameters:
      sourceExpression - OGC CQL expression for the attribute value.
    • getSourceIndex

      public 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
    • setSourceIndex

      public void setSourceIndex(String sourceIndex)
      Sets the OGC CQL expression index for the attribute value.
      Parameters:
      sourceIndex - OGC CQL expression index for the attribute value.
    • getInputAttributePath

      public String getInputAttributePath()
      Return the input XPath expression
      Returns:
      the input XPath expression
    • setInputAttributePath

      public void setInputAttributePath(String inputAttributePath)
      Set the input XPath expression where we are getting the features from a data access instead of a data store.
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getParentLabel

      public String getParentLabel()
    • setParentLabel

      public void setParentLabel(String parentLabel)
    • getTargetQueryString

      public String getTargetQueryString()
    • setTargetQueryString

      public void setTargetQueryString(String targetQueryString)
    • getInstancePath

      public String getInstancePath()
    • setInstancePath

      public void setInstancePath(String instancePath)
    • getIdentifierPath

      public String getIdentifierPath()
    • setIdentifierPath

      public void setIdentifierPath(String identifierPath)
    • getLinkElement

      public String getLinkElement()
      Returns the name of the linked element type of which this attribute is nesting/targeting.
      Returns:
      the link element name
    • setLinkElement

      public void setLinkElement(String linkElement)
      Sets the name of the linked element type of which this attribute is nesting/targeting.
    • getLinkField

      public String getLinkField()
      Returns the XPath expression addressing the target attribute in the linked target feature type
      Returns:
      the linked field
    • setLinkField

      public void setLinkField(String linkField)
      Sets the XPath expression addressing the target attribute in the linked target feature type
    • getTargetAttributePath

      public 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.
    • setTargetAttributePath

      public 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.
    • getTargetAttributeSchemaElement

      public String getTargetAttributeSchemaElement()
      Returns the name of the target element instance this attribute mapping applies to, or null 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

      public 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()
    • 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

      public void setEncodeIfEmpty(String encodeIfEmpty)
      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

      public void setList(String list)
      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

      public void setMultiple(String isMultiple)
      Helper method to allow config digester passing a string.
      See Also:
    • toString

      public String toString()
      Returns a string representation of this config object.
      Overrides:
      toString in class Object
      Returns:
      String representation of this config object.
    • getClientProperties

      public Map<String,String> getClientProperties()
    • setClientProperties

      public void setClientProperties(Map<String,String> clientProperties)
    • putClientProperty

      public void putClientProperty(String name, String expression)
    • getIdentifierExpression

      public String getIdentifierExpression()
    • setIdentifierExpression

      public void setIdentifierExpression(String identifierExpression)
    • getMultipleValue

      public MultipleValue getMultipleValue()
    • setMultipleValue

      public void setMultipleValue(MultipleValue multipleValue)
    • getIndexField

      public String getIndexField()
    • setIndexField

      public void setIndexField(String indexField)
    • getAnonymousAttributes

      public Map<String,String> getAnonymousAttributes()
      Attribute definition map for anonymous unbounded sequences on complexType Elements.
    • setAnonymousAttributes

      public void setAnonymousAttributes(Map<String,String> anonymousAttributes)
    • putAnonymousAttribute

      public void putAnonymousAttribute(String name, String expression)