Class DataType
- java.lang.Object
-
- io.openmanufacturing.sds.aspectmodel.resolver.services.DataType
-
public class DataType extends Object
This class acts as the bridge between the scalar types used in RDF (XSD/RDF/BAMM-specific (i.e. bamm:curie)) and their representations in Java. It implementsRDFDatatypein order to register the types directly in the Jena RDF parser. The actual registration is performed by callingsetupTypeMapping().
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<org.apache.jena.datatypes.RDFDatatype>getAllSupportedTypes()Returns the list of all supported DataTypes, which is equivalent to the union ofgetSupportedXsdTypes()and DataTypes for bamm:curie of all known meta model versions ({@see KnownVersion}).static List<org.apache.jena.datatypes.RDFDatatype>getAllSupportedTypesForMetaModelVersion(io.openmanufacturing.sds.aspectmetamodel.KnownVersion metaModelVersion)Returns the list of all supported DataTypes of a given meta model version, which is equivalent to the union ofgetSupportedXsdTypes()and the DataType for bamm:curie corresponding to the meta model version.static Class<?>getJavaTypeForMetaModelType(org.apache.jena.rdf.model.Resource type, io.openmanufacturing.sds.aspectmetamodel.KnownVersion metaModelVersion)Returns the Java class corresponding to a XSD type in a given meta model version.static List<org.apache.jena.datatypes.RDFDatatype>getSupportedXsdTypes()Returns all XSD types supported in Aspect modelsstatic voidsetupTypeMapping()Idempotent method to register the BAMM type mapping in the Jena RDF parser.
-
-
-
Method Detail
-
setupTypeMapping
public static void setupTypeMapping()
Idempotent method to register the BAMM type mapping in the Jena RDF parser.
-
getSupportedXsdTypes
public static List<org.apache.jena.datatypes.RDFDatatype> getSupportedXsdTypes()
Returns all XSD types supported in Aspect models- Returns:
- the list of supported XSD types
-
getAllSupportedTypes
public static List<org.apache.jena.datatypes.RDFDatatype> getAllSupportedTypes()
Returns the list of all supported DataTypes, which is equivalent to the union ofgetSupportedXsdTypes()and DataTypes for bamm:curie of all known meta model versions ({@see KnownVersion}).- Returns:
- the list of all supported types
-
getAllSupportedTypesForMetaModelVersion
public static List<org.apache.jena.datatypes.RDFDatatype> getAllSupportedTypesForMetaModelVersion(io.openmanufacturing.sds.aspectmetamodel.KnownVersion metaModelVersion)
Returns the list of all supported DataTypes of a given meta model version, which is equivalent to the union ofgetSupportedXsdTypes()and the DataType for bamm:curie corresponding to the meta model version.- Parameters:
metaModelVersion- the given meta model version- Returns:
- the list of all supported types in the meta model version
-
getJavaTypeForMetaModelType
public static Class<?> getJavaTypeForMetaModelType(org.apache.jena.rdf.model.Resource type, io.openmanufacturing.sds.aspectmetamodel.KnownVersion metaModelVersion)
Returns the Java class corresponding to a XSD type in a given meta model version.- Parameters:
type- the resource of the data typemetaModelVersion- the given meta model version- Returns:
- the java class
-
-