org.geotools.data.complex.config
Class AttributeMapping

java.lang.Object
  extended by org.geotools.data.complex.config.AttributeMapping
All Implemented Interfaces:
java.io.Serializable

public class AttributeMapping
extends java.lang.Object
implements java.io.Serializable

Configuration object for the mapping of a community schema attribute.

Since:
2.4
Version:
$Id: AttributeMapping.java 34061 2009-10-05 06:31:55Z bencaradocdavies $
Author:
Gabriel Roldan, Axios Engineering, Rini Angreani, Curtin University of Technology, Russell Petty, GSV
See Also:
Serialized Form

Constructor Summary
AttributeMapping()
           
 
Method Summary
 java.util.Map getClientProperties()
           
 java.lang.String getIdentifierExpression()
           
 java.lang.String getIdentifierPath()
           
 java.lang.String getInputAttributePath()
          Return the input XPath expression
 java.lang.String getInstancePath()
           
 java.lang.String getLabel()
           
 java.lang.String getLinkElement()
          Returns the name of the linked element type of which this attribute is nesting/targeting.
 java.lang.String getLinkField()
          Returns the XPath expression addressing the target attribute in the linked target feature type
 java.lang.String getParentLabel()
           
 java.lang.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.
 java.lang.String getTargetAttributePath()
          Returns the XPath expression addressing the target attribute in a target FeatureType.
 java.lang.String getTargetAttributeSchemaElement()
          Returns the name of the target element instance this attribute mapping applies to, or null if its fully addressable by the FeatureType.
 java.lang.String getTargetQueryString()
           
 boolean isMultiple()
          Returns wether this attribute should be treated as a single or multi valued property.
 void putClientProperty(java.lang.String name, java.lang.String expression)
           
 void setClientProperties(java.util.Map clientProperties)
           
 void setIdentifierExpression(java.lang.String identifierExpression)
           
 void setIdentifierPath(java.lang.String identifierPath)
           
 void setInputAttributePath(java.lang.String inputAttributePath)
          Set the input XPath expression where we are getting the features from a data access instead of a data store.
 void setInstancePath(java.lang.String instancePath)
           
 void setLabel(java.lang.String label)
           
 void setLinkElement(java.lang.String linkElement)
          Sets the name of the linked element type of which this attribute is nesting/targeting.
 void setLinkField(java.lang.String linkField)
          Sets the XPath expression addressing the target attribute in the linked target feature type
 void setMultiple(boolean isMultiple)
          Sets wether this attribute should be treated as a single or multi valued property.
 void setMultiple(java.lang.String isMultiple)
          Helper method to allow config digester passing a string.
 void setParentLabel(java.lang.String parentLabel)
           
 void setSourceExpression(java.lang.String sourceExpression)
          Sets the OGC CQL expression for the attribute value.
 void setTargetAttributePath(java.lang.String targetAttributePath)
          Sets the XPath expression addressing the target attribute in a target FeatureType.
 void setTargetAttributeSchemaElement(java.lang.String targetAttributeSchemaElement)
          Sets the name of the target element instance in the output schema.
 void setTargetQueryString(java.lang.String targetQueryString)
           
 java.lang.String toString()
          Returns a string representation of this config object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeMapping

public AttributeMapping()
Method Detail

getSourceExpression

public java.lang.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(java.lang.String sourceExpression)
Sets the OGC CQL expression for the attribute value.

Parameters:
sourceExpression - OGC CQL expression for the attribute value.

getInputAttributePath

public java.lang.String getInputAttributePath()
Return the input XPath expression

Returns:
the input XPath expression

setInputAttributePath

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

Parameters:
inputAttributePath -

getLabel

public java.lang.String getLabel()

setLabel

public void setLabel(java.lang.String label)

getParentLabel

public java.lang.String getParentLabel()

setParentLabel

public void setParentLabel(java.lang.String parentLabel)

getTargetQueryString

public java.lang.String getTargetQueryString()

setTargetQueryString

public void setTargetQueryString(java.lang.String targetQueryString)

getInstancePath

public java.lang.String getInstancePath()

setInstancePath

public void setInstancePath(java.lang.String instancePath)

getIdentifierPath

public java.lang.String getIdentifierPath()

setIdentifierPath

public void setIdentifierPath(java.lang.String identifierPath)

getLinkElement

public java.lang.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(java.lang.String linkElement)
Sets the name of the linked element type of which this attribute is nesting/targeting.

Parameters:
linkElement -

getLinkField

public java.lang.String getLinkField()
Returns the XPath expression addressing the target attribute in the linked target feature type

Returns:
the linked field

setLinkField

public void setLinkField(java.lang.String linkField)
Sets the XPath expression addressing the target attribute in the linked target feature type

Parameters:
linkField -

getTargetAttributePath

public java.lang.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(java.lang.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 java.lang.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(java.lang.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 wether 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 wether 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.

setMultiple

public void setMultiple(java.lang.String isMultiple)
Helper method to allow config digester passing a string.

Parameters:
isMultiple -
See Also:
setMultiple(boolean)

toString

public java.lang.String toString()
Returns a string representation of this config object.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this config object.

getClientProperties

public java.util.Map getClientProperties()

setClientProperties

public void setClientProperties(java.util.Map clientProperties)

putClientProperty

public void putClientProperty(java.lang.String name,
                              java.lang.String expression)

getIdentifierExpression

public java.lang.String getIdentifierExpression()

setIdentifierExpression

public void setIdentifierExpression(java.lang.String identifierExpression)


Copyright © 1996-2010 Geotools. All Rights Reserved.