org.geotools.data.complex
Class FeatureTypeMapping

Object
  extended by FeatureTypeMapping
Direct Known Subclasses:
XmlFeatureTypeMapping

public class FeatureTypeMapping
extends Object

Since:
2.4
Author:
Gabriel Roldan (Axios Engineering), Rini Angreani (CSIRO Earth Science and Resource Engineering)

Constructor Summary
FeatureTypeMapping()
          No parameters constructor for use by the digester configuration engine as a JavaBean
FeatureTypeMapping(FeatureSource<? extends FeatureType,? extends Feature> source, AttributeDescriptor target, List<AttributeMapping> mappings, NamespaceSupport namespaces)
           
FeatureTypeMapping(FeatureSource<? extends FeatureType,? extends Feature> source, AttributeDescriptor target, List<AttributeMapping> mappings, NamespaceSupport namespaces, boolean isDenormalised)
           
 
Method Summary
 List<Expression> findMappingsFor(XPathUtil.StepList propertyName)
          Looks up for attribute mappings matching the xpath expression propertyName.
 AttributeMapping getAttributeMapping(XPathUtil.StepList exactPath)
          Finds the attribute mapping for the target expression exactPath
 List<AttributeMapping> getAttributeMappings()
           
 List<AttributeMapping> getAttributeMappingsByExpression(Expression sourceExpression)
          Finds the attribute mappings for the given source expression.
 List<AttributeMapping> getAttributeMappingsIgnoreIndex(XPathUtil.StepList targetPath)
          Finds the attribute mappings for the given target location path.
 Expression getFeatureIdExpression()
           
 List<AttributeMapping> getIsListMappings()
          Return list of attribute mappings that are configured as list (isList = true).
 Name getMappingName()
           
 NamespaceSupport getNamespaces()
           
 List<NestedAttributeMapping> getNestedMappings()
           
 FeatureSource getSource()
           
 AttributeDescriptor getTargetFeature()
           
 FeatureTypeMapping getUnderlyingComplexMapping()
           
 boolean isDenormalised()
           
 void setDenormalised(boolean isDenormalised)
           
 void setName(Name name)
           
 void setTargetFeature(AttributeDescriptor feature)
          Has to be called after #setTargetType(FeatureType)
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureTypeMapping

public FeatureTypeMapping()
No parameters constructor for use by the digester configuration engine as a JavaBean


FeatureTypeMapping

public FeatureTypeMapping(FeatureSource<? extends FeatureType,? extends Feature> source,
                          AttributeDescriptor target,
                          List<AttributeMapping> mappings,
                          NamespaceSupport namespaces)

FeatureTypeMapping

public FeatureTypeMapping(FeatureSource<? extends FeatureType,? extends Feature> source,
                          AttributeDescriptor target,
                          List<AttributeMapping> mappings,
                          NamespaceSupport namespaces,
                          boolean isDenormalised)
Method Detail

getAttributeMappings

public List<AttributeMapping> getAttributeMappings()

getNestedMappings

public List<NestedAttributeMapping> getNestedMappings()

getFeatureIdExpression

public Expression getFeatureIdExpression()

getAttributeMappingsIgnoreIndex

public List<AttributeMapping> getAttributeMappingsIgnoreIndex(XPathUtil.StepList targetPath)
Finds the attribute mappings for the given target location path. If the exactPath is not indexed, it will get all the matching mappings ignoring index. If it is indexed, it will get the one with matching index only.

Parameters:
targetPath -
Returns:

getAttributeMappingsByExpression

public List<AttributeMapping> getAttributeMappingsByExpression(Expression sourceExpression)
Finds the attribute mappings for the given source expression.

Parameters:
sourceExpression -
Returns:
list of matching attribute mappings

getAttributeMapping

public AttributeMapping getAttributeMapping(XPathUtil.StepList exactPath)
Finds the attribute mapping for the target expression exactPath

Parameters:
exactPath - the xpath expression on the target schema to find the mapping for
Returns:
the attribute mapping that match 1:1 with exactPath or null if

getNamespaces

public NamespaceSupport getNamespaces()

setTargetFeature

public void setTargetFeature(AttributeDescriptor feature)
Has to be called after #setTargetType(FeatureType)

Parameters:
elementName -
featureTypeName -

getTargetFeature

public AttributeDescriptor getTargetFeature()

getSource

public FeatureSource getSource()

getUnderlyingComplexMapping

public FeatureTypeMapping getUnderlyingComplexMapping()

setName

public void setName(Name name)

getMappingName

public Name getMappingName()

getIsListMappings

public List<AttributeMapping> getIsListMappings()
Return list of attribute mappings that are configured as list (isList = true).

Returns:
attribute mappings with isList enabled.

findMappingsFor

public List<Expression> findMappingsFor(XPathUtil.StepList propertyName)
Looks up for attribute mappings matching the xpath expression propertyName.

If any step in propertyName has index greater than 1, any mapping for the same property applies, regardless of the mapping. For example, if there are mappings for gml:name[1], gml:name[2] and gml:name[3], but propertyName is just gml:name, all three mappings apply.

Parameters:
propertyName -
Returns:

isDenormalised

public boolean isDenormalised()

setDenormalised

public void setDenormalised(boolean isDenormalised)


Copyright © 1996-2014 Geotools. All Rights Reserved.