|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.hpl.jena.datatypes.BaseDatatype
public class BaseDatatype
Base level implementation of datatype from which real implementations can inherit.
Nested Class Summary | |
---|---|
static class |
BaseDatatype.TypedValue
Pair object used to encode both lexical form and datatype for a typed literal with unknown datatype. |
Constructor Summary | |
---|---|
BaseDatatype(String uri)
Constructor. |
Method Summary | |
---|---|
Object |
cannonicalise(Object value)
Cannonicalise a java Object value to a normal form. |
Object |
extendedTypeDefinition()
Returns an object giving more details on the datatype. |
int |
getHashCode(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
Default implementation of getHashCode() delegates to the default from the literal label. |
Class<?> |
getJavaClass()
Returns the java class which is used to represent value instances of this datatype. |
String |
getURI()
Return the URI which is the label for this datatype |
boolean |
isEqual(com.hp.hpl.jena.graph.impl.LiteralLabel litLabel1,
com.hp.hpl.jena.graph.impl.LiteralLabel litLabel2)
Compares two instances of values of the given datatype. |
boolean |
isValid(String lexicalForm)
Test whether the given string is a legal lexical form of this datatype. |
boolean |
isValidLiteral(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
Test whether the given LiteralLabel is a valid instance of this datatype. |
boolean |
isValidValue(Object valueForm)
Test whether the given object is a legal value form of this datatype. |
boolean |
langTagCompatible(com.hp.hpl.jena.graph.impl.LiteralLabel value1,
com.hp.hpl.jena.graph.impl.LiteralLabel value2)
Helper function to compare language tag values |
RDFDatatype |
normalizeSubType(Object value,
RDFDatatype dt)
Normalization. |
Object |
parse(String lexicalForm)
Parse a lexical form of this datatype to a value |
String |
toString()
Display format |
String |
unparse(Object value)
Convert a value of this datatype out to lexical form. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseDatatype(String uri)
uri
- the URI label to use for this datatypeMethod Detail |
---|
public String getURI()
getURI
in interface RDFDatatype
public String unparse(Object value)
unparse
in interface RDFDatatype
public Object parse(String lexicalForm) throws DatatypeFormatException
parse
in interface RDFDatatype
DatatypeFormatException
- if the lexical form is not legalpublic boolean isValid(String lexicalForm)
isValid
in interface RDFDatatype
public boolean isValidLiteral(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
isValidLiteral
in interface RDFDatatype
public boolean isValidValue(Object valueForm)
isValidValue
in interface RDFDatatype
public boolean isEqual(com.hp.hpl.jena.graph.impl.LiteralLabel litLabel1, com.hp.hpl.jena.graph.impl.LiteralLabel litLabel2)
isEqual
in interface RDFDatatype
public int getHashCode(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
getHashCode
in interface RDFDatatype
public boolean langTagCompatible(com.hp.hpl.jena.graph.impl.LiteralLabel value1, com.hp.hpl.jena.graph.impl.LiteralLabel value2)
public Class<?> getJavaClass()
getJavaClass
in interface RDFDatatype
public Object cannonicalise(Object value)
cannonicalise
in interface RDFDatatype
public Object extendedTypeDefinition()
org.apache.xerces.impl.xs.psvi.XSTypeDefinition
.
extendedTypeDefinition
in interface RDFDatatype
public RDFDatatype normalizeSubType(Object value, RDFDatatype dt)
normalizeSubType
in interface RDFDatatype
value
- the current object valuedt
- the currently set data type
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |