org.plasma.query.collector
Interface Selection

All Known Implementing Classes:
SelectionCollector

public interface Selection

A selection provides access to a query graph with operations useful for service implementors, providing property names for a given Type but also operations which return the selected properties at a given (query) graph level, and for a given source edge Type. All properties are returned as a Set and implementations will typically return a HashSet.

Since:
1.1.4
Author:
Scott Cinnamond
See Also:
Select, Type, Property

Method Summary
 java.util.List<Type> addProperty(Type rootType, java.lang.String path)
          Adds the given given property to the selection for the given graph root type and returns any types collected during traversal of the property path.
 java.util.Set<Property> getInheritedProperties(Type type)
          Returns the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, irrespective of the (query) graph level.
 java.util.Set<Property> getInheritedProperties(Type type, int level)
          Returns the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, for the given (query) graph level.
 java.util.Set<Property> getInheritedProperties(Type type, Property sourceProperty)
          Returns the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property.
 java.util.Set<Property> getInheritedProperties(Type type, Property sourceProperty, int level)
          Returns the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property at the given traversal level or graph depth.
 java.util.List<Type> getInheritedTypes()
          Returns all selected types and as well as types which specialize or inherit from the selected types.
 Where getPredicate(Property property)
          Returns the predicate for the given property or null if the given property is not mapped.
 java.util.Set<Property> getProperties(Type type)
          Returns the unique set of data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.
 java.util.Set<Property> getProperties(Type type, int level)
          Returns the unique set of data and reference properties collected for the given Type for the given (query) graph level.
 java.util.Set<Property> getProperties(Type type, Property sourceProperty)
          Returns the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property.
 java.util.Set<Property> getProperties(Type type, Property sourceProperty, int level)
          Returns the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property at the given traversal level or graph depth.
 java.util.Set<Property> getSingularProperties(Type type)
          Returns the unique set of singular data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.
 java.util.List<Type> getTypes()
          Returns all selected types.
 boolean hasInheritedProperty(Type type, Property property)
          Returns true if the given type is found in the inherited type selection and if the given property is found in the property selection for the given type.
 boolean hasInheritedType(Type type)
          Returns true if the given type is found in the inherited type selection.
 boolean hasPredicates()
          Returns true if the selection has path predicates.
 boolean hasProperty(Type type, Property property)
          Returns true if the given type is found in the type selection and if the given property is found in the property selection for the given type.
 boolean hasType(Type type)
          Returns true if the given type is found in the type selection.
 

Method Detail

getTypes

java.util.List<Type> getTypes()
Returns all selected types.

Returns:
all selected types.

hasType

boolean hasType(Type type)
Returns true if the given type is found in the type selection.

Parameters:
type - the type
Returns:
true if the given type is found in the type selection.

getInheritedTypes

java.util.List<Type> getInheritedTypes()
Returns all selected types and as well as types which specialize or inherit from the selected types.

Returns:
all selected types and as well as types which specialize or inherit from the selected types.

hasInheritedType

boolean hasInheritedType(Type type)
Returns true if the given type is found in the inherited type selection.

Parameters:
type - the type
Returns:
true if the given type is found in the inherited type selection.

hasProperty

boolean hasProperty(Type type,
                    Property property)
Returns true if the given type is found in the type selection and if the given property is found in the property selection for the given type.

Parameters:
type - the type
property - the property
Returns:
true if the given type is found in the type selection and if the given property is found in the property selection for the given type.

hasInheritedProperty

boolean hasInheritedProperty(Type type,
                             Property property)
Returns true if the given type is found in the inherited type selection and if the given property is found in the property selection for the given type.

Parameters:
type - the type
property - the property
Returns:
true if the given type is found in the inherited type selection and if the given property is found in the property selection for the given type.

addProperty

java.util.List<Type> addProperty(Type rootType,
                                 java.lang.String path)
Adds the given given property to the selection for the given graph root type and returns any types collected during traversal of the property path.

Parameters:
rootType - the graph root type
path - the SDO XPath specifying a path from the given root type to a target or endpoint property
Returns:
any types collected during traversal of the property path.

getProperties

java.util.Set<Property> getProperties(Type type)
Returns the unique set of data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.

Parameters:
type - the type
Returns:
the unique set of data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.

getSingularProperties

java.util.Set<Property> getSingularProperties(Type type)
Returns the unique set of singular data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.

Parameters:
type - the type
Returns:
the unique set of singular data and reference properties collected for the given type irrespective of the (query) graph level, or source graph edge type.

getInheritedProperties

java.util.Set<Property> getInheritedProperties(Type type)
Returns the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, irrespective of the (query) graph level. of the given type

Parameters:
type - the type
Returns:
the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, irrespective of the (query) graph level

getInheritedProperties

java.util.Set<Property> getInheritedProperties(Type type,
                                               int level)
Returns the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, for the given (query) graph level.

Parameters:
type - the type
level - the specific graph level where the properties were specified in the selection
Returns:
the unique set of inherited data and reference properties collected for the given type, and any base types of the given type, irrespective of the (query) graph level

getInheritedProperties

java.util.Set<Property> getInheritedProperties(Type type,
                                               Property sourceProperty)
Returns the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property.

Parameters:
type - the type (query) graph edge source property
sourceProperty - the
level - the specific graph level where the properties were specified in the selection
Returns:
the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property.

getInheritedProperties

java.util.Set<Property> getInheritedProperties(Type type,
                                               Property sourceProperty,
                                               int level)
Returns the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property at the given traversal level or graph depth.

Parameters:
type - the type (query) graph edge source property
sourceProperty - the
level - the traversal level or graph depth
Returns:
the unique set of inherited data and reference properties collected for the given Type for the given (query) graph edge source property.

getProperties

java.util.Set<Property> getProperties(Type type,
                                      int level)
Returns the unique set of data and reference properties collected for the given Type for the given (query) graph level.

Parameters:
type - the type
level - the specific graph level where the properties were specified in the selection
Returns:
the unique set of data and reference properties collected for the given type for the given (query) graph level.

getProperties

java.util.Set<Property> getProperties(Type type,
                                      Property sourceProperty)
Returns the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property.

Parameters:
type - the type (query) graph edge source property
sourceProperty - the
level - the specific graph level where the properties were specified in the selection
Returns:
the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property.

getProperties

java.util.Set<Property> getProperties(Type type,
                                      Property sourceProperty,
                                      int level)
Returns the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property at the given traversal level or graph depth.

Parameters:
type - the type (query) graph edge source property
sourceProperty - the
level - the traversal level or graph depth
Returns:
the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property.

hasPredicates

boolean hasPredicates()
Returns true if the selection has path predicates.

Returns:
true if the selection has path predicates.

getPredicate

Where getPredicate(Property property)
Returns the predicate for the given property or null if the given property is not mapped.

Parameters:
property - the property
Returns:
the predicate for the given property or null if the given property is not mapped.


Copyright © 2013. All Rights Reserved.