clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/4] clerezza git commit: using rdf.commons draft in core
Date Thu, 18 Dec 2014 20:23:00 GMT
http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
index a367642..0829d2a 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
@@ -22,7 +22,7 @@ import java.io.StringReader;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
@@ -66,8 +66,8 @@ public class SparqlPreParser {
      * @return 
      * @throws ParseException 
      */
-    public Set<UriRef> getReferredGraphs(String queryString, UriRef defaultGraph) throws ParseException {
-        Set<UriRef> referredGraphs;
+    public Set<Iri> getReferredGraphs(String queryString, Iri defaultGraph) throws ParseException {
+        Set<Iri> referredGraphs;
         JavaCCGeneratedSparqlPreParser parser = new JavaCCGeneratedSparqlPreParser(new StringReader(queryString));
         SparqlUnit sparqlUnit;
         sparqlUnit = parser.parse();
@@ -79,7 +79,7 @@ public class SparqlPreParser {
                 referredGraphs = dataSet.getDefaultGraphs();
                 referredGraphs.addAll(dataSet.getNamedGraphs());
             } else {
-                referredGraphs = new HashSet<UriRef>();
+                referredGraphs = new HashSet<Iri>();
             }
             GroupGraphPattern queryPattern = q.getQueryPattern();
             if (queryPattern != null) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
index 3220bfa..b30fb2f 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * This interface definition is not yet stable and may change in future.
@@ -34,7 +34,7 @@ public interface DataSet {
      *        an empty set if no default graph is specified,
      *        otherwise a set of their UriRefs
      */
-    public Set<UriRef> getDefaultGraphs();
+    public Set<Iri> getDefaultGraphs();
 
     /**
      *
@@ -42,5 +42,5 @@ public interface DataSet {
      *        an empty set if no named graph is specified,
      *        otherwise a set of their UriRefs
      */
-    public Set<UriRef> getNamedGraphs();
+    public Set<Iri> getNamedGraphs();
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
index 9da0537..a20ebda 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
@@ -19,26 +19,26 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * Defines a function call which is one form of {@link Expression}.
- * A function call has a name of type {@link UriRef} and a list of arguments,
+ * A function call has a name of type {@link Iri} and a list of arguments,
  * where each argument is an {@link Expression}.
  *
  * @author hasan
  */
 public class FunctionCall implements Expression {
 
-    private final UriRef name;
+    private final Iri name;
     private final List<Expression> arguments;
 
-    public FunctionCall(UriRef name, List<Expression> arguments) {
+    public FunctionCall(Iri name, List<Expression> arguments) {
         this.name = name;
         this.arguments = arguments;
     }
 
-    public UriRef getName() {
+    public Iri getName() {
         return name;
     };
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
index 91db90c..03ee08e 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * Defines a group graph pattern.
@@ -58,7 +58,7 @@ public interface GroupGraphPattern extends GraphPattern {
      * @return
      *      all graphs referred in this graph pattern.
      */
-    public Set<UriRef> getReferredGraphs();
+    public Set<Iri> getReferredGraphs();
 
     /**
 	 * @return 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
index f508d9a..8670598 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
-import org.apache.clerezza.rdf.core.Resource;
+import org.apache.commons.rdf.RdfTerm;
 
 /**
  *
@@ -27,5 +27,5 @@ import org.apache.clerezza.rdf.core.Resource;
  */
 public interface InlineData extends GraphPattern {
     public List<Variable> getVariables();
-    public List<List<Resource>> getValues();
+    public List<List<RdfTerm>> getValues();
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/LiteralExpression.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/LiteralExpression.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/LiteralExpression.java
index 2ac02ef..28aeab1 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/LiteralExpression.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/LiteralExpression.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.clerezza.rdf.core.Literal;
+import org.apache.commons.rdf.Literal;
 
 /**
  * Wraps a {@link Literal} in an {@link Expression}.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
index e809211..18b0efe 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
@@ -18,20 +18,20 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  *
  * @author hasan
  */
 public class PredicatePath implements PropertyPathExpression {
-    private UriRef predicatePath;
+    private Iri predicatePath;
 
-    public PredicatePath(UriRef predicatePath) {
+    public PredicatePath(Iri predicatePath) {
         this.predicatePath = predicatePath;
     }
 
-    public UriRef getPredicatePath() {
+    public Iri getPredicatePath() {
         return predicatePath;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
index a969aa1..c2d4fac 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
@@ -18,19 +18,19 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.clerezza.rdf.core.Resource;
+import org.apache.commons.rdf.RdfTerm;
 
 /**
- * Wraps either a {@link Resource} or a {@link Variable}
+ * Wraps either a {@link RdfTerm} or a {@link Variable}
  *
  * @author hasan
  */
 public class ResourceOrVariable {
 
-    private final Resource resource;
+    private final RdfTerm resource;
     private final Variable variable;
 
-    public ResourceOrVariable(Resource resource) {
+    public ResourceOrVariable(RdfTerm resource) {
         if (resource == null) {
             throw new IllegalArgumentException("Invalid resource: null");
         }
@@ -49,7 +49,7 @@ public class ResourceOrVariable {
     /**
      *
      * @return
-     *        true if it is a {@link Variable}, false if it is a {@link Resource}
+     *        true if it is a {@link Variable}, false if it is a {@link RdfTerm}
      */
     public boolean isVariable() {
         return resource == null;
@@ -60,7 +60,7 @@ public class ResourceOrVariable {
      * @return
      *        the wrapped Resource if it is a Resource, null otherwise
      */
-    public Resource getResource() {
+    public RdfTerm getResource() {
         return resource;
     }
     

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
index 72c6760..bfb01df 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
@@ -18,22 +18,22 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
- * Wraps a {@link UriRef} in an {@link Expression}.
+ * Wraps a {@link Iri} in an {@link Expression}.
  *
  * @author hasan
  */
 public class UriRefExpression implements Expression {
 
-    private final UriRef uriRef;
+    private final Iri uriRef;
 
-    public UriRefExpression(UriRef uriRef) {
+    public UriRefExpression(Iri uriRef) {
         this.uriRef = uriRef;
     }
 
-    public UriRef getUriRef() {
+    public Iri getUriRef() {
         return uriRef;
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
index 34f7f22..1b4feb1 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
@@ -18,10 +18,10 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
- * Wraps either a {@link UriRef} or a {@link Variable}.
+ * Wraps either a {@link Iri} or a {@link Variable}.
  *
  * @author rbn
  */
@@ -31,13 +31,13 @@ public class UriRefOrVariable extends ResourceOrVariable {
         super(variable);
     }
 
-    public UriRefOrVariable(UriRef resource) {
+    public UriRefOrVariable(Iri resource) {
         super(resource);
     }
 
     @Override
-    public UriRef getResource() {
-        return (UriRef)super.getResource();
+    public Iri getResource() {
+        return (Iri)super.getResource();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
index 9b47471..af1ea2f 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 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.sparql.query.DataSet;
 
 /**
@@ -28,24 +28,24 @@ import org.apache.clerezza.rdf.core.sparql.query.DataSet;
  * @author hasan
  */
 public class SimpleDataSet implements DataSet {
-    private Set<UriRef> defaultGraphs = new HashSet<UriRef>();
-    private Set<UriRef> namedGraphs = new HashSet<UriRef>();
+    private Set<Iri> defaultGraphs = new HashSet<Iri>();
+    private Set<Iri> namedGraphs = new HashSet<Iri>();
 
     @Override
-    public Set<UriRef> getDefaultGraphs() {
+    public Set<Iri> getDefaultGraphs() {
         return defaultGraphs;
     }
 
     @Override
-    public Set<UriRef> getNamedGraphs() {
+    public Set<Iri> getNamedGraphs() {
         return namedGraphs;
     }
 
-    public void addDefaultGraph(UriRef defaultGraph) {
+    public void addDefaultGraph(Iri defaultGraph) {
         defaultGraphs.add(defaultGraph);
     }
 
-    public void addNamedGraph(UriRef namedGraph) {
+    public void addNamedGraph(Iri namedGraph) {
         namedGraphs.add(namedGraph);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
index 153a562..d0ca54f 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.BasicGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.Expression;
@@ -189,8 +189,8 @@ public class SimpleGroupGraphPattern implements GroupGraphPattern {
 	}
 
     @Override
-    public Set<UriRef> getReferredGraphs() {
-        Set<UriRef> referredGraphs = new HashSet<UriRef>();
+    public Set<Iri> getReferredGraphs() {
+        Set<Iri> referredGraphs = new HashSet<Iri>();
         if (subSelect != null) {
             GroupGraphPattern queryPattern = subSelect.getQueryPattern();
             referredGraphs.addAll(queryPattern.getReferredGraphs());
@@ -202,8 +202,8 @@ public class SimpleGroupGraphPattern implements GroupGraphPattern {
         return referredGraphs;
     }
 
-    private Set<UriRef> getReferredGraphs(GraphPattern graphPattern) {
-        Set<UriRef> referredGraphs = new HashSet<UriRef>();
+    private Set<Iri> getReferredGraphs(GraphPattern graphPattern) {
+        Set<Iri> referredGraphs = new HashSet<Iri>();
         if (graphPattern instanceof GraphGraphPattern) {
             GraphGraphPattern graphGraphPattern = (GraphGraphPattern) graphPattern;
             UriRefOrVariable graph = graphGraphPattern.getGraph();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
index 4b7d8d7..dd5b55b 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.clerezza.rdf.core.Resource;
+import org.apache.commons.rdf.RdfTerm;
 import org.apache.clerezza.rdf.core.sparql.query.InlineData;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 
@@ -31,7 +31,7 @@ import org.apache.clerezza.rdf.core.sparql.query.Variable;
 public class SimpleInlineData implements InlineData {
 
     private List<Variable> variables = new ArrayList<Variable>();
-    private List<List<Resource>> values = new ArrayList<List<Resource>>();
+    private List<List<RdfTerm>> values = new ArrayList<List<RdfTerm>>();
 
     @Override
     public List<Variable> getVariables() {
@@ -39,7 +39,7 @@ public class SimpleInlineData implements InlineData {
     }
 
     @Override
-    public List<List<Resource>> getValues() {
+    public List<List<RdfTerm>> getValues() {
         return values;
     }
 
@@ -47,7 +47,7 @@ public class SimpleInlineData implements InlineData {
         variables.add(variable);
     }
 
-    public void addValues(List<Resource> values) {
+    public void addValues(List<RdfTerm> values) {
         this.values.add(values);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
index 0fd26f1..446e903 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathExpression;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathExpressionOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathPattern;
@@ -58,17 +58,17 @@ public class SimplePropertyPathPattern implements PropertyPathPattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(NonLiteral subject, Variable propertyPathExpression, Variable object) {
+    public SimplePropertyPathPattern(BlankNodeOrIri subject, Variable propertyPathExpression, Variable object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(Variable subject, Variable propertyPathExpression, Resource object) {
+    public SimplePropertyPathPattern(Variable subject, Variable propertyPathExpression, RdfTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(NonLiteral subject, Variable propertyPathExpression, Resource object) {
+    public SimplePropertyPathPattern(BlankNodeOrIri subject, Variable propertyPathExpression, RdfTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
@@ -78,17 +78,17 @@ public class SimplePropertyPathPattern implements PropertyPathPattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(NonLiteral subject, PropertyPathExpression propertyPathExpression, Variable object) {
+    public SimplePropertyPathPattern(BlankNodeOrIri subject, PropertyPathExpression propertyPathExpression, Variable object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(Variable subject, PropertyPathExpression propertyPathExpression, Resource object) {
+    public SimplePropertyPathPattern(Variable subject, PropertyPathExpression propertyPathExpression, RdfTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(NonLiteral subject, PropertyPathExpression propertyPathExpression, Resource object) {
+    public SimplePropertyPathPattern(BlankNodeOrIri subject, PropertyPathExpression propertyPathExpression, RdfTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
index ecd3491..bad769b 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.InlineData;
@@ -49,14 +49,14 @@ public abstract class SimpleQuery implements Query {
         return inlineData;
     }
 
-    public void addDefaultGraph(UriRef defaultGraph) {
+    public void addDefaultGraph(Iri defaultGraph) {
         if (dataSet == null) {
             dataSet = new SimpleDataSet();
         }
         dataSet.addDefaultGraph(defaultGraph);
     }
 
-    public void addNamedGraph(UriRef namedGraph) {
+    public void addNamedGraph(Iri namedGraph) {
         if (dataSet == null) {
             dataSet = new SimpleDataSet();
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
index 9306e54..9466c1b 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
@@ -20,9 +20,9 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.StringQuerySerializer;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;
@@ -92,10 +92,10 @@ public class SimpleStringQuerySerializer extends StringQuerySerializer {
     private void appendDataSet(StringBuffer s, SimpleQuery q) {
         DataSet dataSet = q.getDataSet();
         if (dataSet != null) {
-            for (UriRef dg : dataSet.getDefaultGraphs()) {
+            for (Iri dg : dataSet.getDefaultGraphs()) {
                 s.append("FROM ").append(dg.toString()).append("\n");
             }
-            for (UriRef ng : dataSet.getNamedGraphs()) {
+            for (Iri ng : dataSet.getNamedGraphs()) {
                 s.append("FROM NAMED ").append(ng.toString()).append("\n");
             }
         }
@@ -186,8 +186,8 @@ public class SimpleStringQuerySerializer extends StringQuerySerializer {
         if (n.isVariable()) {
             appendVariable(s, n.getVariable());
         } else {
-            Resource r = n.getResource();
-            if (r instanceof BNode) {
+            RdfTerm r = n.getResource();
+            if (r instanceof BlankNode) {
                 s.append("_:").append(r.toString().replace("@", "."));
             } else {
                 s.append(r.toString());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
index d89ac4a..68571c4 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
@@ -18,9 +18,9 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.ResourceOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.TriplePattern;
 import org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable;
@@ -58,37 +58,37 @@ public class SimpleTriplePattern implements TriplePattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(NonLiteral subject, Variable predicate, Variable object) {
+    public SimpleTriplePattern(BlankNodeOrIri subject, Variable predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, UriRef predicate, Variable object) {
+    public SimpleTriplePattern(Variable subject, Iri predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(NonLiteral subject, UriRef predicate, Variable object) {
+    public SimpleTriplePattern(BlankNodeOrIri subject, Iri predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, Variable predicate, Resource object) {
+    public SimpleTriplePattern(Variable subject, Variable predicate, RdfTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(NonLiteral subject, Variable predicate, Resource object) {
+    public SimpleTriplePattern(BlankNodeOrIri subject, Variable predicate, RdfTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, UriRef predicate, Resource object) {
+    public SimpleTriplePattern(Variable subject, Iri predicate, RdfTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(NonLiteral subject, UriRef predicate, Resource object) {
+    public SimpleTriplePattern(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
index 3ef552b..73fe749 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 
 /**
@@ -38,7 +38,7 @@ public interface Update {
      *      the specified tcProvider is used to get the named graphs referred in the SPARQL {@link Update}.
      * @return a set of graphs referred in the {@link Update}.
      */
-    public Set<UriRef> getReferredGraphs(UriRef defaultGraph, TcProvider tcProvider);
+    public Set<Iri> getReferredGraphs(Iri defaultGraph, TcProvider tcProvider);
 
     public void addOperation(UpdateOperation updateOperation);
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
index f53b8f0..2623142 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 
 /**
@@ -41,7 +41,7 @@ public interface UpdateOperation {
      *      the specified tcProvider is used to get the named graphs referred as input graphs in this operation.
      * @return a set of graphs referred as input graphs in this operation.
      */
-    public Set<UriRef> getInputGraphs(UriRef defaultGraph, TcProvider tcProvider);
+    public Set<Iri> getInputGraphs(Iri defaultGraph, TcProvider tcProvider);
 
     /**
      * 
@@ -52,5 +52,5 @@ public interface UpdateOperation {
      *      the specified tcProvider is used to get the named graphs referred as destination graphs in this operation.
      * @return a set of graphs referred as destination graphs in this operation.
      */
-    public Set<UriRef> getDestinationGraphs(UriRef defaultGraph, TcProvider tcProvider);
+    public Set<Iri> getDestinationGraphs(Iri defaultGraph, TcProvider tcProvider);
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
index ee27cd9..86f4dd8 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 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.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
@@ -30,8 +30,8 @@ import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
  */
 public abstract class BaseUpdateOperation implements UpdateOperation {
 
-    protected Set<UriRef> inputGraphs = new HashSet<UriRef>();
-    protected Set<UriRef> destinationGraphs = new HashSet<UriRef>();
+    protected Set<Iri> inputGraphs = new HashSet<Iri>();
+    protected Set<Iri> destinationGraphs = new HashSet<Iri>();
     protected GraphSpec inputGraphSpec = GraphSpec.GRAPH;
     protected GraphSpec destinationGraphSpec = GraphSpec.GRAPH;
 
@@ -52,14 +52,14 @@ public abstract class BaseUpdateOperation implements UpdateOperation {
     }
 
     @Override
-    public Set<UriRef> getInputGraphs(UriRef defaultGraph, TcProvider tcProvider) {
+    public Set<Iri> getInputGraphs(Iri defaultGraph, TcProvider tcProvider) {
         return getGraphs(defaultGraph, tcProvider, inputGraphSpec, inputGraphs);
     }
 
-    private Set<UriRef> getGraphs(UriRef defaultGraph, TcProvider tcProvider, GraphSpec graphSpec, Set<UriRef> graphs) {
+    private Set<Iri> getGraphs(Iri defaultGraph, TcProvider tcProvider, GraphSpec graphSpec, Set<Iri> graphs) {
         switch (graphSpec) {
             case DEFAULT:
-                Set<UriRef> result = new HashSet<UriRef>();
+                Set<Iri> result = new HashSet<Iri>();
                 result.add(defaultGraph);
                 return result;
             case NAMED:
@@ -71,15 +71,15 @@ public abstract class BaseUpdateOperation implements UpdateOperation {
     }
 
     @Override
-    public Set<UriRef> getDestinationGraphs(UriRef defaultGraph, TcProvider tcProvider) {
+    public Set<Iri> getDestinationGraphs(Iri defaultGraph, TcProvider tcProvider) {
         return getGraphs(defaultGraph, tcProvider, destinationGraphSpec, destinationGraphs);
     }
 
-    public void addInputGraph(UriRef graph) {
+    public void addInputGraph(Iri graph) {
         inputGraphs.add(graph);
     }
 
-    public void addDestinationGraph(UriRef graph) {
+    public void addDestinationGraph(Iri graph) {
         destinationGraphs.add(graph);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
index 9d17390..31730a2 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
@@ -43,14 +43,14 @@ public class ClearOrDropOperation extends BaseUpdateOperation {
         return silent;
     }
 
-    public void setDestinationGraph(UriRef destination) {
+    public void setDestinationGraph(Iri destination) {
         destinationGraphSpec = UpdateOperation.GraphSpec.GRAPH;
         destinationGraphs.clear();
         destinationGraphs.add(destination);
     }
 
-    public UriRef getDestinationGraph(UriRef defaultGraph, TcProvider tcProvider) {
-        Set<UriRef> result = getDestinationGraphs(defaultGraph, tcProvider);
+    public Iri getDestinationGraph(Iri defaultGraph, TcProvider tcProvider) {
+        Set<Iri> result = getDestinationGraphs(defaultGraph, tcProvider);
         if (result.isEmpty()) {
             return null;
         } else {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
index 8afd24d..4952497 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  *
@@ -40,12 +40,12 @@ public class CreateOperation extends BaseUpdateOperation {
         return silent;
     }
 
-    public void setDestinationGraph(UriRef destination) {
+    public void setDestinationGraph(Iri destination) {
         destinationGraphs.clear();
         destinationGraphs.add(destination);
     }
 
-    public UriRef getDestinationGraph() {
+    public Iri getDestinationGraph() {
         if (destinationGraphs.isEmpty()) {
             return null;
         } else {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
index a1779c6..ec63d09 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
 /**
@@ -31,11 +31,11 @@ import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
  */
 public class LoadOperation extends SimpleUpdateOperation {
 
-    public void setSource(UriRef source) {
+    public void setSource(Iri source) {
         setInputGraph(source);
     }
 
-    public UriRef getSource() {
+    public Iri getSource() {
         return getInputGraph(null);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
index e96d845..8c5c0ef 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 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.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.impl.SimpleDataSet;
@@ -36,13 +36,13 @@ import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
  * @author hasan
  */
 public class ModifyOperation implements UpdateOperation {
-    private UriRef fallbackGraph = null;
+    private Iri fallbackGraph = null;
     private UpdateOperationWithQuads deleteOperation = null;
     private UpdateOperationWithQuads insertOperation = null;
     private SimpleDataSet dataSet = null;
     private GroupGraphPattern queryPattern = null;
 
-    public void setFallbackGraph(UriRef fallbackGraph) {
+    public void setFallbackGraph(Iri fallbackGraph) {
         this.fallbackGraph = fallbackGraph;
     }
 
@@ -58,14 +58,14 @@ public class ModifyOperation implements UpdateOperation {
         this.dataSet = dataSet;
     }
 
-    public void addGraphToDataSet(UriRef graph) {
+    public void addGraphToDataSet(Iri graph) {
         if (dataSet == null) {
             dataSet = new SimpleDataSet();
         }
         dataSet.addDefaultGraph(graph);
     }
 
-    public void addNamedGraphToDataSet(UriRef namedGraph) {
+    public void addNamedGraphToDataSet(Iri namedGraph) {
         if (dataSet == null) {
             dataSet = new SimpleDataSet();
         }
@@ -77,8 +77,8 @@ public class ModifyOperation implements UpdateOperation {
     }
 
     @Override
-    public Set<UriRef> getInputGraphs(UriRef defaultGraph, TcProvider tcProvider) {
-        Set<UriRef> graphs = new HashSet<UriRef>();
+    public Set<Iri> getInputGraphs(Iri defaultGraph, TcProvider tcProvider) {
+        Set<Iri> graphs = new HashSet<Iri>();
         if (dataSet != null) {
             graphs.addAll(dataSet.getDefaultGraphs());
             graphs.addAll(dataSet.getNamedGraphs());
@@ -97,9 +97,9 @@ public class ModifyOperation implements UpdateOperation {
     }
 
     @Override
-    public Set<UriRef> getDestinationGraphs(UriRef defaultGraph, TcProvider tcProvider) {
-        Set<UriRef> graphs = new HashSet<UriRef>();
-        UriRef dfltGraph = (fallbackGraph != null) ? fallbackGraph : defaultGraph;
+    public Set<Iri> getDestinationGraphs(Iri defaultGraph, TcProvider tcProvider) {
+        Set<Iri> graphs = new HashSet<Iri>();
+        Iri dfltGraph = (fallbackGraph != null) ? fallbackGraph : defaultGraph;
         if (deleteOperation != null) {
             graphs.addAll(deleteOperation.getDestinationGraphs(dfltGraph, tcProvider));
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
index f8992e3..f075e7a 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.Update;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
@@ -35,8 +35,8 @@ public class SimpleUpdate implements Update {
     protected List<UpdateOperation> operations = new ArrayList<UpdateOperation>();
 
     @Override
-    public Set<UriRef> getReferredGraphs(UriRef defaultGraph, TcProvider tcProvider) {
-        Set<UriRef> referredGraphs = new HashSet<UriRef>();
+    public Set<Iri> getReferredGraphs(Iri defaultGraph, TcProvider tcProvider) {
+        Set<Iri> referredGraphs = new HashSet<Iri>();
         for (UpdateOperation operation : operations) {
             referredGraphs.addAll(operation.getInputGraphs(defaultGraph, tcProvider));
             referredGraphs.addAll(operation.getDestinationGraphs(defaultGraph, tcProvider));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
index db7960d..5e02afa 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
 /**
@@ -44,14 +44,14 @@ public class SimpleUpdateOperation extends BaseUpdateOperation {
         return silent;
     }
 
-    public void setInputGraph(UriRef source) {
+    public void setInputGraph(Iri source) {
         inputGraphSpec = UpdateOperation.GraphSpec.GRAPH;
         inputGraphs.clear();
         inputGraphs.add(source);
     }
 
-    public UriRef getInputGraph(UriRef defaultGraph) {
-        Set<UriRef> result = getInputGraphs(defaultGraph, null);
+    public Iri getInputGraph(Iri defaultGraph) {
+        Set<Iri> result = getInputGraphs(defaultGraph, null);
         if (result.isEmpty()) {
             return null;
         } else {
@@ -59,14 +59,14 @@ public class SimpleUpdateOperation extends BaseUpdateOperation {
         }
     }
 
-    public void setDestinationGraph(UriRef destination) {
+    public void setDestinationGraph(Iri destination) {
         destinationGraphSpec = UpdateOperation.GraphSpec.GRAPH;
         destinationGraphs.clear();
         destinationGraphs.add(destination);
     }
 
-    public UriRef getDestinationGraph(UriRef defaultGraph) {
-        Set<UriRef> result = getDestinationGraphs(defaultGraph, null);
+    public Iri getDestinationGraph(Iri defaultGraph) {
+        Set<Iri> result = getDestinationGraphs(defaultGraph, null);
         if (result.isEmpty()) {
             return null;
         } else {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
index 9b3b6ec..a36353c 100644
--- a/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
+++ b/rdf.core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.TriplePattern;
 import org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable;
@@ -57,13 +57,13 @@ public class UpdateOperationWithQuads implements UpdateOperation {
     }
 
     @Override
-    public Set<UriRef> getInputGraphs(UriRef defaultGraph, TcProvider tcProvider) {
-        return new HashSet<UriRef>();
+    public Set<Iri> getInputGraphs(Iri defaultGraph, TcProvider tcProvider) {
+        return new HashSet<Iri>();
     }
 
     @Override
-    public Set<UriRef> getDestinationGraphs(UriRef defaultGraph, TcProvider tcProvider) {
-        Set<UriRef> graphs = new HashSet<UriRef>();
+    public Set<Iri> getDestinationGraphs(Iri defaultGraph, TcProvider tcProvider) {
+        Set<Iri> graphs = new HashSet<Iri>();
         if (defaultQuad != null) {
             graphs.add(defaultGraph);
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj b/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
index cd69246..c56f87c 100644
--- a/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
+++ b/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
@@ -39,13 +39,12 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.Literal;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TypedLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
@@ -82,14 +81,14 @@ import org.apache.clerezza.rdf.core.sparql.query.impl.SimpleTriplePattern;
  */
 class JavaCCGeneratedQueryParser {
 
-	private static final UriRef RDF_TYPE =
-		new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
-	private static final UriRef RDF_FIRST =
-		new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
-	private static final UriRef RDF_REST =
-		new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
-	private static final UriRef RDF_NIL =
-		new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+	private static final Iri RDF_TYPE =
+		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
+	private static final Iri RDF_FIRST =
+		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
+	private static final Iri RDF_REST =
+		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
+	private static final Iri RDF_NIL =
+		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
 
 	/** A RegEx pattern for separating out a namespace from a prefixed name. */
 	private static final Pattern pfxNamePattern = Pattern.compile("([^:]*):(.*)");
@@ -187,7 +186,7 @@ class JavaCCGeneratedQueryParser {
 	}
 
 	private ResourceOrVariable getNewBNode() {
-		ResourceOrVariable bNode = new ResourceOrVariable(new BNode());
+		ResourceOrVariable bNode = new ResourceOrVariable(new BlankNode());
 		bNodes.put("*" + count++, bNode);
 		return bNode;
 	}
@@ -195,22 +194,22 @@ class JavaCCGeneratedQueryParser {
 	private ResourceOrVariable getBNode(String label) {
 		ResourceOrVariable bNode = bNodes.get(label);
 		if (bNode == null) {
-			bNode = new ResourceOrVariable(new BNode());
+			bNode = new ResourceOrVariable(new BlankNode());
 			bNodes.put(label, bNode);
 		}
 		return bNode;
 	}
 
-	private UriRef createUriRef(String r) throws ParseException {
+	private Iri createUriRef(String r) throws ParseException {
 		// Create an IRI directly if the string does not start with a prefix
 		Matcher m = pfxNamePattern.matcher(r);
 		if (!m.matches()) {
 			// either a normal IRI, or one with a BASE
-			return isRelative(r) ? new UriRef(base + r) : new UriRef(r);
+			return isRelative(r) ? new Iri(base + r) : new Iri(r);
 		}
 		// extract the prefix, and attempt to convert to a URI before creating the reference
 		String ns = prefixes.get(m.group(1));
-		return ns == null ? new UriRef(r) : new UriRef(ns + m.group(2));
+		return ns == null ? new Iri(r) : new Iri(ns + m.group(2));
 	}
 
 	/**
@@ -387,7 +386,7 @@ private void DatasetClause() : {} {
 
 /* [10]    DefaultGraphClause    ::=    SourceSelector */
 private void DefaultGraphClause() : {
-	UriRef defaultGraph; } {
+	Iri defaultGraph; } {
 
 	defaultGraph=SourceSelector() {
 	((SimpleQuery) query).addDefaultGraph(defaultGraph); }
@@ -395,15 +394,15 @@ private void DefaultGraphClause() : {
 
 /* [11]    NamedGraphClause    ::=    'NAMED' SourceSelector */
 private void NamedGraphClause() : {
-	UriRef namedGraph; } {
+	Iri namedGraph; } {
 
 	<NAMED> namedGraph=SourceSelector() {
 	((SimpleQuery) query).addNamedGraph(namedGraph); }
 }
 
 /* [12]    SourceSelector    ::=    IRIref */
-private UriRef SourceSelector() : {
-	UriRef graph; } {
+private Iri SourceSelector() : {
+	Iri graph; } {
 
 	graph=IRIref() {
 	return graph; }
@@ -573,7 +572,7 @@ private Expression Constraint() : {
 
 /* [28]    FunctionCall    ::=    IRIref ArgList */
 private FunctionCall FunctionCall() : {
-	UriRef name;
+	Iri name;
 	List<Expression> arguments;} {
 
 	name=IRIref()
@@ -762,14 +761,14 @@ private ResourceOrVariable VarOrTerm() : {
 /* [43]    VarOrIRIref    ::=    Var | IRIref */
 private UriRefOrVariable VarOrIRIref() : {
 	Variable var;
-	UriRef uriRef; } {
+	Iri Iri; } {
 
 	(
 	var=Var() {
 	return new UriRefOrVariable(var); }
 	|
-	uriRef=IRIref() {
-	return new UriRefOrVariable(uriRef); }
+	Iri=IRIref() {
+	return new UriRefOrVariable(Iri); }
 	)
 }
 
@@ -784,7 +783,7 @@ private Variable Var() : {
 /* [45]    GraphTerm    ::=    IRIref |  RDFLiteral |  NumericLiteral |  BooleanLiteral |  BlankNode |  NIL */
 private ResourceOrVariable GraphTerm() : {
 	ResourceOrVariable bNode = null;
-	Resource r = null; } {
+	RdfTerm r = null; } {
 
 	(r=IRIref() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | bNode=BlankNode() | <NIL> {
 		r = RDF_NIL; }) {
@@ -867,7 +866,7 @@ private Expression NumericExpression() : {
 /* [52]    AdditiveExpression    ::=    MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | NumericLiteralPositive | NumericLiteralNegative )* */
 private Expression AdditiveExpression() : {
 	Expression e, e2;
-	TypedLiteral l; } {
+	Literal l; } {
 
 	e=MultiplicativeExpression()
 	(
@@ -1047,22 +1046,22 @@ private BuiltInCall RegexExpression() : {
 
 /* [59]    IRIrefOrFunction    ::=    IRIref ArgList? */
 private Expression IRIrefOrFunction() : {
-	UriRef uriRef;
+	Iri Iri;
 	List<Expression> args; } {
 
-	uriRef=IRIref()
+	Iri=IRIref()
 	(
 		args=ArgList() {
-		return new FunctionCall(uriRef, args); }
+		return new FunctionCall(Iri, args); }
 	)? {
-	return new UriRefExpression(uriRef); }
+	return new UriRefExpression(Iri); }
 }
 
 /* [60]    RDFLiteral    ::=    String ( LANGTAG | ( '^^' IRIref ) )? */
 private Literal RDFLiteral() : {
 	Token t;
 	String s;
-	UriRef type; } {
+	Iri type; } {
 
 	s = String()
 	(
@@ -1078,15 +1077,15 @@ private Literal RDFLiteral() : {
 }
 
 /* [61]    NumericLiteral    ::=    NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative */
-private TypedLiteral NumericLiteral() : {
-	TypedLiteral l; } {
+private Literal NumericLiteral() : {
+	Literal l; } {
 
 	( l=NumericLiteralUnsigned() | l=NumericLiteralPositive() | l=NumericLiteralNegative() ) {
 	return l; }
 }
 
 /* [62]    NumericLiteralUnsigned    ::=    INTEGER |  DECIMAL |  DOUBLE */
-private TypedLiteral NumericLiteralUnsigned() : {
+private Literal NumericLiteralUnsigned() : {
 	Token t; } {
 
 	t=<INTEGER> {
@@ -1098,7 +1097,7 @@ private TypedLiteral NumericLiteralUnsigned() : {
 }
 
 /* [63]    NumericLiteralPositive    ::=    INTEGER_POSITIVE |  DECIMAL_POSITIVE |  DOUBLE_POSITIVE */
-private TypedLiteral NumericLiteralPositive() : {
+private Literal NumericLiteralPositive() : {
 	Token t; } {
 
 	t=<INTEGER_POSITIVE> {
@@ -1110,7 +1109,7 @@ private TypedLiteral NumericLiteralPositive() : {
 }
 
 /* [64]    NumericLiteralNegative    ::=    INTEGER_NEGATIVE |  DECIMAL_NEGATIVE |  DOUBLE_NEGATIVE */
-private TypedLiteral NumericLiteralNegative() : {
+private Literal NumericLiteralNegative() : {
 	Token t; } {
 
 	t=<INTEGER_NEGATIVE> {
@@ -1122,7 +1121,7 @@ private TypedLiteral NumericLiteralNegative() : {
 }
 
 /* [65]    BooleanLiteral    ::=    'true' |  'false' */
-private TypedLiteral BooleanLiteral() : {} {
+private Literal BooleanLiteral() : {} {
 
 	<TRUE> {
 		return LiteralFactory.getInstance().createTypedLiteral(true); }
@@ -1144,19 +1143,19 @@ private String String() : {
 }
 
 /* [67]    IRIref    ::=    IRI_REF |  PrefixedName */
-private UriRef IRIref() : {
-	UriRef uriRef;
+private Iri IRIref() : {
+	Iri Iri;
 	Token t; } {
 
 	t=<IRI_REF> {
 	return createUriRef(unquote(t.image)); }
 	|
-	uriRef=PrefixedName() {
-	return uriRef; }
+	Iri=PrefixedName() {
+	return Iri; }
 }
 
 /* [68]    PrefixedName    ::=    PNAME_LN | PNAME_NS */
-private UriRef PrefixedName() : {
+private Iri PrefixedName() : {
 	Token t; } {
 
 	( t=<PNAME_LN> | t=<PNAME_NS> ) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
----------------------------------------------------------------------
diff --git a/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj b/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
index c295dab..e881782 100644
--- a/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
+++ b/rdf.core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
@@ -38,13 +38,12 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.Literal;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TypedLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
@@ -116,14 +115,14 @@ import org.apache.clerezza.rdf.core.sparql.update.impl.UpdateOperationWithQuads;
  */
 class JavaCCGeneratedSparqlPreParser {
 
-    private static final UriRef RDF_TYPE =
-        new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
-    private static final UriRef RDF_FIRST =
-        new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
-    private static final UriRef RDF_REST =
-        new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
-    private static final UriRef RDF_NIL =
-        new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+    private static final Iri RDF_TYPE =
+        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
+    private static final Iri RDF_FIRST =
+        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
+    private static final Iri RDF_REST =
+        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
+    private static final Iri RDF_NIL =
+        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
 
     /** A RegEx pattern for separating out a namespace from a prefixed name. */
     private static final Pattern pfxNamePattern = Pattern.compile("([^:]*):(.*)");
@@ -135,17 +134,17 @@ class JavaCCGeneratedSparqlPreParser {
 
     private class GraphRefAllSpec {
         GraphSpec graphSpec;
-        UriRef graph;
+        Iri graph;
         public void setGraphSpec(GraphSpec graphSpec) {
             this.graphSpec = graphSpec;
         }
         public GraphSpec getGraphSpec() {
             return this.graphSpec;
         }
-        public void setGraph(UriRef graph){
+        public void setGraph(Iri graph){
             this.graph = graph;
         }
-        public UriRef getGraph() {
+        public Iri getGraph() {
             return this.graph;
         }
     }
@@ -274,7 +273,7 @@ class JavaCCGeneratedSparqlPreParser {
     }
 
     private ResourceOrVariable getNewBNode() {
-        ResourceOrVariable bNode = new ResourceOrVariable(new BNode());
+        ResourceOrVariable bNode = new ResourceOrVariable(new BlankNode());
         bNodes.put("*" + count++, bNode);
         return bNode;
     }
@@ -282,22 +281,22 @@ class JavaCCGeneratedSparqlPreParser {
     private ResourceOrVariable getBNode(String label) {
         ResourceOrVariable bNode = bNodes.get(label);
         if (bNode == null) {
-            bNode = new ResourceOrVariable(new BNode());
+            bNode = new ResourceOrVariable(new BlankNode());
             bNodes.put(label, bNode);
         }
         return bNode;
     }
 
-    private UriRef createUriRef(String r) throws ParseException {
+    private Iri createUriRef(String r) throws ParseException {
         // Create an IRI directly if the string does not start with a prefix
         Matcher m = pfxNamePattern.matcher(r);
         if (!m.matches()) {
             // either a normal IRI, or one with a BASE
-            return isRelative(r) ? new UriRef(base + r) : new UriRef(r);
+            return isRelative(r) ? new Iri(base + r) : new Iri(r);
         }
         // extract the prefix, and attempt to convert to a URI before creating the reference
         String ns = prefixes.get(m.group(1));
-        return ns == null ? new UriRef(r) : new UriRef(ns + m.group(2));
+        return ns == null ? new Iri(r) : new Iri(ns + m.group(2));
     }
 
     /**
@@ -598,7 +597,7 @@ private void DatasetClause(Query query) : {} {
 
 /* [14]    DefaultGraphClause ::= SourceSelector */
 private void DefaultGraphClause(Query query) : {
-    UriRef defaultGraph; } {
+    Iri defaultGraph; } {
 
     defaultGraph=SourceSelector() {
     ((SimpleQuery) query).addDefaultGraph(defaultGraph); }
@@ -606,15 +605,15 @@ private void DefaultGraphClause(Query query) : {
 
 /* [15]    NamedGraphClause ::= 'NAMED' SourceSelector */
 private void NamedGraphClause(Query query) : {
-    UriRef namedGraph; } {
+    Iri namedGraph; } {
 
     <NAMED> namedGraph=SourceSelector() {
     ((SimpleQuery) query).addNamedGraph(namedGraph); }
 }
 
 /* [16]    SourceSelector ::= iri */
-private UriRef SourceSelector() : {
-    UriRef graph; } {
+private Iri SourceSelector() : {
+    Iri graph; } {
 
     graph=Iri() {
     return graph; }
@@ -782,7 +781,7 @@ private void Update1(Update update) : {
 
 /* [31]    Load ::= 'LOAD' 'SILENT'? iri ( 'INTO' GraphRef )? */
 private UpdateOperation Load() : {
-    UriRef uriRef;
+    Iri uriRef;
     LoadOperation operation; } {
     <LOAD> {
     operation = new LoadOperation(); }
@@ -835,7 +834,7 @@ private UpdateOperation Drop() : {
 
 /* [34]    Create ::= 'CREATE' 'SILENT'? GraphRef */
 private UpdateOperation Create() : {
-    UriRef uriRef;
+    Iri uriRef;
     CreateOperation operation; } {
     <CREATE> {
     operation = new CreateOperation(); }
@@ -928,7 +927,7 @@ private UpdateOperation DeleteWhere() : {
 
 /* [41]    Modify ::= ( 'WITH' iri )? ( DeleteClause InsertClause? | InsertClause ) UsingClause* 'WHERE' GroupGraphPattern */
 private UpdateOperation Modify() : {
-    UriRef fallbackGraph = null;
+    Iri fallbackGraph = null;
     UpdateOperationWithQuads deleteOperation = null;
     UpdateOperationWithQuads insertOperation = null;
     SimpleDataSet dataSet = new SimpleDataSet();
@@ -987,7 +986,7 @@ private UpdateOperationWithQuads InsertClause() : {
 
 /* [44]    UsingClause ::= 'USING' ( iri | 'NAMED' iri ) */
 private void UsingClause(SimpleDataSet dataSet) : {
-    UriRef graph; } {
+    Iri graph; } {
     <USING>
     (
         graph = Iri() {
@@ -1001,7 +1000,7 @@ private void UsingClause(SimpleDataSet dataSet) : {
 
 /* [45]    GraphOrDefault ::= 'DEFAULT_T' | 'GRAPH'? iri */
 private GraphRefAllSpec GraphOrDefault() : {
-    UriRef uriRef;
+    Iri uriRef;
     GraphRefAllSpec graphRefAllSpec = new GraphRefAllSpec(); } {
     (
         <DEFAULT_T> {
@@ -1018,8 +1017,8 @@ private GraphRefAllSpec GraphOrDefault() : {
 }
 
 /* [46]    GraphRef ::= 'GRAPH' iri */
-private UriRef GraphRef() : {
-    UriRef uriRef; } {
+private Iri GraphRef() : {
+    Iri uriRef; } {
     <GRAPH>
     uriRef = Iri() {
     return uriRef; }
@@ -1027,7 +1026,7 @@ private UriRef GraphRef() : {
 
 /* [47]    GraphRefAll ::= GraphRef | 'DEFAULT_T' | 'NAMED' | 'ALL' */
 private GraphRefAllSpec GraphRefAll() : {
-    UriRef uriRef;
+    Iri uriRef;
     GraphRefAllSpec graphRefAllSpec = new GraphRefAllSpec(); } {
     (
         uriRef = GraphRef() {
@@ -1256,14 +1255,14 @@ private InlineData DataBlock() : {
 /* [63]    InlineDataOneVar ::= Var '{' DataBlockValue* '}' */
 private void InlineDataOneVar(InlineData inlineData) : {
     Variable var;
-    Resource val; } {
+    RdfTerm val; } {
 
     var=Var() {
     ((SimpleInlineData) inlineData).addVariable(var); }
     "{"
     (
         val=DataBlockValue() {
-        List<Resource> values = new ArrayList<Resource>();
+        List<RdfTerm> values = new ArrayList<RdfTerm>();
         values.add(val);
         ((SimpleInlineData) inlineData).addValues(values); }
     )*
@@ -1273,7 +1272,7 @@ private void InlineDataOneVar(InlineData inlineData) : {
 /* [64]    InlineDataFull ::= ( NIL | '(' Var* ')' ) '{' ( '(' DataBlockValue* ')' | NIL )* '}' */
 private void InlineDataFull(InlineData inlineData) : {
     Variable var;
-    Resource val; } {
+    RdfTerm val; } {
     (
         <NIL>
     |
@@ -1289,7 +1288,7 @@ private void InlineDataFull(InlineData inlineData) : {
     (
         (
             "(" {
-            List<Resource> values = new ArrayList<Resource>(); }
+            List<RdfTerm> values = new ArrayList<RdfTerm>(); }
             (
                 val=DataBlockValue() {
                 values.add(val); }
@@ -1299,14 +1298,14 @@ private void InlineDataFull(InlineData inlineData) : {
         )
     |
         <NIL> {
-        ((SimpleInlineData) inlineData).addValues(new ArrayList<Resource>()); }
+        ((SimpleInlineData) inlineData).addValues(new ArrayList<RdfTerm>()); }
     )*
     "}"
 }
 
 /* [65]    DataBlockValue ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF' */
-private Resource DataBlockValue() : {
-    Resource r = null; } {
+private RdfTerm DataBlockValue() : {
+    RdfTerm r = null; } {
     (r=Iri() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | <UNDEF> ) {
     return r; }
 }
@@ -1360,7 +1359,7 @@ private Expression Constraint() : {
 
 /* [70]    FunctionCall ::= iri ArgList */
 private FunctionCall FunctionCall() : {
-    UriRef name;
+    Iri name;
     List<Expression> arguments; } {
 
     name=Iri()
@@ -1686,7 +1685,7 @@ private String PathMod() : {} {
 /* [94]    PathPrimary ::= iri | 'a' | '!' PathNegatedPropertySet | '(' Path ')' */
 private PropertyPathExpression PathPrimary() : {
     PropertyPathExpression ppe;
-    UriRef uriRef; } {
+    Iri uriRef; } {
 
     (
         uriRef=Iri() {
@@ -1732,7 +1731,7 @@ private PropertyPathExpression PathNegatedPropertySet() : {
 
 /* [96]    PathOneInPropertySet ::= iri | 'a' | '^' ( iri | 'a' ) */
 private PropertyPathExpression PathOneInPropertySet() : {
-    UriRef uriRef; } {
+    Iri uriRef; } {
 
     (
         uriRef=Iri() {
@@ -1867,7 +1866,7 @@ private ResourceOrVariable VarOrTerm() : {
 /* [107]    VarOrIri ::= Var | iri */
 private UriRefOrVariable VarOrIri() : {
     Variable var;
-    UriRef uriRef; } {
+    Iri uriRef; } {
 
     (
     var=Var() {
@@ -1889,7 +1888,7 @@ private Variable Var() : {
 /* [109]    GraphTerm ::= Iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL */
 private ResourceOrVariable GraphTerm() : {
     ResourceOrVariable bNode = null;
-    Resource r = null; } {
+    RdfTerm r = null; } {
 
     (r=Iri() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | bNode=BlankNode() | <NIL> {
         r = RDF_NIL; }) {
@@ -1984,7 +1983,7 @@ private Expression NumericExpression() : {
 /* [116]    AdditiveExpression ::= MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | ( NumericLiteralPositive | NumericLiteralNegative ) ( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )* )* */
 private Expression AdditiveExpression() : {
     Expression e, e2, u;
-    TypedLiteral l; } {
+    Literal l; } {
 
     e=MultiplicativeExpression()
     (
@@ -2286,7 +2285,7 @@ private Expression NotExistsFunc() : {
 
 /* [128]    IriOrFunction ::= iri ArgList? */
 private Expression IriOrFunction() : {
-    UriRef uriRef;
+    Iri uriRef;
     List<Expression> args; } {
 
     uriRef=Iri()
@@ -2301,7 +2300,7 @@ private Expression IriOrFunction() : {
 private Literal RDFLiteral() : {
     Token t;
     String s;
-    UriRef type; } {
+    Iri type; } {
 
     s = String()
     (
@@ -2318,8 +2317,8 @@ private Literal RDFLiteral() : {
 }
 
 /* [130]    NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative */
-private TypedLiteral NumericLiteral() : {
-    TypedLiteral l; } {
+private Literal NumericLiteral() : {
+    Literal l; } {
 
     (
         l=NumericLiteralUnsigned()
@@ -2332,7 +2331,7 @@ private TypedLiteral NumericLiteral() : {
 }
 
 /* [131]    NumericLiteralUnsigned ::= INTEGER |  DECIMAL |  DOUBLE */
-private TypedLiteral NumericLiteralUnsigned() : {
+private Literal NumericLiteralUnsigned() : {
     Token t; } {
 
         t=<INTEGER> {
@@ -2346,7 +2345,7 @@ private TypedLiteral NumericLiteralUnsigned() : {
 }
 
 /* [132]    NumericLiteralPositive ::= INTEGER_POSITIVE |  DECIMAL_POSITIVE |  DOUBLE_POSITIVE */
-private TypedLiteral NumericLiteralPositive() : {
+private Literal NumericLiteralPositive() : {
     Token t; } {
 
         t=<INTEGER_POSITIVE> {
@@ -2360,7 +2359,7 @@ private TypedLiteral NumericLiteralPositive() : {
 }
 
 /* [133]    NumericLiteralNegative ::= INTEGER_NEGATIVE | DECIMAL_NEGATIVE | DOUBLE_NEGATIVE */
-private TypedLiteral NumericLiteralNegative() : {
+private Literal NumericLiteralNegative() : {
     Token t; } {
 
         t=<INTEGER_NEGATIVE> {
@@ -2374,7 +2373,7 @@ private TypedLiteral NumericLiteralNegative() : {
 }
 
 /* [134]    BooleanLiteral ::= 'true' | 'false' */
-private TypedLiteral BooleanLiteral() : {} {
+private Literal BooleanLiteral() : {} {
 
         <TRUE> {
         return LiteralFactory.getInstance().createTypedLiteral(true); }
@@ -2401,8 +2400,8 @@ private String String() : {
 }
 
 /* [136]    iri ::= IRIREF |  PrefixedName */
-private UriRef Iri() : {
-    UriRef uriRef;
+private Iri Iri() : {
+    Iri uriRef;
     Token t; } {
 
         t=<IRIREF> {
@@ -2413,7 +2412,7 @@ private UriRef Iri() : {
 }
 
 /* [137]    PrefixedName ::= PNAME_LN | PNAME_NS */
-private UriRef PrefixedName() : {
+private Iri PrefixedName() : {
     Token t; } {
 
     ( t=<PNAME_LN> | t=<PNAME_NS> ) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
index e8538ad..3242e33 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
@@ -19,6 +19,7 @@
 package org.apache.clerezza.rdf.core;
 
 
+import org.apache.commons.rdf.Language;
 import org.junit.Test;
 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/LiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
index b30a094..71d21e6 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
@@ -19,6 +19,8 @@
 package org.apache.clerezza.rdf.core;
 
 
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Iri;
 import java.util.Arrays;
 import java.util.Date;
 import org.junit.Test;
@@ -49,8 +51,8 @@ public class LiteralFactoryTest {
         for (byte i = 0; i < bytes.length; i++) {
             bytes[i] = i;
         }
-        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral(bytes);
-        Assert.assertEquals(new UriRef("http://www.w3.org/2001/XMLSchema#base64Binary"), 
+        Literal literal = LiteralFactory.getInstance().createTypedLiteral(bytes);
+        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#base64Binary"), 
                 literal.getDataType());
         //we are using bytes.getClass() but there should be a way to get
         //that instance of Class without getting it from an instance
@@ -66,8 +68,8 @@ public class LiteralFactoryTest {
     @Test
     public void dateConversion() {
         Date date = new Date();
-        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral(date);
-        Assert.assertEquals(new UriRef("http://www.w3.org/2001/XMLSchema#dateTime"),
+        Literal literal = LiteralFactory.getInstance().createTypedLiteral(date);
+        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#dateTime"),
                 literal.getDataType());
         Date dateBack = LiteralFactory.getInstance().createObject(Date.class, literal);
         Assert.assertEquals(date.getTime(), dateBack.getTime());
@@ -80,8 +82,8 @@ public class LiteralFactoryTest {
     @Test
     public void stringConversion() {
         String value = "Hello world";
-        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new UriRef("http://www.w3.org/2001/XMLSchema#string"),
+        Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
+        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#string"),
                 literal.getDataType());
         String valueBack = LiteralFactory.getInstance().createObject(String.class, literal);
         Assert.assertEquals(value, valueBack);
@@ -94,8 +96,8 @@ public class LiteralFactoryTest {
     @Test
     public void intConversion() {
         int value = 3;
-        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new UriRef("http://www.w3.org/2001/XMLSchema#int"),
+        Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
+        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#int"),
                 literal.getDataType());
         Integer valueBack = LiteralFactory.getInstance().createObject(Integer.class, literal);
         Assert.assertEquals(value, valueBack.intValue());
@@ -108,8 +110,8 @@ public class LiteralFactoryTest {
     @Test
     public void longConversion() {
         long value = 332314646;
-        TypedLiteral literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new UriRef("http://www.w3.org/2001/XMLSchema#long"),
+        Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
+        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#long"),
                 literal.getDataType());
         Long valueBack = LiteralFactory.getInstance().createObject(Long.class, literal);
         Assert.assertEquals(value, valueBack.longValue());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
index 84df6a8..2ce68a7 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.clerezza.rdf.core;
 
+import org.apache.commons.rdf.Iri;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import org.junit.Test;
@@ -38,11 +39,11 @@ public class UriRefTest {
     public void uriRefEqualityTest() {
         try {
             String uriRefString = "http://example.org/üöä";
-            UriRef uriRef1 = new UriRef(uriRefString);
-            UriRef uriRef2 = new UriRef(uriRefString);
+            Iri uriRef1 = new Iri(uriRefString);
+            Iri uriRef2 = new Iri(uriRefString);
             Assert.assertEquals(uriRef1, uriRef2);
-            UriRef uriRef3 =
-                    new UriRef(URLEncoder.encode(uriRefString, "utf-8"));
+            Iri uriRef3 =
+                    new Iri(URLEncoder.encode(uriRefString, "utf-8"));
             Assert.assertFalse(uriRef1.equals(uriRef3));
         } catch (UnsupportedEncodingException ex) {
             logger.error("Exception {} ", ex);
@@ -52,7 +53,7 @@ public class UriRefTest {
     @Test
     public void toStringTest() {
         String uriRefString = "http://example.org/üöä";
-        UriRef uriRef = new UriRef(uriRefString);
+        Iri uriRef = new Iri(uriRefString);
         Assert.assertEquals("<"+uriRefString+">", uriRef.toString());
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
index 3e3255e..9d11ea8 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
@@ -33,10 +33,10 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.MGraph;
-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.MGraph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.providers.WeightedA;
 import org.apache.clerezza.rdf.core.access.providers.WeightedDummy;
 import org.apache.clerezza.rdf.core.access.security.TcPermission;
@@ -57,8 +57,8 @@ public class SecurityTest {
         ////needed to unbind because this is injected with META-INF/services - file
         TcManager.getInstance().unbindWeightedTcProvider(new WeightedA());
         TcManager.getInstance().bindWeightedTcProvider(new WeightedDummy());
-        TcManager.getInstance().createMGraph(new UriRef("http://example.org/graph/alreadyexists"));
-        TcManager.getInstance().createMGraph(new UriRef("http://example.org/read/graph"));
+        TcManager.getInstance().createMGraph(new Iri("http://example.org/graph/alreadyexists"));
+        TcManager.getInstance().createMGraph(new Iri("http://example.org/read/graph"));
     }
 
     @AfterClass
@@ -112,69 +112,69 @@ public class SecurityTest {
 
     @Test(expected=NoSuchEntityException.class)
     public void testAcessGraph() {        
-        TcManager.getInstance().getGraph(new UriRef("http://example.org/permitted"));
+        TcManager.getInstance().getGraph(new Iri("http://example.org/permitted"));
     }
     
     @Test(expected=AccessControlException.class)
     public void testNoWildCard() {
-        TcManager.getInstance().getGraph(new UriRef("http://example.org/permitted/subthing"));
+        TcManager.getInstance().getGraph(new Iri("http://example.org/permitted/subthing"));
     }
     
     @Test(expected=NoSuchEntityException.class)
     public void testAllowedArea() {
-        TcManager.getInstance().getGraph(new UriRef("http://example.org/area/allowed/something"));
+        TcManager.getInstance().getGraph(new Iri("http://example.org/area/allowed/something"));
     }
     
     @Test(expected=AccessControlException.class)
     public void testAcessForbiddenGraph() {
-        TcManager.getInstance().getGraph(new UriRef("http://example.org/forbidden"));
+        TcManager.getInstance().getGraph(new Iri("http://example.org/forbidden"));
     }
 
     @Test(expected=NoSuchEntityException.class)
     public void testCustomPermissions() {
-        UriRef graphUri = new UriRef("http://example.org/custom");
+        Iri graphUri = new Iri("http://example.org/custom");
         TcManager.getInstance().getTcAccessController().setRequiredReadPermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        TripleCollection ag = TcManager.getInstance().getTriples(new UriRef("urn:x-localinstance:/graph-access.graph"));
+        TripleCollection ag = TcManager.getInstance().getTriples(new Iri("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().getMGraph(graphUri);
     }
 
     @Test(expected=AccessControlException.class)
     public void testCustomPermissionsIncorrect() {
-        UriRef graphUri = new UriRef("http://example.org/custom");
+        Iri graphUri = new Iri("http://example.org/custom");
         TcManager.getInstance().getTcAccessController().setRequiredReadPermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        TripleCollection ag = TcManager.getInstance().getTriples(new UriRef("urn:x-localinstance:/graph-access.graph"));
+        TripleCollection ag = TcManager.getInstance().getTriples(new Iri("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().createMGraph(graphUri);
     }
 
     @Test
     public void testCustomReadWritePermissions() {
-        UriRef graphUri = new UriRef("http://example.org/read-write-custom");
+        Iri graphUri = new Iri("http://example.org/read-write-custom");
         TcManager.getInstance().getTcAccessController().setRequiredReadWritePermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        TripleCollection ag = TcManager.getInstance().getTriples(new UriRef("urn:x-localinstance:/graph-access.graph"));
+        TripleCollection ag = TcManager.getInstance().getTriples(new Iri("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().createMGraph(graphUri);
     }
     
     @Test(expected=EntityAlreadyExistsException.class)
     public void testCreateMGraph() {
-        TcManager.getInstance().createMGraph(new UriRef("http://example.org/graph/alreadyexists"));
+        TcManager.getInstance().createMGraph(new Iri("http://example.org/graph/alreadyexists"));
     }
     @Test(expected=AccessControlException.class)
     public void testCreateMGraphWithoutWritePermission() {
-        TcManager.getInstance().createMGraph(new UriRef("http://example.org/read/graph"));
+        TcManager.getInstance().createMGraph(new Iri("http://example.org/read/graph"));
     }
     @Test(expected=ReadOnlyException.class)
     public void testAddTripleToMGraph() {
-        MGraph mGraph = TcManager.getInstance().getMGraph(new UriRef("http://example.org/read/graph"));
-        Triple triple = new TripleImpl(new UriRef("http://example.org/definition/isNonLiteral"), new UriRef("http://example.org/definition/isTest"), new PlainLiteralImpl("test"));
+        MGraph mGraph = TcManager.getInstance().getMGraph(new Iri("http://example.org/read/graph"));
+        Triple triple = new TripleImpl(new Iri("http://example.org/definition/isNonLiteral"), new Iri("http://example.org/definition/isTest"), new PlainLiteralImpl("test"));
         mGraph.add(triple);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/29f822c7/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
----------------------------------------------------------------------
diff --git a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
index 861c738..dad3eb7 100644
--- a/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
+++ b/rdf.core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
@@ -24,10 +24,10 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
-import org.apache.clerezza.rdf.core.Graph;
-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.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.TripleCollection;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.providers.WeightedA;
 import org.apache.clerezza.rdf.core.access.providers.WeightedA1;
 import org.apache.clerezza.rdf.core.access.providers.WeightedAHeavy;
@@ -50,10 +50,10 @@ import static org.junit.Assert.*;
  */
 public class TcManagerTest {
 
-	public static UriRef uriRefAHeavy = new UriRef("http://example.org/aHeavy");
-	public static UriRef uriRefB = new UriRef("http://example.org/b");;
-	public static final UriRef uriRefA = new UriRef("http://example.org/a");
-	public static final UriRef uriRefA1 = new UriRef("http://example.org/a1");
+	public static Iri uriRefAHeavy = new Iri("http://example.org/aHeavy");
+	public static Iri uriRefB = new Iri("http://example.org/b");;
+	public static final Iri uriRefA = new Iri("http://example.org/a");
+	public static final Iri uriRefA1 = new Iri("http://example.org/a1");
 	private TcManager graphAccess;
 	private QueryEngine queryEngine;
 	private final WeightedA weightedA = new WeightedA();


Mime
View raw message