public abstract class AbstractSchemaParser extends Object
Modifier and Type | Field and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractSchemaParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
isQuirksMode()
Checks if quirks mode is enabled.
|
abstract SchemaObject |
parse(String schemaDescription)
Parse a SchemaObject description and returns back an instance of SchemaObject.
|
protected void |
reset(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.
|
protected void |
setSchemaName(SchemaObject schemaObject)
Update the schemaName for this SchemaObject, accordingly to the X-SCHEMA parameter.
|
protected ParserMonitor monitor
protected ReusableAntlrSchemaParser parser
protected ReusableAntlrSchemaLexer lexer
protected void reset(String spec)
public void setParserMonitor(ParserMonitor monitor)
monitor
- the new parser monitorpublic void setQuirksMode(boolean enabled)
enabled
- the new quirks modepublic boolean isQuirksMode()
public abstract SchemaObject parse(String schemaDescription) throws ParseException
schemaDescription
- The SchemaObject descriptionParseException
- If the parsing failedprotected void setSchemaName(SchemaObject schemaObject)
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.