org.geotools.data.complex
Class XmlFeatureTypeMapping

Object
  extended by FeatureTypeMapping
      extended by XmlFeatureTypeMapping

public class XmlFeatureTypeMapping
extends FeatureTypeMapping

Author:
Russell Petty (GeoScience Victoria), Rini Angreani (CSIRO Earth Science and Resource Engineering)

Field Summary
protected  String itemXpath
           
 
Constructor Summary
XmlFeatureTypeMapping()
          No parameters constructor for use by the digester configuration engine as a JavaBean
XmlFeatureTypeMapping(FeatureSource source, AttributeDescriptor target, List<AttributeMapping> mappings, NamespaceSupport namespaces, String itemXpath)
           
 
Method Summary
 List<Expression> findMappingsFor(XPathUtil.StepList propertyName)
          Looks up for attribute mappings matching the xpath expression propertyName.
 AttributeMapping getAttributeMappingByLabel(String label)
          Finds an attribute mapping by label.
 List<AttributeMapping> getAttributeMappingsByExpression(Expression sourceExpression)
          Finds the attribute mappings for the given source expression.
 List<Expression> getExpressionsIgnoreIndex(XPathUtil.StepList targetPath)
           
 AttributeMapping getStringMapping(XPathUtil.StepList exactPath)
          Finds the attribute mapping for the target expression exactPath
protected  Expression getValue(String xpathPrefix, Expression node, AttributeMapping mapping)
           
 void populateFeatureData()
           
protected  void setClientProperties(Attribute target, Object source, Map<Name,Expression> clientProperties)
           
 
Methods inherited from class FeatureTypeMapping
getAttributeMapping, getAttributeMappings, getAttributeMappingsIgnoreIndex, getFeatureIdExpression, getIsListMappings, getMappingName, getNamespaces, getNestedMappings, getSource, getTargetFeature, getUnderlyingComplexMapping, isDenormalised, setDenormalised, setName, setTargetFeature
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemXpath

protected String itemXpath
Constructor Detail

XmlFeatureTypeMapping

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


XmlFeatureTypeMapping

public XmlFeatureTypeMapping(FeatureSource source,
                             AttributeDescriptor target,
                             List<AttributeMapping> mappings,
                             NamespaceSupport namespaces,
                             String itemXpath)
Method Detail

getExpressionsIgnoreIndex

public List<Expression> getExpressionsIgnoreIndex(XPathUtil.StepList targetPath)

getAttributeMappingsByExpression

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

Overrides:
getAttributeMappingsByExpression in class FeatureTypeMapping
Parameters:
sourceExpression -
Returns:
list of matching attribute mappings

getAttributeMappingByLabel

public AttributeMapping getAttributeMappingByLabel(String label)
Finds an attribute mapping by label.

Parameters:
label - The attribute mapping label.
Returns:
Attribute mapping that matches the label, or null.

getStringMapping

public AttributeMapping getStringMapping(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

populateFeatureData

public void populateFeatureData()
                         throws IOException
Throws:
IOException

getValue

protected Expression getValue(String xpathPrefix,
                              Expression node,
                              AttributeMapping mapping)

setClientProperties

protected void setClientProperties(Attribute target,
                                   Object source,
                                   Map<Name,Expression> clientProperties)

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.

Overrides:
findMappingsFor in class FeatureTypeMapping
Parameters:
mappings - Feature type mapping to search for
simplifiedSteps -
Returns:


Copyright © 1996-2014 Geotools. All Rights Reserved.