|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Datatypes.Datatype
This is a Java implementation of the datatyping model employed by RDF 1.1. The Java class hierarchy is expected to mirror the RDF subClassOf relations between the datatypes, and the top level concrete datatype classes define a native Java type which is used by all subclasses, to allow for native comparision of hierarchically related values. This is in line with the RDF datatyping model where the class extension of each datatype is its value space and each subordinate datatype must have a value space that is a proper subset of its superordinates -- even though its lexical space and lexical to value mapping need not be compatible.
Field Summary | |
protected java.lang.Object |
nativeValue
|
Constructor Summary | |
Datatype()
|
Method Summary | |
static int |
compare(java.lang.String uriX,
java.lang.String lformX,
java.lang.String uriY,
java.lang.String lformY)
Compares the values denoted by two typed literals, returning 0 if they are equal, a value less than zero if the first is less than the second, and a value greater than zero if the first is greater than the second. |
int |
compareTo(Datatype value)
Compares itself to the specified value, returning 0 if they are equal, , a value less than zero if less than the specified value, and a value greater than zero if greater than the specified value. |
static boolean |
equal(java.lang.String uriX,
java.lang.String lformX,
java.lang.String uriY,
java.lang.String lformY)
Compares the values denoted by two typed literals, returning true if they are equal or false if they are not equal. |
boolean |
equals(Datatype value)
Compares itself to the specified value, returning true if they are equal or false if they are not equal. |
abstract boolean |
isValidForm(java.lang.String lform)
Returns true if lexical form is valid, else returns false. |
abstract java.lang.String |
lexicalForm()
Returns a valid lexical form (string representation) of the value. |
static java.lang.String |
lookup(java.lang.String uri)
Retrieves Java class name associated with specified datatype URI |
static void |
register(java.lang.String uri,
java.lang.String classname)
Registers datatype Java class name under datatype URI |
abstract void |
setValue(java.lang.String lform)
Sets the value corresponding to the specified lexical form |
static Datatype |
value(java.lang.String uri,
java.lang.String lform)
Creates new datatype value instance of specified datatype, initialized to the value denoted by the lexical form. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object nativeValue
Constructor Detail |
public Datatype()
Method Detail |
public static final void register(java.lang.String uri, java.lang.String classname)
public static final java.lang.String lookup(java.lang.String uri) throws UnknownDatatype
UnknownDatatype
public static final Datatype value(java.lang.String uri, java.lang.String lform) throws InvalidLexicalForm, UnknownDatatype, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
InvalidLexicalForm
UnknownDatatype
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static final int compare(java.lang.String uriX, java.lang.String lformX, java.lang.String uriY, java.lang.String lformY) throws InvalidLexicalForm, UnknownDatatype, InvalidComparison, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
InvalidLexicalForm
UnknownDatatype
InvalidComparison
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static final boolean equal(java.lang.String uriX, java.lang.String lformX, java.lang.String uriY, java.lang.String lformY) throws InvalidLexicalForm, UnknownDatatype, InvalidComparison, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
InvalidLexicalForm
UnknownDatatype
InvalidComparison
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public int compareTo(Datatype value) throws InvalidComparison
InvalidComparison
public boolean equals(Datatype value) throws InvalidComparison
InvalidComparison
public abstract java.lang.String lexicalForm()
public abstract void setValue(java.lang.String lform) throws InvalidLexicalForm
InvalidLexicalForm
public abstract boolean isValidForm(java.lang.String lform)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |