Package org.geotools.data.complex.filter
Class FeatureChainedAttributeVisitor.FeatureChainedAttributeDescriptor
Object
FeatureChainedAttributeDescriptor
- Enclosing class:
- FeatureChainedAttributeVisitor
Descriptor class holding information about a feature chained attribute, i.e. an attribute belonging to a feature
type that is linked to a root feature type via feature chaining.
In more detail, purpose of this class is to store:
- the sequence of nested attribute mappings describing how from top to bottom in the feature types chain
- the path of the attribute, relative to the last linked feature type in the chain (except when the last chaining is done by reference, in which case the path refers to the second last feature type)
- Author:
- Stefano Costa, GeoSolutions
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new link in the feature types chain.int
Gets the size of the feature types chain.Gets the path of the feature chained attribute.Returns the list of links in the feature types chain.Returns the feature type where the mapping configuration of the nested attribute is defined.Gets the first link in the feature types chain.Gets the last link in the feature types chain.getLink
(int linkIdx) Gets a link in the feature types chain by its index.boolean
Checks whether all nested attribute mappings are instances ofJoiningNestedAttributeMapping
.void
setAttributePath
(XPathUtil.StepList attributePath) Sets the path of the feature chained attribute.Perform a shallow copy of thisFeatureChainedAttributeVisitor.FeatureChainedAttributeDescriptor
instance.
-
Method Details
-
getFeatureChain
Returns the list of links in the feature types chain.- Returns:
- a copy of the internal feature chain links list
-
addLink
Adds a new link in the feature types chain.- Parameters:
chainLink
- the link to add
-
getLink
Gets a link in the feature types chain by its index.- Parameters:
linkIdx
- the link index (0-based)- Returns:
- the feature chain link corresponding to the provided index
- Throws:
IllegalArgumentException
- iflinkIdx
is negativeIndexOutOfBoundsException
- iflinkIdx
is >= than the chain size
-
getFirstLink
Gets the first link in the feature types chain.- Returns:
- the first feature chain link
- Throws:
IndexOutOfBoundsException
- if the feature types chain is empty
-
getLastLink
Gets the last link in the feature types chain.- Returns:
- the last feature chain link
- Throws:
IndexOutOfBoundsException
- if the feature types chain is empty
-
isJoiningEnabled
public boolean isJoiningEnabled()Checks whether all nested attribute mappings are instances ofJoiningNestedAttributeMapping
.- Returns:
true
if all nested attribute mappings in the chain support joining,false
otherwise
-
chainSize
public int chainSize()Gets the size of the feature types chain.- Returns:
- the number of links in the chain
-
getAttributePath
Gets the path of the feature chained attribute.- Returns:
- the attribute path
-
setAttributePath
Sets the path of the feature chained attribute.- Parameters:
attributePath
- the attribute path to set
-
getFeatureTypeOwningAttribute
Returns the feature type where the mapping configuration of the nested attribute is defined.In practice, this is the last linked feature type in the chain, except when the last chaining is done by reference (via an xlink:href attribute), in which case the second last feature type is returned.
-
shallowCopy
Perform a shallow copy of thisFeatureChainedAttributeVisitor.FeatureChainedAttributeDescriptor
instance.- Returns:
- a shallow copy of the instance
-