You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2014/11/10 11:51:21 UTC
[22/50] [abbrv] jena git commit: JENA-193,
JENA-189 :: Add a flag for RDF 1.1 mode. For development only,
not for Jena2 releases.
JENA-193, JENA-189 :: Add a flag for RDF 1.1 mode.
For development only, not for Jena2 releases.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/68045fd8
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/68045fd8
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/68045fd8
Branch: refs/heads/hadoop-rdf
Commit: 68045fd8af9ebab6adb7c5766f622678b35b41c0
Parents: c7a5820
Author: Andy Seaborne <an...@apache.org>
Authored: Sun Nov 2 18:52:48 2014 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Sun Nov 2 18:52:48 2014 +0000
----------------------------------------------------------------------
.../main/java/com/hp/hpl/jena/JenaRuntime.java | 55 ++++++++++++++++++++
1 file changed, 55 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/68045fd8/jena-core/src/main/java/com/hp/hpl/jena/JenaRuntime.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/com/hp/hpl/jena/JenaRuntime.java b/jena-core/src/main/java/com/hp/hpl/jena/JenaRuntime.java
index e1c5b5a..4813d14 100644
--- a/jena-core/src/main/java/com/hp/hpl/jena/JenaRuntime.java
+++ b/jena-core/src/main/java/com/hp/hpl/jena/JenaRuntime.java
@@ -30,6 +30,61 @@ import com.hp.hpl.jena.util.Metadata ;
public class JenaRuntime
{
+ /**
+ * <p>
+ * The global <tt>isRDF11</tt> exists only to support development in Jena2.
+ * It is not expected that this flag will be "true" for Jena2 releases.
+ * </p>
+ * <p>
+ * Jena2 provides RDF 1.0 (AKA RDF 2004) and as much of RDF 1.1 that can be provided without
+ * invalidating existing data and applciations. For example, the Turtle family parsers
+ * cover the RDF 1.1 defined grammars.
+ * </p>
+ * <p>
+ * 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.
+ * </p>
+ * <p>
+ * One of these changes is that literals always have a datatype. RDF 1.0 plain literals
+ * (e.g. <tt>"foo"</tt> and <tt>"foo"@en</tt>) do not have datatype.
+ * </p>
+ * <p>
+ * In RDF 1.1:
+ * <ul>
+ * <li>string literals without language tag have datatype <tt>xsd:string</tt></li>
+ * <li>string literals with language tag have datatype <tt>rdf:langString</tt>.
+ * They still have a language tag.</li>
+ * </ul>
+ * <p>
+ * In RDF 1.0, <tt>"foo"</tt> and <tt>"foo"^^xsd:string</tt> are different RDF terms.
+ * Triples <tt>:s :p "foo"</tt> and <tt>:s :p "foo"^^xsd:string</tt> are two different RDF triples.
+ * Jena memory models provide "same value" semantics, so these can both be found looking for
+ * object of <tt>"foo"</tt> but two such triples are found.
+ * </p>
+ * <p>
+ * Other storage implementations do not provide these "same value" semantics.
+ * Two triples are stored in a graph or in a database.
+ * </p>
+ * <p>
+ * In RDF 1.1, <tt>"foo"</tt> and <tt>"foo"^^xsd:string</tt> 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.
+ * </p>
+ * <p>
+ * It is common for applications to work either with RDF 1.0 untyped strings or with typed
+ * <tt>xsd:strings</tt>. Mixed working is less common. Mixed working applications will be
+ * affected by the changes in RDF 1.1.
+ * </p>
+ * <p>
+ * Default full RDF 1.1 behaviour is expected in Jena3, with the change of major version
+ * number used to indicate the application-visible change.
+ * </p>
+ */
+
+ public final static boolean isRDF11 = false ;
+
+ // --------------------------------------------------------------
+
private static String metadataLocation = "org/apache/jena/jena-properties.xml" ;
private static Metadata metadata = new Metadata(metadataLocation) ;
public static String getMetadata(String key, String defaultValue) { return metadata.get(key, defaultValue) ; }