Class SubtreeSpecificationParser
- java.lang.Object
-
- org.apache.directory.api.ldap.model.subtree.SubtreeSpecificationParser
-
public class SubtreeSpecificationParser extends 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.- Author:
- Apache Directory Project
- See Also:
- RFC 3672
-
-
Constructor Summary
Constructors Constructor Description SubtreeSpecificationParser(NormalizerMappingResolver resolver, SchemaManager schemaManager)
Creates a normalizing subtree specification parser.SubtreeSpecificationParser(SchemaManager schemaManager)
Creates a subtree specification parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isNormizing()
Tests to see if this parser is normalizing.SubtreeSpecification
parse(String spec)
Parses a subtree specification without exhausting the parser.
-
-
-
Constructor Detail
-
SubtreeSpecificationParser
public SubtreeSpecificationParser(SchemaManager schemaManager)
Creates a subtree specification parser.- Parameters:
schemaManager
- The SchemaManager
-
SubtreeSpecificationParser
public SubtreeSpecificationParser(NormalizerMappingResolver resolver, SchemaManager schemaManager)
Creates a normalizing subtree specification parser.- Parameters:
resolver
- The resolver to useschemaManager
- The SchemaManager
-
-
Method Detail
-
parse
public SubtreeSpecification parse(String spec) throws ParseException
Parses a subtree specification without exhausting the parser.- Parameters:
spec
- the specification to be parsed- Returns:
- the specification bean
- Throws:
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
-
-