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

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

public class ScopeNode
extends AbstractExprNode

Node used not to represent an published assertion but an assertion on the scope of the search.

Version:
$Rev: 379008 $
Author:
Apache Directory Project

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
ScopeNode(DerefAliasesEnum derefAliases, java.lang.String baseDn, int scope)
          Creates a new ScopeNode object.
ScopeNode(java.util.Map env, java.lang.String baseDn, int scope)
          Creates a new ScopeNode object.
 
Method Summary
 void accept(FilterVisitor visitor)
          Element/node accept method for visitor pattern.
 java.lang.String getBaseDn()
          Gets the base dn.
 DerefAliasesEnum getDerefAliases()
          Gets the alias dereferencing mode type safe enumeration.
 int getScope()
          Gets the scope constant for this node.
 boolean isLeaf()
          Always returns true since a scope node has no children.
 java.lang.StringBuffer printToBuffer(java.lang.StringBuffer 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

ScopeNode

public ScopeNode(DerefAliasesEnum derefAliases,
                 java.lang.String baseDn,
                 int scope)
Creates a new ScopeNode object.

Parameters:
derefAliases - the alias dereferencing mode
baseDn - the search base
scope - the search scope

ScopeNode

public ScopeNode(java.util.Map env,
                 java.lang.String baseDn,
                 int scope)
Creates a new ScopeNode object.

Parameters:
env - the JNDI environment from which to extract the alias dereferencing mode
baseDn - the search base
scope - the search scope
Method Detail

isLeaf

public boolean isLeaf()
Always returns true since a scope node has no children.

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

getScope

public int getScope()
Gets the scope constant for this node.

Returns:
the scope constant
See Also:
SearchControls.OBJECT_SCOPE, SearchControls.ONELEVEL_SCOPE, SearchControls.SUBTREE_SCOPE

getBaseDn

public java.lang.String getBaseDn()
Gets the base dn.

Returns:
the base dn

getDerefAliases

public DerefAliasesEnum getDerefAliases()
Gets the alias dereferencing mode type safe enumeration.

Returns:
the alias dereferencing enumeration constant.

printToBuffer

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

Parameters:
buf - the buffer to append to.
See Also:
ExprNode.printToBuffer(StringBuffer)

accept

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

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


Copyright © 2003-2006 . All Rights Reserved.