public final class TypeMapper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
XSD_NAMESPACE
xsd namespace.
|
Modifier and Type | Method and Description |
---|---|
static Object |
asLiteral(Object o)
Tries to interpret the specified object as RDF literal.
|
static XMLGregorianCalendar |
getCurrentDateTime()
Get the current date and time as representation for W3C XML Schema 1.0
date/time datatypes.
|
static DatatypeFactory |
getDataTypeFactory()
Return an instance of DatatypeFactory.
|
static String |
getDatatypeURI(Class c)
Return the XSD type given a java class, according to the list of
predefined types.
|
static String |
getDatatypeURI(Object o)
Return the XSD type given a java object, according to the list of
predefined types.
|
static Class |
getJavaClass(String datatypeURI)
Return the Java class given an XSD String, according to the list of
predefined types.
|
static Object |
getJavaInstance(String lexicalForm,
String xsdType)
Return a Java object from an XML literal and its type.
|
static String[] |
getXMLInstance(Object o)
Return the lexical string and XSD type from an object which can be mapped
to XSD type.
|
static boolean |
isCompatible(String supertypeURI,
String subtypeURI)
Determines if the first specified URI is a super type of the second
specified URI.
|
static boolean |
isLiteral(Object o)
Determines if the specified object is a Resource that is either an XML
Literal or an XSD Literal.
|
static boolean |
isRegisteredDatatypeURI(String datatypeURI)
Determines if an object is registered for the specified URI.
|
public static final String XSD_NAMESPACE
public static XMLGregorianCalendar getCurrentDateTime()
public static DatatypeFactory getDataTypeFactory()
DatatypeFactory
public static String[] getXMLInstance(Object o)
o
- The Object to be serialized.public static Object getJavaInstance(String lexicalForm, String xsdType)
lexicalForm
- The serialized string.xsdType
- The XSD type of the object.public static Object asLiteral(Object o)
o
- The object to interpret.public static String getDatatypeURI(Class c)
c
- The Java class.public static String getDatatypeURI(Object o)
o
- The Java instance.public static Class getJavaClass(String datatypeURI)
datatypeURI
- The XSD String.public static boolean isCompatible(String supertypeURI, String subtypeURI)
supertypeURI
- URI of the super type.subtypeURI
- URI that is to be tested to be a sub type of the specified
super type.public static boolean isLiteral(Object o)
public static boolean isRegisteredDatatypeURI(String datatypeURI)
Copyright © 2015 universAAL Consortium. All Rights Reserved.