org.apache.directory.shared.ldap.schema.syntax.parser
Class AbstractSchemaParser

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.syntax.parser.AbstractSchemaParser
Direct Known Subclasses:
AttributeTypeDescriptionSchemaParser, ComparatorDescriptionSchemaParser, DITContentRuleDescriptionSchemaParser, DITStructureRuleDescriptionSchemaParser, LdapSyntaxDescriptionSchemaParser, MatchingRuleDescriptionSchemaParser, MatchingRuleUseDescriptionSchemaParser, NameFormDescriptionSchemaParser, NormalizerDescriptionSchemaParser, ObjectClassDescriptionSchemaParser, OpenLdapSchemaParser, SyntaxCheckerDescriptionSchemaParser

public abstract class AbstractSchemaParser
extends java.lang.Object

TODO AbstractSchemaParser.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
protected  ReusableAntlrSchemaLexer lexer
          the antlr generated lexer being wrapped
protected  ParserMonitor monitor
          the monitor to use for this parser
protected  ReusableAntlrSchemaParser parser
          the antlr generated parser being wrapped
 
Constructor Summary
protected AbstractSchemaParser()
           
 
Method Summary
 boolean isQuirksMode()
          Checks if quirks mode is enabled.
abstract  AbstractSchemaDescription parse(java.lang.String schemaDescription)
           
protected  void reset(java.lang.String spec)
          Initializes the plumbing by creating a pipe and coupling the parser/lexer pair with it.
 void setParserMonitor(ParserMonitor monitor)
          Sets the parser monitor.
 void setQuirksMode(boolean enabled)
          Sets the quirks mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

monitor

protected ParserMonitor monitor
the monitor to use for this parser


parser

protected ReusableAntlrSchemaParser parser
the antlr generated parser being wrapped


lexer

protected ReusableAntlrSchemaLexer lexer
the antlr generated lexer being wrapped

Constructor Detail

AbstractSchemaParser

protected AbstractSchemaParser()
Method Detail

reset

protected void reset(java.lang.String spec)
Initializes the plumbing by creating a pipe and coupling the parser/lexer pair with it. param spec the specification to be parsed


setParserMonitor

public void setParserMonitor(ParserMonitor monitor)
Sets the parser monitor.

Parameters:
monitor - the new parser monitor

setQuirksMode

public void setQuirksMode(boolean enabled)
Sets the quirks mode. If enabled the parser accepts non-numeric OIDs and some special characters in descriptions.

Parameters:
enabled - the new quirks mode

isQuirksMode

public boolean isQuirksMode()
Checks if quirks mode is enabled.

Returns:
true, if is quirks mode is enabled

parse

public abstract AbstractSchemaDescription parse(java.lang.String schemaDescription)
                                         throws java.text.ParseException
Throws:
java.text.ParseException


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