org.apache.directory.shared.ldap.subtree
Class SubtreeSpecificationParser

java.lang.Object
  extended byorg.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser

public class SubtreeSpecificationParser
extends java.lang.Object

A reusable wrapper around the antlr generated parser for an LDAP subtree specification as defined by RFC 3672. This class enables the reuse of the antlr parser/lexer pair without having to recreate the pair every time.

Version:
$Rev: 379008 $
Author:
Apache Directory Project
See Also:
RFC 3672

Constructor Summary
SubtreeSpecificationParser()
          Creates a subtree specification parser.
SubtreeSpecificationParser(NameComponentNormalizer normalizer)
          Creates a normalizing subtree specification parser.
 
Method Summary
 boolean isNormizing()
          Tests to see if this parser is normalizing.
 SubtreeSpecification parse(java.lang.String spec)
          Parses a subtree specification without exhausting the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtreeSpecificationParser

public SubtreeSpecificationParser()
Creates a subtree specification parser.


SubtreeSpecificationParser

public SubtreeSpecificationParser(NameComponentNormalizer normalizer)
Creates a normalizing subtree specification parser.

Method Detail

parse

public SubtreeSpecification parse(java.lang.String spec)
                           throws java.text.ParseException
Parses a subtree specification without exhausting the parser.

Parameters:
spec - the specification to be parsed
Returns:
the specification bean
Throws:
java.text.ParseException - if there are any recognition errors (bad syntax)

isNormizing

public boolean isNormizing()
Tests to see if this parser is normalizing.

Returns:
true if it normalizes false otherwise


Copyright © 2003-2006 . All Rights Reserved.