com.thaiopensource.validate.mns
Class SchemaImpl.Handler
java.lang.Object
com.thaiopensource.xml.sax.DelegatingContentHandler
com.thaiopensource.validate.mns.SchemaImpl.Handler
- All Implemented Interfaces:
- SchemaFuture, ContentHandler
- Enclosing class:
- SchemaImpl
private class SchemaImpl.Handler
- extends DelegatingContentHandler
- implements SchemaFuture
Method Summary |
private String |
displayPath(boolean isRoot,
Stack nameStack)
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
private void |
endPath()
|
(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 String[] |
getInModes(Attributes attributes)
|
private SchemaImpl.Mode[] |
getModes(String[] modeNames)
|
private String |
getNs(Attributes attributes,
boolean forbidEmpty)
|
private ElementsOrAttributes |
getPrune(Attributes attributes)
|
Schema |
getSchema()
|
private String |
getSchema(Attributes attributes)
|
private String |
getSchemaType(Attributes attributes)
|
private SchemaImpl.Mode |
getUseMode(Attributes attributes)
|
private void |
parseContext(Attributes attributes)
|
private void |
parseCover(Attributes attributes)
|
private void |
parseElement(Attributes attributes)
|
private void |
parseLax(Attributes attributes)
|
private void |
parseRoot(Attributes attributes)
|
private void |
parseRules(Attributes attributes)
|
private void |
parseValidate(boolean isAttribute,
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
currentElementAction
private SchemaImpl.ElementAction currentElementAction
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
contextNs
private String contextNs
contextMode
private SchemaImpl.Mode contextMode
elementNs
private String elementNs
defaultSchemaType
private String defaultSchemaType
nameStack
private final Stack nameStack
isRoot
private boolean isRoot
pathDepth
private int pathDepth
validator
private Validator validator
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)
parseCover
private void parseCover(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseLax
private void parseLax(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseValidate
private void parseValidate(boolean isAttribute,
Attributes attributes)
throws SAXException
- Throws:
SAXException
parseContext
private void parseContext(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseRoot
private void parseRoot(Attributes attributes)
throws SAXException
- Throws:
SAXException
parseElement
private void parseElement(Attributes attributes)
throws SAXException
- Throws:
SAXException
endPath
private void endPath()
throws SAXException
- Throws:
SAXException
displayPath
private String displayPath(boolean isRoot,
Stack nameStack)
getSchema
private String getSchema(Attributes attributes)
throws SAXException
- Throws:
SAXException
getSchemaType
private String getSchemaType(Attributes attributes)
getPrune
private ElementsOrAttributes getPrune(Attributes attributes)
toElementsOrAttributes
private ElementsOrAttributes toElementsOrAttributes(String value,
ElementsOrAttributes defaultValue)
getUseMode
private SchemaImpl.Mode getUseMode(Attributes attributes)
getNs
private String getNs(Attributes attributes,
boolean forbidEmpty)
throws SAXException
- Throws:
SAXException
getModes
private SchemaImpl.Mode[] getModes(String[] modeNames)
getInModes
private String[] getInModes(Attributes attributes)
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