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
 List<Type> addProperty(Type rootType, 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.
 List<Function> getFunctions(Property property)
          Returns the functions for the given property or empty list if the given property has no functions.
 List<Function> getFunctions(Property property, int level)
          Returns the functions for the given property for the given traversal level or graph depth, or empty list if the given property has no functions.
 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.
 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.
 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.
 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.
 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 has no predicates.
 Where getPredicate(Property property, int level)
          Returns the predicate , if exists, collected for the given property for the given traversal level or graph depth.
 Where getPredicate(Property property, Property sourceProperty)
          Returns the predicate, if exists, collected for the given property and for the given (query) graph edge source property.
 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.
 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.
 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.
 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.
 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.
 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

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

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

List<Type> addProperty(Type rootType,
                       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

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

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

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

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

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

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

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

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 (query) graph edge source property
Returns:
the unique set of data and reference properties collected for the given Type for the given (query) graph edge source property.

getProperties

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 (query) graph edge source property
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 has no predicates.

Parameters:
property - the property
Returns:
the predicate for the given property or null if the given property has no predicates.

getPredicate

Where getPredicate(Property property,
                   Property sourceProperty)
Returns the predicate, if exists, collected for the given property and for the given (query) graph edge source property.

Parameters:
property - the source property
sourceProperty - the (query) graph edge source property
Returns:
the predicate, if exists

getPredicate

Where getPredicate(Property property,
                   int level)
Returns the predicate , if exists, collected for the given property for 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 predicate, if exists

getFunctions

List<Function> getFunctions(Property property)
Returns the functions for the given property or empty list if the given property has no functions.

Parameters:
property - the property
Returns:
the predicate for the given property or empty list if the given property has no functions.

getFunctions

List<Function> getFunctions(Property property,
                            int level)
Returns the functions for the given property for the given traversal level or graph depth, or empty list if the given property has no functions.

Parameters:
property - the property
level - the traversal level or graph depth
Returns:
the predicate for the given property for the given traversal level or graph depth, or empty list if the given property has no functions.


Copyright © 2014. All rights reserved.