com.thaiopensource.validate.nrl
Class SchemaImpl.Handler
java.lang.Object
com.thaiopensource.xml.sax.DelegatingContentHandler
com.thaiopensource.validate.nrl.SchemaImpl.Handler
- All Implemented Interfaces:
- SchemaFuture, ContentHandler
- Enclosing class:
- SchemaImpl
private class SchemaImpl.Handler
- extends DelegatingContentHandler
- implements SchemaFuture
Method Summary |
private Schema |
createSubSchema(boolean isAttributesSchema)
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
(package private) void |
error(String key)
|
(package private) void |
error(String key,
String arg)
|
(package private) void |
error(String key,
String arg,
Locator locator)
|
(package private) void |
error(String key,
String arg1,
String arg2)
|
private void |
finishValidate()
|
private ModeUsage |
getModeUsage(Attributes attributes)
|
private String |
getNs(Attributes attributes)
|
Schema |
getSchema()
|
private String |
getSchema(Attributes attributes)
|
private String |
getSchemaType(Attributes attributes)
|
private Mode |
getUseMode(Attributes attributes)
|
private void |
parseAllow(Attributes attributes)
|
private void |
parseAnyNamespace(Attributes attributes)
|
private void |
parseAttach(Attributes attributes)
|
private void |
parseContext(Attributes attributes)
|
private void |
parseMode(Attributes attributes)
|
private void |
parseNamespace(Attributes attributes)
|
private void |
parseOption(Attributes attributes)
|
private void |
parseReject(Attributes attributes)
|
private void |
parseRule(String ns,
Attributes attributes)
|
private void |
parseRules(Attributes attributes)
|
private void |
parseUnwrap(Attributes attributes)
|
private void |
parseValidate(Attributes attributes)
|
void |
setDocumentLocator(Locator locator)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
private ElementsOrAttributes |
toElementsOrAttributes(String value,
ElementsOrAttributes defaultValue)
|
RuntimeException |
unwrapException(RuntimeException e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sr
private final SchemaReceiverImpl sr
hadError
private boolean hadError
eh
private final ErrorHandler eh
ceh
private final CountingErrorHandler ceh
localizer
private final Localizer localizer
locator
private Locator locator
xmlBaseHandler
private final XmlBaseHandler xmlBaseHandler
foreignDepth
private int foreignDepth
currentMode
private Mode currentMode
defaultSchemaType
private String defaultSchemaType
validator
private Validator validator
match
private ElementsOrAttributes match
actions
private ActionSet actions
attributeActions
private AttributeActionSet attributeActions
schemaUri
private String schemaUri
schemaType
private String schemaType
options
private PropertyMapBuilder options
mustSupportOptions
private final Vector mustSupportOptions
modeUsage
private ModeUsage modeUsage
anyNamespace
private boolean anyNamespace
SchemaImpl.Handler
SchemaImpl.Handler(SchemaReceiverImpl sr)
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interface ContentHandler
- Overrides:
setDocumentLocator
in class DelegatingContentHandler
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DelegatingContentHandler
- Throws:
SAXException
getSchema
public Schema getSchema()
throws IncorrectSchemaException,
SAXException
- Specified by:
getSchema
in interface SchemaFuture
- Throws:
IncorrectSchemaException
SAXException
unwrapException
public RuntimeException unwrapException(RuntimeException e)
throws SAXException,
IOException,
IncorrectSchemaException
- Specified by:
unwrapException
in interface SchemaFuture
- Throws:
SAXException
IOException
IncorrectSchemaException
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DelegatingContentHandler
- Throws:
SAXException
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DelegatingContentHandler
- Throws:
SAXException
parseRules
private void parseRules(Attributes attributes)
parseMode
private void parseMode(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseNamespace
private void parseNamespace(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseAnyNamespace
private void parseAnyNamespace(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseRule
private void parseRule(String ns,
Attributes attributes)
throws SAXException
- Throws:
SAXException
parseValidate
private void parseValidate(Attributes attributes)
throws SAXException
- Throws:
SAXException
finishValidate
private void finishValidate()
throws SAXException
- Throws:
SAXException
createSubSchema
private Schema createSubSchema(boolean isAttributesSchema)
throws IOException,
IncorrectSchemaException,
SAXException
- Throws:
IOException
IncorrectSchemaException
SAXException
parseOption
private void parseOption(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseAttach
private void parseAttach(Attributes attributes)
parseUnwrap
private void parseUnwrap(Attributes attributes)
parseAllow
private void parseAllow(Attributes attributes)
parseReject
private void parseReject(Attributes attributes)
parseContext
private void parseContext(Attributes attributes)
throws SAXException
- Throws:
SAXException
getSchema
private String getSchema(Attributes attributes)
throws SAXException
- Throws:
SAXException
getSchemaType
private String getSchemaType(Attributes attributes)
toElementsOrAttributes
private ElementsOrAttributes toElementsOrAttributes(String value,
ElementsOrAttributes defaultValue)
getModeUsage
private ModeUsage getModeUsage(Attributes attributes)
getUseMode
private Mode getUseMode(Attributes attributes)
getNs
private String getNs(Attributes attributes)
throws SAXException
- Throws:
SAXException
error
void error(String key)
throws SAXException
- Throws:
SAXException
error
void error(String key,
String arg)
throws SAXException
- Throws:
SAXException
error
void error(String key,
String arg,
Locator locator)
throws SAXException
- Throws:
SAXException
error
void error(String key,
String arg1,
String arg2)
throws SAXException
- Throws:
SAXException