com.thaiopensource.datatype.xsd
Class IdDatatype

java.lang.Object
  extended by com.thaiopensource.datatype.xsd.DatatypeBase
      extended by com.thaiopensource.datatype.xsd.TokenDatatype
          extended by com.thaiopensource.datatype.xsd.NameDatatype
              extended by com.thaiopensource.datatype.xsd.NCNameDatatype
                  extended by com.thaiopensource.datatype.xsd.IdDatatype
All Implemented Interfaces:
Datatype2, Measure, Datatype

 class IdDatatype
extends NCNameDatatype


Field Summary
 
Fields inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
WHITE_SPACE_COLLAPSE, WHITE_SPACE_PRESERVE, WHITE_SPACE_REPLACE
 
Fields inherited from interface org.relaxng.datatype.Datatype
ID_TYPE_ID, ID_TYPE_IDREF, ID_TYPE_IDREFS, ID_TYPE_NULL
 
Constructor Summary
IdDatatype()
           
 
Method Summary
 int getIdType()
          Checks if the ID/IDREF semantics is associated with this datatype.
 
Methods inherited from class com.thaiopensource.datatype.xsd.NCNameDatatype
lexicallyAllows
 
Methods inherited from class com.thaiopensource.datatype.xsd.NameDatatype
alwaysValid, getLength
 
Methods inherited from class com.thaiopensource.datatype.xsd.TokenDatatype
getMeasure, getValue
 
Methods inherited from class com.thaiopensource.datatype.xsd.DatatypeBase
allowsValue, checkValid, createStreamingValidator, createValue, getOrderRelation, getPrimitive, getWhiteSpace, isContextDependent, isValid, normalizeWhiteSpace, sameValue, valueHashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdDatatype

IdDatatype()
Method Detail

getIdType

public int getIdType()
Description copied from interface: Datatype
Checks if the ID/IDREF semantics is associated with this datatype.

This method is introduced to support the RELAX NG DTD compatibility spec. (Of course it's always free to use this method for other purposes.)

If you are implementing a datatype library and have no idea about the "RELAX NG DTD compatibility" thing, just return ID_TYPE_NULL is fine.

Specified by:
getIdType in interface Datatype
Overrides:
getIdType in class DatatypeBase
Returns:
If this datatype doesn't have any ID/IDREF semantics, it returns Datatype.ID_TYPE_NULL. If it has such a semantics (for example, XSD:ID, XSD:IDREF and comp:ID type), then it returns Datatype.ID_TYPE_ID, Datatype.ID_TYPE_IDREF or Datatype.ID_TYPE_IDREFS.