clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/9] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)
Date Sat, 11 Apr 2015 13:43:54 GMT
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaStatementSink.java
----------------------------------------------------------------------
diff --git a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaStatementSink.java b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaStatementSink.java
index cbb90be..bd80af4 100644
--- a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaStatementSink.java
+++ b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaStatementSink.java
@@ -23,12 +23,12 @@ import java.util.Map;
 
 import net.rootdev.javardfa.StatementSink;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.Language;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
@@ -61,12 +61,12 @@ public class ClerezzaStatementSink implements StatementSink {
 
     @Override
     public void addObject(String subject, String predicate, String object) {
-        mgraph.add(new TripleImpl(transform(subject), new Iri(predicate), transform(object)));
+        mgraph.add(new TripleImpl(transform(subject), new IRI(predicate), transform(object)));
     }
 
-    private BlankNodeOrIri transform(String nonLiteral) {
-        BlankNodeOrIri s;
-        RdfTerm o;
+    private BlankNodeOrIRI transform(String nonLiteral) {
+        BlankNodeOrIRI s;
+        RDFTerm o;
         if (nonLiteral.startsWith("_:")) {
             s = bnodeLookup.get(nonLiteral);
             if (s == null) {
@@ -74,7 +74,7 @@ public class ClerezzaStatementSink implements StatementSink {
                 bnodeLookup.put(nonLiteral, (BlankNode) s);
             }
         } else {
-            s = new Iri(nonLiteral);
+            s = new IRI(nonLiteral);
         }
         return s;
     }
@@ -89,9 +89,9 @@ public class ClerezzaStatementSink implements StatementSink {
                 obj = new PlainLiteralImpl(lex, new Language(lang));
             }
         } else {
-            obj = new TypedLiteralImpl(lex, new Iri(datatype));
+            obj = new TypedLiteralImpl(lex, new IRI(datatype));
         }
-        mgraph.add(new TripleImpl(transform(subject), new Iri(predicate), obj));
+        mgraph.add(new TripleImpl(transform(subject), new IRI(predicate), obj));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
index 7fb0bb4..809eb5f 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
@@ -21,12 +21,12 @@ package org.apache.clerezza.rdf.scala.utils
 
 //import org.apache.clerezza.rdf.core.impl.{TypedLiteralImpl, PlainLiteralImpl}
 import org.apache.clerezza.rdf.ontologies.XSD
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.commons.rdf.Language
 import org.apache.clerezza.commons.rdf.Literal
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl
 import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl
-//import org.apache.clerezza.commons.rdf.core.{TypedLiteral, Language, PlainLiteral, Iri}
+//import org.apache.clerezza.commons.rdf.core.{TypedLiteral, Language, PlainLiteral, IRI}
 
 object EzLiteral extends EzLiteralImplicits
 
@@ -65,7 +65,7 @@ class EzLiteral(string: String) extends TypedLiteralImpl(string,XSD.string) {
   /**
    * Map to a Typed Literal of given type
    */
-  def ^^(typ: Iri): Literal = new TypedLiteralImpl(string, typ)
+  def ^^(typ: IRI): Literal = new TypedLiteralImpl(string, typ)
 
   /**
    * alias for iri
@@ -76,6 +76,6 @@ class EzLiteral(string: String) extends TypedLiteralImpl(string,XSD.string) {
   /**
    * Map to an IRI of given lexical form
    */
-  def iri = new Iri(string)
+  def iri = new IRI(string)
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
index 1e86b50..1794b4b 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
@@ -22,10 +22,10 @@ package org.apache.clerezza.rdf.scala.utils
 import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.core.impl._
 import org.apache.clerezza.commons.rdf.BlankNode
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI
 import org.apache.clerezza.commons.rdf.Graph
-import org.apache.clerezza.commons.rdf.Iri
-import org.apache.clerezza.commons.rdf.RdfTerm
+import org.apache.clerezza.commons.rdf.IRI
+import org.apache.clerezza.commons.rdf.RDFTerm
 import org.apache.clerezza.commons.rdf.Triple
 import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
@@ -44,8 +44,8 @@ class EzGraph(val baseTc: Graph) extends AbstractGraph with TcDependentConversio
 
   def this() = this (new SimpleGraph())
 
-  def performFilter(subject: BlankNodeOrIri, predicate: Iri,
-      obj: RdfTerm): java.util.Iterator[Triple] = baseTc.filter(subject, predicate, obj)
+  def performFilter(subject: BlankNodeOrIRI, predicate: IRI,
+      obj: RDFTerm): java.util.Iterator[Triple] = baseTc.filter(subject, predicate, obj)
 
   override def performSize = baseTc.size
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
index f9c4c55..1c8484f 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
@@ -27,9 +27,9 @@ import java.net.URL
 import java.util.Date
 import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.commons.rdf.Graph
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.commons.rdf.Literal
-import org.apache.clerezza.commons.rdf.RdfTerm
+import org.apache.clerezza.commons.rdf.RDFTerm
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph
@@ -71,7 +71,7 @@ protected trait TcDependentConversions extends TcIndependentConversions {
   
   def baseTc: Graph
   
-  implicit def toRichGraphNode(resource: RdfTerm) = {
+  implicit def toRichGraphNode(resource: RDFTerm) = {
     new RichGraphNode(new GraphNode(resource, baseTc))
   }
 }
@@ -108,11 +108,11 @@ protected trait TcIndependentConversions extends EzLiteralImplicits {
 
   implicit def double2lit(double: Double) = litFactory.createTypedLiteral(double)
 
-  implicit def uriRef2Prefix(uriRef: Iri) = new NameSpace(uriRef.getUnicodeString)
+  implicit def uriRef2Prefix(uriRef: IRI) = new NameSpace(uriRef.getUnicodeString)
 
-  implicit def URItoIri(uri: URI) = new Iri(uri.toString)
+  implicit def URItoIRI(uri: URI) = new IRI(uri.toString)
 
-  implicit def URLtoIri(url: URL) = new Iri(url.toExternalForm)
+  implicit def URLtoIRI(url: URL) = new IRI(url.toExternalForm)
   
 }
 protected object TcIndependentConversions {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
index 86d436c..a176165 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
@@ -25,9 +25,9 @@ import java.util.Iterator
 import _root_.scala.collection.JavaConversions._
 import _root_.scala.reflect.Manifest
 import org.apache.clerezza.commons.rdf.Graph
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.commons.rdf.Literal
-import org.apache.clerezza.commons.rdf.RdfTerm
+import org.apache.clerezza.commons.rdf.RDFTerm
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.rdf.utils.UnionGraph
 
@@ -41,7 +41,7 @@ import org.apache.clerezza.rdf.utils.UnionGraph
  * @param resource the node represented by this RichGraphNode
  * @param graph the Graph that describes the resource
  */
-class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource, graph) {
+class RichGraphNode(resource: RDFTerm, graph: Graph ) extends GraphNode(resource, graph) {
 
   /**
    * Construct a RichGraphNode given an existing [[GraphNde]]
@@ -55,7 +55,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
    *
    * @return all objects of the specified property of the node wrapped by this object
    */
-  def /(property: Iri): CollectedIter[RichGraphNode] = {
+  def /(property: IRI): CollectedIter[RichGraphNode] = {
     new CollectedIter[RichGraphNode](() => new GraphNodeIter(getObjects(property)), readLock)
   }
 
@@ -65,7 +65,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
    * @param property the property for which the subjects pointing to this node by that property are requested
    * @return the matching resources
    */
-  def /-(property: Iri): CollectedIter[RichGraphNode] = {
+  def /-(property: IRI): CollectedIter[RichGraphNode] = {
     new CollectedIter[RichGraphNode](() => new GraphNodeIter(getSubjects(property)), readLock)
   }
 
@@ -87,14 +87,14 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
 
   /**
    * produces a default String representation for the node, this is the lexical form of literals,
-   * the unicode-string for Iri and for BlankNodes the value returned by toString
+   * the unicode-string for IRI and for BlankNodes the value returned by toString
    *
    * @return the default string representation of the node
    */
   def * : String = {
     getNode() match {
       case lit: Literal => lit.getLexicalForm
-      case uri: Iri => uri.getUnicodeString
+      case uri: IRI => uri.getUnicodeString
       case wrappedNode => wrappedNode.toString
     }
   }
@@ -119,16 +119,16 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
   }
 
   /**
-   * Operator syntax shortcut to get the <code>RdfTerm</code> wrapped by this
+   * Operator syntax shortcut to get the <code>RDFTerm</code> wrapped by this
    * <code>GraphNode</code>
    *
-   * @return the node represented by this GraphNode as RdfTerm, same as <code>getNode</code>
+   * @return the node represented by this GraphNode as RDFTerm, same as <code>getNode</code>
    */
   def ! = {
     getNode()
   }
 
-  private class GraphNodeIter[T <: RdfTerm](base: Iterator[T]) extends Iterator[RichGraphNode] {
+  private class GraphNodeIter[T <: RDFTerm](base: Iterator[T]) extends Iterator[RichGraphNode] {
     override def hasNext() = {
         base.hasNext();
     }
@@ -144,7 +144,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
 
   /**
    *Sets the RDF:type of the subject */
-  def a(rdfclass: Iri): RichGraphNode = {
+  def a(rdfclass: IRI): RichGraphNode = {
     addProperty(RDF.`type`, rdfclass)
     return this
   }
@@ -159,7 +159,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
   /**
    * relate the subject via the given relation to....
    */
-  def --(rel: RdfTerm): DashTuple = new DashTuple(rel)
+  def --(rel: RDFTerm): DashTuple = new DashTuple(rel)
 
   def --(rel: RichGraphNode): DashTuple = new DashTuple(rel.getNode)
 
@@ -169,9 +169,9 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
    */
   def <--(tuple: RichGraphNode#DashTuple): RichGraphNode = {
     val inversePropertyRes = tuple.first.getNode
-    val inverseProperty: Iri =  inversePropertyRes match {
-      case p: Iri => p
-      case _ => throw new RuntimeException("DashTuple must be a Iri")
+    val inverseProperty: IRI =  inversePropertyRes match {
+      case p: IRI => p
+      case _ => throw new RuntimeException("DashTuple must be a IRI")
     }
     RichGraphNode.this.addInverseProperty(inverseProperty, tuple.second)
     RichGraphNode.this
@@ -185,7 +185,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
 //    /**
 //     * ...to the following non literal
 //     */
-//    def --(subj: BlankNodeOrIri): RichGraphNode = {
+//    def --(subj: BlankNodeOrIRI): RichGraphNode = {
 //      RichGraphNode.this.addInverseProperty(rel, subj)
 //      RichGraphNode.this
 //    }
@@ -193,14 +193,14 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
 //    /**
 //     * ...to the following resource (given as a string)
 //     */
-//    def --(subj: String): RichGraphNode = --(new Iri(subj))
+//    def --(subj: String): RichGraphNode = --(new IRI(subj))
 //
 //    /**
 //     * ...to the following EzGraphNode
 //     * (useful for opening a new parenthesis and specifying other things in more detail
 //     */
 //    def --(subj: GraphNode): RichGraphNode = {
-//      --(subj.getNode.asInstanceOf[BlankNodeOrIri])
+//      --(subj.getNode.asInstanceOf[BlankNodeOrIRI])
 //    }
 //    // since we can only have inverses from non literals (howto deal with bndoes?)
 //  }
@@ -208,16 +208,16 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
   /**
    *  class for relations with the current RichGraphNode.ref as subject
    */
-  class DashTuple(val second: RdfTerm) {
+  class DashTuple(val second: RDFTerm) {
 
     val first = RichGraphNode.this
     /**
      * ...to the following non resource
      */
-    def -->(obj: RdfTerm): RichGraphNode = {
+    def -->(obj: RDFTerm): RichGraphNode = {
       val property = second match {
-        case u: Iri => u;
-        case _ => throw new RuntimeException("Property must be a Iri")
+        case u: IRI => u;
+        case _ => throw new RuntimeException("Property must be a IRI")
       }
       RichGraphNode.this.addProperty(property, obj)
       RichGraphNode.this
@@ -234,7 +234,7 @@ class RichGraphNode(resource: RdfTerm, graph: Graph ) extends GraphNode(resource
     /**
      * Add one relation for each member of the iterable collection
      */
-    def -->>[T <: RdfTerm](uris: Iterable[T]): RichGraphNode = {
+    def -->>[T <: RDFTerm](uris: Iterable[T]): RichGraphNode = {
       for (u <- uris) -->(u)
       RichGraphNode.this
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/schemagen/main/src/main/java/org/apache/clerezza/rdf/schemagen/SchemaGen.java
----------------------------------------------------------------------
diff --git a/rdf/schemagen/main/src/main/java/org/apache/clerezza/rdf/schemagen/SchemaGen.java b/rdf/schemagen/main/src/main/java/org/apache/clerezza/rdf/schemagen/SchemaGen.java
index ad73af9..f7e5e1d 100644
--- a/rdf/schemagen/main/src/main/java/org/apache/clerezza/rdf/schemagen/SchemaGen.java
+++ b/rdf/schemagen/main/src/main/java/org/apache/clerezza/rdf/schemagen/SchemaGen.java
@@ -35,12 +35,12 @@ import java.util.TreeSet;
 
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.wymiwyg.commons.util.arguments.AnnotatedInterfaceArguments;
@@ -104,7 +104,7 @@ public class SchemaGen {
         Iterator<Triple> ontologyTriples = schemaGraph.filter(null, RDF.type, OWL.Ontology);
         String result;
         if(ontologyTriples.hasNext()) {
-            result = ((Iri) ontologyTriples.next().getSubject()).getUnicodeString();
+            result = ((IRI) ontologyTriples.next().getSubject()).getUnicodeString();
         } else {
             throw new RuntimeException("No OWL Ontology found!");
         }
@@ -133,7 +133,7 @@ public class SchemaGen {
             out.println(';');
         }
         out.println();
-        out.println("import org.apache.clerezza.commons.rdf.Iri;");
+        out.println("import org.apache.clerezza.commons.rdf.IRI;");
         out.println();
         out.print("public class ");
         out.print(getSimpleName());
@@ -188,16 +188,16 @@ public class SchemaGen {
                 out.println(description);
                 out.println("\t */");
             }
-            out.print("\tpublic static final Iri ");
+            out.print("\tpublic static final IRI ");
             out.print(ontologyResource.getLocalName());
-            out.print(" = new Iri(\"");
+            out.print(" = new IRI(\"");
             out.print(ontologyResource.getUriString());
             out.println("\");");
         }
 
     }
 
-    private Collection<OntologyResource> getResourcesOfType(Iri type) {
+    private Collection<OntologyResource> getResourcesOfType(IRI type) {
          return getResourcesOfType(type, null);
     }
 
@@ -207,13 +207,13 @@ public class SchemaGen {
      * @param ignore a set things to ignore
      * @return
      */
-    private Collection<OntologyResource> getResourcesOfType(Iri type, Collection<OntologyResource> ignore) {
+    private Collection<OntologyResource> getResourcesOfType(IRI type, Collection<OntologyResource> ignore) {
         Set<OntologyResource> result = new HashSet<OntologyResource>();
         Iterator<Triple> classStatemente = schemaGraph.filter(null, RDF.type,
                 type);
         while (classStatemente.hasNext()) {
             Triple triple = classStatemente.next();
-            BlankNodeOrIri classResource = triple.getSubject();
+            BlankNodeOrIRI classResource = triple.getSubject();
             if (classResource instanceof BlankNode) {
                 if (type !=null) System.err.println("Ignoring anonymous resource of type " + type.getUnicodeString());
                 else System.err.println("Ignoring anonymous resource");
@@ -224,7 +224,7 @@ public class SchemaGen {
             }
 
             // Test if the given resource belongs to the ontology
-            final Iri classUri = (Iri) classResource;
+            final IRI classUri = (IRI) classResource;
             final String strClassUri = classUri.getUnicodeString();
             if (strClassUri.startsWith(namespace)) {
                 // The remaining part of the class URI must not contain
@@ -248,7 +248,7 @@ public class SchemaGen {
         return result;
     }
 
-    private ImmutableGraph getNodeContext(BlankNodeOrIri resource, Graph graph) {
+    private ImmutableGraph getNodeContext(BlankNodeOrIRI resource, Graph graph) {
         final HashSet<BlankNode> dontExpand = new HashSet<BlankNode>();
         if (resource instanceof BlankNode) {
             dontExpand.add((BlankNode) resource);
@@ -257,14 +257,14 @@ public class SchemaGen {
 
     }
 
-    private Graph getContextOf(BlankNodeOrIri node, Set<BlankNode> dontExpand,
+    private Graph getContextOf(BlankNodeOrIRI node, Set<BlankNode> dontExpand,
             Graph graph) {
         Graph result = new SimpleGraph();
         Iterator<Triple> forwardProperties = graph.filter(node, null, null);
         while (forwardProperties.hasNext()) {
             Triple triple = forwardProperties.next();
             result.add(triple);
-            RdfTerm object = triple.getObject();
+            RDFTerm object = triple.getObject();
             if (object instanceof BlankNode) {
                 BlankNode bNodeObject = (BlankNode) object;
                 if (!dontExpand.contains(bNodeObject)) {
@@ -277,7 +277,7 @@ public class SchemaGen {
         while (backwardProperties.hasNext()) {
             Triple triple = backwardProperties.next();
             result.add(triple);
-            BlankNodeOrIri subject = triple.getSubject();
+            BlankNodeOrIRI subject = triple.getSubject();
             if (subject instanceof BlankNode) {
                 BlankNode bNodeSubject = (BlankNode) subject;
                 if (!dontExpand.contains(bNodeSubject)) {
@@ -309,7 +309,7 @@ public class SchemaGen {
             Comparable<OntologyResource> {
 
         final Graph graph;
-        final Iri uri;
+        final IRI uri;
 
         static final List<String> reservedWords = Arrays.asList(
                 "abstract", "assert", "boolean", "break", "byte", "case",
@@ -322,7 +322,7 @@ public class SchemaGen {
                 "synchronized", "this", "throw", "throws", "transient",
                 "true", "try", "void", "volatile", "while");
 
-        OntologyResource(Iri uri, Graph graph) {
+        OntologyResource(IRI uri, Graph graph) {
             this.uri = uri;
             this.graph = graph;
         }
@@ -348,7 +348,7 @@ public class SchemaGen {
             Iterator<Triple> titleStatements = graph.filter(
                     uri, DCTERMS.title, null);
             while (titleStatements.hasNext()) {
-                RdfTerm object = titleStatements.next().getObject();
+                RDFTerm object = titleStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("title: ");
                     result.append (((Literal) object).getLexicalForm());
@@ -358,7 +358,7 @@ public class SchemaGen {
             Iterator<Triple> descriptionStatements = graph.filter(
                     uri, DCTERMS.description, null);
             while (descriptionStatements.hasNext()) {
-                RdfTerm object = descriptionStatements.next().getObject();
+                RDFTerm object = descriptionStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("description: ");
                     result.append (((Literal) object).getLexicalForm());
@@ -368,7 +368,7 @@ public class SchemaGen {
             Iterator<Triple> skosDefStatements = graph.filter(
                     uri, SKOS.definition, null);
             while (skosDefStatements.hasNext()) {
-                RdfTerm object = skosDefStatements.next().getObject();
+                RDFTerm object = skosDefStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("definition: ");
                     result.append (((Literal) object).getLexicalForm());
@@ -378,7 +378,7 @@ public class SchemaGen {
             Iterator<Triple> rdfsCommentStatements = graph.filter(
                     uri, RDFS.comment, null);
             while (rdfsCommentStatements.hasNext()) {
-                RdfTerm object = rdfsCommentStatements.next().getObject();
+                RDFTerm object = rdfsCommentStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("comment: ");
                     result.append(((Literal) object).getLexicalForm());
@@ -388,7 +388,7 @@ public class SchemaGen {
             Iterator<Triple> skosNoteStatements = graph.filter(
                     uri, SKOS.note, null);
             while (skosNoteStatements.hasNext()) {
-                RdfTerm object = skosNoteStatements.next().getObject();
+                RDFTerm object = skosNoteStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("note: ");
                     result.append (((Literal) object).getLexicalForm());
@@ -398,13 +398,13 @@ public class SchemaGen {
             Iterator<Triple> skosExampleStatements = graph.filter(
                     uri, SKOS.example, null);
             while (skosExampleStatements.hasNext()) {
-                RdfTerm object = skosExampleStatements.next().getObject();
+                RDFTerm object = skosExampleStatements.next().getObject();
                 if (object instanceof Literal) {
                     result.append("example: ");
                     result.append (((Literal) object).getLexicalForm());
                     result.append("\n");
-                } else if (object instanceof Iri) {
-                    result.append("see <a href="+((Iri)object).getUnicodeString()+">example</a>");
+                } else if (object instanceof IRI) {
+                    result.append("see <a href="+((IRI)object).getUnicodeString()+">example</a>");
                     result.append("\n");
                 }
             }
@@ -444,13 +444,13 @@ public class SchemaGen {
 
 
         private static final String NS = "http://www.w3.org/2002/07/owl#";
-        private static final Iri Class =
-                new Iri(NS + "Class");
-        public static final RdfTerm Ontology = new Iri(NS + "Ontology");
-        private static final Iri DatatypeProperty =
-                new Iri(NS + "DatatypeProperty");
-        private static final Iri ObjectProperty =
-                new Iri(NS + "ObjectProperty");
+        private static final IRI Class =
+                new IRI(NS + "Class");
+        public static final RDFTerm Ontology = new IRI(NS + "Ontology");
+        private static final IRI DatatypeProperty =
+                new IRI(NS + "DatatypeProperty");
+        private static final IRI ObjectProperty =
+                new IRI(NS + "ObjectProperty");
     }
 
     /** RDFS Ontology. */
@@ -458,9 +458,9 @@ public class SchemaGen {
 
         private static final String NS =
                 "http://www.w3.org/2000/01/rdf-schema#";
-        private static final Iri Class = new Iri(NS + "Class");
-        private static final Iri Datatype = new Iri(NS + "Datatype");
-        private static final Iri comment = new Iri(NS + "comment");
+        private static final IRI Class = new IRI(NS + "Class");
+        private static final IRI Datatype = new IRI(NS + "Datatype");
+        private static final IRI comment = new IRI(NS + "comment");
     }
 
     /** RDF Ontology. */
@@ -468,19 +468,19 @@ public class SchemaGen {
 
         private static final String NS =
                 "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-        private static final Iri Property = new Iri(NS + "Property");
-        private static final Iri type = new Iri(NS + "type");
+        private static final IRI Property = new IRI(NS + "Property");
+        private static final IRI type = new IRI(NS + "type");
     }
 
     private static class SKOS {
-        static final Iri definition = new Iri("http://www.w3.org/2008/05/skos#definition");
-        static final Iri note = new Iri("http://www.w3.org/2004/02/skos/core#note");
-        static final Iri example = new Iri("http://www.w3.org/2004/02/skos/core#example");
+        static final IRI definition = new IRI("http://www.w3.org/2008/05/skos#definition");
+        static final IRI note = new IRI("http://www.w3.org/2004/02/skos/core#note");
+        static final IRI example = new IRI("http://www.w3.org/2004/02/skos/core#example");
     }
 
     private static class DCTERMS {
-        public static final Iri title = new Iri("http://purl.org/dc/terms/title");
-        public static final Iri description = new Iri("http://purl.org/dc/terms/description");
+        public static final IRI title = new IRI("http://purl.org/dc/terms/title");
+        public static final IRI description = new IRI("http://purl.org/dc/terms/description");
 
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/simple.storage/src/main/java/org/apache/clerezza/rdf/simple/storage/SimpleTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/simple.storage/src/main/java/org/apache/clerezza/rdf/simple/storage/SimpleTcProvider.java b/rdf/simple.storage/src/main/java/org/apache/clerezza/rdf/simple/storage/SimpleTcProvider.java
index 1dbdaa1..11352ca 100644
--- a/rdf/simple.storage/src/main/java/org/apache/clerezza/rdf/simple/storage/SimpleTcProvider.java
+++ b/rdf/simple.storage/src/main/java/org/apache/clerezza/rdf/simple/storage/SimpleTcProvider.java
@@ -25,7 +25,7 @@ import java.util.Set;
 
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.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.osgi.service.component.annotations.Component;
 @Component(service = WeightedTcProvider.class, property = TcManager.GENERAL_PURPOSE_TC+"=true")
 public class SimpleTcProvider implements WeightedTcProvider {
 
-    private Map<Iri, Graph> tripleMap = new HashMap<Iri, Graph>();
+    private Map<IRI, Graph> tripleMap = new HashMap<IRI, Graph>();
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples)
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples)
             throws EntityAlreadyExistsException {
         if ((name == null) || (name.getUnicodeString() == null)
                 || (name.getUnicodeString().trim().length() == 0)) {
@@ -73,7 +73,7 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Graph createGraph(Iri name) throws EntityAlreadyExistsException {
+    public Graph createGraph(IRI name) throws EntityAlreadyExistsException {
         if ((name == null) || (name.getUnicodeString() == null)
                 || (name.getUnicodeString().trim().length() == 0)) {
             throw new IllegalArgumentException("Name must not be null");
@@ -92,7 +92,7 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public void deleteGraph(Iri name)
+    public void deleteGraph(IRI name)
             throws NoSuchEntityException, EntityUndeletableException {
         if (tripleMap.remove(name) == null) {
             throw new NoSuchEntityException(name);
@@ -100,7 +100,7 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         Graph tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
             throw new NoSuchEntityException(name);
@@ -111,7 +111,7 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         Graph tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
             throw new NoSuchEntityException(name);
@@ -122,13 +122,13 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
+    public Set<IRI> getNames(ImmutableGraph graph) {
         throw new UnsupportedOperationException(
                 "Not supported yet. equals() has to be implemented first");
     }
 
     @Override
-    public Graph getGraph(Iri name)
+    public Graph getGraph(IRI name)
             throws NoSuchEntityException {
         Graph tripleCollection = tripleMap.get(name);
         if (tripleCollection == null) {
@@ -144,9 +144,9 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
-        for (Iri uriRef : listGraphs()) {
+    public Set<IRI> listImmutableGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
+        for (IRI uriRef : listGraphs()) {
             if (tripleMap.get(uriRef) instanceof ImmutableGraph) {
                 result.add(uriRef);
             }
@@ -155,9 +155,9 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
-        for (Iri uriRef : listGraphs()) {
+    public Set<IRI> listMGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
+        for (IRI uriRef : listGraphs()) {
             if (!(tripleMap.get(uriRef) instanceof ImmutableGraph)) {
                 result.add(uriRef);
             }
@@ -166,7 +166,7 @@ public class SimpleTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return tripleMap.keySet();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/AccessViaTcManager.java
----------------------------------------------------------------------
diff --git a/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/AccessViaTcManager.java b/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/AccessViaTcManager.java
index 9c86d60..8714b97 100644
--- a/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/AccessViaTcManager.java
+++ b/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/AccessViaTcManager.java
@@ -17,7 +17,7 @@ package org.apache.clerezza.rdf.simple.storage;
 
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.junit.Assert;
 import org.junit.Test;
@@ -30,7 +30,7 @@ public class AccessViaTcManager {
     
     @Test
     public void simple() {
-        Graph g = TcManager.getInstance().createGraph(new Iri("http://example.org/foo"));
+        Graph g = TcManager.getInstance().createGraph(new IRI("http://example.org/foo"));
         Assert.assertTrue(g instanceof SimpleGraph);
     }
     

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphNode.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphNode.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphNode.java
index af8696c..c710699 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphNode.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphNode.java
@@ -37,7 +37,7 @@ import org.apache.clerezza.commons.rdf.*;
  */
 public class GraphNode {
 
-    private final RdfTerm resource;
+    private final RDFTerm resource;
     private final Graph graph;
 
     /**
@@ -46,7 +46,7 @@ public class GraphNode {
      * @param resource the resource this GraphNode represents
      * @param graph the Graph that describes the resource
      */
-    public GraphNode(RdfTerm resource, Graph graph) {
+    public GraphNode(RDFTerm resource, Graph graph) {
         if (resource == null) {
             throw new IllegalArgumentException("resource may not be null");
         }
@@ -71,7 +71,7 @@ public class GraphNode {
      *
      * @return the node represented by this GraphNode
      */
-    public RdfTerm getNode() {
+    public RDFTerm getNode() {
         return resource;
     }
 
@@ -99,10 +99,10 @@ public class GraphNode {
         Lock l = readLock();
         l.lock();
         try {
-            final HashSet<RdfTerm> dontExpand = new HashSet<RdfTerm>();
+            final HashSet<RDFTerm> dontExpand = new HashSet<RDFTerm>();
             dontExpand.add(resource);
-            if (resource instanceof Iri) {
-                return getContextOf((Iri) resource, dontExpand).getImmutableGraph();
+            if (resource instanceof IRI) {
+                return getContextOf((IRI) resource, dontExpand).getImmutableGraph();
             }
             return getContextOf(resource, dontExpand).getImmutableGraph();
         } finally {
@@ -111,17 +111,17 @@ public class GraphNode {
 
     }
 
-    private Graph getContextOf(Iri node, final Set<RdfTerm> dontExpand) {
+    private Graph getContextOf(IRI node, final Set<RDFTerm> dontExpand) {
         final String uriPrefix = node.getUnicodeString()+'#';
         return getContextOf(node, dontExpand, new Acceptor() {
 
             @Override
-            public boolean expand(RdfTerm resource) {
+            public boolean expand(RDFTerm resource) {
                 if (resource instanceof BlankNode) {
                     return true;
                 }
-                if (resource instanceof Iri) {
-                    return ((Iri)resource).getUnicodeString().startsWith(uriPrefix);
+                if (resource instanceof IRI) {
+                    return ((IRI)resource).getUnicodeString().startsWith(uriPrefix);
                 }
                 return false;
             }
@@ -129,18 +129,18 @@ public class GraphNode {
     }
 
     /**
-     * Returns the context of a <code>BlankNodeOrIri</code>
+     * Returns the context of a <code>BlankNodeOrIRI</code>
      *
      * @param node
      * @param dontExpand a list of bnodes at which to stop expansion, if node
      * is a BlankNode it should be contained (potentially faster)
      * @return the context of a node
      */
-    private Graph getContextOf(RdfTerm node, final Set<RdfTerm> dontExpand) {
+    private Graph getContextOf(RDFTerm node, final Set<RDFTerm> dontExpand) {
         return getContextOf(node, dontExpand, new Acceptor() {
 
             @Override
-            public boolean expand(RdfTerm resource) {
+            public boolean expand(RDFTerm resource) {
                 if (resource instanceof BlankNode) {
                     return true;
                 }
@@ -150,16 +150,16 @@ public class GraphNode {
     }
 
     private interface Acceptor {
-        boolean expand(RdfTerm resource);
+        boolean expand(RDFTerm resource);
     }
-    private Graph getContextOf(RdfTerm node, final Set<RdfTerm> dontExpand, Acceptor acceptor) {
+    private Graph getContextOf(RDFTerm node, final Set<RDFTerm> dontExpand, Acceptor acceptor) {
         Graph result = new SimpleGraph();
-        if (node instanceof BlankNodeOrIri) {
-            Iterator<Triple> forwardProperties = graph.filter((BlankNodeOrIri) node, null, null);
+        if (node instanceof BlankNodeOrIRI) {
+            Iterator<Triple> forwardProperties = graph.filter((BlankNodeOrIRI) node, null, null);
             while (forwardProperties.hasNext()) {
                 Triple triple = forwardProperties.next();
                 result.add(triple);
-                RdfTerm object = triple.getObject();
+                RDFTerm object = triple.getObject();
                 if (acceptor.expand(object) && !dontExpand.contains(object)) {
                     dontExpand.add(object);
                     result.addAll(getContextOf(object, dontExpand, acceptor));
@@ -170,7 +170,7 @@ public class GraphNode {
         while (backwardProperties.hasNext()) {
             Triple triple = backwardProperties.next();
             result.add(triple);
-            BlankNodeOrIri subject = triple.getSubject();
+            BlankNodeOrIRI subject = triple.getSubject();
             if (acceptor.expand(subject) && !dontExpand.contains(subject)) {
                 dontExpand.add(subject);
                 result.addAll(getContextOf(subject, dontExpand, acceptor));
@@ -179,8 +179,8 @@ public class GraphNode {
         return result;
     }
 
-    private <T> Iterator<T> getTypeSelectedObjects(Iri property, final Class<T> type) {
-        final Iterator<RdfTerm> objects = getObjects(property);
+    private <T> Iterator<T> getTypeSelectedObjects(IRI property, final Class<T> type) {
+        final Iterator<RDFTerm> objects = getObjects(property);
         return new Iterator<T>() {
 
             T next = prepareNext();
@@ -204,7 +204,7 @@ public class GraphNode {
 
             private T prepareNext() {
                 while (objects.hasNext()) {
-                    RdfTerm nextObject = objects.next();
+                    RDFTerm nextObject = objects.next();
                     if (type.isAssignableFrom(nextObject.getClass())) {
                         return (T) nextObject;
                     }
@@ -214,8 +214,8 @@ public class GraphNode {
         };
     }
 
-    public Iterator<Literal> getLiterals(Iri property) {
-        final Iterator<RdfTerm> objects = getObjects(property);
+    public Iterator<Literal> getLiterals(IRI property) {
+        final Iterator<RDFTerm> objects = getObjects(property);
         return new Iterator<Literal>() {
 
             Literal next = prepareNext();
@@ -239,7 +239,7 @@ public class GraphNode {
 
             private Literal prepareNext() {
                 while (objects.hasNext()) {
-                    RdfTerm nextObject = objects.next();
+                    RDFTerm nextObject = objects.next();
                     if (nextObject instanceof Literal) {
                         return (Literal) nextObject;
                     }
@@ -257,8 +257,8 @@ public class GraphNode {
      * @return the number of triples in the underlying triple-collection
      *        which meet the specified condition
      */
-    public int countObjects(Iri property) {
-        return countTriples(graph.filter((BlankNodeOrIri) resource, property, null));
+    public int countObjects(IRI property) {
+        return countTriples(graph.filter((BlankNodeOrIRI) resource, property, null));
     }
 
     private int countTriples(final Iterator<Triple> triples) {
@@ -277,10 +277,10 @@ public class GraphNode {
      * @param property the property
      * @return
      */
-    public Iterator<RdfTerm> getObjects(Iri property) {
-        if (resource instanceof BlankNodeOrIri) {
-            final Iterator<Triple> triples = graph.filter((BlankNodeOrIri) resource, property, null);
-            return new Iterator<RdfTerm>() {
+    public Iterator<RDFTerm> getObjects(IRI property) {
+        if (resource instanceof BlankNodeOrIRI) {
+            final Iterator<Triple> triples = graph.filter((BlankNodeOrIRI) resource, property, null);
+            return new Iterator<RDFTerm>() {
 
                 @Override
                 public boolean hasNext() {
@@ -288,7 +288,7 @@ public class GraphNode {
                 }
 
                 @Override
-                public RdfTerm next() {
+                public RDFTerm next() {
                     final Triple triple = triples.next();
                     if (triple != null) {
                         return triple.getObject();
@@ -303,7 +303,7 @@ public class GraphNode {
                 }
             };
         } else {
-            return new Iterator<RdfTerm>() {
+            return new Iterator<RDFTerm>() {
 
                 @Override
                 public boolean hasNext() {
@@ -311,7 +311,7 @@ public class GraphNode {
                 }
 
                 @Override
-                public RdfTerm next() {
+                public RDFTerm next() {
                     return null;
                 }
 
@@ -333,11 +333,11 @@ public class GraphNode {
      * @return true if the node represented by this object is the subject of a
      *         statement with the given prediate and object, false otherwise
      */
-    public boolean hasProperty(Iri property, RdfTerm object) {
+    public boolean hasProperty(IRI property, RDFTerm object) {
         Lock l = readLock();
         l.lock();
         try {
-            Iterator<RdfTerm> objects = getObjects(property);
+            Iterator<RDFTerm> objects = getObjects(property);
             if (object == null) {
                 return objects.hasNext();
             }
@@ -360,7 +360,7 @@ public class GraphNode {
      * @return the number of triples in the underlying triple-collection
      *        which meet the specified condition
      */
-    public int countSubjects(Iri property) {
+    public int countSubjects(IRI property) {
         Lock l = readLock();
         l.lock();
         try {
@@ -377,9 +377,9 @@ public class GraphNode {
      * @param property the property
      * @return
      */
-    public Iterator<BlankNodeOrIri> getSubjects(Iri property) {
+    public Iterator<BlankNodeOrIRI> getSubjects(IRI property) {
         final Iterator<Triple> triples = graph.filter(null, property, resource);
-        return new Iterator<BlankNodeOrIri>() {
+        return new Iterator<BlankNodeOrIRI>() {
 
             @Override
             public boolean hasNext() {
@@ -387,7 +387,7 @@ public class GraphNode {
             }
 
             @Override
-            public BlankNodeOrIri next() {
+            public BlankNodeOrIRI next() {
                 return triples.next().getSubject();
             }
 
@@ -398,24 +398,24 @@ public class GraphNode {
         };
     }
 
-    public Iterator<Iri> getIriObjects(Iri property) {
-        return getTypeSelectedObjects(property, Iri.class);
+    public Iterator<IRI> getIriObjects(IRI property) {
+        return getTypeSelectedObjects(property, IRI.class);
 
     }
 
     /**
-     * Get all available properties as an {@link Iterator}<{@link Iri}>.
-     * You can use <code>getObjects(Iri property)</code> to get the values of
+     * Get all available properties as an {@link Iterator}<{@link IRI}>.
+     * You can use <code>getObjects(IRI property)</code> to get the values of
      * each property
      *
      * @return an iterator over properties of this node
      */
-    public Iterator<Iri> getProperties() {
-        if (resource instanceof BlankNodeOrIri) {
-            final Iterator<Triple> triples = graph.filter((BlankNodeOrIri) resource, null, null);
+    public Iterator<IRI> getProperties() {
+        if (resource instanceof BlankNodeOrIRI) {
+            final Iterator<Triple> triples = graph.filter((BlankNodeOrIRI) resource, null, null);
             return getUniquePredicates(triples);
         } else {
-            return new Iterator<Iri>() {
+            return new Iterator<IRI>() {
 
                 @Override
                 public boolean hasNext() {
@@ -423,7 +423,7 @@ public class GraphNode {
                 }
 
                 @Override
-                public Iri next() {
+                public IRI next() {
                     return null;
                 }
 
@@ -436,13 +436,13 @@ public class GraphNode {
     }
 
     /**
-     * Get all inverse properties as an {@link Iterator}<{@link Iri}>.
-     * You can use <code>getSubject(Iri property)</code> to get the values of
+     * Get all inverse properties as an {@link Iterator}<{@link IRI}>.
+     * You can use <code>getSubject(IRI property)</code> to get the values of
      * each inverse property
      *
      * @return an iterator over properties pointing to this node
      */
-    public Iterator<Iri> getInverseProperties() {
+    public Iterator<IRI> getInverseProperties() {
         final Iterator<Triple> triples = graph.filter(null, null, resource);
         return getUniquePredicates(triples);
     }
@@ -453,8 +453,8 @@ public class GraphNode {
      * @returnan {@link Iterator}<{@link Iri}> containing the predicates from
      * an {@link Iterator}<{@link Triple}>
      */
-    private Iterator<Iri> getUniquePredicates(final Iterator<Triple> triples) {
-        final Set<Iri> resultSet = new HashSet<Iri>();
+    private Iterator<IRI> getUniquePredicates(final Iterator<Triple> triples) {
+        final Set<IRI> resultSet = new HashSet<IRI>();
         while (triples.hasNext()) {
             resultSet.add(triples.next().getPredicate());
         }
@@ -467,9 +467,9 @@ public class GraphNode {
      * @param predicate
      * @param object
      */
-    public void addProperty(Iri predicate, RdfTerm object) {
-        if (resource instanceof BlankNodeOrIri) {
-            graph.add(new TripleImpl((BlankNodeOrIri) resource, predicate, object));
+    public void addProperty(IRI predicate, RDFTerm object) {
+        if (resource instanceof BlankNodeOrIRI) {
+            graph.add(new TripleImpl((BlankNodeOrIRI) resource, predicate, object));
         } else {
             throw new RuntimeException("Literals cannot be the subject of a statement");
         }
@@ -483,7 +483,7 @@ public class GraphNode {
      * @param property the predicate of the triple to be created
      * @param value the value of the typed literal object
      */
-    public void addPropertyValue(Iri property, Object value) {
+    public void addPropertyValue(IRI property, Object value) {
         addProperty(property,
                 LiteralFactory.getInstance().createTypedLiteral(value));
     }
@@ -495,9 +495,9 @@ public class GraphNode {
      * @param predicate
      * @param subject
      */
-    public void addInverseProperty(Iri predicate, RdfTerm subject) {
-        if (subject instanceof BlankNodeOrIri) {
-            graph.add(new TripleImpl((BlankNodeOrIri) subject, predicate, resource));
+    public void addInverseProperty(IRI predicate, RDFTerm subject) {
+        if (subject instanceof BlankNodeOrIRI) {
+            graph.add(new TripleImpl((BlankNodeOrIRI) subject, predicate, resource));
         } else {
             throw new RuntimeException("Literals cannot be the subject of a statement");
         }
@@ -510,9 +510,9 @@ public class GraphNode {
      *
      * @return a List to easy access the rdf:List represented by this node
      */
-    public List<RdfTerm> asList() {
-        if (resource instanceof BlankNodeOrIri) {
-            return new RdfList((BlankNodeOrIri) resource, graph);
+    public List<RDFTerm> asList() {
+        if (resource instanceof BlankNodeOrIRI) {
+            return new RdfList((BlankNodeOrIRI) resource, graph);
         } else {
             throw new RuntimeException("Literals cannot be the subject of a List");
         }
@@ -524,9 +524,9 @@ public class GraphNode {
      *
      * @param predicate
      */
-    public void deleteProperties(Iri predicate) {
-        if (resource instanceof BlankNodeOrIri) {
-            Iterator<Triple> tripleIter = graph.filter((BlankNodeOrIri) resource, predicate, null);
+    public void deleteProperties(IRI predicate) {
+        if (resource instanceof BlankNodeOrIRI) {
+            Iterator<Triple> tripleIter = graph.filter((BlankNodeOrIRI) resource, predicate, null);
             Collection<Triple> toDelete = new ArrayList<Triple>();
             while (tripleIter.hasNext()) {
                 Triple triple = tripleIter.next();
@@ -544,9 +544,9 @@ public class GraphNode {
      * @param predicate
      * @param object
      */
-    public void deleteProperty(Iri predicate, RdfTerm object) {
-        if (resource instanceof BlankNodeOrIri) {
-            graph.remove(new TripleImpl((BlankNodeOrIri) resource, predicate, object));
+    public void deleteProperty(IRI predicate, RDFTerm object) {
+        if (resource instanceof BlankNodeOrIRI) {
+            graph.remove(new TripleImpl((BlankNodeOrIRI) resource, predicate, object));
         }
     }
 
@@ -556,27 +556,27 @@ public class GraphNode {
     }
 
     /**
-     * Replaces the graph node resouce with the specified <code>BlankNodeOrIri</code>.
+     * Replaces the graph node resouce with the specified <code>BlankNodeOrIRI</code>.
      * The resource is only replaced where it is either subject or object.
      * @param replacement
      * @return a GraphNode representing the replecement node
      */
-    public GraphNode replaceWith(BlankNodeOrIri replacement) {
+    public GraphNode replaceWith(BlankNodeOrIRI replacement) {
         return replaceWith(replacement, false);
     }
 
     /**
-     * Replaces the graph node resouce with the specified <code>BlankNodeOrIri</code>.
+     * Replaces the graph node resouce with the specified <code>BlankNodeOrIRI</code>.
      * Over the boolean <code>checkPredicate</code> it can be specified if the
      * resource should also be replaced where it is used as predicate.
      * @param replacement
      * @param checkPredicates
      * @return a GraphNode representing the replecement node
      */
-    public GraphNode replaceWith(BlankNodeOrIri replacement, boolean checkPredicates) {
+    public GraphNode replaceWith(BlankNodeOrIRI replacement, boolean checkPredicates) {
         Graph newTriples = new SimpleGraph();
         if (!(resource instanceof Literal)) {
-            Iterator<Triple> subjectTriples = graph.filter((BlankNodeOrIri) resource, null,
+            Iterator<Triple> subjectTriples = graph.filter((BlankNodeOrIRI) resource, null,
                     null);
             while (subjectTriples.hasNext()) {
                 Triple triple = subjectTriples.next();
@@ -600,14 +600,14 @@ public class GraphNode {
         graph.addAll(newTriples);
         newTriples.clear();
 
-        if (checkPredicates && replacement instanceof Iri
-                && resource instanceof Iri) {
+        if (checkPredicates && replacement instanceof IRI
+                && resource instanceof IRI) {
             Iterator<Triple> predicateTriples = graph.filter(null,
-                    (Iri) resource, null);
+                    (IRI) resource, null);
             while (predicateTriples.hasNext()) {
                 Triple triple = predicateTriples.next();
                 Triple newTriple = new TripleImpl(triple.getSubject(),
-                        (Iri) replacement, triple.getObject());
+                        (IRI) replacement, triple.getObject());
                 predicateTriples.remove();
                 newTriples.add(newTriple);
             }
@@ -624,8 +624,8 @@ public class GraphNode {
      * @param property
      * @return
      */
-    public Iterator<GraphNode> getObjectNodes(Iri property) {
-        final Iterator<RdfTerm> objects = this.getObjects(property);
+    public Iterator<GraphNode> getObjectNodes(IRI property) {
+        final Iterator<RDFTerm> objects = this.getObjects(property);
         return new Iterator<GraphNode>() {
 
             @Override
@@ -635,7 +635,7 @@ public class GraphNode {
 
             @Override
             public GraphNode next() {
-                RdfTerm object = objects.next();
+                RDFTerm object = objects.next();
                 return new GraphNode(object, graph);
 
             }
@@ -655,8 +655,8 @@ public class GraphNode {
      * @param property
      * @return
      */
-    public Iterator<GraphNode> getSubjectNodes(Iri property) {
-        final Iterator<BlankNodeOrIri> subjects = this.getSubjects(property);
+    public Iterator<GraphNode> getSubjectNodes(IRI property) {
+        final Iterator<BlankNodeOrIRI> subjects = this.getSubjects(property);
         return new Iterator<GraphNode>() {
 
             @Override
@@ -666,7 +666,7 @@ public class GraphNode {
 
             @Override
             public GraphNode next() {
-                RdfTerm object = subjects.next();
+                RDFTerm object = subjects.next();
                 return new GraphNode(object, graph);
 
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphUtils.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphUtils.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphUtils.java
index 4ed57cd..f1c82d5 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphUtils.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/GraphUtils.java
@@ -25,8 +25,8 @@ import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 
@@ -72,7 +72,7 @@ public class GraphUtils {
                 break;
             }
             final GraphNode objectGN = new GraphNode(triple.getObject(), unGroundedTriples);
-            BlankNodeOrIri subject = triple.getSubject();
+            BlankNodeOrIRI subject = triple.getSubject();
             ImmutableGraph context = objectGN.getNodeContext();
             Iterator<Triple> potentialIter = mGraph.filter(subject, triple.getPredicate(), null);
             while (potentialIter.hasNext()) {
@@ -97,7 +97,7 @@ public class GraphUtils {
                 break;
             }
             final GraphNode subjectGN = new GraphNode(triple.getSubject(), unGroundedTriples);
-            RdfTerm object = triple.getObject();
+            RDFTerm object = triple.getObject();
             if (object instanceof BlankNode) {
                 object = null;
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/RdfList.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/RdfList.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/RdfList.java
index f6e4311..e9192ab 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/RdfList.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/RdfList.java
@@ -28,9 +28,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
@@ -54,18 +54,18 @@ import org.slf4j.LoggerFactory;
  *
  * @author rbn, mir
  */
-public class RdfList extends AbstractList<RdfTerm> {
+public class RdfList extends AbstractList<RDFTerm> {
 
     private static final Logger logger = LoggerFactory.getLogger(RdfList.class);
 
-    private final static Iri RDF_NIL =
-            new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+    private final static IRI RDF_NIL =
+            new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
     /**
      * a list of the linked rdf:List elements in order
      */
-    private List<BlankNodeOrIri> listList = new ArrayList<BlankNodeOrIri>();
-    private List<RdfTerm> valueList = new ArrayList<RdfTerm>();
-    private BlankNodeOrIri firstList;
+    private List<BlankNodeOrIRI> listList = new ArrayList<BlankNodeOrIRI>();
+    private List<RDFTerm> valueList = new ArrayList<RDFTerm>();
+    private BlankNodeOrIRI firstList;
     private Graph tc;
     private boolean totallyExpanded = false;
 
@@ -78,7 +78,7 @@ public class RdfList extends AbstractList<RdfTerm> {
      * @param listRdfTerm
      * @param tc
      */
-    public RdfList(BlankNodeOrIri listRdfTerm, Graph tc) {
+    public RdfList(BlankNodeOrIRI listRdfTerm, Graph tc) {
         firstList = listRdfTerm;
         this.tc = tc;
 
@@ -90,7 +90,7 @@ public class RdfList extends AbstractList<RdfTerm> {
      * @param listNode
      */
     public RdfList(GraphNode listNode) {
-        this((BlankNodeOrIri)listNode.getNode(), listNode.getGraph());
+        this((BlankNodeOrIRI)listNode.getNode(), listNode.getGraph());
     }
 
     /**
@@ -103,7 +103,7 @@ public class RdfList extends AbstractList<RdfTerm> {
      * @throws IllegalArgumentException
      *        if the provided {@code  listRdfTerm} is a non-empty rdf:List.
      */
-    public static RdfList createEmptyList(BlankNodeOrIri listRdfTerm, Graph tc)
+    public static RdfList createEmptyList(BlankNodeOrIRI listRdfTerm, Graph tc)
             throws IllegalArgumentException {
 
         if (!tc.filter(listRdfTerm, RDF.first, null).hasNext()) {
@@ -119,7 +119,7 @@ public class RdfList extends AbstractList<RdfTerm> {
         if (totallyExpanded) {
             return;
         }
-        BlankNodeOrIri currentList;
+        BlankNodeOrIRI currentList;
         if (listList.size() > 0) {
             currentList = listList.get(listList.size()-1);
         } else {
@@ -150,7 +150,7 @@ public class RdfList extends AbstractList<RdfTerm> {
 
 
     @Override
-    public RdfTerm get(int index) {
+    public RDFTerm get(int index) {
         expandTill(index + 1);
         return valueList.get(index);
     }
@@ -162,7 +162,7 @@ public class RdfList extends AbstractList<RdfTerm> {
     }
 
     @Override
-    public void add(int index, RdfTerm element) {
+    public void add(int index, RDFTerm element) {
         expandTill(index);
         if (index == 0) {
             //special casing to make sure the first list remains the same resource
@@ -187,9 +187,9 @@ public class RdfList extends AbstractList<RdfTerm> {
      * @param index is > 0
      * @param element
      */
-    private void addInRdfList(int index, RdfTerm element) {
+    private void addInRdfList(int index, RDFTerm element) {
         expandTill(index+1);
-        BlankNodeOrIri newList = new BlankNode() {
+        BlankNodeOrIRI newList = new BlankNode() {
         };
         tc.add(new TripleImpl(newList, RDF.first, element));
         if (index < listList.size()) {
@@ -205,7 +205,7 @@ public class RdfList extends AbstractList<RdfTerm> {
     }
 
     @Override
-    public RdfTerm remove(int index) {
+    public RDFTerm remove(int index) {
         //keeping the first list resource
         tc.remove(new TripleImpl(listList.get(index), RDF.first, valueList.get(index)));
         if (index == (listList.size() - 1)) {
@@ -233,11 +233,11 @@ public class RdfList extends AbstractList<RdfTerm> {
         return valueList.remove(index);
     }
 
-    private BlankNodeOrIri getRest(BlankNodeOrIri list) {
-        return (BlankNodeOrIri) tc.filter(list, RDF.rest, null).next().getObject();
+    private BlankNodeOrIRI getRest(BlankNodeOrIRI list) {
+        return (BlankNodeOrIRI) tc.filter(list, RDF.rest, null).next().getObject();
     }
 
-    private RdfTerm getFirstEntry(final BlankNodeOrIri listRdfTerm) {
+    private RDFTerm getFirstEntry(final BlankNodeOrIRI listRdfTerm) {
         try {
             return tc.filter(listRdfTerm, RDF.first, null).next().getObject();
         } catch (final NullPointerException e) {
@@ -250,7 +250,7 @@ public class RdfList extends AbstractList<RdfTerm> {
                         Serializer.getInstance().serialize(fileOutputStream, graphNode.getNodeContext(), SupportedFormat.N_TRIPLE);
                         fileOutputStream.flush();
                         logger.warn("GraphNode: " + graphNode);
-                        final Iterator<Iri> properties = graphNode.getProperties();
+                        final Iterator<IRI> properties = graphNode.getProperties();
                         while (properties.hasNext()) {
                             logger.warn("available: " + properties.next());
                         }
@@ -265,7 +265,7 @@ public class RdfList extends AbstractList<RdfTerm> {
         }
     }
 
-    public BlankNodeOrIri getListRdfTerm() {
+    public BlankNodeOrIRI getListRdfTerm() {
         return firstList;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/SeeAlsoExpander.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/SeeAlsoExpander.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/SeeAlsoExpander.java
index 9bcc652..fb1c646 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/SeeAlsoExpander.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/SeeAlsoExpander.java
@@ -23,9 +23,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.locks.Lock;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.ontologies.RDFS;
@@ -56,10 +56,10 @@ public class SeeAlsoExpander {
      * @return a new GraphNode over the union of the original and all expansion graphs
      */
     public GraphNode expand(GraphNode node, int recursion) {
-        Set<Iri> alreadyVisited = new HashSet();
+        Set<IRI> alreadyVisited = new HashSet();
         Set<Graph> resultTripleCollections = new HashSet<Graph>();
         resultTripleCollections.add(node.getGraph());
-        for (Iri uriRef : expand(node, alreadyVisited, recursion)) {
+        for (IRI uriRef : expand(node, alreadyVisited, recursion)) {
             try {
                 resultTripleCollections.add(tcManager.getGraph(uriRef));
             } catch (NoSuchEntityException e) {
@@ -72,16 +72,16 @@ public class SeeAlsoExpander {
 
     }
 
-    private Set<Iri> getSeeAlsoObjectUris(GraphNode node) {
-        Set<Iri> result = new HashSet<Iri>();
+    private Set<IRI> getSeeAlsoObjectUris(GraphNode node) {
+        Set<IRI> result = new HashSet<IRI>();
         Lock l = node.readLock();
         l.lock();
         try {
-            Iterator<RdfTerm> objects = node.getObjects(RDFS.seeAlso);
+            Iterator<RDFTerm> objects = node.getObjects(RDFS.seeAlso);
             while (objects.hasNext()) {
-                RdfTerm next = objects.next();
-                if (next instanceof Iri) {
-                    result.add((Iri)next);
+                RDFTerm next = objects.next();
+                if (next instanceof IRI) {
+                    result.add((IRI)next);
                 }
             }
         } finally {
@@ -90,15 +90,15 @@ public class SeeAlsoExpander {
         return result;
     }
 
-    private Set<Iri> expand(GraphNode node, Set<Iri> alreadyVisited, int recursion) {
-        Set<Iri> rdfSeeAlsoTargets = getSeeAlsoObjectUris(node);
-        Set<Iri> result = new HashSet<Iri>();
+    private Set<IRI> expand(GraphNode node, Set<IRI> alreadyVisited, int recursion) {
+        Set<IRI> rdfSeeAlsoTargets = getSeeAlsoObjectUris(node);
+        Set<IRI> result = new HashSet<IRI>();
         result.addAll(rdfSeeAlsoTargets);
         recursion++;
         if (recursion > 0) {
             rdfSeeAlsoTargets.removeAll(alreadyVisited);
             alreadyVisited.addAll(rdfSeeAlsoTargets);
-            for (Iri target : rdfSeeAlsoTargets) {
+            for (IRI target : rdfSeeAlsoTargets) {
                 try {
                     result.addAll(expand(new GraphNode(node.getNode(),
                         tcManager.getGraph(target)), alreadyVisited, recursion));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionGraph.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionGraph.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionGraph.java
index d2bf031..acd72ad 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionGraph.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionGraph.java
@@ -27,11 +27,11 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph;
 
 /**
@@ -70,8 +70,8 @@ public class UnionGraph extends AbstractGraph {
     }
 
     @Override
-    public Iterator<Triple> performFilter(final BlankNodeOrIri subject,
-            final Iri predicate, final RdfTerm object) {
+    public Iterator<Triple> performFilter(final BlankNodeOrIRI subject,
+            final IRI predicate, final RDFTerm object) {
         if (baseTripleCollections.length == 0) {
             return new HashSet<Triple>(0).iterator();
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UriMutatingGraph.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UriMutatingGraph.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UriMutatingGraph.java
index 6834726..5513dca 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UriMutatingGraph.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UriMutatingGraph.java
@@ -22,12 +22,12 @@ package org.apache.clerezza.rdf.utils;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
@@ -57,13 +57,13 @@ public class UriMutatingGraph implements Graph {
         targetPrefixLength= targetPrefix.length();
     }
 
-    private <R extends RdfTerm> R toTargetRdfTerm(final R sourceRdfTerm) {
-        if (sourceRdfTerm instanceof Iri) {
-            final Iri sourceIri = (Iri) sourceRdfTerm;
+    private <R extends RDFTerm> R toTargetRdfTerm(final R sourceRdfTerm) {
+        if (sourceRdfTerm instanceof IRI) {
+            final IRI sourceIri = (IRI) sourceRdfTerm;
             if (sourceIri.getUnicodeString().startsWith(sourcePrefix)) {
                 final String uriRest = sourceIri.getUnicodeString()
                         .substring(sourcePrefixLength);
-                return (R) new Iri(targetPrefix+uriRest);
+                return (R) new IRI(targetPrefix+uriRest);
             }
         }
         return sourceRdfTerm;            
@@ -77,13 +77,13 @@ public class UriMutatingGraph implements Graph {
                 triple.getPredicate(), toTargetRdfTerm(triple.getObject()));
     }
 
-    private <R extends RdfTerm> R toSourceRdfTerm(final R targetRdfTerm) {
-        if (targetRdfTerm instanceof Iri) {
-            final Iri sourceIri = (Iri) targetRdfTerm;
+    private <R extends RDFTerm> R toSourceRdfTerm(final R targetRdfTerm) {
+        if (targetRdfTerm instanceof IRI) {
+            final IRI sourceIri = (IRI) targetRdfTerm;
             if (sourceIri.getUnicodeString().startsWith(targetPrefix)) {
                 final String uriRest = sourceIri.getUnicodeString()
                         .substring(targetPrefixLength);
-                return (R) new Iri(sourcePrefix+uriRest);
+                return (R) new IRI(sourcePrefix+uriRest);
             }
         }
         return targetRdfTerm;
@@ -98,7 +98,7 @@ public class UriMutatingGraph implements Graph {
     }
 
     @Override
-    public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         final Iterator<Triple> baseIter = base.filter(toSourceRdfTerm(subject),
                 predicate, toSourceRdfTerm(object));
         return new WrappedIteraror(baseIter);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/graphnodeprovider/GraphNodeProvider.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/graphnodeprovider/GraphNodeProvider.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/graphnodeprovider/GraphNodeProvider.java
index a8c59f2..57c5169 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/graphnodeprovider/GraphNodeProvider.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/graphnodeprovider/GraphNodeProvider.java
@@ -18,7 +18,7 @@ package org.apache.clerezza.rdf.utils.graphnodeprovider;
  * specific language governing permissions and limitations
  * under the License.
  */
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -34,18 +34,18 @@ public interface GraphNodeProvider {
      * Get a GraphNode for the specified resource, see class comments for
      * details.
      */
-    GraphNode get(Iri uriRef);
+    GraphNode get(IRI uriRef);
 
     /**
      * Get a GraphNode for the specified resource, The resource is assumed to be
-     * local, i.e. the method behaves like get(Iri) for a Uri with an
-     * authority section contained in the Set retuned by
-     * <code>org.apache.clerezza.platform.config.PlatformConfig#getBaseUris()</code>
+     * local, i.e. the method behaves like get(IRI) for a Uri with an
+ authority section contained in the Set retuned by
+ <code>org.apache.clerezza.platform.config.PlatformConfig#getBaseUris()</code>
      */
-    GraphNode getLocal(Iri uriRef);
+    GraphNode getLocal(IRI uriRef);
 
     /**
      * return true iff getLocal(uriRef).getNodeContext.size > 0
      */
-    boolean existsLocal(Iri uriRef);
+    boolean existsLocal(IRI uriRef);
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/BaseSmusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/BaseSmusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/BaseSmusher.java
index f296849..90f3c26 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/BaseSmusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/BaseSmusher.java
@@ -23,10 +23,10 @@ import java.util.Set;
 import java.util.concurrent.locks.Lock;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.OWL;
@@ -49,12 +49,12 @@ public class BaseSmusher {
      * @param equivalenceSets sets of equivalent resources
      * @param addOwlSameAs whether owl:sameAs statements should be added
      */
-    public void smush(Graph mGraph, Set<Set<BlankNodeOrIri>> equivalenceSets, boolean addOwlSameAs) {
-        Map<BlankNodeOrIri, BlankNodeOrIri> current2ReplacementMap = new HashMap<BlankNodeOrIri, BlankNodeOrIri>();
+    public void smush(Graph mGraph, Set<Set<BlankNodeOrIRI>> equivalenceSets, boolean addOwlSameAs) {
+        Map<BlankNodeOrIRI, BlankNodeOrIRI> current2ReplacementMap = new HashMap<BlankNodeOrIRI, BlankNodeOrIRI>();
         final Graph owlSameAsGraph = new SimpleGraph();
-        for (Set<BlankNodeOrIri> equivalenceSet : equivalenceSets) {
-            final BlankNodeOrIri replacement = getReplacementFor(equivalenceSet, owlSameAsGraph);
-            for (BlankNodeOrIri current : equivalenceSet) {
+        for (Set<BlankNodeOrIRI> equivalenceSet : equivalenceSets) {
+            final BlankNodeOrIRI replacement = getReplacementFor(equivalenceSet, owlSameAsGraph);
+            for (BlankNodeOrIRI current : equivalenceSet) {
                 if (!current.equals(replacement)) {
                     current2ReplacementMap.put(current, replacement);
                 }
@@ -66,11 +66,11 @@ public class BaseSmusher {
         try {
             for (Iterator<Triple> it = mGraph.iterator(); it.hasNext();) {
                 final Triple triple = it.next();
-                final BlankNodeOrIri subject = triple.getSubject();
-                BlankNodeOrIri subjectReplacement = current2ReplacementMap.get(subject);
-                final RdfTerm object = triple.getObject();
+                final BlankNodeOrIRI subject = triple.getSubject();
+                BlankNodeOrIRI subjectReplacement = current2ReplacementMap.get(subject);
+                final RDFTerm object = triple.getObject();
                 @SuppressWarnings(value = "element-type-mismatch")
-                RdfTerm objectReplacement = current2ReplacementMap.get(object);
+                RDFTerm objectReplacement = current2ReplacementMap.get(object);
                 if ((subjectReplacement != null) || (objectReplacement != null)) {
                     it.remove();
                     if (subjectReplacement == null) {
@@ -91,12 +91,12 @@ public class BaseSmusher {
         }
     }
     
-    private BlankNodeOrIri getReplacementFor(Set<BlankNodeOrIri> equivalenceSet, 
+    private BlankNodeOrIRI getReplacementFor(Set<BlankNodeOrIRI> equivalenceSet, 
             Graph owlSameAsGraph) {
-        final Set<Iri> uriRefs = new HashSet<Iri>();
-        for (BlankNodeOrIri nonLiteral : equivalenceSet) {
-            if (nonLiteral instanceof Iri) {
-                uriRefs.add((Iri) nonLiteral);
+        final Set<IRI> uriRefs = new HashSet<IRI>();
+        for (BlankNodeOrIRI nonLiteral : equivalenceSet) {
+            if (nonLiteral instanceof IRI) {
+                uriRefs.add((IRI) nonLiteral);
             }
         }
         switch (uriRefs.size()) {
@@ -105,10 +105,10 @@ public class BaseSmusher {
             case 0:
                 return new BlankNode();
         }
-        final Iri preferedIri = getPreferedIri(uriRefs);
-        final Iterator<Iri> uriRefIter = uriRefs.iterator();
+        final IRI preferedIri = getPreferedIri(uriRefs);
+        final Iterator<IRI> uriRefIter = uriRefs.iterator();
         while (uriRefIter.hasNext()) {
-            Iri uriRef = uriRefIter.next();
+            IRI uriRef = uriRefIter.next();
             if (!uriRef.equals(preferedIri)) {
                 owlSameAsGraph.add(new TripleImpl(uriRef, OWL.sameAs, preferedIri));
             }
@@ -125,8 +125,8 @@ public class BaseSmusher {
      * @param uriRefs
      * @return 
      */
-    protected Iri getPreferedIri(Set<Iri> uriRefs) {
-        final Iterator<Iri> uriRefIter = uriRefs.iterator();
+    protected IRI getPreferedIri(Set<IRI> uriRefs) {
+        final Iterator<IRI> uriRefIter = uriRefs.iterator();
         //instead of an arbitrary one we might either decide lexicographically
         //or look at their frequency in mGraph
         return uriRefIter.next();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/IfpSmusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/IfpSmusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/IfpSmusher.java
index 5b3b410..7ce925a 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/IfpSmusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/IfpSmusher.java
@@ -26,10 +26,10 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.commons.rdf.Triple;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.slf4j.Logger;
@@ -56,34 +56,34 @@ public class IfpSmusher extends BaseSmusher {
      * @param tBox
      */
     public void smush(Graph mGraph, Graph tBox) {
-        final Set<Iri> ifps = getIfps(tBox);
-        final Map<PredicateObject, Set<BlankNodeOrIri>> ifp2nodesMap = new HashMap<PredicateObject, Set<BlankNodeOrIri>>();
+        final Set<IRI> ifps = getIfps(tBox);
+        final Map<PredicateObject, Set<BlankNodeOrIRI>> ifp2nodesMap = new HashMap<PredicateObject, Set<BlankNodeOrIRI>>();
         for (Iterator<Triple> it = mGraph.iterator(); it.hasNext();) {
             final Triple triple = it.next();
-            final Iri predicate = triple.getPredicate();
+            final IRI predicate = triple.getPredicate();
             if (!ifps.contains(predicate)) {
                 continue;
             }
             final PredicateObject po = new PredicateObject(predicate, triple.getObject());
-            Set<BlankNodeOrIri> equivalentNodes = ifp2nodesMap.get(po);
+            Set<BlankNodeOrIRI> equivalentNodes = ifp2nodesMap.get(po);
             if (equivalentNodes == null) {
-                equivalentNodes = new HashSet<BlankNodeOrIri>();
+                equivalentNodes = new HashSet<BlankNodeOrIRI>();
                 ifp2nodesMap.put(po, equivalentNodes);
             }
             equivalentNodes.add(triple.getSubject());
         }
-        Set<Set<BlankNodeOrIri>> unitedEquivalenceSets = uniteSetsWithCommonElement(ifp2nodesMap.values());
+        Set<Set<BlankNodeOrIRI>> unitedEquivalenceSets = uniteSetsWithCommonElement(ifp2nodesMap.values());
         smush(mGraph, unitedEquivalenceSets, true);
     }
     
 
-    private Set<Iri> getIfps(Graph tBox) {
+    private Set<IRI> getIfps(Graph tBox) {
         final Iterator<Triple> ifpDefinitions = tBox.filter(null, RDF.type,
                 OWL.InverseFunctionalProperty);
-        final Set<Iri> ifps = new HashSet<Iri>();
+        final Set<IRI> ifps = new HashSet<IRI>();
         while (ifpDefinitions.hasNext()) {
             final Triple triple = ifpDefinitions.next();
-            ifps.add((Iri) triple.getSubject());
+            ifps.add((IRI) triple.getSubject());
         }
         return ifps;
     }
@@ -130,10 +130,10 @@ public class IfpSmusher extends BaseSmusher {
 
     class PredicateObject {
 
-        final Iri predicate;
-        final RdfTerm object;
+        final IRI predicate;
+        final RDFTerm object;
 
-        public PredicateObject(Iri predicate, RdfTerm object) {
+        public PredicateObject(IRI predicate, RDFTerm object) {
             this.predicate = predicate;
             this.object = object;
         }


Mime
View raw message