|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.msv.schematron.verifier.RelmesVerifier
public class RelmesVerifier
| Constructor Summary | |
|---|---|
RelmesVerifier(DocumentDeclaration docDecl,
ErrorHandler handler)
|
|
RelmesVerifier(IVerifier core)
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
Object |
getCurrentElementType()
returns current element type. |
ErrorHandler |
getErrorHandler()
|
Datatype[] |
getLastCharacterType()
gets DataType that validated the last characters. |
Locator |
getLocator()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isValid()
checks if the document was valid. |
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
setErrorHandler(ErrorHandler handler)
|
void |
setPanicMode(boolean v)
Turns on/off the panic mode. |
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RelmesVerifier(IVerifier core)
throws ParserConfigurationException
ParserConfigurationException
public RelmesVerifier(DocumentDeclaration docDecl,
ErrorHandler handler)
throws ParserConfigurationException
ParserConfigurationException| Method Detail |
|---|
public void setPanicMode(boolean v)
IVerifierHowever, turning it off is sometimes useful, when you are sure that the structure of the document is almost valid (e.g., validating a document generated by an application or when you are sure about the validity of the structure and only interested in validating datatypes,)
setPanicMode in interface IVerifierpublic boolean isValid()
IVerifier
isValid in interface IVerifierisValid in interface VerifierHandlerpublic Object getCurrentElementType()
IVerifier
getCurrentElementType in interface IVerifierpublic Datatype[] getLastCharacterType()
IVerifierThis method works correctly only when called immediately after startElement and endElement method. When called, this method returns DataType object that validated the last character literals.
For RELAX NG grammar, this method can return an array of length 2 or more. This happens when the last character matches <list> pattern. In that case, each type corresponds to each token (where tokens are the white-space separation of the last characters).
For any other grammar, this method always returns an array of length 1 (or null, if the type assignment failed).
So when you are using VerifierFilter, you can call this method only in your startElement and endElement method.
getLastCharacterType in interface IVerifierpublic final Locator getLocator()
getLocator in interface IVerifierpublic final ErrorHandler getErrorHandler()
getErrorHandler in interface IVerifierpublic final void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface IVerifierpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerSAXException
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXException
public void skippedEntity(String name)
throws SAXException
skippedEntity in interface ContentHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||