Package org.geotools.data.complex
Class XmlFeatureTypeMapping
Object
FeatureTypeMapping
XmlFeatureTypeMapping
- Author:
- Russell Petty (GeoScience Victoria), Rini Angreani (CSIRO Earth Science and Resource Engineering)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNo parameters constructor for use by the digester configuration engine as a JavaBeanXmlFeatureTypeMapping
(FeatureSource<? extends FeatureType, ? extends Feature> source, AttributeDescriptor target, List<AttributeMapping> mappings, NamespaceSupport namespaces, String itemXpath) -
Method Summary
Modifier and TypeMethodDescriptionfindMappingsFor
(XPathUtil.StepList propertyName, boolean includeNestedMappings) Looks up for attribute mappings matching the xpath expressionpropertyName
.getAttributeMappingByLabel
(String label) Finds an attribute mapping by label.getAttributeMappingsByExpression
(Expression sourceExpression) Finds the attribute mappings for the given source expression.getExpressionsIgnoreIndex
(XPathUtil.StepList targetPath) getStringMapping
(XPathUtil.StepList exactPath) Finds the attribute mapping for the target expressionexactPath
protected Expression
getValue
(String xpathPrefix, Expression node, AttributeMapping mapping) void
Methods inherited from class FeatureTypeMapping
equals, getAttributeMapping, getAttributeMapping, getAttributeMappings, getAttributeMappingsIgnoreIndex, getDefaultGeometryXPath, getFeatureIdExpression, getIndexAttributeName, getIndexSource, getIsListMappings, getMappingName, getNamespaces, getNestedMappings, getSource, getSourceDatastoreId, getTargetFeature, getUnderlyingComplexMapping, hashCode, isDenormalised, isInclude, setDefaultGeometryXPath, setDenormalised, setInclude, setIndexSource, setName, setSource, setSourceDatastoreId, setTargetFeature
-
Field Details
-
itemXpath
-
-
Constructor Details
-
XmlFeatureTypeMapping
public XmlFeatureTypeMapping()No parameters constructor for use by the digester configuration engine as a JavaBean -
XmlFeatureTypeMapping
public XmlFeatureTypeMapping(FeatureSource<? extends FeatureType, ? extends Feature> source, AttributeDescriptor target, List<AttributeMapping> mappings, NamespaceSupport namespaces, String itemXpath)
-
-
Method Details
-
getExpressionsIgnoreIndex
-
getAttributeMappingsByExpression
Finds the attribute mappings for the given source expression.- Overrides:
getAttributeMappingsByExpression
in classFeatureTypeMapping
- Returns:
- list of matching attribute mappings
-
getAttributeMappingByLabel
Finds an attribute mapping by label.- Parameters:
label
- The attribute mapping label.- Returns:
- Attribute mapping that matches the label, or null.
-
getStringMapping
Finds the attribute mapping for the target expressionexactPath
- Parameters:
exactPath
- the xpath expression on the target schema to find the mapping for- Returns:
- the attribute mapping that match 1:1 with
exactPath
ornull
if
-
populateFeatureData
- Throws:
IOException
-
getValue
-
findMappingsFor
public List<Expression> findMappingsFor(XPathUtil.StepList propertyName, boolean includeNestedMappings) Looks up for attribute mappings matching the xpath expressionpropertyName
.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 forgml:name[1]
,gml:name[2]
andgml:name[3]
, but propertyName is justgml:name
, all three mappings apply.- Overrides:
findMappingsFor
in classFeatureTypeMapping
-