org.whattf.datatype
Class Id
java.lang.Object
org.whattf.datatype.AbstractDatatype
org.whattf.datatype.Id
- All Implemented Interfaces:
- Datatype
- Direct Known Subclasses:
- Idref
public class Id
- extends AbstractDatatype
This datatype shall accept any string that consists of one or more characters
and does not contain any whitespace characters.
The ID-type of this datatype is ID.
- Version:
- $Id: Id.java,v 1.4 2006/11/18 11:51:44 hsivonen Exp $
- Author:
- hsivonen
Constructor Summary |
protected |
Id()
Package-private constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THE_INSTANCE
public static final Id THE_INSTANCE
- The singleton instance.
Id
protected Id()
- Package-private constructor
checkValid
public void checkValid(CharSequence literal)
throws DatatypeException
- Checks that the value is a proper HTML5 id.
- Specified by:
checkValid
in class AbstractDatatype
- Parameters:
literal
- the valuecontext
- ignored
- Throws:
DatatypeException
- if the value isn't valid- See Also:
Datatype.checkValid(java.lang.String, org.relaxng.datatype.ValidationContext)
getIdType
public int getIdType()
- Returns
Datatype.ID_TYPE_ID
.
- Specified by:
getIdType
in interface Datatype
- Overrides:
getIdType
in class AbstractDatatype
- Returns:
Datatype.ID_TYPE_ID
- See Also:
Datatype.getIdType()