|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.msv.reader.util.GrammarLoader
public class 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 | |
---|---|
Controller |
getController()
|
ExpressionPool |
getPool()
|
SAXParserFactory |
getSAXParserFactory()
|
boolean |
getStrictCheck()
|
static Grammar |
loadSchema(InputSource source)
|
static Grammar |
loadSchema(InputSource source,
GrammarReaderController controller)
returns a thread-safe AGM object, depending on the language used. |
static Grammar |
loadSchema(InputSource source,
GrammarReaderController controller,
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,
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,
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,
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(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. |
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, SAXParserFactory factory) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static REDocumentDeclaration loadVGM(InputSource source, GrammarReaderController controller, SAXParserFactory factory) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static REDocumentDeclaration loadVGM(String url) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static REDocumentDeclaration loadVGM(InputSource source) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(String url, GrammarReaderController controller, SAXParserFactory factory) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(InputSource source, GrammarReaderController controller, SAXParserFactory factory) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(String source, GrammarReaderController controller) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(InputSource source, GrammarReaderController controller) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(String url) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public static Grammar loadSchema(InputSource source) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public void setSAXParserFactory(SAXParserFactory factory)
If no SAXParserFactory is set, then the default parser is used. (The parser that can be obtained by SAXParserFactory.newInstance()).
public SAXParserFactory getSAXParserFactory()
public void setController(GrammarReaderController controller)
public Controller getController()
public void setPool(ExpressionPool pool)
public ExpressionPool getPool()
public void setStrictCheck(boolean value)
When this flag is set to false, which is the default, the reader may accept incorrect schemas.
public boolean getStrictCheck()
public Grammar parse(InputSource source) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public Grammar parse(String url) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public REDocumentDeclaration parseVGM(String url) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
public REDocumentDeclaration parseVGM(InputSource source) throws SAXException, ParserConfigurationException, IOException
SAXException
ParserConfigurationException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |