Class JenaRuntime

  • public class JenaRuntime
    extends java.lang.Object
    Methods and constants that define features of the current the environment. Primarily for other parts of the Jena framework.
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String featureNoCharset
      The JVM does not implement java.nio.charset.Charset operations (correctly)
      static java.lang.String featureNoSecurity
      The JVM does not implement (correctly)
      static boolean isRDF11
      The global isRDF11 exists only to support development in Jena2.
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getLineSeparator()  
      static java.lang.String getMetadata​(java.lang.String key, java.lang.String defaultValue)  
      static java.lang.String getSystemProperty​(java.lang.String propName)  
      static java.lang.String getSystemProperty​(java.lang.String propName, java.lang.String defaultValue)  
      static boolean runNotUnder​(java.lang.String featureName)  
      static boolean runUnder​(java.lang.String featureName)  
      static void setFeature​(java.lang.String featureName)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isRDF11

        public static boolean isRDF11

        The global isRDF11 exists only to support development in Jena2. It is not expected that this flag will be "true" for Jena2 releases.

        Jena2 provides RDF 1.0 (AKA RDF 2004) and as much of RDF 1.1 that can be provided without invalidating existing data and applications. For example, the Turtle family parsers cover the RDF 1.1 defined grammars.

        RDF 1.1 does make some changes that will effect some applications. The RDF Working Group do not expect these to be that major but they are visible in some situations.

        One of these changes is that literals always have a datatype. RDF 1.0 plain literals (e.g. "foo" and "foo"@en) do not have datatype.

        In RDF 1.1:

        • string literals without language tag have datatype xsd:string
        • string literals with language tag have datatype rdf:langString. They still have a language tag.

        In RDF 1.0, "foo" and "foo"^^xsd:string are different RDF terms. Triples :s :p "foo" and :s :p "foo"^^xsd:string are two different RDF triples. Jena memory models provide "same value" semantics, so these can both be found looking for object of "foo" but two such triples are found.

        Other storage implementations do not provide these "same value" semantics. Two triples are stored in a graph or in a database.

        In RDF 1.1, "foo" and "foo"^^xsd:string are the same RDF term; it is just two different ways to write it. The example triples above are the same triple. Only one triple would be stored in a graph or on disk.

        It is common for applications to work either with RDF 1.0 untyped strings or with typed xsd:strings. Mixed working is less common. Mixed working applications will be affected by the changes in RDF 1.1.

        Default full RDF 1.1 behaviour is expected in Jena3, with the change of major version number used to indicate the application-visible change.

      • featureNoSecurity

        public static final java.lang.String featureNoSecurity
        The JVM does not implement (correctly)
        See Also:
        Constant Field Values
      • featureNoCharset

        public static final java.lang.String featureNoCharset
        The JVM does not implement java.nio.charset.Charset operations (correctly)
        See Also:
        Constant Field Values
    • Constructor Detail

      • JenaRuntime

        public JenaRuntime()
    • Method Detail

      • getMetadata

        public static java.lang.String getMetadata​(java.lang.String key,
                                                   java.lang.String defaultValue)
      • setFeature

        public static void setFeature​(java.lang.String featureName)
      • runUnder

        public static boolean runUnder​(java.lang.String featureName)
      • runNotUnder

        public static boolean runNotUnder​(java.lang.String featureName)
      • getLineSeparator

        public static java.lang.String getLineSeparator()
      • getSystemProperty

        public static java.lang.String getSystemProperty​(java.lang.String propName)
      • getSystemProperty

        public static java.lang.String getSystemProperty​(java.lang.String propName,
                                                         java.lang.String defaultValue)