Package org.geotools.data.complex.filter
Class FeatureChainedAttributeVisitor.FeatureChainLink
- Object
-
- FeatureChainLink
-
- Enclosing class:
- FeatureChainedAttributeVisitor
public static class FeatureChainedAttributeVisitor.FeatureChainLink extends Object
Represents a single link in the "chain" of feature types that need to be linked to go from the root type to a nested attribute.The class is
public
as its purpose is to convey information to clients, but instantiation and manipulation of its internal state isprivate
.- Author:
- Stefano Costa, GeoSolutions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlias()
Unique identifier of a link in the chain; mainly useful when SQL encoding the feature chained attribute.FeatureTypeMapping
getFeatureTypeMapping()
Gets the mapping configuration of the linked feature type.NestedAttributeMapping
getNestedFeatureAttribute()
Gets the mapping configuration of the attribute holding the next nested feature in the chain.<T extends NestedAttributeMapping>
TgetNestedFeatureAttribute(Class<T> attributeMappingClass)
Gets the mapping configuration of the attribute holding the next nested feature in the chain, cast to the specifiedNestedAttributeMapping
subclass.boolean
hasNestedFeature()
Returnstrue
if this link refers to a nested feature type which in turn contains another nested feature.boolean
isChainingByReference()
Returnstrue
if thisFeatureChainedAttributeVisitor.FeatureChainLink
instance represents a chaining-by-reference mapping, i.e. nested feature is not fully encoded inline, onlyxlink:href
attribute is set.boolean
isJoiningNestedMapping()
Returnstrue
if joining support is enabled for the nested attribute mapping.FeatureChainedAttributeVisitor.FeatureChainLink
next()
Returns the next link in the chain.FeatureChainedAttributeVisitor.FeatureChainLink
previous()
Returns the previous link in the chain.
-
-
-
Method Detail
-
getFeatureTypeMapping
public FeatureTypeMapping getFeatureTypeMapping()
Gets the mapping configuration of the linked feature type.- Returns:
- the linked feature type mapping
-
getNestedFeatureAttribute
public NestedAttributeMapping getNestedFeatureAttribute()
Gets the mapping configuration of the attribute holding the next nested feature in the chain.- Returns:
- the nested attribute mapping, or
null
if there are no more nested features in the chain
-
getNestedFeatureAttribute
public <T extends NestedAttributeMapping> T getNestedFeatureAttribute(Class<T> attributeMappingClass)
Gets the mapping configuration of the attribute holding the next nested feature in the chain, cast to the specifiedNestedAttributeMapping
subclass.- Parameters:
attributeMappingClass
- theNestedAttributeMapping
subclass to cast to- See Also:
getNestedFeatureAttribute()
-
isChainingByReference
public boolean isChainingByReference()
Returnstrue
if thisFeatureChainedAttributeVisitor.FeatureChainLink
instance represents a chaining-by-reference mapping, i.e. nested feature is not fully encoded inline, onlyxlink:href
attribute is set.- Returns:
true
if this is chaining by reference,false
otherwise
-
isJoiningNestedMapping
public boolean isJoiningNestedMapping()
Returnstrue
if joining support is enabled for the nested attribute mapping.- Returns:
true
if joining support is enabled for this chain link,false
otherwise
-
hasNestedFeature
public boolean hasNestedFeature()
Returnstrue
if this link refers to a nested feature type which in turn contains another nested feature.- Returns:
true
if there is another nested feature in the chain,false
otherwise
-
getAlias
public String getAlias()
Unique identifier of a link in the chain; mainly useful when SQL encoding the feature chained attribute.- Returns:
- a unique identifier of the link
-
next
public FeatureChainedAttributeVisitor.FeatureChainLink next()
Returns the next link in the chain.- Returns:
- the next link, or
null
if none exists
-
previous
public FeatureChainedAttributeVisitor.FeatureChainLink previous()
Returns the previous link in the chain.- Returns:
- the previous link, or
null
if none exists
-
-