com.sun.msv.reader.util
public class GrammarLoader extends Object
The static version of loadVGM/loadSchema methods provides simple ways to load a grammar.
Another way to use GrammarLoader is
Constructor Summary | |
---|---|
GrammarLoader() |
Method Summary | |
---|---|
Controller | getController() |
ExpressionPool | getPool() |
SAXParserFactory | getSAXParserFactory() |
boolean | getStrictCheck() |
static Grammar | loadSchema(String url, GrammarReaderController controller, SAXParserFactory factory)
parses the specified schema and returns the result as a Grammar object.
|
static Grammar | loadSchema(InputSource source, GrammarReaderController controller, SAXParserFactory factory) |
static Grammar | loadSchema(String source, GrammarReaderController controller)
returns a thread-safe AGM object, depending on the language used. |
static Grammar | loadSchema(InputSource source, GrammarReaderController controller)
returns a thread-safe AGM object, depending on the language used. |
static Grammar | loadSchema(String url)
parses the specified schema and returns the result as a Grammar object.
|
static Grammar | loadSchema(InputSource source) |
static REDocumentDeclaration | loadVGM(String url, GrammarReaderController controller, SAXParserFactory factory)
parses the specified schema and returns the result as a VGM.
|
static REDocumentDeclaration | loadVGM(InputSource source, GrammarReaderController controller, SAXParserFactory factory) |
static REDocumentDeclaration | loadVGM(String url)
parses the specified schema and returns the result as a VGM.
|
static REDocumentDeclaration | loadVGM(InputSource source) |
Grammar | parse(InputSource source) |
Grammar | parse(String url) |
REDocumentDeclaration | parseVGM(String url) |
REDocumentDeclaration | parseVGM(InputSource source) |
void | setController(GrammarReaderController controller)
sets the GrammarReaderController object that will control
various aspects of the parsing. |
void | setPool(ExpressionPool pool)
Sets the ExpressionPool object that will be used during the loading process.
|
void | setSAXParserFactory(SAXParserFactory factory)
sets the factory object which is used to create XML parsers
to parse schema files.
|
void | setStrictCheck(boolean value)
Sets the strict check flag. |
Returns: null if there was an error in the grammar.
Returns: a non-null valid Grammar.
Returns: null if there was an error in the grammar.
Returns: non-null valid VGM object.
If no SAXParserFactory is set, then the default parser is used. (The parser that can be obtained by SAXParserFactory.newInstance()).
When this flag is set to false, which is the default, the reader may accept incorrect schemas.