clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/4] clerezza git commit: using rdf.commons draft in core
Date Thu, 18 Dec 2014 20:22:59 GMT
Repository: clerezza
Updated Branches:
  refs/heads/rdf-commons [created] 29f822c7e


http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
index 083a914..5ae2668 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
@@ -16,89 +16,89 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.clerezza.rdf.core.access.providers;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.clerezza.rdf.core.access.TcManagerTest;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-
-/**
- *
- * @author reto
- */
-public class WeightedA implements WeightedTcProvider {
-    private Set<UriRef> mGraphList = new HashSet<UriRef>();
-    @Override
-    public int getWeight() {
-        return 5;
-    }
-
-    @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
-        if (name.equals(TcManagerTest.uriRefA)) {
-            MGraph mResult = new SimpleMGraph();
-            mResult.add(new TripleImpl(TcManagerTest.uriRefA, 
-                    TcManagerTest.uriRefA, TcManagerTest.uriRefA));
-            mGraphList.add(name);
-            return mResult.getGraph();
-        }
-        throw new NoSuchEntityException(name);
-    }
-
-    @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
-        return getGraph(name);
-    }
-
-    @Override
-    public MGraph createMGraph(UriRef name) {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public void deleteTripleCollection(UriRef name) throws NoSuchEntityException, 
-            EntityUndeletableException {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Set<UriRef> getNames(Graph graph) {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Set<UriRef> listGraphs() {
-        return Collections.singleton(TcManagerTest.uriRefA);
-    }
-
-    @Override
-    public Set<UriRef> listMGraphs() {
-        return mGraphList;
-    }
-
-    @Override
-    public Set<UriRef> listTripleCollections() {
-        return listGraphs();
-    }
-}
+package org.apache.clerezza.rdf.core.access.providers;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
+import org.apache.clerezza.rdf.core.access.TcManagerTest;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+
+/**
+ *
+ * @author reto
+ */
+public class WeightedA implements WeightedTcProvider {
+    private Set<Iri> mGraphList = new HashSet<Iri>();
+    @Override
+    public int getWeight() {
+        return 5;
+    }
+
+    @Override
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
+        if (name.equals(TcManagerTest.uriRefA)) {
+            MGraph mResult = new SimpleMGraph();
+            mResult.add(new TripleImpl(TcManagerTest.uriRefA, 
+                    TcManagerTest.uriRefA, TcManagerTest.uriRefA));
+            mGraphList.add(name);
+            return mResult.getGraph();
+        }
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public MGraph getMGraph(Iri name) throws NoSuchEntityException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public TripleCollection getTriples(Iri name) throws NoSuchEntityException {
+        return getGraph(name);
+    }
+
+    @Override
+    public MGraph createMGraph(Iri name) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Graph createGraph(Iri name, TripleCollection triples) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void deleteTripleCollection(Iri name) throws NoSuchEntityException, 
+            EntityUndeletableException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Set<Iri> getNames(Graph graph) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Set<Iri> listGraphs() {
+        return Collections.singleton(TcManagerTest.uriRefA);
+    }
+
+    @Override
+    public Set<Iri> listMGraphs() {
+        return mGraphList;
+    }
+
+    @Override
+    public Set<Iri> listTripleCollections() {
+        return listGraphs();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
index e9622de..467c645 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
@@ -21,10 +21,10 @@ package org.apache.clerezza.rdf.core.access.providers;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -38,14 +38,14 @@ import org.apache.clerezza.rdf.core.impl.TripleImpl;
  * @author reto
  */
 public class WeightedA1 implements WeightedTcProvider {
-    private Set<UriRef> mGraphList = new HashSet<UriRef>();
+    private Set<Iri> mGraphList = new HashSet<Iri>();
     @Override
     public int getWeight() {
         return 5;
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefA)) {
             MGraph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefA1, 
@@ -57,48 +57,48 @@ public class WeightedA1 implements WeightedTcProvider {
     }
 
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public MGraph getMGraph(Iri name) throws NoSuchEntityException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+    public TripleCollection getTriples(Iri name) throws NoSuchEntityException {
         return getGraph(name);
     }
 
     @Override
-    public MGraph createMGraph(UriRef name) {
+    public MGraph createMGraph(Iri name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) {
+    public Graph createGraph(Iri name, TripleCollection triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name) throws NoSuchEntityException, 
+    public void deleteTripleCollection(Iri name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(Graph graph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
+    public Set<Iri> listMGraphs() {
         return mGraphList;
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listTripleCollections() {
         return listMGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
index 2cfc234..c4e6856 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
@@ -22,10 +22,10 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -45,7 +45,7 @@ public class WeightedAHeavy implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefA)) {
             MGraph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefAHeavy, 
@@ -56,47 +56,47 @@ public class WeightedAHeavy implements WeightedTcProvider {
     }
 
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public MGraph getMGraph(Iri name) throws NoSuchEntityException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+    public TripleCollection getTriples(Iri name) throws NoSuchEntityException {
         return getGraph(name);
     }
 
     @Override
-    public MGraph createMGraph(UriRef name) {
+    public MGraph createMGraph(Iri name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) {
+    public Graph createGraph(Iri name, TripleCollection triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name) throws NoSuchEntityException, 
+    public void deleteTripleCollection(Iri name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(Graph graph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listGraphs() {
         return Collections.singleton(TcManagerTest.uriRefA);
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
-        return new HashSet<UriRef>();
+    public Set<Iri> listMGraphs() {
+        return new HashSet<Iri>();
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listTripleCollections() {
         return listGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
index cc7a28e..36a4aa7 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
@@ -21,10 +21,10 @@ package org.apache.clerezza.rdf.core.access.providers;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -44,7 +44,7 @@ public class WeightedBlight implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefB)) {
             MGraph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefB, TcManagerTest.uriRefB, TcManagerTest.uriRefB));
@@ -59,48 +59,48 @@ public class WeightedBlight implements WeightedTcProvider {
     }
 
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public MGraph getMGraph(Iri name) throws NoSuchEntityException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+    public TripleCollection getTriples(Iri name) throws NoSuchEntityException {
         return getGraph(name);
     }
 
     @Override
-    public MGraph createMGraph(UriRef name) {
+    public MGraph createMGraph(Iri name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) {
+    public Graph createGraph(Iri name, TripleCollection triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name) throws NoSuchEntityException, 
+    public void deleteTripleCollection(Iri name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(Graph graph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
-        return new HashSet<UriRef>();
+    public Set<Iri> listMGraphs() {
+        return new HashSet<Iri>();
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listTripleCollections() {
         return listMGraphs();
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
index 8451602..085f7d4 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
@@ -23,10 +23,10 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
@@ -40,10 +40,10 @@ import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
  */
 public class WeightedDummy implements WeightedTcProvider {
 
-    private Map<UriRef, TripleCollection> tripleMap = new HashMap<UriRef, TripleCollection>();
+    private Map<Iri, TripleCollection> tripleMap = new HashMap<Iri, TripleCollection>();
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples)
+    public Graph createGraph(Iri name, TripleCollection triples)
             throws EntityAlreadyExistsException {
         if ((name == null) || (name.getUnicodeString() == null)
                 || (name.getUnicodeString().trim().length() == 0)) {
@@ -69,7 +69,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public MGraph createMGraph(UriRef name) throws EntityAlreadyExistsException {
+    public MGraph createMGraph(Iri name) throws EntityAlreadyExistsException {
         if ((name == null) || (name.getUnicodeString() == null)
                 || (name.getUnicodeString().trim().length() == 0)) {
             throw new IllegalArgumentException("Name must not be null");
@@ -88,7 +88,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name)
+    public void deleteTripleCollection(Iri name)
             throws NoSuchEntityException, EntityUndeletableException {
         if (tripleMap.remove(name) == null) {
             throw new NoSuchEntityException(name);
@@ -96,7 +96,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         TripleCollection tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
             throw new NoSuchEntityException(name);
@@ -107,7 +107,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public MGraph getMGraph(Iri name) throws NoSuchEntityException {
         TripleCollection tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
             throw new NoSuchEntityException(name);
@@ -118,13 +118,13 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(Graph graph) {
         throw new UnsupportedOperationException(
                 "Not supported yet. equals() has to be implemented first");
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name)
+    public TripleCollection getTriples(Iri name)
             throws NoSuchEntityException {
         TripleCollection tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
@@ -140,17 +140,17 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
-        return new HashSet<UriRef>();
+    public Set<Iri> listMGraphs() {
+        return new HashSet<Iri>();
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listTripleCollections() {
         return listMGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/events/NotificationTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/events/NotificationTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/events/NotificationTest.java
index 1ce57cd..147a6b2 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/events/NotificationTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/events/NotificationTest.java
@@ -24,12 +24,12 @@ import java.util.List;
 import java.util.Set;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.event.FilterTriple;
-import org.apache.clerezza.rdf.core.event.GraphEvent;
-import org.apache.clerezza.rdf.core.event.GraphListener;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.event.FilterTriple;
+import org.apache.commons.rdf.event.GraphEvent;
+import org.apache.commons.rdf.event.GraphListener;
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 
@@ -93,7 +93,7 @@ public class NotificationTest {
                 generateRandomUriRef());
     }
 
-    private static UriRef generateRandomUriRef() {
-        return new UriRef("http://example.org/"+Math.random());
+    private static Iri generateRandomUriRef() {
+        return new Iri("http://example.org/"+Math.random());
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/PlainLiteralImplTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/PlainLiteralImplTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/PlainLiteralImplTest.java
index be46ff2..381503b 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/PlainLiteralImplTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/PlainLiteralImplTest.java
@@ -21,8 +21,8 @@ package org.apache.clerezza.rdf.core.impl;
 import org.junit.Test;
 import junit.framework.Assert;
 
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.PlainLiteral;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Literal;
 /**
  *
  * @author reto
@@ -34,25 +34,25 @@ public class PlainLiteralImplTest {
     
     @Test public void plainLiteralEquality() {
         String stringValue = "some text";
-        PlainLiteral literal1 = new PlainLiteralImpl(stringValue);
-        PlainLiteral literal2 = new PlainLiteralImpl(stringValue);        
+        Literal literal1 = new PlainLiteralImpl(stringValue);
+        Literal literal2 = new PlainLiteralImpl(stringValue);        
         Assert.assertEquals(literal1, literal2);
         Assert.assertEquals(literal1.hashCode(), literal2.hashCode());
-        PlainLiteral literal3 = new PlainLiteralImpl("something else");
+        Literal literal3 = new PlainLiteralImpl("something else");
         Assert.assertFalse(literal1.equals(literal3));
     }
     
     @Test public void languageLiteralEquality() {
         String stringValue = "some text";
         Language lang = new Language("en-ca");
-        PlainLiteral literal1 = new PlainLiteralImpl(stringValue, lang);
-        PlainLiteral literal2 = new PlainLiteralImpl(stringValue, lang);        
+        Literal literal1 = new PlainLiteralImpl(stringValue, lang);
+        Literal literal2 = new PlainLiteralImpl(stringValue, lang);        
         Assert.assertEquals(literal1, literal2);
         Assert.assertEquals(literal1.hashCode(), literal2.hashCode());
         Language lang2 = new Language("de");
-        PlainLiteral literal3 = new PlainLiteralImpl(stringValue, lang2);
+        Literal literal3 = new PlainLiteralImpl(stringValue, lang2);
         Assert.assertFalse(literal1.equals(literal3));
-        PlainLiteral literal4 = new PlainLiteralImpl(stringValue, null);
+        Literal literal4 = new PlainLiteralImpl(stringValue, null);
         Assert.assertFalse(literal3.equals(literal4));
         Assert.assertFalse(literal4.equals(literal3));
     }
@@ -63,7 +63,7 @@ public class PlainLiteralImplTest {
     @Test public void checkHashCode() {
         String stringValue = "some text";
         Language language = new Language("en");
-        PlainLiteral literal = new PlainLiteralImpl(stringValue, language);
+        Literal literal = new PlainLiteralImpl(stringValue, language);
         Assert.assertEquals(stringValue.hashCode() + language.hashCode(), literal.hashCode());
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleLiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleLiteralFactoryTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleLiteralFactoryTest.java
index b4674ad..17e25ed 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleLiteralFactoryTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleLiteralFactoryTest.java
@@ -19,8 +19,8 @@
 package org.apache.clerezza.rdf.core.impl;
 
 import junit.framework.Assert;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Iri;
 import org.junit.Test;
 
 /**
@@ -29,19 +29,19 @@ import org.junit.Test;
  */
 public class SimpleLiteralFactoryTest {
 
-    final private static UriRef xsdInteger = 
-            new UriRef("http://www.w3.org/2001/XMLSchema#integer");
-    final private static UriRef xsdInt =
-            new UriRef("http://www.w3.org/2001/XMLSchema#int");
-    final private static UriRef xsdLong =
-            new UriRef("http://www.w3.org/2001/XMLSchema#long");
+    final private static Iri xsdInteger = 
+            new Iri("http://www.w3.org/2001/XMLSchema#integer");
+    final private static Iri xsdInt =
+            new Iri("http://www.w3.org/2001/XMLSchema#int");
+    final private static Iri xsdLong =
+            new Iri("http://www.w3.org/2001/XMLSchema#long");
 
     SimpleLiteralFactory simpleLiteralFactory = new SimpleLiteralFactory();
 
     @Test
     public void longToXsdIntegerAndBackToMany() {
         long value = 14l;
-        TypedLiteral tl = simpleLiteralFactory.createTypedLiteral(value);
+        Literal tl = simpleLiteralFactory.createTypedLiteral(value);
         Assert.assertEquals(xsdLong, tl.getDataType());
         long longValue = simpleLiteralFactory.createObject(Long.class, tl);
         Assert.assertEquals(value, longValue);
@@ -52,7 +52,7 @@ public class SimpleLiteralFactoryTest {
     @Test
     public void intToXsdIntAndBackToMany() {
         int value = 14;
-        TypedLiteral tl = simpleLiteralFactory.createTypedLiteral(value);
+        Literal tl = simpleLiteralFactory.createTypedLiteral(value);
         Assert.assertEquals(xsdInt, tl.getDataType());
         long longValue = simpleLiteralFactory.createObject(Long.class, tl);
         Assert.assertEquals(value, longValue);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleTripleCollectionTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleTripleCollectionTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleTripleCollectionTest.java
index f289675..084a79f 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleTripleCollectionTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/SimpleTripleCollectionTest.java
@@ -22,8 +22,8 @@ import java.util.ConcurrentModificationException;
 import java.util.Iterator;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
 
 /**
  *
@@ -31,9 +31,9 @@ import org.apache.clerezza.rdf.core.UriRef;
  */
 public class SimpleTripleCollectionTest {
 
-    private UriRef uriRef1 = new UriRef("http://example.org/foo");
-    private UriRef uriRef2 = new UriRef("http://example.org/bar");
-    private UriRef uriRef3 = new UriRef("http://example.org/test");
+    private Iri uriRef1 = new Iri("http://example.org/foo");
+    private Iri uriRef2 = new Iri("http://example.org/bar");
+    private Iri uriRef3 = new Iri("http://example.org/test");
     private Triple triple1 = new TripleImpl(uriRef1, uriRef2, uriRef3);
     private Triple triple2 = new TripleImpl(uriRef2, uriRef2, uriRef1);
     private Triple triple3 = new TripleImpl(uriRef3, uriRef1, uriRef3);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TripleImplTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TripleImplTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TripleImplTest.java
index 763c79f..b127702 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TripleImplTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TripleImplTest.java
@@ -29,10 +29,10 @@ package org.apache.clerezza.rdf.core.impl;
 import org.junit.Test;
 import junit.framework.Assert;
 
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 /**
@@ -45,9 +45,9 @@ public class TripleImplTest {
     
     
     @Test public void tripleEquality() {
-        NonLiteral subject = new UriRef("http://example.org/");
-        UriRef predicate = new UriRef("http://example.org/property");
-        Resource object = new PlainLiteralImpl("property value");
+        BlankNodeOrIri subject = new Iri("http://example.org/");
+        Iri predicate = new Iri("http://example.org/property");
+        RdfTerm object = new PlainLiteralImpl("property value");
         Triple triple1 = new TripleImpl(subject, predicate, object);
         Triple triple2 = new TripleImpl(subject, predicate, object);
         Assert.assertEquals(triple1.hashCode(), triple2.hashCode());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TypedLiteralImplTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TypedLiteralImplTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TypedLiteralImplTest.java
index e744df2..9a3dbed 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TypedLiteralImplTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/TypedLiteralImplTest.java
@@ -21,10 +21,16 @@ package org.apache.clerezza.rdf.core.impl;
 import org.junit.Test;
 import junit.framework.Assert;
 
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.Literal;
 /**
  *
+ * @author reto/**
+ *
+ * @author reto/**
+ *
+ * @author reto/**
+ *
  * @author reto
  *
  */
@@ -34,15 +40,15 @@ public class TypedLiteralImplTest {
     
     @Test public void typedLiteralEquality() {
         String stringValue = "some text";
-        UriRef uriRef = new UriRef("http://example.org/datatypes/magic");
-        TypedLiteral literal1 = new TypedLiteralImpl(stringValue, uriRef);
-        TypedLiteral literal2 = new TypedLiteralImpl(stringValue, uriRef);        
+        Iri uriRef = new Iri("http://example.org/datatypes/magic");
+        Literal literal1 = new TypedLiteralImpl(stringValue, uriRef);
+        Literal literal2 = new TypedLiteralImpl(stringValue, uriRef);        
         Assert.assertEquals(literal1, literal2);
         Assert.assertEquals(literal1.hashCode(), literal2.hashCode());
-        TypedLiteral literal3 = new TypedLiteralImpl("something else", uriRef);
+        Literal literal3 = new TypedLiteralImpl("something else", uriRef);
         Assert.assertFalse(literal1.equals(literal3));
-        UriRef uriRef2 = new UriRef("http://example.org/datatypes/other");
-        TypedLiteral literal4 = new TypedLiteralImpl(stringValue, uriRef2);
+        Iri uriRef2 = new Iri("http://example.org/datatypes/other");
+        Literal literal4 = new TypedLiteralImpl(stringValue, uriRef2);
         Assert.assertFalse(literal1.equals(literal4));
     }
 
@@ -52,8 +58,8 @@ public class TypedLiteralImplTest {
      */
     @Test public void checkHashCode() {
         String stringValue = "some text";
-        UriRef uriRef = new UriRef("http://example.org/datatypes/magic");
-        TypedLiteral literal =  new TypedLiteralImpl(stringValue, uriRef);
+        Iri uriRef = new Iri("http://example.org/datatypes/magic");
+        Literal literal =  new TypedLiteralImpl(stringValue, uriRef);
         Assert.assertEquals(stringValue.hashCode() + uriRef.hashCode(), literal.hashCode());
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/GraphMatcherTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/GraphMatcherTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/GraphMatcherTest.java
index c4a6d99..135a255 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/GraphMatcherTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/GraphMatcherTest.java
@@ -19,13 +19,13 @@
 package org.apache.clerezza.rdf.core.impl.graphmatching;
 
 import java.util.Map;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import org.junit.Assert;
@@ -37,13 +37,13 @@ import org.junit.Test;
  */
 public class GraphMatcherTest {
 
-    final static UriRef u1 = new UriRef("http://example.org/u1");
+    final static Iri u1 = new Iri("http://example.org/u1");
 
     @Test
     public void testEmpty() {
         TripleCollection tc1 = new SimpleMGraph();
         TripleCollection tc2 = new SimpleMGraph();
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(0, mapping.size());
     }
@@ -53,7 +53,7 @@ public class GraphMatcherTest {
         TripleCollection tc1 = new SimpleMGraph();
         tc1.add(new TripleImpl(u1, u1, u1));
         TripleCollection tc2 = new SimpleMGraph();
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNull(mapping);
     }
 
@@ -63,7 +63,7 @@ public class GraphMatcherTest {
         tc1.add(new TripleImpl(u1, u1, u1));
         TripleCollection tc2 = new SimpleMGraph();
         tc2.add(new TripleImpl(u1, u1, u1));
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(0, mapping.size());
     }
@@ -71,10 +71,10 @@ public class GraphMatcherTest {
     @Test
     public void test4() {
         TripleCollection tc1 = new SimpleMGraph();
-        tc1.add(new TripleImpl(u1, u1, new BNode()));
+        tc1.add(new TripleImpl(u1, u1, new BlankNode()));
         TripleCollection tc2 = new SimpleMGraph();
-        tc2.add(new TripleImpl(u1, u1, new BNode()));
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        tc2.add(new TripleImpl(u1, u1, new BlankNode()));
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(1, mapping.size());
     }
@@ -82,10 +82,10 @@ public class GraphMatcherTest {
     @Test
     public void test5() {
         TripleCollection tc1 = new SimpleMGraph();
-        tc1.add(new TripleImpl(new BNode(), u1, new BNode()));
+        tc1.add(new TripleImpl(new BlankNode(), u1, new BlankNode()));
         TripleCollection tc2 = new SimpleMGraph();
-        tc2.add(new TripleImpl(new BNode(), u1, new BNode()));
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        tc2.add(new TripleImpl(new BlankNode(), u1, new BlankNode()));
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(2, mapping.size());
     }
@@ -93,27 +93,27 @@ public class GraphMatcherTest {
     @Test
     public void test6() {
         TripleCollection tc1 = new SimpleMGraph();
-        final BNode b11 = new BNode();
-        tc1.add(new TripleImpl(new BNode(), u1,b11));
-        tc1.add(new TripleImpl(new BNode(), u1,b11));
+        final BlankNode b11 = new BlankNode();
+        tc1.add(new TripleImpl(new BlankNode(), u1,b11));
+        tc1.add(new TripleImpl(new BlankNode(), u1,b11));
         TripleCollection tc2 = new SimpleMGraph();
-        tc2.add(new TripleImpl(new BNode(), u1, new BNode()));
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        tc2.add(new TripleImpl(new BlankNode(), u1, new BlankNode()));
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNull(mapping);
     }
 
     private MGraph generateCircle(int size) {
-        return generateCircle(size, new BNode());
+        return generateCircle(size, new BlankNode());
     }
 
-    private MGraph generateCircle(int size, final NonLiteral firstNode) {
+    private MGraph generateCircle(int size, final BlankNodeOrIri firstNode) {
         if (size < 1) {
             throw new IllegalArgumentException();
         }
         MGraph result = new SimpleMGraph();
-        NonLiteral lastNode = firstNode;
+        BlankNodeOrIri lastNode = firstNode;
         for (int i = 0; i < (size-1); i++) {
-            final BNode newNode = new BNode();
+            final BlankNode newNode = new BlankNode();
             result.add(new TripleImpl(lastNode, u1, newNode));
             lastNode = newNode;
         }
@@ -125,7 +125,7 @@ public class GraphMatcherTest {
     public void test7() {
         TripleCollection tc1 = generateCircle(2);
         TripleCollection tc2 = generateCircle(2);
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(2, mapping.size());
     }
@@ -134,20 +134,20 @@ public class GraphMatcherTest {
     public void test8() {
         TripleCollection tc1 = generateCircle(5);
         TripleCollection tc2 = generateCircle(5);
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(5, mapping.size());
     }
 
     @Test
     public void test9() {
-        NonLiteral crossing = new UriRef("http://example.org/");
+        BlankNodeOrIri crossing = new Iri("http://example.org/");
         TripleCollection tc1 = generateCircle(2,crossing);
         tc1.addAll(generateCircle(3,crossing));
         TripleCollection tc2 = generateCircle(2,crossing);
         tc2.addAll(generateCircle(3,crossing));
         Assert.assertEquals(5, tc1.size());
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         //a circle of 2 with 1 bnode and one of 2 bnodes
         Assert.assertEquals(3, mapping.size());
@@ -155,14 +155,14 @@ public class GraphMatcherTest {
 
     @Test
     public void test10() {
-        NonLiteral crossing1 = new BNode();
+        BlankNodeOrIri crossing1 = new BlankNode();
         TripleCollection tc1 = generateCircle(2,crossing1);
         tc1.addAll(generateCircle(3,crossing1));
-        NonLiteral crossing2 = new BNode();
+        BlankNodeOrIri crossing2 = new BlankNode();
         TripleCollection tc2 = generateCircle(2,crossing2);
         tc2.addAll(generateCircle(3,crossing2));
         Assert.assertEquals(5, tc1.size());
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         //a circle of 2 and one of 3 with one common node
         Assert.assertEquals(4, mapping.size());
@@ -170,41 +170,41 @@ public class GraphMatcherTest {
 
     @Test
     public void test11() {
-        NonLiteral crossing1 = new BNode();
+        BlankNodeOrIri crossing1 = new BlankNode();
         TripleCollection tc1 = generateCircle(2,crossing1);
         tc1.addAll(generateCircle(4,crossing1));
-        NonLiteral crossing2 = new BNode();
+        BlankNodeOrIri crossing2 = new BlankNode();
         TripleCollection tc2 = generateCircle(3,crossing2);
         tc2.addAll(generateCircle(3,crossing2));
         Assert.assertEquals(6, tc1.size());
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNull(mapping);
     }
 
     @Test
     public void test12() {
-        NonLiteral start1 = new BNode();
+        BlankNodeOrIri start1 = new BlankNode();
         TripleCollection tc1 = Utils4Testing.generateLine(4,start1);
         tc1.addAll(Utils4Testing.generateLine(5,start1));
-        NonLiteral start2 = new BNode();
+        BlankNodeOrIri start2 = new BlankNode();
         TripleCollection tc2 = Utils4Testing.generateLine(5,start2);
         tc2.addAll(Utils4Testing.generateLine(4,start2));
         Assert.assertEquals(9, tc1.size());
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNotNull(mapping);
         Assert.assertEquals(10, mapping.size());
     }
 
     @Test
     public void test13() {
-        NonLiteral start1 = new BNode();
+        BlankNodeOrIri start1 = new BlankNode();
         TripleCollection tc1 = Utils4Testing.generateLine(4,start1);
         tc1.addAll(Utils4Testing.generateLine(5,start1));
-        NonLiteral start2 = new BNode();
+        BlankNodeOrIri start2 = new BlankNode();
         TripleCollection tc2 = Utils4Testing.generateLine(3,start2);
         tc2.addAll(Utils4Testing.generateLine(3,start2));
         Assert.assertEquals(9, tc1.size());
-        final Map<BNode, BNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
+        final Map<BlankNode, BlankNode> mapping = GraphMatcher.getValidMapping(tc1, tc2);
         Assert.assertNull(mapping);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/HashMatchingTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/HashMatchingTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/HashMatchingTest.java
index d0c81cd..a700ca2 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/HashMatchingTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/HashMatchingTest.java
@@ -21,9 +21,9 @@ package org.apache.clerezza.rdf.core.impl.graphmatching;
 
 import java.util.Map;
 
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -35,14 +35,14 @@ public class HashMatchingTest {
 
     @Test
     public void twoLine() throws GraphNotIsomorphicException {
-        NonLiteral start1 = new BNode();
+        BlankNodeOrIri start1 = new BlankNode();
         MGraph tc1 = Utils4Testing.generateLine(4,start1);
         tc1.addAll(Utils4Testing.generateLine(5,start1));
-        NonLiteral start2 = new BNode();
+        BlankNodeOrIri start2 = new BlankNode();
         MGraph tc2 = Utils4Testing.generateLine(5,start2);
         tc2.addAll(Utils4Testing.generateLine(4,start2));
         Assert.assertEquals(9, tc1.size());
-        final Map<BNode, BNode> mapping = new HashMatching(tc1, tc2).getMatchings();
+        final Map<BlankNode, BlankNode> mapping = new HashMatching(tc1, tc2).getMatchings();
         Assert.assertNotNull(mapping);
         Assert.assertEquals(10, mapping.size());
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/Utils4Testing.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/Utils4Testing.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/Utils4Testing.java
index 0741e52..1e09590 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/Utils4Testing.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/impl/graphmatching/Utils4Testing.java
@@ -19,10 +19,10 @@
 
 package org.apache.clerezza.rdf.core.impl.graphmatching;
 
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.MGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 
@@ -32,20 +32,20 @@ import org.apache.clerezza.rdf.core.impl.TripleImpl;
  */
 public class Utils4Testing {
 
-    static MGraph generateLine(int size, final NonLiteral firstNode) {
+    static MGraph generateLine(int size, final BlankNodeOrIri firstNode) {
         if (size < 1) {
             throw new IllegalArgumentException();
         }
         MGraph result = new SimpleMGraph();
-        NonLiteral lastNode = firstNode;
+        BlankNodeOrIri lastNode = firstNode;
         for (int i = 0; i < size; i++) {
-            final BNode newNode = new BNode();
+            final BlankNode newNode = new BlankNode();
             result.add(new TripleImpl(lastNode, u1, newNode));
             lastNode = newNode;
         }
         return result;
     }
 
-    final static UriRef u1 = new UriRef("http://example.org/u1");
+    final static Iri u1 = new Iri("http://example.org/u1");
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
index ac6512b..2fc6aa2 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
@@ -18,6 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.serializedform;
 
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.MGraph;
 import java.io.InputStream;
 import junit.framework.Assert;
 
@@ -72,7 +74,7 @@ public class ParserTest {
     static class ParsingProviderA implements ParsingProvider {
 
         @Override
-        public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, UriRef baseUri) {
+        public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
             providerAInvoked = true;
         }
     };
@@ -80,7 +82,7 @@ public class ParserTest {
     static class ParsingProviderB implements ParsingProvider {
 
         @Override
-        public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, UriRef baseUri) {
+        public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
             providerBInvoked = true;
         }
     };

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
index e937cd6..14076c1 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.serializedform;
 
+import org.apache.commons.rdf.TripleCollection;
 import java.io.OutputStream;
 
 import junit.framework.Assert;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
index a046d94..b05ef25 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
@@ -19,10 +19,10 @@
 package org.apache.clerezza.rdf.core.serializedform;
 
 import java.io.InputStream;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.commons.rdf.MGraph;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * This class is listed in
@@ -36,7 +36,7 @@ public class TestServiceManagedProvider implements ParsingProvider {
     private static boolean parseInvoked;
 
     @Override
-    public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, UriRef baseUri) {
+    public void parse(MGraph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
         parseInvoked = true;
     }
     

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
index 2cd6e80..0c30926 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
@@ -23,8 +23,8 @@ import java.util.List;
 import java.util.Set;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;
 import org.apache.clerezza.rdf.core.sparql.query.BasicGraphPattern;
@@ -75,7 +75,7 @@ public class QueryParserTest {
         Assert.assertTrue(selectQuery.getSelection().get(0)
                 .equals(new Variable(variable)));
         Assert.assertTrue(selectQuery.getDataSet().getDefaultGraphs().toArray()[0]
-                .equals(new UriRef(defaultGraph)));
+                .equals(new Iri(defaultGraph)));
 
         GraphPattern gp = (GraphPattern) selectQuery.getQueryPattern()
                 .getGraphPatterns().toArray()[0];
@@ -85,8 +85,8 @@ public class QueryParserTest {
         Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
         Assert.assertTrue(triplePatterns.size()==1);
 
-        ResourceOrVariable s = new ResourceOrVariable(new UriRef(subject));
-        UriRefOrVariable p = new UriRefOrVariable(new UriRef(predicate));
+        ResourceOrVariable s = new ResourceOrVariable(new Iri(subject));
+        UriRefOrVariable p = new UriRefOrVariable(new Iri(predicate));
         ResourceOrVariable o = new ResourceOrVariable(new Variable(variable));
 
         Assert.assertTrue(triplePatterns.contains(
@@ -187,8 +187,8 @@ public class QueryParserTest {
                 .getConstructTemplate();
         Assert.assertTrue(triplePatterns.size()==1);
 
-        ResourceOrVariable s = new ResourceOrVariable(new UriRef(subject1));
-        UriRefOrVariable p = new UriRefOrVariable(new UriRef(predicate1));
+        ResourceOrVariable s = new ResourceOrVariable(new Iri(subject1));
+        UriRefOrVariable p = new UriRefOrVariable(new Iri(predicate1));
         ResourceOrVariable o = new ResourceOrVariable(new Variable(variable1));
 
         Assert.assertTrue(triplePatterns.contains(
@@ -202,7 +202,7 @@ public class QueryParserTest {
         Assert.assertTrue(triplePatterns.size()==1);
 
         s = new ResourceOrVariable(new Variable(variable2));
-        p = new UriRefOrVariable(new UriRef(predicate2));
+        p = new UriRefOrVariable(new Iri(predicate2));
 
         Assert.assertTrue(triplePatterns.contains(
                 new SimpleTriplePattern(s, p, o)));
@@ -222,7 +222,7 @@ public class QueryParserTest {
         Assert.assertTrue(DescribeQuery.class.isAssignableFrom(q.getClass()));
         DescribeQuery describeQuery = (DescribeQuery) q;
         Assert.assertTrue(describeQuery.getResourcesToDescribe().get(0)
-                .getResource().equals(new UriRef(resource)));
+                .getResource().equals(new Iri(resource)));
     }
 
     @Test
@@ -250,9 +250,8 @@ public class QueryParserTest {
         Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
         Assert.assertTrue(triplePatterns.size()==1);
 
-        Assert.assertTrue(triplePatterns.contains(
-                new SimpleTriplePattern(new Variable(variable),
-                new UriRef(predicate), new PlainLiteralImpl(object))));
+        Assert.assertTrue(triplePatterns.contains(new SimpleTriplePattern(new Variable(variable),
+                new Iri(predicate), new PlainLiteralImpl(object))));
     }
 
     @Test
@@ -293,8 +292,8 @@ public class QueryParserTest {
         Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
         Assert.assertTrue(triplePatterns.size()==1);
 
-        ResourceOrVariable s = new ResourceOrVariable(new UriRef(base+subject));
-        UriRefOrVariable p = new UriRefOrVariable(new UriRef(prefixUri+predicate));
+        ResourceOrVariable s = new ResourceOrVariable(new Iri(base+subject));
+        UriRefOrVariable p = new UriRefOrVariable(new Iri(prefixUri+predicate));
         ResourceOrVariable o = new ResourceOrVariable(new Variable(variable));
 
         Assert.assertTrue(triplePatterns.contains(
@@ -368,8 +367,7 @@ public class QueryParserTest {
 
         Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
         Assert.assertTrue(triplePatterns.size() == 1);
-        Assert.assertTrue(triplePatterns.contains(
-                new SimpleTriplePattern(var1, new UriRef(prefix1Uri + predicate1),
+        Assert.assertTrue(triplePatterns.contains(new SimpleTriplePattern(var1, new Iri(prefix1Uri + predicate1),
                 var2)));
 
         GraphPattern gp2 = (GraphPattern) ogp.getOptionalGraphPattern()
@@ -379,8 +377,7 @@ public class QueryParserTest {
 
         triplePatterns = bgp.getTriplePatterns();
         Assert.assertTrue(triplePatterns.size() == 1);
-        Assert.assertTrue(triplePatterns.contains(
-                new SimpleTriplePattern(var1, new UriRef(prefix2Uri + predicate2),
+        Assert.assertTrue(triplePatterns.contains(new SimpleTriplePattern(var1, new Iri(prefix2Uri + predicate2),
                 var3)));
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
index 576414d..e536493 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.BinaryOperation;
 import org.apache.clerezza.rdf.core.sparql.query.BuiltInCall;
 import org.apache.clerezza.rdf.core.sparql.query.Expression;
@@ -61,12 +61,12 @@ public class QuerySerializerTest {
         SimpleSelectQuery selectQuery = new SimpleSelectQuery();
         Variable variable = new Variable("title");
         selectQuery.addSelection(variable);
-        UriRef defaultGraph = new UriRef("http://example.org/library");
+        Iri defaultGraph = new Iri("http://example.org/library");
         selectQuery.addDefaultGraph(defaultGraph);
         ResourceOrVariable subject = new ResourceOrVariable(
-                new UriRef("http://example.org/book/book1"));
+                new Iri("http://example.org/book/book1"));
         UriRefOrVariable predicate = new UriRefOrVariable(
-                new UriRef("http://purl.org/dc/elements/1.1/title"));
+                new Iri("http://purl.org/dc/elements/1.1/title"));
         ResourceOrVariable object = new ResourceOrVariable(variable);
         TriplePattern triplePattern = new SimpleTriplePattern(subject, predicate, object);
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
@@ -89,16 +89,16 @@ public class QuerySerializerTest {
                 "WHERE { ?x <http://xmlns.com/foaf/0.1/name> ?name . }";
 
         ResourceOrVariable s = new ResourceOrVariable(
-                new UriRef("http://example.org/person#Alice"));
+                new Iri("http://example.org/person#Alice"));
         UriRefOrVariable p = new UriRefOrVariable(
-                new UriRef("http://www.w3.org/2001/vcard-rdf/3.0#FN"));
+                new Iri("http://www.w3.org/2001/vcard-rdf/3.0#FN"));
         ResourceOrVariable o = new ResourceOrVariable(new Variable("name"));
         Set<TriplePattern> constructTriplePatterns = new HashSet<TriplePattern>();
         constructTriplePatterns.add(new SimpleTriplePattern(s, p, o));
         SimpleConstructQuery constructQuery = new SimpleConstructQuery(constructTriplePatterns);
 
         s = new ResourceOrVariable(new Variable("x"));
-        p = new UriRefOrVariable(new UriRef("http://xmlns.com/foaf/0.1/name"));
+        p = new UriRefOrVariable(new Iri("http://xmlns.com/foaf/0.1/name"));
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
         triplePatterns.add(new SimpleTriplePattern(s, p, o));
 
@@ -118,7 +118,7 @@ public class QuerySerializerTest {
 
         SimpleDescribeQuery describeQuery = new SimpleDescribeQuery();
         describeQuery.addResourceToDescribe(new ResourceOrVariable(
-                new UriRef("http://example.org/book/book1")));
+                new Iri("http://example.org/book/book1")));
 
         Assert.assertTrue(describeQuery.toString()
                 .replaceAll("( |\n)+", " ").trim().equals(queryString));
@@ -132,7 +132,7 @@ public class QuerySerializerTest {
 
         ResourceOrVariable s = new ResourceOrVariable(new Variable("x"));
         UriRefOrVariable p = new UriRefOrVariable(
-                new UriRef("http://xmlns.com/foaf/0.1/name"));
+                new Iri("http://xmlns.com/foaf/0.1/name"));
         ResourceOrVariable o = new ResourceOrVariable(
                 LiteralFactory.getInstance().createTypedLiteral("Alice"));
 
@@ -167,9 +167,9 @@ public class QuerySerializerTest {
         Variable x = new Variable("x");
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
         triplePatterns.add(new SimpleTriplePattern(x,
-                new UriRef("http://example.org/ns#price"), price));
+                new Iri("http://example.org/ns#price"), price));
         triplePatterns.add(new SimpleTriplePattern(x,
-                new UriRef("http://purl.org/dc/elements/1.1/title"), title));
+                new Iri("http://purl.org/dc/elements/1.1/title"), title));
 
         SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
         SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();
@@ -198,13 +198,13 @@ public class QuerySerializerTest {
         Variable myType = new Variable("myType");
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
         triplePatterns.add(new SimpleTriplePattern(resource,
-                new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), myType));
+                new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), myType));
 
         SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
         SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();
         queryPattern.addGraphPattern(bgp);
         BinaryOperation constraint = new BinaryOperation("=",
-                resource, new UriRefExpression(new UriRef("http://example.org/ontology#special")));
+                resource, new UriRefExpression(new Iri("http://example.org/ontology#special")));
         queryPattern.addConstraint(constraint);
         selectQuery.setQueryPattern(queryPattern);
 
@@ -255,13 +255,13 @@ public class QuerySerializerTest {
         Variable x = new Variable("x");
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
         triplePatterns.add(new SimpleTriplePattern(x,
-                new UriRef("http://purl.org/dc/elements/1.1/title"), title));
+                new Iri("http://purl.org/dc/elements/1.1/title"), title));
 
         SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
 
         Set<TriplePattern> triplePatternsOpt = new HashSet<TriplePattern>();
         triplePatternsOpt.add(new SimpleTriplePattern(x,
-                new UriRef("http://example.org/ns#price"), price));
+                new Iri("http://example.org/ns#price"), price));
 
         SimpleBasicGraphPattern bgpOpt =
                 new SimpleBasicGraphPattern(triplePatternsOpt);
@@ -293,7 +293,7 @@ public class QuerySerializerTest {
         Variable x = new Variable("x");
         Set<TriplePattern> triplePatterns = new HashSet<TriplePattern>();
         triplePatterns.add(new SimpleTriplePattern(
-                new UriRef("http://localhost/testitem"), p, x));
+                new Iri("http://localhost/testitem"), p, x));
 
         SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
         SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
index aeaa67f..e524dc5 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.junit.Assert;
 import org.junit.Test;
@@ -31,14 +31,14 @@ import org.junit.Test;
  */
 public class SparqlPreParserTest {
 
-    private final static UriRef DEFAULT_GRAPH = new UriRef("http://example.org/default.graph"); 
-    private final static UriRef NAMED_GRAPH = new UriRef("http://example.org/dummy.graph"); 
-    private final static UriRef TEST_GRAPH = new UriRef("http://example.org/test.graph"); 
+    private final static Iri DEFAULT_GRAPH = new Iri("http://example.org/default.graph"); 
+    private final static Iri NAMED_GRAPH = new Iri("http://example.org/dummy.graph"); 
+    private final static Iri TEST_GRAPH = new Iri("http://example.org/test.graph"); 
 
     class MyTcManager extends TcManager {
         @Override
-        public Set<UriRef> listTripleCollections() {
-            Set<UriRef> result = new HashSet<UriRef>();
+        public Set<Iri> listTripleCollections() {
+            Set<Iri> result = new HashSet<Iri>();
             result.add(NAMED_GRAPH);
             return result;
         }
@@ -57,7 +57,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -69,7 +69,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs == null);
     }
 
@@ -87,7 +87,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStrBuilder.toString(), DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -98,7 +98,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -109,7 +109,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -120,7 +120,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -131,7 +131,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -142,7 +142,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(new MyTcManager());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(NAMED_GRAPH));
     }
 
@@ -153,7 +153,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -164,7 +164,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -175,7 +175,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(new MyTcManager());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(NAMED_GRAPH));
     }
 
@@ -186,7 +186,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -197,7 +197,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -208,8 +208,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -222,8 +222,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -236,8 +236,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -250,8 +250,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -264,8 +264,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -278,8 +278,8 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -293,7 +293,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -304,7 +304,7 @@ public class SparqlPreParserTest {
                 "INSERT DATA { GRAPH " + TEST_GRAPH.toString() + " { <http://example/book1>  ns:price  42 } }";
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -316,7 +316,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -327,7 +327,7 @@ public class SparqlPreParserTest {
                 "DELETE DATA { GRAPH " + TEST_GRAPH.toString() + " { <http://example/book1>  ns:price  42 } }";
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -339,9 +339,9 @@ public class SparqlPreParserTest {
                 "DELETE DATA { GRAPH " + TEST_GRAPH.toString() + " { <http://example/book1>  ns:price  42 } }";
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
 
-        Set<UriRef> expected = new HashSet<UriRef>();
+        Set<Iri> expected = new HashSet<Iri>();
         expected.add(DEFAULT_GRAPH);
         expected.add(TEST_GRAPH);
         Assert.assertTrue(referredGraphs.containsAll(expected));
@@ -355,7 +355,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
 
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
@@ -369,11 +369,11 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
 
-        Set<UriRef> expected = new HashSet<UriRef>();
-        expected.add(new UriRef("http://example.com/names"));
-        expected.add(new UriRef("http://example.com/addresses"));
+        Set<Iri> expected = new HashSet<Iri>();
+        expected.add(new Iri("http://example.com/names"));
+        expected.add(new Iri("http://example.com/addresses"));
         Assert.assertTrue(referredGraphs.containsAll(expected));
     }
 
@@ -385,7 +385,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(TEST_GRAPH));
     }
 
@@ -397,7 +397,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -410,11 +410,11 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
 
-        Set<UriRef> expected = new HashSet<UriRef>();
-        expected.add(new UriRef("http://example/bookStore2"));
-        expected.add(new UriRef("http://example/bookStore"));
+        Set<Iri> expected = new HashSet<Iri>();
+        expected.add(new Iri("http://example/bookStore2"));
+        expected.add(new Iri("http://example/bookStore"));
         Assert.assertTrue(referredGraphs.containsAll(expected));
     }
 
@@ -444,11 +444,11 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
 
-        Set<UriRef> expected = new HashSet<UriRef>();
-        expected.add(new UriRef("http://example/bookStore2"));
-        expected.add(new UriRef("http://example/bookStore"));
+        Set<Iri> expected = new HashSet<Iri>();
+        expected.add(new Iri("http://example/bookStore2"));
+        expected.add(new Iri("http://example/bookStore"));
         Assert.assertTrue(referredGraphs.containsAll(expected));
     }
 
@@ -465,7 +465,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 
@@ -482,7 +482,7 @@ public class SparqlPreParserTest {
 
         SparqlPreParser parser;
         parser = new SparqlPreParser(TcManager.getInstance());
-        Set<UriRef> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
+        Set<Iri> referredGraphs = parser.getReferredGraphs(queryStr, DEFAULT_GRAPH);
         Assert.assertTrue(referredGraphs.toArray()[0].equals(DEFAULT_GRAPH));
     }
 }


Mime
View raw message