|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.datastore.PropertyPathResolver
public class PropertyPathResolver
Helper class that resolves PropertyPath
instances (e.g. PropertyName elements in GetFeature
) against
the property structure of MappedFeatureType
s.
Constructor Summary | |
---|---|
PropertyPathResolver()
|
Method Summary | |
---|---|
static java.util.Map<MappedPropertyType,java.util.Collection<PropertyPath>> |
determineFetchProperties(MappedFeatureType ft,
java.lang.String alias,
PropertyPath[] requestedPaths)
Determines the properties of the given feature type that have to be fetched based on the requested property paths. |
static PropertyPath[] |
determineSubPropertyPaths(MappedFeatureType featureType,
java.util.Collection<PropertyPath> propertyPaths)
Determines the sub property paths that are needed to fetch the given property paths for the also given property. |
static PropertyPath |
normalizePropertyPath(MappedFeatureType ft,
java.lang.String alias,
PropertyPath path)
Ensures that the requested property begins with a "feature type step" (this may also be an alias). |
static java.util.List<PropertyPath>[] |
normalizePropertyPaths(MappedFeatureType[] fts,
java.lang.String[] ftAliases,
PropertyPath[] paths)
Ensures that all requested properties begin with a feature type (or alias) step. |
static PropertyPath[] |
normalizePropertyPaths(MappedFeatureType ft,
java.lang.String alias,
PropertyPath[] paths)
Ensures that all requested properties begin with a feature type step or an alias. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyPathResolver()
Method Detail |
---|
public static PropertyPath normalizePropertyPath(MappedFeatureType ft, java.lang.String alias, PropertyPath path)
This is necessary, as section 7.4.2 of the Web Feature Implementation Specification 1.1.0 states:
The first step of a relative location path may correspond to the root element of the feature property
being referenced or to the root element of the feature type with the next step corresponding to the root
element of the feature property being referenced.
ft
- featureType that the requested properties refer toalias
- alias for the feature type (may be null)path
- requested property
public static PropertyPath[] normalizePropertyPaths(MappedFeatureType ft, java.lang.String alias, PropertyPath[] paths)
If no properties are specified at all, a single PropertyPath entry is created that selects the whole feature type.
ft
- feature type that the requested properties refer toalias
- alias for the feature type, may be nullpaths
- requested properties, may not be null
public static java.util.List<PropertyPath>[] normalizePropertyPaths(MappedFeatureType[] fts, java.lang.String[] ftAliases, PropertyPath[] paths) throws PropertyPathResolvingException
If no properties are specified for a feature type, a single PropertyPath
entry is created that selects
the whole feature type.
fts
- feature types that the requested properties refer topaths
- requested properties, may not be null
PropertyPathResolvingException
public static java.util.Map<MappedPropertyType,java.util.Collection<PropertyPath>> determineFetchProperties(MappedFeatureType ft, java.lang.String alias, PropertyPath[] requestedPaths) throws PropertyPathResolvingException
Returns a helper Map
that associates each (requested) property of the feature with the property
paths that request it. Note that the returned helper map may contain more properties than specified. This
behaviour is due to section 9.2 of the Web Feature Implementation Specification 1.1.0:
In the event that a WFS encounters a query that does not select all mandatory properties of a feature, the WFS will internally augment the property name list to include all mandatory property names.
Note that every requested property path must begin with a step that selects the given feature type.
ft
- feature typealias
- alias for the feature type (may be null)requestedPaths
-
Map
, key class: MappedPropertyType
, value class: Collection
(of
PropertyPath
instances)
PropertyPathResolvingException
public static PropertyPath[] determineSubPropertyPaths(MappedFeatureType featureType, java.util.Collection<PropertyPath> propertyPaths)
featureType
- propertyPaths
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org