Package org.topbraid.jenax.util
Class JenaDatatypes
- java.lang.Object
-
- org.topbraid.jenax.util.JenaDatatypes
-
public class JenaDatatypes extends Object
Some static utilities dealing with datatypes and literals.- Author:
- Holger Knublauch
-
-
Constructor Summary
Constructors Constructor Description JenaDatatypes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.jena.rdf.model.LiteralcreateDecimal(int value)static org.apache.jena.rdf.model.LiteralcreateInteger(int value)static List<String>getDatatypeURIs()Gets a List of all datatype URIs.static booleanisFloat(String datatypeURI)Checks if a given URI is a numeric floating point datatype URI: xsd:decimal, xsd:float or xsd:double.static booleanisNumeric(String datatypeURI)Checks if a given URI is a numeric datatype URI.static booleanisSystemDatatype(org.apache.jena.rdf.model.RDFNode node)Checks if a given RDFNode represents a system XSD datatype such as xsd:int.
-
-
-
Method Detail
-
createDecimal
public static org.apache.jena.rdf.model.Literal createDecimal(int value)
-
createInteger
public static org.apache.jena.rdf.model.Literal createInteger(int value)
-
getDatatypeURIs
public static List<String> getDatatypeURIs()
Gets a List of all datatype URIs.- Returns:
- a List the datatype URIs
-
isFloat
public static boolean isFloat(String datatypeURI)
Checks if a given URI is a numeric floating point datatype URI: xsd:decimal, xsd:float or xsd:double.- Parameters:
datatypeURI- the URI of the datatype to test- Returns:
- true if so
-
isNumeric
public static boolean isNumeric(String datatypeURI)
Checks if a given URI is a numeric datatype URI.- Parameters:
datatypeURI- the URI of the datatype to test- Returns:
- true if so
-
isSystemDatatype
public static boolean isSystemDatatype(org.apache.jena.rdf.model.RDFNode node)
Checks if a given RDFNode represents a system XSD datatype such as xsd:int. Note: this will not return true on user-defined datatypes or rdfs:Literal.- Parameters:
node- the node to test- Returns:
- true if node is a datatype
-
-