|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.rdf.TypeMapper
public final class TypeMapper
This class handles the mapping between java objects and the according representation in XML namespace.
Field Summary | |
---|---|
static String |
XSD_NAMESPACE
xsd namespace. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XSD_NAMESPACE
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |