org.apache.directory.shared.ldap.filter
Interface ExprNode

All Known Implementing Classes:
AbstractExprNode, AndNode, ApproximateNode, AssertionNode, BranchNode, EqualityNode, ExtensibleNode, GreaterEqNode, LeafNode, LessEqNode, NotNode, OrNode, PresenceNode, ScopeNode, SimpleNode, SubstringNode

public interface ExprNode

Root expression node interface which all expression nodes in the filter expression tree implement.

Version:
$Revision: 664290 $
Author:
Apache Directory Project

Method Summary
 java.lang.Object accept(FilterVisitor visitor)
          Element/node accept method for visitor pattern.
 java.lang.Object get(java.lang.Object key)
          Gets an annotation on the tree by key.
 AssertionType getAssertionType()
          Gets the assertion type of this node.
 boolean isLeaf()
          Tests to see if this node is a leaf or branch node.
 java.lang.StringBuilder printRefinementToBuffer(java.lang.StringBuilder buf)
          Recursively appends the refinement string representation of this node and its descendants in prefix notation to a buffer.
 void set(java.lang.String key, java.lang.Object value)
          Sets a annotation key to a value.
 

Method Detail

get

java.lang.Object get(java.lang.Object key)
Gets an annotation on the tree by key.

Parameters:
key - the annotation key.
Returns:
the annotation value.

set

void set(java.lang.String key,
         java.lang.Object value)
Sets a annotation key to a value.

Parameters:
key - the annotation key.
value - the annotation value.

isLeaf

boolean isLeaf()
Tests to see if this node is a leaf or branch node.

Returns:
true if the node is a leaf,false otherwise

getAssertionType

AssertionType getAssertionType()
Gets the assertion type of this node. Make it possible to use switch statements on the node type.

Returns:
the assertion type

printRefinementToBuffer

java.lang.StringBuilder printRefinementToBuffer(java.lang.StringBuilder buf)
Recursively appends the refinement string representation of this node and its descendants in prefix notation to a buffer. TODO - Why is this here? Why not put it in some utility class?

Parameters:
buf - the buffer to append to.
Returns:
The buffer in which the refinement has been appended
Throws:
java.lang.UnsupportedOperationException - if this node isn't a part of a refinement.

accept

java.lang.Object accept(FilterVisitor visitor)
Element/node accept method for visitor pattern.

Parameters:
visitor - the filter expression tree structure visitor TODO - what is this modified element ?
Returns:
the modified element


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.