Class TypeUtil


  • public class TypeUtil
    extends Object
    Utilities for converting strings to typed RDF nodes depending on either an explicit type URI or a guess from the syntax.
    • Constructor Detail

      • TypeUtil

        public TypeUtil()
    • Method Detail

      • asTypedValue

        public static org.apache.jena.rdf.model.RDFNode asTypedValue​(String value)
        Return a typed RDFNode based on a guess of the type from the syntax. Handles numbers, date/dateTimes and URIs. Defaults to a plain literal.
      • asTypedValue

        public static org.apache.jena.rdf.model.RDFNode asTypedValue​(String value,
                                                                     String typeURI,
                                                                     String lang)
        Return a typed RDFNode using the given type URI. If the type URI is null then the typed is guessed, if it is empty string then a plain literal is used, if it is rdfs:Resource then a returns a resource.
      • asTypedValue

        public static org.apache.jena.rdf.model.RDFNode asTypedValue​(String value,
                                                                     String typeURI)
        Return a typed RDFNode using the given type URI. If the type URI is null then the typed is guessed, if it is empty string then a plain literal is used, if it is rdfs:Resource then a returns a resource.