org.modeshape.graph.query.model
Class DescendantNode

java.lang.Object
  extended by org.modeshape.graph.query.model.Constraint
      extended by org.modeshape.graph.query.model.DescendantNode
All Implemented Interfaces:
Serializable, LanguageObject, Visitable

@Immutable
public class DescendantNode
extends Constraint

A constraint requiring that the selected node is a descendant of the node reachable by the supplied absolute path

See Also:
Serialized Form

Constructor Summary
DescendantNode(SelectorName selectorName, String ancestorPath)
          Create a constraint requiring that the node identified by the selector is a descendant of the node reachable by the supplied absolute path.
 
Method Summary
 void accept(Visitor visitor)
          Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
 boolean equals(Object obj)
          
 String getAncestorPath()
          Get the path of the node that is to be the ancestor of the target node.
 SelectorName getSelectorName()
          Get the name of the selector for the node.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescendantNode

public DescendantNode(SelectorName selectorName,
                      String ancestorPath)
Create a constraint requiring that the node identified by the selector is a descendant of the node reachable by the supplied absolute path.

Parameters:
selectorName - the name of the selector
ancestorPath - the absolute path to the ancestor
Method Detail

getSelectorName

public final SelectorName getSelectorName()
Get the name of the selector for the node.

Returns:
the selector name; never null

getAncestorPath

public final String getAncestorPath()
Get the path of the node that is to be the ancestor of the target node.

Returns:
the path of the ancestor node; never null

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

accept

public void accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.

Parameters:
visitor - the visitor; never null
See Also:
Visitable.accept(org.modeshape.graph.query.model.Visitor)


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