commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [47/50] incubator-commonsrdf git commit: Upgrade to rdf4j 2.0M2
Date Thu, 02 Jun 2016 16:45:59 GMT
Upgrade to rdf4j 2.0M2


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/12051e9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/12051e9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/12051e9c

Branch: refs/heads/rdf4j
Commit: 12051e9c6e9be4fa15a84562cf04052084d779d7
Parents: 575d2af
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Thu Jun 2 17:39:47 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Thu Jun 2 17:39:47 2016 +0100

----------------------------------------------------------------------
 rdf4j/pom.xml                                   | 35 ++++-----
 .../commons/rdf/rdf4j/RDF4JBlankNode.java       |  4 +-
 .../apache/commons/rdf/rdf4j/RDF4JGraph.java    |  2 +-
 .../org/apache/commons/rdf/rdf4j/RDF4JIRI.java  |  6 +-
 .../apache/commons/rdf/rdf4j/RDF4JLiteral.java  |  6 +-
 .../org/apache/commons/rdf/rdf4j/RDF4JTerm.java |  2 +-
 .../commons/rdf/rdf4j/RDF4JTermFactory.java     | 76 ++++++++++----------
 .../apache/commons/rdf/rdf4j/RDF4JTriple.java   |  2 +-
 .../commons/rdf/rdf4j/MemoryGraphTest.java      |  2 +-
 9 files changed, 68 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/pom.xml
----------------------------------------------------------------------
diff --git a/rdf4j/pom.xml b/rdf4j/pom.xml
index 3134702..9c7f6cc 100644
--- a/rdf4j/pom.xml
+++ b/rdf4j/pom.xml
@@ -29,24 +29,25 @@
 
     <artifactId>commons-rdf-rdf4j</artifactId>
     <packaging>jar</packaging>
-<properties>
-	<sesame.version>4.1.2</sesame.version>
+<properties>	
+	<rdf4j.version>2.0M2</rdf4j.version>
 </properties>
 
     <name>Commons RDF: Integration: RDF4j</name>
-    <description>Eclipse RDF4j (formerly OpenRDF Sesame) implementation of Commons
RDF API</description>
+    <description>Eclipse RDF4j implementation of Commons RDF API</description>
 
-    <dependencies>
-        <dependency>
-            <groupId>${project.parent.groupId}</groupId>
-            <artifactId>commons-rdf-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-		<groupId>org.openrdf.sesame</groupId>
-		<artifactId>sesame-runtime</artifactId>
-		<version>${sesame.version}</version>
-        </dependency>
+	<dependencies>
+		<dependency>
+			<groupId>${project.parent.groupId}</groupId>
+			<artifactId>commons-rdf-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.eclipse.rdf4j</groupId>
+			<artifactId>rdf4j-runtime</artifactId>
+			<version>${rdr4j.version}</version>
+		</dependency>
+        
         <dependency>
             <groupId>${project.parent.groupId}</groupId>
             <artifactId>commons-rdf-api</artifactId>
@@ -65,9 +66,9 @@
 <dependencyManagement>
     <dependencies>
         <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-bom</artifactId>
-            <version>${sesame.version}</version>
+            <groupId>org.eclipse.rdf4j</groupId>
+            <artifactId>rdf4j-bom</artifactId>
+            <version>${rdr4j.version}</version>
             <type>pom</type>
             <scope>import</scope>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
index 0b06144..c0523e1 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JBlankNode.java
@@ -17,14 +17,14 @@
  */
 package org.apache.commons.rdf.rdf4j;
 
-import org.openrdf.model.BNode;
+import org.eclipse.rdf4j.model.BNode;
 
 /**
  * Marker interface for RDF4J implementations of BlankNode.
  * 
  */
 public interface RDF4JBlankNode 
-	extends RDF4JTerm<org.openrdf.model.BNode>, org.apache.commons.rdf.api.BlankNode {
+	extends RDF4JTerm<org.eclipse.rdf4j.model.BNode>, org.apache.commons.rdf.api.BlankNode
{
 
 	/**
 	 * Return the corresponding RDF4J {@link BNode}.

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
index 3bf8000..2fcd2ea 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JGraph.java
@@ -18,7 +18,7 @@
 package org.apache.commons.rdf.rdf4j;
 
 import org.apache.commons.rdf.api.Graph;
-import org.openrdf.model.Model;
+import org.eclipse.rdf4j.model.Model;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
index 91386ea..c29e8b2 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JIRI.java
@@ -22,14 +22,14 @@ package org.apache.commons.rdf.rdf4j;
  * 
  */
 public interface RDF4JIRI 
-	extends RDF4JTerm<org.openrdf.model.IRI>, org.apache.commons.rdf.api.IRI {
+	extends RDF4JTerm<org.eclipse.rdf4j.model.IRI>, org.apache.commons.rdf.api.IRI {
 	
 	/**
-	 * Return the corresponding RDF4J {@link org.openrdf.model.IRI}.
+	 * Return the corresponding RDF4J {@link org.eclipse.rdf4j.model.IRI}.
 	 * 
 	 * @return The corresponding RDF4J IRI
 	 */
-	public org.openrdf.model.IRI asValue();
+	public org.eclipse.rdf4j.model.IRI asValue();
 	
 	
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
index 804518a..838074c 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JLiteral.java
@@ -17,17 +17,17 @@
  */
 package org.apache.commons.rdf.rdf4j;
 
-import org.openrdf.model.Literal;
+import org.eclipse.rdf4j.model.Literal;
 
 /**
  * Marker interface for RDF4J implementations of Literal.
  * 
  */
 public interface RDF4JLiteral 
-	extends RDF4JTerm<org.openrdf.model.Literal>, org.apache.commons.rdf.api.Literal {
+	extends RDF4JTerm<org.eclipse.rdf4j.model.Literal>, org.apache.commons.rdf.api.Literal
{
 	
 	/**
-	 * Return the corresponding RDF4J {@link org.openrdf.model.Literal}.
+	 * Return the corresponding RDF4J {@link org.eclipse.rdf4j.model.Literal}.
 	 * 
 	 * @return The corresponding RDF4J Literal
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTerm.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTerm.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTerm.java
index 3225693..3117eee 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTerm.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTerm.java
@@ -18,7 +18,7 @@
 package org.apache.commons.rdf.rdf4j;
 
 import org.apache.commons.rdf.api.RDFTerm;
-import org.openrdf.model.Value;
+import org.eclipse.rdf4j.model.Value;
 
 /**
  * Marker interface for RDF4J implementations of RDFTerm.

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
index 4f0dc76..6f9d410 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
@@ -33,16 +33,16 @@ import org.apache.commons.rdf.api.Graph;
 import org.apache.commons.rdf.api.RDFTerm;
 import org.apache.commons.rdf.api.RDFTermFactory;
 import org.apache.commons.rdf.api.Triple;
-import org.openrdf.model.BNode;
-import org.openrdf.model.Model;
-import org.openrdf.model.Resource;
-import org.openrdf.model.Statement;
-import org.openrdf.model.Value;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.LinkedHashModel;
-import org.openrdf.model.impl.SimpleValueFactory;
-import org.openrdf.model.vocabulary.XMLSchema;
-import org.openrdf.rio.turtle.TurtleUtil;
+import org.eclipse.rdf4j.model.BNode;
+import org.eclipse.rdf4j.model.Model;
+import org.eclipse.rdf4j.model.Resource;
+import org.eclipse.rdf4j.model.Statement;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.LinkedHashModel;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
+import org.eclipse.rdf4j.rio.turtle.TurtleUtil;
 
 /**
  * RDF4J implementation of RDFTermFactory
@@ -92,26 +92,26 @@ public class RDF4JTermFactory implements RDFTermFactory {
 	 * <p>
 	 * <p>
 	 * The value will be of the same kind as the term, e.g. a
-	 * {@link org.openrdf.model.BNode} is converted to a
+	 * {@link org.eclipse.rdf4j.model.BNode} is converted to a
 	 * {@link org.apache.commons.rdf.api.BlankNode}, 
-	 * a {@link org.openrdf.model.IRI}
+	 * a {@link org.eclipse.rdf4j.model.IRI}
 	 * is converted to a {@link org.apache.commons.rdf.api.IRI}
-	 * and a {@link org.openrdf.model.Literal}.
+	 * and a {@link org.eclipse.rdf4j.model.Literal}.
 	 * is converted to a 
 	 * {@link org.apache.commons.rdf.api.Literal} 
 	 * 
 	 * @param value
 	 * @return
 	 */
-	public RDF4JTerm<?> asRDFTerm(final org.openrdf.model.Value value) {		
+	public RDF4JTerm<?> asRDFTerm(final org.eclipse.rdf4j.model.Value value) {		
 		if (value instanceof BNode) {
 			return new BlankNodeImpl((BNode) value);
 		}
-		if (value instanceof org.openrdf.model.Literal) {
-			return new LiteralImpl((org.openrdf.model.Literal) value);
+		if (value instanceof org.eclipse.rdf4j.model.Literal) {
+			return new LiteralImpl((org.eclipse.rdf4j.model.Literal) value);
 		}
-		if (value instanceof org.openrdf.model.IRI) {
-			return new IRIImpl((org.openrdf.model.IRI) value);
+		if (value instanceof org.eclipse.rdf4j.model.IRI) {
+			return new IRIImpl((org.eclipse.rdf4j.model.IRI) value);
 		}
 		throw new IllegalArgumentException("Value is not a BNode, Literal or IRI: " + value.getClass());
	
 	}
@@ -132,8 +132,8 @@ public class RDF4JTermFactory implements RDFTermFactory {
 	
 	public Statement asStatement(Triple triple) {
 		return valueFactory.createStatement(
-				(org.openrdf.model.Resource) asValue(triple.getSubject()), 
-				(org.openrdf.model.IRI) asValue(triple.getPredicate()), 
+				(org.eclipse.rdf4j.model.Resource) asValue(triple.getSubject()), 
+				(org.eclipse.rdf4j.model.IRI) asValue(triple.getPredicate()), 
 				asValue(triple.getObject()));
 	}	
 	
@@ -153,10 +153,10 @@ public class RDF4JTermFactory implements RDFTermFactory {
 	 * <p>
 	 * The value will be of the same kind as the term, e.g. a
 	 * {@link org.apache.commons.rdf.api.BlankNode} is converted to a
-	 * {@link org.openrdf.model.BNode}, a {@link org.apache.commons.rdf.api.IRI}
-	 * is converted to a {@link org.openrdf.model.IRI} and a
+	 * {@link org.eclipse.rdf4j.model.BNode}, a {@link org.apache.commons.rdf.api.IRI}
+	 * is converted to a {@link org.eclipse.rdf4j.model.IRI} and a
 	 * {@link org.apache.commons.rdf.api.Literal} is converted to a
-	 * {@link org.openrdf.model.Literal}.
+	 * {@link org.eclipse.rdf4j.model.Literal}.
 	 * <p>
 	 * If the provided {@link RDFTerm} is <code>null</code>, then the returned
 	 * value is <code>null</code>.
@@ -189,7 +189,7 @@ public class RDF4JTermFactory implements RDFTermFactory {
 				String lang = literal.getLanguageTag().get();
 				return valueFactory.createLiteral(label, lang);
 			}
-			org.openrdf.model.IRI dataType = (org.openrdf.model.IRI ) asValue(literal.getDatatype());
+			org.eclipse.rdf4j.model.IRI dataType = (org.eclipse.rdf4j.model.IRI ) asValue(literal.getDatatype());
 			return valueFactory.createLiteral(label, dataType);
 		}
 		if (term instanceof BlankNode) {
@@ -226,22 +226,22 @@ public class RDF4JTermFactory implements RDFTermFactory {
 
 	@Override
 	public LiteralImpl createLiteral(String lexicalForm) throws IllegalArgumentException, UnsupportedOperationException
{
-		org.openrdf.model.Literal lit = valueFactory.createLiteral(lexicalForm);
+		org.eclipse.rdf4j.model.Literal lit = valueFactory.createLiteral(lexicalForm);
 		return (LiteralImpl)asRDFTerm(lit);
 	}
 
 	@Override
 	public org.apache.commons.rdf.api.Literal createLiteral(String lexicalForm, org.apache.commons.rdf.api.IRI
dataType)
 			throws IllegalArgumentException, UnsupportedOperationException {
-		org.openrdf.model.IRI iri = valueFactory.createIRI(dataType.getIRIString());
-		org.openrdf.model.Literal lit = valueFactory.createLiteral(lexicalForm, iri);
+		org.eclipse.rdf4j.model.IRI iri = valueFactory.createIRI(dataType.getIRIString());
+		org.eclipse.rdf4j.model.Literal lit = valueFactory.createLiteral(lexicalForm, iri);
 		return (org.apache.commons.rdf.api.Literal)asRDFTerm(lit);
 	}
 
 	@Override
 	public org.apache.commons.rdf.api.Literal createLiteral(String lexicalForm, String languageTag)
 			throws IllegalArgumentException, UnsupportedOperationException {
-		org.openrdf.model.Literal lit = valueFactory.createLiteral(lexicalForm, languageTag);
+		org.eclipse.rdf4j.model.Literal lit = valueFactory.createLiteral(lexicalForm, languageTag);
 		return (org.apache.commons.rdf.api.Literal)asRDFTerm(lit);
 	}
 
@@ -249,8 +249,8 @@ public class RDF4JTermFactory implements RDFTermFactory {
 	public RDF4JTriple createTriple(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate,
RDFTerm object)
 			throws IllegalArgumentException, UnsupportedOperationException {
 		final Statement statement = valueFactory.createStatement(
-				(org.openrdf.model.Resource) asValue(subject), 
-				(org.openrdf.model.IRI) asValue(predicate), 
+				(org.eclipse.rdf4j.model.Resource) asValue(subject), 
+				(org.eclipse.rdf4j.model.IRI) asValue(predicate), 
 				asValue(object));
 		return asTriple(statement);
 	}
@@ -324,7 +324,7 @@ public class RDF4JTermFactory implements RDFTermFactory {
 		public void add(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, RDFTerm
object) {
 			model.add(
 					(Resource)asValue(subject), 
-					(org.openrdf.model.IRI)asValue(predicate), 
+					(org.eclipse.rdf4j.model.IRI)asValue(predicate), 
 					asValue(object));				
 		}
 		
@@ -346,7 +346,7 @@ public class RDF4JTermFactory implements RDFTermFactory {
 		public boolean contains(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate,
RDFTerm object) {
 			return model.contains(
 					(Resource)asValue(subject), 
-					(org.openrdf.model.IRI)asValue(predicate), 
+					(org.eclipse.rdf4j.model.IRI)asValue(predicate), 
 					asValue(object));
 		}
 	
@@ -364,7 +364,7 @@ public class RDF4JTermFactory implements RDFTermFactory {
 		public Stream<RDF4JTriple> getTriples(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI
predicate, RDFTerm object) {
 			return model.filter(
 					(Resource)asValue(subject), 
-					(org.openrdf.model.IRI)asValue(predicate), 
+					(org.eclipse.rdf4j.model.IRI)asValue(predicate), 
 					asValue(object)).parallelStream()
 				.map(RDF4JTermFactory.this::asTriple);
 		}
@@ -373,7 +373,7 @@ public class RDF4JTermFactory implements RDFTermFactory {
 		public void remove(BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, RDFTerm
object) {
 			model.remove(
 					(Resource)asValue(subject), 
-					(org.openrdf.model.IRI)asValue(predicate), 
+					(org.eclipse.rdf4j.model.IRI)asValue(predicate), 
 					asValue(object));
 			
 		}
@@ -395,10 +395,10 @@ public class RDF4JTermFactory implements RDFTermFactory {
 		}
 	}
 
-	private final class IRIImpl extends RDFTermImpl<org.openrdf.model.IRI> 
+	private final class IRIImpl extends RDFTermImpl<org.eclipse.rdf4j.model.IRI> 
 		implements RDF4JIRI {
 	
-		IRIImpl(org.openrdf.model.IRI iri) {
+		IRIImpl(org.eclipse.rdf4j.model.IRI iri) {
 			super(iri);			
 		}
 		@Override
@@ -437,12 +437,12 @@ public class RDF4JTermFactory implements RDFTermFactory {
 	}
 
 	private final class LiteralImpl 
-		extends RDFTermImpl<org.openrdf.model.Literal>
+		extends RDFTermImpl<org.eclipse.rdf4j.model.Literal>
 	    implements RDF4JLiteral {		
 	
 		private static final String QUOTE = "\"";
 		
-		LiteralImpl(org.openrdf.model.Literal literal) {
+		LiteralImpl(org.eclipse.rdf4j.model.Literal literal) {
 			super(literal);			
 		}
 		@Override

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java
index 2661a2a..ed0b4b0 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java
@@ -18,7 +18,7 @@
 package org.apache.commons.rdf.rdf4j;
 
 import org.apache.commons.rdf.api.Triple;
-import org.openrdf.model.Statement;
+import org.eclipse.rdf4j.model.Statement;
 
 /**
  * Marker interface for RDF4J implementations of Triple.

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/12051e9c/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
index 7acfa4e..4ceb9fe 100644
--- a/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
+++ b/rdf4j/src/test/java/org/apache/commons/rdf/rdf4j/MemoryGraphTest.java
@@ -19,7 +19,7 @@ package org.apache.commons.rdf.rdf4j;
 
 import org.apache.commons.rdf.api.AbstractGraphTest;
 import org.apache.commons.rdf.api.RDFTermFactory;
-import org.openrdf.sail.memory.model.MemValueFactory;
+import org.eclipse.rdf4j.sail.memory.model.MemValueFactory;
 
 public class MemoryGraphTest extends AbstractGraphTest {
 


Mime
View raw message