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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.jena.rdf.model.Literal
     
    static final org.apache.jena.rdf.model.Literal
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.rdf.model.Literal
    createDecimal(int value)
     
    static org.apache.jena.rdf.model.Literal
    createInteger(int value)
     
    static List<String>
    Gets a List of all datatype URIs.
    static boolean
    isFloat(String datatypeURI)
    Checks if a given URI is a numeric floating point datatype URI: xsd:decimal, xsd:float or xsd:double.
    static boolean
    isNumeric(String datatypeURI)
    Checks if a given URI is a numeric datatype URI.
    static boolean
    isSystemDatatype(org.apache.jena.rdf.model.RDFNode node)
    Checks if a given RDFNode represents a system XSD datatype such as xsd:int.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      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