Package org.openprovenance.prov.model
Class ValueConverter
- java.lang.Object
-
- org.openprovenance.prov.model.ValueConverter
-
public class ValueConverter extends Object
Conversion from String to Object and vice-versa for common xsd types.- Author:
- lavm
-
-
Constructor Summary
Constructors Constructor Description ValueConverter(ProvFactory pFactory)
-
Method Summary
Modifier and Type Method Description Object
convertToJava(QualifiedName datatype, String value)
Converts a string into a Java object, according to type provided.Element
convertXMLLiteral(String value)
QualifiedName
getXsdType(Object o)
-
-
-
Constructor Detail
-
ValueConverter
public ValueConverter(ProvFactory pFactory)
-
-
Method Detail
-
convertToJava
public Object convertToJava(QualifiedName datatype, String value)
Converts a string into a Java object, according to type provided. This function does not convert to QualifiedName since this requires access to a prefix-namespace mapping.- Parameters:
datatype
- any xsd datatype, provided it is not xsd:QNamevalue
- is a String- Returns:
- an object
-
getXsdType
public QualifiedName getXsdType(Object o)
-
-