|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.msv.reader.util.GrammarLoader
loads any supported grammar (except XML DTD) by automatically detecting the schema language.
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 | |
GrammarReaderController |
getController()
|
ExpressionPool |
getPool()
|
javax.xml.parsers.SAXParserFactory |
getSAXParserFactory()
|
static Grammar |
loadSchema(InputSource source)
|
static Grammar |
loadSchema(InputSource source,
GrammarReaderController controller,
javax.xml.parsers.SAXParserFactory factory)
|
static Grammar |
loadSchema(String url)
parses the specified schema and returns the result as a Grammar object. |
static Grammar |
loadSchema(String source,
GrammarReaderController controller)
returns a thread-safe AGM object, depending on the language used. |
static Grammar |
loadSchema(String url,
GrammarReaderController controller,
javax.xml.parsers.SAXParserFactory factory)
parses the specified schema and returns the result as a Grammar object. |
static REDocumentDeclaration |
loadVGM(InputSource source)
|
static REDocumentDeclaration |
loadVGM(InputSource source,
GrammarReaderController controller,
javax.xml.parsers.SAXParserFactory factory)
|
static REDocumentDeclaration |
loadVGM(String url)
parses the specified schema and returns the result as a VGM. |
static REDocumentDeclaration |
loadVGM(String url,
GrammarReaderController controller,
javax.xml.parsers.SAXParserFactory factory)
parses the specified schema and returns the result as a VGM. |
Grammar |
parse(InputSource source)
|
Grammar |
parse(String url)
|
REDocumentDeclaration |
parseVGM(InputSource source)
|
REDocumentDeclaration |
parseVGM(String url)
|
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(javax.xml.parsers.SAXParserFactory factory)
sets the factory object which is used to create XML parsers to parse schema files. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GrammarLoader()
Method Detail |
public static REDocumentDeclaration loadVGM(String url, GrammarReaderController controller, javax.xml.parsers.SAXParserFactory factory) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static REDocumentDeclaration loadVGM(InputSource source, GrammarReaderController controller, javax.xml.parsers.SAXParserFactory factory) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static REDocumentDeclaration loadVGM(String url) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static REDocumentDeclaration loadVGM(InputSource source) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static Grammar loadSchema(String url, GrammarReaderController controller, javax.xml.parsers.SAXParserFactory factory) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static Grammar loadSchema(InputSource source, GrammarReaderController controller, javax.xml.parsers.SAXParserFactory factory) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static Grammar loadSchema(String source, GrammarReaderController controller) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static Grammar loadSchema(String url) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public static Grammar loadSchema(InputSource source) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public void setSAXParserFactory(javax.xml.parsers.SAXParserFactory factory)
If no SAXParserFactory is set, then the default parser is used. (The parser that can be obtained by SAXParserFactory.newInstance()).
public javax.xml.parsers.SAXParserFactory getSAXParserFactory()
public void setController(GrammarReaderController controller)
public GrammarReaderController getController()
public void setPool(ExpressionPool pool)
public ExpressionPool getPool()
public Grammar parse(InputSource source) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public Grammar parse(String url) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public REDocumentDeclaration parseVGM(String url) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
public REDocumentDeclaration parseVGM(InputSource source) throws SAXException, javax.xml.parsers.ParserConfigurationException, IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |