|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Datatype object. Every datatype object has several functionalities. Particularly,
Method Summary | |
boolean |
allows(java.lang.String literal,
ValidationContext context)
checks if 'literal' matchs this datatype under the current context. |
void |
check(java.lang.String literal,
ValidationContext context)
diagnoses the reason of error. |
DataTypeStreamingValidator |
createStreamingValidator(ValidationContext context)
creates an instance of the streaming validator for this type. |
java.lang.Object |
createValue(java.lang.String literal,
ValidationContext context)
converts lexcial value and the current context to the corresponding value object. |
java.lang.String |
displayName()
gets type name suitable for display (something like "string","dateTim", and so on.) the callee cannot return null. |
boolean |
sameValue(java.lang.Object value1,
java.lang.Object value2)
tests the equality of two value objects which belongs to this type. |
Method Detail |
public boolean allows(java.lang.String literal, ValidationContext context)
literal
- the lexical representation to be verifiedcontext
- context information that may be
necessary to verify the given literal.public void check(java.lang.String literal, ValidationContext context) throws java.lang.UnsupportedOperationException, DataTypeException
This method is optional and implementations are free to throw UnsupportedOperationException to indicate that this method is not implemented.
java.lang.UnsupportedOperationException
- if diagnosis is not supported by the callee.DataTypeException
- If the callee supports the diagnosis and the given literal is invalid,
then this exception that contains diagnosis information is thrown.public DataTypeStreamingValidator createStreamingValidator(ValidationContext context) throws java.lang.UnsupportedOperationException
This method is optional and implementations are free to throw UnsupportedOperationException to indicate that this method is not implemented.
context
- context information that may be
necessary to verify the given literal.
The callee may keep a reference to this context object
while the returned streaming validator is being used.java.lang.UnsupportedOperationException
- if streaming validation is not supported by the callee.public java.lang.String displayName()
public java.lang.Object createValue(java.lang.String literal, ValidationContext context)
The caller cannot generally assume that the value object is a meaningful Java object. For example, the caller cannot expect this method to return java.lang.Number type for the "integer" type of XML Schema Part2.
The returned value object should be used solely for the sameValue method.
public boolean sameValue(java.lang.Object value1, java.lang.Object value2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |