jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [06/10] jena git commit: JENA-1051: Deprecate RDF 1.0 IRI factories
Date Wed, 21 Oct 2015 16:46:25 GMT
JENA-1051: Deprecate RDF 1.0 IRI factories

jenaImplementation(), semanticWebImplementation()


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b5e80a67
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b5e80a67
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b5e80a67

Branch: refs/heads/master
Commit: b5e80a67d20fb9310b491a3642eff18aec8ec0da
Parents: 053b79f
Author: Andy Seaborne <andy@apache.org>
Authored: Wed Oct 21 15:02:20 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Wed Oct 21 17:44:32 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/jena/iri/IRIFactory.java     | 19 ++++++++++++++++---
 .../test/java/org/apache/jena/iri/MoreTests.java |  6 +++++-
 .../org/apache/jena/iri/TestErrorMessages.java   |  5 +----
 .../java/org/apache/jena/iri/TestIRIFactory.java |  1 +
 4 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/b5e80a67/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java b/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
index 2c0eedc..d3f4f19 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
@@ -154,17 +154,30 @@ public class IRIFactory extends IRIFactoryImpl
      * not in error, can be used 
      * interoperably in RDF/XML, SPARQL, N3
      * and N-Triple.
+     * <p>
+     * This is the support for RDF 1.0 / RDF 2004 which includes "RDF URI References" 
+     * (they are very broad and allow spaces, for example; the IRI RFC was not finalized
+     * when the RDF 1.1 specs were published).
+     * Nowadays, IRIs are strongly preferred by the semantic web standards.
+ 
      * @return A factory suitable for Semantic Web applications.
+     * @deprecated Use {@link #iriImplementation()}
      */
+    @Deprecated
     static public IRIFactory semanticWebImplementation() {
         return theSemWebFactory;
     }
     /** 
-     * For use by Jena team only.
-     * This method reflects the current IRI support
-     * in Jena, which is a moving target at present.
+     * For use by Jena intenal use only.
+     * <p>
+     * This is the support for RDF 1.0 / RDF 2004 which includes "RDF URI References" 
+     * (they are very broad and allow spaces, for example; the IRI RFC was not finalized
+     * when the RDF 1.1 specs were published).
+     * Nowadays, IRIs are strongly preferred by the semantic web standards.
      * @return A factory suitable for Jena.
+     * @deprecated Use {@link #iriImplementation()}
      */
+    @Deprecated
     static public IRIFactory jenaImplementation() {
         return jenaFactory;
     }

http://git-wip-us.apache.org/repos/asf/jena/blob/b5e80a67/jena-iri/src/test/java/org/apache/jena/iri/MoreTests.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/MoreTests.java b/jena-iri/src/test/java/org/apache/jena/iri/MoreTests.java
index c02217a..75bf18b 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/MoreTests.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/MoreTests.java
@@ -47,7 +47,8 @@ public class MoreTests extends TestCase {
 
 	
 	public void testRelativizeFrag1() {
-		IRIFactory f = IRIFactory.jenaImplementation();
+		@SuppressWarnings("deprecation")
+        IRIFactory f = IRIFactory.jenaImplementation();
 		IRI base = f.create("http://example.org/somefolder/mybase.rdf");
 		IRI frag = f.create("http://example.org#foo");
 		IRI rel = base.relativize(frag);
@@ -58,6 +59,7 @@ public class MoreTests extends TestCase {
 	}
 
 	public void testRelativizeFrag2() {
+        @SuppressWarnings("deprecation")
 		IRIFactory f = IRIFactory.jenaImplementation();
 		IRI base = f.create("http://example.org/somefolder/mybase.rdf");
 		IRI frag = f.create("http://example.org/#foo");
@@ -68,6 +70,7 @@ public class MoreTests extends TestCase {
 	}
 	
 	public void testXPointer() {
+        @SuppressWarnings("deprecation")
 		IRIFactory f = IRIFactory.jenaImplementation();
 		IRI base = f.create("http://example.org/");
 		IRI frag = base.resolve("http://eg.com/test.txt#xpointer(/unit[5])");
@@ -80,6 +83,7 @@ public class MoreTests extends TestCase {
 		
 	}
 	public void testNotIDN() {
+        @SuppressWarnings("deprecation")
 		IRIFactory f = IRIFactory.jenaImplementation();
 		IRI base = f.create("http://example.org/");
 		IRI frag = base.resolve("outbind://4-00000000C45F478BF9F2A048A7A59DE"+

http://git-wip-us.apache.org/repos/asf/jena/blob/b5e80a67/jena-iri/src/test/java/org/apache/jena/iri/TestErrorMessages.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestErrorMessages.java b/jena-iri/src/test/java/org/apache/jena/iri/TestErrorMessages.java
index e384523..ce08494 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestErrorMessages.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestErrorMessages.java
@@ -76,15 +76,12 @@ public class TestErrorMessages extends TestCase
         return rslt.toString();
     }
 
-
-   
-
 	private void printErrorMessages(Violation v) {
 			System.err.println(v.getShortMessage());
 		
 	}
 
-
+    @SuppressWarnings("deprecation")
     static public IRIFactory f = IRIFactory.jenaImplementation();
    
     @Override

http://git-wip-us.apache.org/repos/asf/jena/blob/b5e80a67/jena-iri/src/test/java/org/apache/jena/iri/TestIRIFactory.java
----------------------------------------------------------------------
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestIRIFactory.java b/jena-iri/src/test/java/org/apache/jena/iri/TestIRIFactory.java
index 94489f5..ebdcb16 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestIRIFactory.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestIRIFactory.java
@@ -29,6 +29,7 @@ public class TestIRIFactory {
 		return new JUnit4TestAdapter(TestIRIFactory.class);
 	}
 	
+    @SuppressWarnings("deprecation")
 	private static IRIFactory iriFactory = IRIFactory.jenaImplementation();
 	
 	@Test


Mime
View raw message