Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.sun.msv.verifier.AbstractVerifier
com.sun.msv.verifier.Verifier
Field Summary | |
static String | |
static String | |
static String | |
static String | |
static String | |
static String | |
static String | |
static String |
Constructor Summary | |
|
Method Summary | |
void |
|
void | |
void |
|
Object |
|
ErrorHandler | |
Datatype[] |
|
void |
|
boolean |
|
static String |
|
void |
|
void |
|
void |
|
void | |
void |
|
Methods inherited from class com.sun.msv.verifier.AbstractVerifier | |
endElement , endPrefixMapping , getBaseUri , getLocator , isNotation , isUnparsedEntity , notationDecl , onID , processingInstruction , resolveNamespacePrefix , setDocumentLocator , skippedEntity , startElement , startPrefixMapping , unparsedEntityDecl |
public static final String ERR_DUPLICATE_ID
public static final String ERR_MISSING_ATTRIBUTE
public static final String ERR_UNCOMPLETED_CONTENT
public static final String ERR_UNEXPECTED_ATTRIBUTE
public static final String ERR_UNEXPECTED_ELEMENT
public static final String ERR_UNEXPECTED_STARTTAG
public static final String ERR_UNEXPECTED_TEXT
public static final String ERR_UNSOLD_IDREF
public void characters(char[] buf, int start, int len) throws SAXException
public void endDocument() throws SAXException
public void endElement(String namespaceUri, String localName, String qName) throws SAXException
- Overrides:
- endElement in interface AbstractVerifier
public Object getCurrentElementType()
returns current element type. Actual java type depends on the implementation. This method works correctly only when called immediately after handling startElement event.
- Specified by:
- getCurrentElementType in interface IVerifier
- Returns:
- null this method returns null when it doesn't support type-assignment feature, or type-assignment is impossible for the current element (for example due to the ambiguous grammar).
public final ErrorHandler getErrorHandler()
- Specified by:
- getErrorHandler in interface IVerifier
public Datatype[] getLastCharacterType()
gets DataType that validated the last characters. This 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.
- Specified by:
- getLastCharacterType in interface IVerifier
- Returns:
- null if type-assignment was not possible.
public void ignorableWhitespace(char[] buf, int start, int len) throws SAXException
public final boolean isValid()
checks if the document was valid. This method may not be called before verification was completed.
public static String localizeMessage(String propertyName, Object[] args)
public void onDuplicateId(String id)
this method is called when a duplicate id value is found.
public final void setErrorHandler(ErrorHandler handler)
- Specified by:
- setErrorHandler in interface IVerifier
public final void setPanicMode(boolean usePanicMode)
Turns on/off the panic mode. Panic mode is on by default. Turning it on is good for general use. It prevents false error messages to appear. However, 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,)
- Specified by:
- setPanicMode in interface IVerifier
public void startDocument() throws SAXException
public void startElement(String namespaceUri, String localName, String qName, Attributes atts) throws SAXException
- Overrides:
- startElement in interface AbstractVerifier