com.sun.msv.reader.trex
Class TREXBaseReader
java.lang.Object
|
+--org.xml.sax.helpers.XMLFilterImpl
|
+--com.sun.msv.reader.GrammarReader
|
+--com.sun.msv.reader.trex.TREXBaseReader
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler, IDContextProvider, ValidationContext, XMLFilter, XMLReader
- Direct Known Subclasses:
- RELAXNGReader, TREXGrammarReader
- public abstract class TREXBaseReader
- extends GrammarReader
reads TREX grammar from SAX2 and constructs abstract grammar model.
- Author:
- Kohsuke KAWAGUCHI
Fields inherited from class com.sun.msv.reader.GrammarReader |
backwardReference, basePrefixResolver, controller, ERR_BAD_ATTRIBUTE_VALUE, ERR_BAD_TYPE, ERR_CHARACTERS, ERR_CONFLICTING_ATTRIBUTES, ERR_DATATYPE_ALREADY_DEFINED, ERR_DISALLOWED_ATTRIBUTE, ERR_ILLEGAL_FINAL_VALUE, ERR_IO_EXCEPTION, ERR_MALPLACED_ELEMENT, ERR_MISSING_ATTRIBUTE, ERR_MISSING_ATTRIBUTE_2, ERR_MISSING_CHILD_EXPRESSION, ERR_MISSING_CHILD_TYPE, ERR_MISSING_TOPLEVEL, ERR_MORE_THAN_ONE_CHILD_EXPRESSION, ERR_MORE_THAN_ONE_CHILD_TYPE, ERR_RECURSIVE_DATATYPE, ERR_RECURSIVE_INCLUDE, ERR_RUNAWAY_EXPRESSION, ERR_SAX_EXCEPTION, ERR_UNDEFINED_DATATYPE, ERR_XMLPARSERFACTORY_EXCEPTION, hadError, locator, parserFactory, pool, prefixResolver, WRN_DEPRECATED_TYPENAME, WRN_MAYBE_WRONG_NAMESPACE |
Methods inherited from class com.sun.msv.reader.GrammarReader |
addBackPatchJob, combineURL, detectUndefinedOnes, endPrefixMapping, getBackwardCompatibleType, getCurrentState, getDeclaredLocationOf, isNotation, isUnparsedEntity, onID, onIDREF, parse, parse, popState, pushState, reportError, reportError, reportError, reportError, reportError, reportError, reportError, reportError, reportWarning, reportWarning, reportWarning, resolveDataType, resolveLocation, resolveNamespacePrefix, setDeclaredLocationOf, setDocumentLocator, splitQName, startPrefixMapping, switchSource |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
characters, endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, unparsedEntityDecl, warning |
sfactory
public final TREXBaseReader.StateFactory sfactory
ERR_MISSING_CHILD_NAMECLASS
public static final String ERR_MISSING_CHILD_NAMECLASS
ERR_MORE_THAN_ONE_NAMECLASS
public static final String ERR_MORE_THAN_ONE_NAMECLASS
ERR_UNDECLARED_PREFIX
public static final String ERR_UNDECLARED_PREFIX
ERR_UNDEFINED_PATTERN
public static final String ERR_UNDEFINED_PATTERN
ERR_UNKNOWN_DATATYPE_VOCABULARY
public static final String ERR_UNKNOWN_DATATYPE_VOCABULARY
ERR_BAD_COMBINE
public static final String ERR_BAD_COMBINE
ERR_COMBINE_MISSING
public static final String ERR_COMBINE_MISSING
WRN_COMBINE_IGNORED
public static final String WRN_COMBINE_IGNORED
WRN_OBSOLETED_XMLSCHEMA_NAMSPACE
public static final String WRN_OBSOLETED_XMLSCHEMA_NAMSPACE
ERR_DUPLICATE_DEFINITION
public static final String ERR_DUPLICATE_DEFINITION
ERR_NONEXISTENT_PARENT_GRAMMAR
public static final String ERR_NONEXISTENT_PARENT_GRAMMAR
ERR_INTERLEAVED_STRING
public static final String ERR_INTERLEAVED_STRING
ERR_SEQUENCED_STRING
public static final String ERR_SEQUENCED_STRING
ERR_REPEATED_STRING
public static final String ERR_REPEATED_STRING
TREXBaseReader
public TREXBaseReader(GrammarReaderController controller,
javax.xml.parsers.SAXParserFactory parserFactory,
ExpressionPool pool,
TREXBaseReader.StateFactory stateFactory,
State rootState)
- full constructor
getResult
public final TREXGrammar getResult()
- obtains parsed grammar object only if parsing was successful.
getResultAsGrammar
public Grammar getResultAsGrammar()
- Description copied from class:
GrammarReader
- gets the parsed AGM.
Should any error happens, this method returns null.
derived classes should implement type-safe getGrammar method,
along with this method.
- Overrides:
getResultAsGrammar
in class GrammarReader
getTargetNamespace
public final String getTargetNamespace()
createExpressionChildState
public State createExpressionChildState(State parent,
StartTagInfo tag)
- Description copied from class:
GrammarReader
- this method must be implemented by the derived class to create
language-default expresion state.
- Overrides:
createExpressionChildState
in class GrammarReader
- Following copied from class:
com.sun.msv.reader.GrammarReader
- Returns:
- null if the start tag is an error.
wrapUp
public void wrapUp()
- performs final wrap-up.
This method is called from the RootState object, after the parsing is completed.
startElement
public void startElement(String a,
String b,
String c,
Attributes d)
throws SAXException
- Overrides:
startElement
in class XMLFilterImpl
endElement
public void endElement(String a,
String b,
String c)
throws SAXException
- Overrides:
endElement
in class XMLFilterImpl