org.apache.directory.shared.ldap.filter
Class AssertionNode

java.lang.Object
  extended byorg.apache.directory.shared.ldap.filter.AbstractExprNode
      extended byorg.apache.directory.shared.ldap.filter.AssertionNode
All Implemented Interfaces:
ExprNode

public class AssertionNode
extends AbstractExprNode

Node used for the application of arbitrary predicates on return candidates. Applies dynamic and programatic criteria for the selection of candidates for return. Nodes of this type may be introduced into the filter expression to provided the opportunity to constrain the search further without altering the search algorithm.

Version:
$Revision: 379008 $
Author:
Alex Karasulu, $author$

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
AND, APPROXIMATE, ASSERTION, EQUALITY, EXTENSIBLE, GREATEREQ, LESSEQ, NOT, OR, PRESENCE, SCOPE, SUBSTRING
 
Constructor Summary
AssertionNode(Assertion a_assertion)
          Creates an AssertionNode using an arbitrary candidate assertion.
AssertionNode(Assertion a_assertion, java.lang.String a_desc)
          Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.
 
Method Summary
 void accept(FilterVisitor a_visitor)
          Element/node accept method for visitor pattern.
 Assertion getAssertion()
          Gets the Assertion used by this assertion node.
 boolean isLeaf()
          Always returns true since an AssertionNode has no children.
 java.lang.StringBuffer printToBuffer(java.lang.StringBuffer a_buf)
          Recursively appends this String representation of this node and its descendents in prefix notation to a buffer.
 
Methods inherited from class org.apache.directory.shared.ldap.filter.AbstractExprNode
equals, get, getAnnotations, getAssertionType, getOperationString, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertionNode

public AssertionNode(Assertion a_assertion)
Creates an AssertionNode using an arbitrary candidate assertion.

Parameters:
a_assertion - the arbitrary selection logic.

AssertionNode

public AssertionNode(Assertion a_assertion,
                     java.lang.String a_desc)
Creates an AssertionNode using an arbitrary candidate assertion with a descriptions used for filter AST walker dumps.

Parameters:
a_assertion - the arbitrary selection logic.
a_desc - the printout representation for filter prints.
Method Detail

getAssertion

public Assertion getAssertion()
Gets the Assertion used by this assertion node.

Returns:
the assertion used by this node

isLeaf

public boolean isLeaf()
Always returns true since an AssertionNode has no children.

Returns:
true if the node is a leaf,false otherwise
See Also:
ExprNode.isLeaf()

printToBuffer

public java.lang.StringBuffer printToBuffer(java.lang.StringBuffer a_buf)
Description copied from interface: ExprNode
Recursively appends this String representation of this node and its descendents in prefix notation to a buffer.

Parameters:
a_buf - the buffer to append to.
See Also:
ExprNode.printToBuffer(java.lang.StringBuffer)

accept

public void accept(FilterVisitor a_visitor)
Description copied from interface: ExprNode
Element/node accept method for visitor pattern.

Parameters:
a_visitor - the filter expression tree structure visitor
See Also:
ExprNode.accept( org.apache.directory.shared.ldap.filter.FilterVisitor)


Copyright © 2003-2006 . All Rights Reserved.