All LDAP Classes
Internal LDAP Classes

com.novell.ldap.rfc2251
Class RfcFilter.FilterTokenizer

java.lang.Object
  extended by com.novell.ldap.rfc2251.RfcFilter.FilterTokenizer
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
RfcFilter

 class RfcFilter.FilterTokenizer
extends java.lang.Object
implements java.io.Serializable

This inner class will tokenize the components of an RFC 2254 search filter.


Field Summary
private  java.lang.String attr
           
private  java.lang.String filter
           
private  int filterLength
           
private  int offset
           
 
Constructor Summary
RfcFilter.FilterTokenizer(java.lang.String filter)
          Constructs a FilterTokenizer for a filter.
 
Method Summary
 java.lang.String getAttr()
          Returns the current attribute identifier.
 int getFilterType()
          Reads an RFC 2251 filter type from the filter string and returns its int value.
 void getLeftParen()
          Reads the current char and throws an Exception if it is not a left parenthesis.
 int getOpOrAttr()
          Reads either an operator, or an attribute, whichever is next in the filter string.
 void getRightParen()
          Reads the current char and throws an Exception if it is not a right parenthesis.
 java.lang.String getValue()
          Reads a value from a filter string.
 char peekChar()
          Return the current char without advancing the offset pointer.
private  void readObject(java.io.ObjectInputStream objectIStrm)
          Reads the serialized object from the underlying input stream.
private  void writeObject(java.io.ObjectOutputStream objectOStrm)
          Writes the object state to a stream in standard Default Binary format This function wraps ObjectOutputStream' s defaultWriteObject() to write the non-static and non-transient fields of the current class to the stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter

private java.lang.String filter

attr

private java.lang.String attr

offset

private int offset

filterLength

private int filterLength
Constructor Detail

RfcFilter.FilterTokenizer

public RfcFilter.FilterTokenizer(java.lang.String filter)
Constructs a FilterTokenizer for a filter.

Method Detail

getLeftParen

public final void getLeftParen()
                        throws LDAPException
Reads the current char and throws an Exception if it is not a left parenthesis.

Throws:
LDAPException

getRightParen

public final void getRightParen()
                         throws LDAPException
Reads the current char and throws an Exception if it is not a right parenthesis.

Throws:
LDAPException

getOpOrAttr

public final int getOpOrAttr()
                      throws LDAPException
Reads either an operator, or an attribute, whichever is next in the filter string.

Operators are &, |, or !.

If the next component is an attribute, it is read and stored in the attr field of this class which may be retrieved with getAttr() and a -1 is returned. Otherwise, the int value of the operator read is returned.

Throws:
LDAPException

getFilterType

public final int getFilterType()
                        throws LDAPException
Reads an RFC 2251 filter type from the filter string and returns its int value.

Throws:
LDAPException

getValue

public final java.lang.String getValue()
                                throws LDAPException
Reads a value from a filter string.

Throws:
LDAPException

getAttr

public final java.lang.String getAttr()
Returns the current attribute identifier.


peekChar

public final char peekChar()
                    throws LDAPException
Return the current char without advancing the offset pointer. This is used by ParseFilterList when determining if there are any more Filters in the list.

Throws:
LDAPException

writeObject

private void writeObject(java.io.ObjectOutputStream objectOStrm)
                  throws java.io.IOException
Writes the object state to a stream in standard Default Binary format This function wraps ObjectOutputStream' s defaultWriteObject() to write the non-static and non-transient fields of the current class to the stream

Parameters:
objectOStrm - The OutputSteam where the Object need to be written
Throws:
java.io.IOException

readObject

private void readObject(java.io.ObjectInputStream objectIStrm)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Reads the serialized object from the underlying input stream. This function wraps ObjectInputStream's defaultReadObject() function

Parameters:
objectIStrm - InputStream used to recover those objects previously serialized.
Throws:
java.io.IOException
java.lang.ClassNotFoundException

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000