Class JenaDatatypes


  • public class JenaDatatypes
    extends Object
    Some static utilities dealing with datatypes and literals.
    Author:
    Holger Knublauch
    • Field Detail

      • FALSE

        public static final org.apache.jena.rdf.model.Literal FALSE
      • TRUE

        public static final org.apache.jena.rdf.model.Literal TRUE
    • Constructor Detail

      • JenaDatatypes

        public JenaDatatypes()
    • 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