org.modeshape.graph.query.process
Interface SelectComponent.Analyzer

Enclosing class:
SelectComponent

public static interface SelectComponent.Analyzer

Inteface for criteria evaluation operations that cannot be defined efficiently, correctly, or completely using only the tuple values.

See Also:
SelectComponent.SelectComponent(ProcessingComponent, Constraint, Map, Analyzer)

Method Summary
 double hasFullText(Location location, String fullTextQuery)
          Determine whether the node at the supplied location satisfies the supplied full-text query.
 double hasFullText(Location location, String propertyName, String fullTextQuery)
          Determine whether the named property of the node at the supplied location satisfies the supplied full-text query.
 boolean hasProperty(Location location, String propertyName)
          Determine whether the node at the supplied location has the named property.
 boolean isDescendantOf(Location location, String ancestorPath)
          Determine whether the node specified by the location is a descendant of that supplied by the path.
 boolean isSameNode(Location location, String accessibleAtPath)
          Determine whether the node specified by the location is the same node as that supplied by the path.
 int length(Object value)
           
 

Method Detail

length

int length(Object value)

isSameNode

boolean isSameNode(Location location,
                   String accessibleAtPath)
Determine whether the node specified by the location is the same node as that supplied by the path. This determines if the nodes at the supplied location and path are the same node.

Parameters:
location - the location of the node; never null
accessibleAtPath - the path that the node can be accessed via
Returns:
true if the node given by the Location is also accessible at the supplied path, or false otherwise

isDescendantOf

boolean isDescendantOf(Location location,
                       String ancestorPath)
Determine whether the node specified by the location is a descendant of that supplied by the path.

Parameters:
location - the location of the node; never null
ancestorPath - the path of the ancestor node
Returns:
true if the node given by the Location is also accessible at the supplied path, or false otherwise

hasProperty

boolean hasProperty(Location location,
                    String propertyName)
Determine whether the node at the supplied location has the named property.

Parameters:
location - the location of the node; never null
propertyName - the name of the property
Returns:
true if the node at the supplied Location does contain the property, or false if it does not

hasFullText

double hasFullText(Location location,
                   String fullTextQuery)
Determine whether the node at the supplied location satisfies the supplied full-text query.

Parameters:
location - the location of the node; never null
fullTextQuery - the full-text search expression; never null
Returns:
the full-text search score of the node, or 0.0d if the node does not satisfy the full-text query

hasFullText

double hasFullText(Location location,
                   String propertyName,
                   String fullTextQuery)
Determine whether the named property of the node at the supplied location satisfies the supplied full-text query.

Parameters:
location - the location of the node; never null
propertyName - the name of the property; never null
fullTextQuery - the full-text search expression; never null
Returns:
the full-text search score of the node, or 0.0d if the node does not satisfy the full-text query


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.