Package org.topbraid.jenax.util
Class JenaDatatypes
java.lang.Object
org.topbraid.jenax.util.JenaDatatypes
Some static utilities dealing with datatypes and literals.
- Author:
- Holger Knublauch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.rdf.model.LiteralcreateDecimal(int value) static org.apache.jena.rdf.model.LiteralcreateInteger(int value) Gets a List of all datatype URIs.static booleanChecks if a given URI is a numeric floating point datatype URI: xsd:decimal, xsd:float or xsd:double.static booleanChecks 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.
-
Field Details
-
FALSE
public static final org.apache.jena.rdf.model.Literal FALSE -
TRUE
public static final org.apache.jena.rdf.model.Literal TRUE
-
-
Constructor Details
-
JenaDatatypes
public JenaDatatypes()
-
-
Method Details
-
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
Gets a List of all datatype URIs.- Returns:
- a List the datatype URIs
-
isFloat
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
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
-