clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [84/87] [abbrv] clerezza git commit: CLEREZZA-984: introducing content-launcher, porting platform content, some porting related fixes.
Date Tue, 14 Apr 2015 13:13:59 GMT
CLEREZZA-984: introducing content-launcher, porting platform content, some porting related fixes.

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

Branch: refs/heads/master
Commit: 36b8bdf4f581610ed4ac869b755967ea71abe1ba
Parents: de2a6d1
Author: Reto Gmuer <reto@apache.org>
Authored: Sun Apr 12 16:56:46 2015 +0000
Committer: Reto Gmuer <reto@apache.org>
Committed: Sun Apr 12 16:56:46 2015 +0000

----------------------------------------------------------------------
 jaxrs.rdf.providers/pom.xml                     |  10 +-
 .../jaxrs/rdf/providers/GraphNodeWriter.java    |  16 +-
 .../jaxrs/rdf/providers/GraphReader.java        |  19 +-
 .../jaxrs/rdf/providers/GraphWriter.java        |  18 +-
 .../rdf/providers/ImmutableGraphReader.java     |  19 +-
 platform/content.fsadaptor/pom.xml              |  18 +-
 .../content/fsadaptor/BundleFsLoader.scala      | 102 +++----
 .../content/fsadaptor/DirectoryOverlay.scala    |  32 +--
 .../content/fsadaptor/PathNode2MGraph.scala     |  30 +-
 platform/content/pom.xml                        |  47 +--
 .../content/AbstractDiscobitsHandler.java       |  39 ++-
 .../platform/content/CollectionTypeHandler.java |  28 +-
 .../platform/content/ContentPostSupport.java    |  10 +-
 .../platform/content/DiscobitTemplating.java    |  16 +-
 .../platform/content/DiscobitsHandler.java      |  12 +-
 .../platform/content/DiscobitsTypeHandler.java  |  81 +++---
 .../clerezza/platform/content/Editor.java       |  40 +--
 .../clerezza/platform/content/InfoDiscobit.java |  15 +-
 .../platform/content/PageNotFoundService.java   |   2 +-
 .../content/SimpleDiscobitsHandler.java         |   8 +-
 .../content/TitledContentRenderlet.java         |  18 +-
 .../clerezza/platform/content/WebDavUtils.java  |  90 +++---
 .../content/collections/CollectionCreator.java  |  22 +-
 .../GenericMetaDataGenerator.java               |   6 +-
 .../clerezza/platform/content/collection.ssp    |   2 +-
 .../collections/CollectionsCreatorTest.java     |  20 +-
 platform/editor/pom.xml                         |  90 +++---
 .../clerezza/platform/editor/Manager.scala      |   4 +-
 .../content-launcher/nb-configuration.xml       |  18 ++
 .../launchers/content-launcher/nbactions.xml    |  50 ++++
 provisioning/launchers/content-launcher/pom.xml | 283 +++++++++++++++++++
 .../content-launcher/src/main/bundles/list.xml  |   5 +
 .../content-launcher/src/main/config/note.txt   |   1 +
 provisioning/launchers/pom.xml                  |   2 +-
 provisioning/platform.content/pom.xml           |  10 +-
 provisioning/rdf.web/pom.xml                    |   8 +-
 .../access/security/TcAccessController.java     |   6 +-
 .../clerezza/rdf/core/access/SecurityTest.java  |   8 +-
 rdf/file.storage/pom.xml                        |   8 +
 .../rdf/file/storage/FileTcProvider.java        |  10 +-
 web.fileserver/pom.xml                          |   4 +-
 41 files changed, 800 insertions(+), 427 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/jaxrs.rdf.providers/pom.xml
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/pom.xml b/jaxrs.rdf.providers/pom.xml
index 527f922..548cd3d 100644
--- a/jaxrs.rdf.providers/pom.xml
+++ b/jaxrs.rdf.providers/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent</relativePath>
     </parent>
     <groupId>org.apache.clerezza</groupId>
@@ -32,6 +32,14 @@
     <packaging>bundle</packaging>
     <version>1.0.0-SNAPSHOT</version>
     <name>Clerezza - JAX-RS MessageBodyProviders for RDF</name>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin> 
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
index 264fc77..22712b0 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
@@ -44,6 +44,10 @@ import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 
 /**
  * By default this returns a serialization of the context of the GraphNode.
@@ -53,12 +57,13 @@ import org.apache.clerezza.rdf.utils.GraphNode;
  * repeated). For the specified properties their objects respectively subjects
  * are expanded as if they were bnodes.
  *
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
  * 
  * @author reto
  */
+
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
 @Provider
 @Produces({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
     SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
@@ -67,9 +72,8 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
 
     public static final String OBJ_EXP_PARAM = "xPropObj";
     public static final String SUBJ_EXP_PARAM = "xPropSubj";
-    /**
-     * @scr.reference
-     */
+    
+    @Reference
     private Serializer serializer;
     private UriInfo uriInfo;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
index 1475b7a..defd419 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
@@ -33,23 +33,22 @@ import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 
-/**
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
- * 
- * @author reto
- */
+
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
 @Provider
 @Consumes({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
     SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
     SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
 public class GraphReader implements MessageBodyReader<Graph> {
 
-    /**
-     * @scr.reference
-     */
+    @Reference
     private Parser parser;
     
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphWriter.java
index 9437305..b6d74b1 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphWriter.java
@@ -33,24 +33,22 @@ import javax.ws.rs.ext.Provider;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 
 
-/**
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
- * 
- * @author reto
- */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
 @Provider
 @Produces({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
     SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
     SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
 public class GraphWriter implements MessageBodyWriter<Graph> {
 
-    /**
-     * @scr.reference
-     */
+    @Reference
     private Serializer serializer;
     
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java
index 03884cf..67df6b1 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java
@@ -31,23 +31,22 @@ import javax.ws.rs.ext.Provider;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 
-/**
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
- * 
- * @author reto
- */
+
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
 @Provider
 @Consumes({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
     SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
     SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
 public class ImmutableGraphReader implements MessageBodyReader<ImmutableGraph> {
 
-    /**
-     * @scr.reference
-     */
+    @Reference
     private Parser parser;
     @Override
     public boolean isReadable(Class<?> type, Type genericType,

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content.fsadaptor/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/pom.xml b/platform/content.fsadaptor/pom.xml
index 1097fb9..036258c 100644
--- a/platform/content.fsadaptor/pom.xml
+++ b/platform/content.fsadaptor/pom.xml
@@ -24,8 +24,8 @@
     <parent>
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.content.fsadaptor</artifactId>
@@ -41,27 +41,27 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.scala.utils</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>
@@ -111,6 +111,10 @@
                     </instructions>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin> 
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
index 645dab1..242fd55 100644
--- a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
@@ -22,19 +22,19 @@ package org.apache.clerezza.platform.content.fsadaptor
 import java.util.Collections
 import org.apache.clerezza.platform.Constants
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
-import org.apache.clerezza.rdf.core.Graph
-import org.apache.clerezza.rdf.core.MGraph
-import org.apache.clerezza.rdf.core.NonLiteral
-import org.apache.clerezza.rdf.core.Resource
-import org.apache.clerezza.rdf.core.TripleCollection
-import org.apache.clerezza.rdf.core.Triple
-import org.apache.clerezza.rdf.core.UriRef
+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.Graph
+import org.apache.clerezza.commons.rdf.Triple
+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.core.access.WeightedTcProvider
 import org.apache.clerezza.rdf.core.access.security.TcPermission
-import org.apache.clerezza.rdf.core.impl.AbstractMGraph
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph
+import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.utils.osgi.BundlePathNode
 import org.osgi.framework.Bundle
 import org.osgi.framework.BundleEvent
@@ -55,28 +55,28 @@ import scala.util._
  */
 class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider {
 
-  private val RESOURCE_MGRAPH_URI = new UriRef(Constants.URN_LOCAL_INSTANCE+"/web-resources.graph")
+  private val RESOURCE_MGRAPH_URI = new IRI(Constants.URN_LOCAL_INSTANCE+"/web-resources.graph")
   private val cacheGraphPrefix = Constants.URN_LOCAL_INSTANCE+"/web-resources-cache.graph"
-  private var currentCacheUri: UriRef = null
+  private var currentCacheUri: IRI = null
 
   private var tcManager: TcManager = null
   private var cgProvider: ContentGraphProvider = null
   private var startLevel: StartLevel = null
   private var pathNodes: List[PathNode] = Nil 
   private var bundleList = List[Bundle]()
-  private var currentCacheMGraph: MGraph = null
+  private var currentCacheGraph: Graph = null
   
   private var frequentUpdateDirectory: Option[PathNode] = None
 
-  private val virtualMGraph: MGraph = new AbstractMGraph() {
+  private val virtualGraph: Graph = new AbstractGraph() {
     
-    private def baseGraph: TripleCollection = frequentUpdateDirectory match {
-        case Some(p) => new DirectoryOverlay(p, currentCacheMGraph)
-        case None => currentCacheMGraph
+    private def baseGraph: Graph = frequentUpdateDirectory match {
+        case Some(p) => new DirectoryOverlay(p, currentCacheGraph)
+        case None => currentCacheGraph
     }
     
-    override def performFilter(s: NonLiteral, p: UriRef,
-                      o: Resource): java.util.Iterator[Triple] = {
+    override def performFilter(s: BlankNodeOrIRI, p: IRI,
+                      o: RDFTerm): java.util.Iterator[Triple] = {
       val baseIter = baseGraph.filter(s,p,o)
       new java.util.Iterator[Triple]() {
         override def next = {
@@ -87,7 +87,7 @@ class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider
       }
     }
 
-    override def size = baseGraph.size
+    override def performSize = baseGraph.size
     
     override def toString = "BundleFsLoader virtual graph"
     
@@ -126,9 +126,9 @@ class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider
 
   private def deleteCacheGraphs() {
     import collection.JavaConversions._
-    for(mGraphUri <- tcManager.listMGraphs) {
+    for(mGraphUri <- tcManager.listGraphs) {
       if(mGraphUri.getUnicodeString.startsWith(cacheGraphPrefix)) {
-        tcManager.deleteTripleCollection(mGraphUri);
+        tcManager.deleteGraph(mGraphUri);
       }
     }
   }
@@ -153,36 +153,36 @@ class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider
       context.getBundleContext().removeBundleListener(this);
       updateThread.interrupt()
       cgProvider.removeTemporaryAdditionGraph(RESOURCE_MGRAPH_URI)
-      tcManager.deleteTripleCollection(currentCacheUri);
+      tcManager.deleteGraph(currentCacheUri);
       updateThread == null;
     }
   }
 
   private def updateCache() = {
-    def getVirtualTripleCollection(bundles: Seq[Bundle]): TripleCollection = {
+    def getVirtualGraph(bundles: Seq[Bundle]): Graph = {
       if (bundles.isEmpty) {
-        new SimpleMGraph()
+        new SimpleGraph()
       } else {
         val pathNode = new BundlePathNode(bundles.head, "CLEREZZA-INF/web-resources");
         if (pathNode.isDirectory) {
           BundleFsLoader.log.debug("Creating directory overlay for "+bundles.head)
-          new DirectoryOverlay(pathNode, getVirtualTripleCollection(bundles.tail))
+          new DirectoryOverlay(pathNode, getVirtualGraph(bundles.tail))
         } else {
-          getVirtualTripleCollection(bundles.tail)
+          getVirtualGraph(bundles.tail)
         }
       }
     }
     synchronized {
       val sortedList = Sorting.stableSort(bundleList, (b:Bundle) => -startLevel.getBundleStartLevel(b))
-      val newCacheUri = new UriRef(cacheGraphPrefix+System.currentTimeMillis)
-      val newChacheMGraph = tcManager.createMGraph(newCacheUri);
+      val newCacheUri = new IRI(cacheGraphPrefix+System.currentTimeMillis)
+      val newChacheGraph = tcManager.createGraph(newCacheUri);
       tcManager.getTcAccessController.setRequiredReadPermissions(
           newCacheUri, Collections.singleton(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ)))
-      newChacheMGraph.addAll(getVirtualTripleCollection(sortedList))
-      currentCacheMGraph = newChacheMGraph
+      newChacheGraph.addAll(getVirtualGraph(sortedList))
+      currentCacheGraph = newChacheGraph
       val oldCacheUri = currentCacheUri
       currentCacheUri = newCacheUri
-      if (oldCacheUri != null) tcManager.deleteTripleCollection(oldCacheUri);
+      if (oldCacheUri != null) tcManager.deleteGraph(oldCacheUri);
       BundleFsLoader.log.debug("updated web-resource cache")
     }
   }
@@ -191,49 +191,41 @@ class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider
 
   override def getWeight() = 30
 
-  override def getMGraph(name: UriRef) = {
+  override def getGraph(name: IRI) = {
     if (name.equals(RESOURCE_MGRAPH_URI)) {
-      virtualMGraph
+      virtualGraph
     } else {
       throw new NoSuchEntityException(name);
     }
   }
+  
+  override def getMGraph(name: IRI) = getGraph(name);
 
-  override def getTriples(name: UriRef) = {
-    getMGraph(name);
-  }
-
-  override def getGraph(name: UriRef) = {
-    throw new NoSuchEntityException(name);
-  }
-
-
-  override def listMGraphs(): java.util.Set[UriRef] = {
+  override def getImmutableGraph(name: IRI) = throw new NoSuchEntityException(name);
+  
+  override def listGraphs(): java.util.Set[IRI] = {
     java.util.Collections.singleton(RESOURCE_MGRAPH_URI);
   }
+  
+  override def listMGraphs() = listGraphs();
+  
+  override def listImmutableGraphs(): java.util.Set[IRI] = java.util.Collections.emptySet();
 
-  override def listGraphs() = {
-    new java.util.HashSet[UriRef]();
-  }
-
-  override def listTripleCollections() = {
-    Collections.singleton(RESOURCE_MGRAPH_URI);
-  }
 
-  override def createMGraph(name: UriRef) =  {
+  override def createGraph(name: IRI) =  {
     throw new UnsupportedOperationException("Not supported.");
   }
 
-  override def createGraph(name: UriRef, triples: TripleCollection): Graph = {
+  override def createImmutableGraph(name: IRI, triples: Graph): ImmutableGraph = {
     throw new UnsupportedOperationException("Not supported.");
   }
 
-  override def deleteTripleCollection(name: UriRef) {
+  override def deleteGraph(name: IRI) {
     throw new UnsupportedOperationException("Not supported.");
   }
 
-  override def getNames(graph: Graph) = {
-    val result = new java.util.HashSet[UriRef]();
+  override def getNames(graph: ImmutableGraph) = {
+    val result = new java.util.HashSet[IRI]();
     result;
   }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
index 40bfb21..9008082 100644
--- a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
@@ -19,19 +19,19 @@
 
 package org.apache.clerezza.platform.content.fsadaptor
 
-import org.apache.clerezza.rdf.core.NonLiteral
-import org.apache.clerezza.rdf.core.Resource
-import org.apache.clerezza.rdf.core.Triple
-import org.apache.clerezza.rdf.core.TripleCollection
-import org.apache.clerezza.rdf.core.UriRef
-import org.apache.clerezza.rdf.core.impl.AbstractTripleCollection
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph
+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.impl.utils.AbstractGraph
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.utils.IteratorMerger
 import org.wymiwyg.commons.util.dirbrowser.PathNode
 import java.util.Iterator
 
-class DirectoryOverlay(pathNode: PathNode, base: TripleCollection)
-  extends AbstractTripleCollection {
+class DirectoryOverlay(pathNode: PathNode, base: Graph)
+  extends AbstractGraph {
 
   
 
@@ -39,11 +39,11 @@ class DirectoryOverlay(pathNode: PathNode, base: TripleCollection)
 
   
 
-  override def performFilter(s: NonLiteral, p: UriRef,
-    o: Resource): Iterator[Triple] = {
-    val addedTriples = new SimpleMGraph()
+  override def performFilter(s: BlankNodeOrIRI, p: IRI,
+    o: RDFTerm): Iterator[Triple] = {
+    val addedTriples = new SimpleGraph()
 
-    PathNode2MGraph.describeInGraph(pathNode, addedTriples)
+    PathNode2Graph.describeInGraph(pathNode, addedTriples)
     
     val subjects = (for (triple <- addedTriples; subject = triple.getSubject) yield {
       subject
@@ -76,10 +76,10 @@ class DirectoryOverlay(pathNode: PathNode, base: TripleCollection)
   /**
    * returns an upper bound of the size (removals in abse are not deducted)
    */
-  override def size = {
-    val addedTriples = new SimpleMGraph()
+  override def performSize = {
+    val addedTriples = new SimpleGraph()
 
-      PathNode2MGraph.describeInGraph(pathNode, addedTriples)
+      PathNode2Graph.describeInGraph(pathNode, addedTriples)
 
    base.size+addedTriples.size 
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
index 8a62774..439c8ae 100644
--- a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
@@ -22,11 +22,11 @@ package org.apache.clerezza.platform.content.fsadaptor;
 import java.io.ByteArrayOutputStream
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.Constants
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.IRI;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl
 import org.apache.clerezza.rdf.core.LiteralFactory
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl
-import org.apache.clerezza.rdf.core.impl.TripleImpl
 import org.apache.clerezza.rdf.ontologies.DISCOBITS
 import org.apache.clerezza.rdf.ontologies.HIERARCHY
 import org.apache.clerezza.rdf.ontologies.RDF
@@ -39,7 +39,7 @@ import org.wymiwyg.commons.util.dirbrowser.PathNode
  *
  * @author reto
  */
-object PathNode2MGraph {
+object PathNode2Graph {
 
   private val URI_PREFIX = Constants.URN_LOCAL_INSTANCE
 
@@ -68,9 +68,9 @@ object PathNode2MGraph {
     baos.toByteArray
   }
 
-  def describeInGraph(directory: PathNode, mGraph: MGraph) {
+  def describeInGraph(directory: PathNode, mGraph: Graph) {
     val basePathLength = directory.getPath.length
-    def createUriRef(file: PathNode, isDirectory: Boolean) = {
+    def createIRI(file: PathNode, isDirectory: Boolean) = {
       def addSlashIfNeeded(s: String) = {
          if (s.endsWith("/")) {
            s
@@ -83,15 +83,15 @@ object PathNode2MGraph {
       } else {
         file.getPath.substring(basePathLength)
       }
-      new UriRef(URI_PREFIX+path)
+      new IRI(URI_PREFIX+path)
     }
     def processDirectory(directory: PathNode) {
-      val directoryResource = createUriRef(directory, true)
+      val directoryResource = createIRI(directory, true)
       mGraph.add(new TripleImpl(directoryResource, RDF.`type`, HIERARCHY.Collection))
       for (subPath <- directory.list) {
         val file = directory.getSubPath(subPath)
         val isDirectory = file.isDirectory
-        val resource = createUriRef(file, isDirectory)
+        val resource = createIRI(file, isDirectory)
         mGraph.add(new TripleImpl(resource, HIERARCHY.parent, directoryResource))
         if (isDirectory) {
           processDirectory(file)
@@ -107,9 +107,9 @@ object PathNode2MGraph {
     processDirectory(directory)
   }
 
-  def removeNodesFromGraph(directory: PathNode, mGraph: MGraph) {
+  def removeNodesFromGraph(directory: PathNode, mGraph: Graph) {
     val basePathLength = directory.getPath.length
-    def createUriRef(file: PathNode, isDirectory: Boolean) = {
+    def createIRI(file: PathNode, isDirectory: Boolean) = {
       def addSlashIfNeeded(s: String) = {
          if (s.endsWith("/")) {
            s
@@ -122,15 +122,15 @@ object PathNode2MGraph {
       } else {
         file.getPath.substring(basePathLength)
       }
-      new UriRef(URI_PREFIX+path)
+      new IRI(URI_PREFIX+path)
     }
     def processDirectory(directory: PathNode) {
-      val directoryResource = createUriRef(directory, true)
+      val directoryResource = createIRI(directory, true)
       mGraph.remove(new TripleImpl(directoryResource, RDF.`type`, HIERARCHY.Collection))
       for (subPath <- directory.list) {
         val file = directory.getSubPath(subPath)
         val isDirectory = file.isDirectory
-        val resource = createUriRef(file, isDirectory)
+        val resource = createIRI(file, isDirectory)
         val node = new GraphNode(resource, mGraph)
         if (isDirectory) {
           processDirectory(file)

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content/pom.xml b/platform/content/pom.xml
index 0cb5e24..245c432 100644
--- a/platform/content/pom.xml
+++ b/platform/content/pom.xml
@@ -18,32 +18,33 @@
  specific language governing permissions and limitations
  under the License.
 
--->
+    -->
 
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
-        <version>0.5</version>
+        <version>7-SNAPSHOT</version>
         <relativePath>../parent</relativePath>
-    </parent>    <groupId>org.apache.clerezza</groupId>
+    </parent>    
+    <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.content</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Clerezza - Platform Content</name>
     <description>Clerezza CMS - A handler to manage and access data modeled using
-    the discobits ontology</description>
+        the discobits ontology</description>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
-             <artifactId>org.osgi.core</artifactId>
-         </dependency>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
-             <artifactId>org.osgi.compendium</artifactId>
-         </dependency>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>jsr311-api</artifactId>
@@ -51,37 +52,37 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typehandlerspace</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.graphnodeprovider</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.seedsnipe</artifactId>
-            <version>0.7</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -92,7 +93,7 @@
                     <groupId>org.apache.felix</groupId>
                 </exclusion>
             </exclusions>
-            <version>0.10</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.wymiwyg</groupId>
@@ -110,27 +111,27 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
-    <!--    <dependency>
+        <!--    <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.security</artifactId>
         </dependency> -->
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.metadata</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core.test</artifactId>
             <scope>test</scope>
-            <version>0.15</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -149,6 +150,10 @@
                 <groupId>net.sf.alchim</groupId>
                 <artifactId>yuicompressor-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin> 
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
index e605c40..d545877 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
@@ -27,13 +27,12 @@ import java.util.concurrent.locks.Lock;
 import javax.ws.rs.core.MediaType;
 import org.apache.clerezza.platform.content.collections.CollectionCreator;
 
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.IRI;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
 import org.apache.clerezza.rdf.ontologies.DISCOBITS;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -50,9 +49,9 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
 
     /**
      *
-     * @return the MGraph to be used to retrieve and create discobits
+     * @return the Graph to be used to retrieve and create discobits
      */
-    protected abstract MGraph getMGraph();
+    protected abstract Graph getGraph();
 
     /**
      * A <code>Set</code> containing <code>MetaDataGenerator</code>s to be used
@@ -64,11 +63,11 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
 
     
     @Override
-    public void put(UriRef infoDiscoBitUri, MediaType mediaType,
+    public void put(IRI infoDiscoBitUri, MediaType mediaType,
             byte[] data) {
 
         GraphNode infoDiscoBitNode;
-        final LockableMGraph mGraph = (LockableMGraph) getMGraph();
+        final Graph mGraph = getGraph();
         infoDiscoBitNode = new GraphNode(infoDiscoBitUri, mGraph);
         CollectionCreator collectionCreator = new CollectionCreator(mGraph);
         collectionCreator.createContainingCollections(infoDiscoBitUri);
@@ -76,10 +75,10 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
         writeLock.lock();
         try {
             infoDiscoBitNode.addProperty(RDF.type, DISCOBITS.InfoDiscoBit);
-            TypedLiteral dataLiteral = LiteralFactory.getInstance().createTypedLiteral(data);
+            Literal dataLiteral = LiteralFactory.getInstance().createTypedLiteral(data);
             infoDiscoBitNode.deleteProperties(DISCOBITS.infoBit);
             infoDiscoBitNode.addProperty(DISCOBITS.infoBit, dataLiteral);
-            TypedLiteral mediaTypeLiteral = LiteralFactory.getInstance().createTypedLiteral(mediaType.toString());
+            Literal mediaTypeLiteral = LiteralFactory.getInstance().createTypedLiteral(mediaType.toString());
             infoDiscoBitNode.deleteProperties(DISCOBITS.mediaType);
             infoDiscoBitNode.addProperty(DISCOBITS.mediaType,mediaTypeLiteral);
         } finally {
@@ -98,8 +97,8 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
     }
 
     @Override
-    public  void remove(NonLiteral node) {
-        MGraph mGraph = getMGraph();        
+    public  void remove(BlankNodeOrIRI node) {
+        Graph mGraph = getGraph();        
         Iterator<Triple> properties = mGraph.filter(node, null, null);
         //copying properties to set, as we're modifying underlying graph
         Set<Triple> propertiesSet = new HashSet<Triple>();
@@ -109,10 +108,10 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
         properties = propertiesSet.iterator();
         while (properties.hasNext()) {
             Triple triple = properties.next();
-            UriRef predicate = triple.getPredicate();
+            IRI predicate = triple.getPredicate();
             if (predicate.equals(DISCOBITS.contains)) {
                 try {
-                    GraphNode containedNode = new GraphNode((NonLiteral)triple.getObject(), mGraph);
+                    GraphNode containedNode = new GraphNode((BlankNodeOrIRI)triple.getObject(), mGraph);
                     //The following includes triple
                     containedNode.deleteNodeContext();
                 } catch (ClassCastException e) {
@@ -128,8 +127,8 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
     }
 
     @Override
-    public byte[] getData(UriRef uriRef) {
-        MGraph mGraph = getMGraph();
+    public byte[] getData(IRI uriRef) {
+        Graph mGraph = getGraph();
         GraphNode node = new GraphNode(uriRef, mGraph);
         final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
         if (infoDiscobit == null) {
@@ -139,8 +138,8 @@ public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
     }
 
     @Override
-    public MediaType getMediaType(UriRef uriRef) {
-        MGraph mGraph = getMGraph();
+    public MediaType getMediaType(IRI uriRef) {
+        Graph mGraph = getGraph();
         GraphNode node = new GraphNode(uriRef, mGraph);
         final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
         if (infoDiscobit == null) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
index 5bcf1af..32b4b25 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
@@ -34,18 +34,18 @@ import org.apache.clerezza.platform.content.webdav.UNLOCK;
 import org.apache.clerezza.platform.typehandlerspace.SupportedTypes;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.IRI;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.HIERARCHY;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.utils.UnionMGraph;
+import org.apache.clerezza.rdf.utils.UnionGraph;
 import org.apache.felix.scr.annotations.Services;
 import org.osgi.service.component.ComponentContext;
 
@@ -78,7 +78,7 @@ public class CollectionTypeHandler extends DiscobitsTypeHandler{
     protected void activate(ComponentContext componentContext) {
         URL templateURL = getClass().getResource("collection.ssp");
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(templateURL.toString()), HIERARCHY.Collection,
+                new IRI(templateURL.toString()), HIERARCHY.Collection,
                 "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         logger.info("CollectionTypeHandler activated.");
@@ -91,31 +91,31 @@ public class CollectionTypeHandler extends DiscobitsTypeHandler{
     @GET
     @Override
     public GraphNode getResource(@Context UriInfo uriInfo) {
-        final MGraph contentGraph = cgProvider.getContentGraph();
+        final Graph contentGraph = cgProvider.getContentGraph();
         final String uriString = uriInfo.getAbsolutePath().toString();
-        final UriRef indexUri = new UriRef(uriString+"index");
+        final IRI indexUri = new IRI(uriString+"index");
         if (contentGraph.filter(indexUri, null, null).hasNext()) {
             return new GraphNode(indexUri, contentGraph);
         }
-        final UriRef uri = new UriRef(uriString);
-        MGraph mGraph = new UnionMGraph(new SimpleMGraph(), contentGraph);
+        final IRI uri = new IRI(uriString);
+        Graph mGraph = new UnionGraph(new SimpleGraph(), contentGraph);
         final GraphNode graphNode = new GraphNode(uri, mGraph);
         graphNode.addProperty(RDF.type, PLATFORM.HeadedPage);
 
-        UriRef collectionUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        IRI collectionUri = new IRI(uriInfo.getAbsolutePath().toString());
         return graphNode;
     }
 
     @Override
-    Map<UriRef, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
+    Map<IRI, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
         return WebDavUtils.getCollectionProps(null, null, null, node,
                             depthHeader, false /* doesNotIncludeValues */);
     }
 
     @Override
-    Map<UriRef, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
+    Map<IRI, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
             String depthHeader) {
-        Map<UriRef, PropertyMap> result;
+        Map<IRI, PropertyMap> result;
         NodeList children = requestNode.getChildNodes();
         result = WebDavUtils.getPropsByName(children, node, depthHeader,
                 true /* includeValues */);
@@ -123,7 +123,7 @@ public class CollectionTypeHandler extends DiscobitsTypeHandler{
     }
 
     @Override
-    Map<UriRef, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
+    Map<IRI, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
         return WebDavUtils.getCollectionProps(null, null, null, node,
                             depthHeader, true /* includeValues */);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
index 6a7db15..9ca391d 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
@@ -27,11 +27,11 @@ import javax.ws.rs.Path;
 
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.jaxrs.utils.form.FormFile;
 import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
@@ -79,11 +79,11 @@ public class ContentPostSupport {
             return Response.status(400).entity("Required form field is missing").
                     type(MediaType.TEXT_PLAIN_TYPE).build();
         }
-        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        Graph contentGraph = cgProvider.getContentGraph();
         Lock readLock = contentGraph.getLock().readLock();
         readLock.lock();
         try {
-            if (contentGraph.filter(new UriRef(uri), RDF.type, null).hasNext()) {
+            if (contentGraph.filter(new IRI(uri), RDF.type, null).hasNext()) {
                 return Response.status(Response.Status.CONFLICT).
                         entity("A resource with the specified URI already exists").
                         type(MediaType.TEXT_PLAIN_TYPE).build();
@@ -91,7 +91,7 @@ public class ContentPostSupport {
         } finally {
             readLock.unlock();
         }
-        handler.put(new UriRef(uri), formFile.getMediaType(), content);
+        handler.put(new IRI(uri), formFile.getMediaType(), content);
         return Response.created(URI.create(uri)).build();
     }    
     

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
index 3b45d62..3406902 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
@@ -28,7 +28,7 @@ import org.osgi.service.component.ComponentContext;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
 import org.apache.clerezza.platform.typerendering.seedsnipe.SeedsnipeRenderlet;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.DISCOBITS;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 
@@ -46,23 +46,23 @@ public class DiscobitTemplating {
 
         // register seedsnipe renderlets
         renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("Resource.xhtml").toString()),
+                new IRI(getClass().getResource("Resource.xhtml").toString()),
                 RDFS.Resource, null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("Resource_naked.xhtml").toString()),
+                new IRI(getClass().getResource("Resource_naked.xhtml").toString()),
                 RDFS.Resource, "(naked|.*-naked)", MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("XHTML_InfoDiscoBit_naked.xhtml").toString()),
+                new IRI(getClass().getResource("XHTML_InfoDiscoBit_naked.xhtml").toString()),
                 DISCOBITS.XHTMLInfoDiscoBit, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("OrderedContent_naked.xhtml").toString()),
+                new IRI(getClass().getResource("OrderedContent_naked.xhtml").toString()),
                 DISCOBITS.OrderedContent, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("TitledContent.xhtml").toString()),
+                new IRI(getClass().getResource("TitledContent.xhtml").toString()),
                 DISCOBITS.TitledContent, null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
 
         renderletManager.registerRenderlet(TitledContentRenderlet.class.getName(),
@@ -70,8 +70,8 @@ public class DiscobitTemplating {
 
         // registre renderlet for XMLLiteral datatype.
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(getClass().getResource("XmlLiteral.ssp").toString()),
-                new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"), null,
+                new IRI(getClass().getResource("XmlLiteral.ssp").toString()),
+                new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"), null,
                 MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
index 2e3e441..d4071d5 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
@@ -20,8 +20,8 @@ package org.apache.clerezza.platform.content;
 
 import javax.ws.rs.core.MediaType;
 
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * Provides utility methods to create, retrieve and remove binary contents.
@@ -39,7 +39,7 @@ public interface DiscobitsHandler {
      * @param mediaType
      * @param data
      */
-    public abstract void put(UriRef infoDiscoBitUri, MediaType mediaType,
+    public abstract void put(IRI infoDiscoBitUri, MediaType mediaType,
             byte[] data);
 
     /**
@@ -49,7 +49,7 @@ public interface DiscobitsHandler {
      * 
      * @param node
      */
-    public abstract void remove(NonLiteral node);
+    public abstract void remove(BlankNodeOrIRI node);
 
     /**
      * 
@@ -57,7 +57,7 @@ public interface DiscobitsHandler {
      * @return the media type of the InfoDiscoBit with the specified URI or null
      *         if no MediaType for that URI is known
      */
-    public MediaType getMediaType(UriRef uriRef);
+    public MediaType getMediaType(IRI uriRef);
 
     /**
      * 
@@ -65,6 +65,6 @@ public interface DiscobitsHandler {
      * @return a byte[] with the data of the InfoDiscoBit with the specified URI
      *         or null if no data for that URI is known
      */
-    public byte[] getData(UriRef uriRef);
+    public byte[] getData(IRI uriRef);
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
index a92ff01..757d7d9 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
@@ -70,17 +70,16 @@ import org.slf4j.LoggerFactory;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
 import org.apache.clerezza.platform.typehandlerspace.OPTIONS;
 import org.apache.clerezza.platform.typehandlerspace.SupportedTypes;
-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.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.commons.rdf.Graph;
+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.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.HIERARCHY;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.utils.UnionMGraph;
-import org.apache.clerezza.rdf.utils.UriMutatingTripleCollection;
+import org.apache.clerezza.rdf.utils.UnionGraph;
+import org.apache.clerezza.rdf.utils.UriMutatingGraph;
 import org.apache.clerezza.web.fileserver.util.MediaTypeGuesser;
 import org.osgi.service.component.ComponentContext;
 import org.w3c.dom.Document;
@@ -145,7 +144,7 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
     @GET
     @Produces({"*/*"})
     public Object getResource(@Context UriInfo uriInfo) {
-        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final IRI uri = new IRI(uriInfo.getAbsolutePath().toString());
             final GraphNode graphNode = getResourceAsGraphNode(uriInfo);
         if (graphNode == null) {
             return resourceUnavailable(uri, uriInfo);
@@ -163,10 +162,10 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
     }
 
     private GraphNode getResourceAsGraphNode(UriInfo uriInfo) {
-        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final IRI uri = new IRI(uriInfo.getAbsolutePath().toString());
         GraphNode result = graphNodeProvider.getLocal(uri);
         //could chck if nodeContext > 0, but this would be less efficient
-        TripleCollection tc = result.getGraph();
+        Graph tc = result.getGraph();
         if (tc.filter(uri, null, null).hasNext()) {
             return result;
         }
@@ -200,7 +199,7 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
             }
             
         }    
-        final UriRef infoDiscoBitUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final IRI infoDiscoBitUri = new IRI(uriInfo.getAbsolutePath().toString());
         put(infoDiscoBitUri, MediaType.valueOf(contentType), data);
         return Response.status(Status.CREATED).build();
     }
@@ -221,8 +220,8 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
         if (uriString.charAt(uriString.length()-1) != '/') {
             uriString += '/';
         }
-        UriRef nodeUri = new UriRef(uriString);
-        final MGraph mGraph = cgProvider.getContentGraph();
+        IRI nodeUri = new IRI(uriString);
+        final Graph mGraph = cgProvider.getContentGraph();
         Triple typeTriple = new TripleImpl(nodeUri, RDF.type, HIERARCHY.Collection);
         if (mGraph.contains(typeTriple)) {
             return Response.status(405) // Method Not Allowed
@@ -252,17 +251,17 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
     @Produces({"application/xml", "text/xml", "*/*"})
     public Response propfind(@Context UriInfo uriInfo,
             @Context HttpHeaders headers, DOMSource body) {
-        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final IRI nodeUri = new IRI(uriInfo.getAbsolutePath().toString());
         if (!nodeAtUriExists(nodeUri)) {
             return resourceUnavailable(nodeUri, uriInfo);
         }
-            Map<UriRef, PropertyMap> result;
+            Map<IRI, PropertyMap> result;
         try {
             String depthHeader = WebDavUtils.getHeaderAsString(headers, "Depth");
             if (depthHeader == null) {
                 depthHeader = WebDavUtils.infinite;
             }
-            final MGraph mGraph = cgProvider.getContentGraph();
+            final Graph mGraph = cgProvider.getContentGraph();
             GraphNode node = new GraphNode(nodeUri, mGraph);
             if (body != null) {
                 Document requestDoc = WebDavUtils.sourceToDocument(body);
@@ -294,22 +293,22 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
         }
     }
 
-    Map<UriRef, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
-        Map<UriRef, PropertyMap> result = new HashMap<UriRef, PropertyMap>();
+    Map<IRI, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
+        Map<IRI, PropertyMap> result = new HashMap<IRI, PropertyMap>();
         WebDavUtils.addNodeProperties(result, null, null, node, false);
         return result;
     }
 
-    Map<UriRef, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
+    Map<IRI, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
             String depthHeader) {
-        Map<UriRef, PropertyMap> result;
+        Map<IRI, PropertyMap> result;
         NodeList children = requestNode.getChildNodes();
         result = WebDavUtils.getPropsByName(children, node, "0", true);
         return result;
     }
 
-    Map<UriRef, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
-        HashMap<UriRef, PropertyMap> result = new HashMap<UriRef, PropertyMap>();
+    Map<IRI, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
+        HashMap<IRI, PropertyMap> result = new HashMap<IRI, PropertyMap>();
         WebDavUtils.addNodeProperties(result, null, null, node, true);
         return result;
     }
@@ -329,13 +328,13 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
     @Consumes({"application/xml", "text/xml", "*/*"})
     @Produces({"application/xml", "text/xml", "*/*"})
     public Response proppatch(@Context UriInfo uriInfo, DOMSource body) {
-        UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        IRI nodeUri = new IRI(uriInfo.getAbsolutePath().toString());
         if (!nodeAtUriExists(nodeUri)) {
             return resourceUnavailable(nodeUri, uriInfo);
         }
         try {
             Document requestDoc = WebDavUtils.sourceToDocument(body);
-            final MGraph mGraph = cgProvider.getContentGraph();
+            final Graph mGraph = cgProvider.getContentGraph();
             GraphNode node = new GraphNode(nodeUri, mGraph);
             NodeList propsToSet = null;
             NodeList propsToRemove = null;
@@ -381,12 +380,12 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
      */
     @MOVE
     public Response move(@Context UriInfo uriInfo, @Context HttpHeaders headers) {
-        UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        final LockableMGraph mGraph = cgProvider.getContentGraph();
+        IRI nodeUri = new IRI(uriInfo.getAbsolutePath().toString());
+        final Graph mGraph = cgProvider.getContentGraph();
         GraphNode node = new GraphNode(nodeUri, mGraph);
         String targetString = WebDavUtils.getHeaderAsString(headers,
                     "Destination");
-        UriRef targetUri = new UriRef(targetString);
+        IRI targetUri = new IRI(targetString);
         String overwriteHeader = WebDavUtils.getHeaderAsString(headers, "Overwrite");
         boolean overwriteTarget = "T".equalsIgnoreCase(overwriteHeader);
         if (nodeAtUriExists(targetUri)) {
@@ -439,12 +438,12 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
      */
     @DELETE
     public Response delete(@Context UriInfo uriInfo) {
-        UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        IRI nodeUri = new IRI(uriInfo.getAbsolutePath().toString());
         if (!nodeAtUriExists(nodeUri)) {
             return Response.status(Status.NOT_FOUND).entity(
                     uriInfo.getAbsolutePath()).type(MediaType.TEXT_PLAIN).build();
         }
-        final LockableMGraph mGraph = cgProvider.getContentGraph();
+        final Graph mGraph = cgProvider.getContentGraph();
         GraphNode node = new GraphNode(nodeUri, mGraph);
         node.deleteNodeContext();
         return Response.ok().build();
@@ -462,7 +461,7 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
      */
     @OPTIONS
     public Response options(@Context UriInfo uriInfo) {
-        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final IRI nodeUri = new IRI(uriInfo.getAbsolutePath().toString());
         if (!nodeAtUriExists(nodeUri)) {
             return resourceUnavailable(nodeUri, uriInfo);
         }
@@ -501,7 +500,7 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
     }
 
     @Override
-    protected MGraph getMGraph() {
+    protected Graph getGraph() {
         return cgProvider.getContentGraph();
     }
 
@@ -512,8 +511,8 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
 
     
 
-    private boolean nodeAtUriExists(UriRef nodeUri) {
-        LockableMGraph mGraph = (LockableMGraph) getMGraph();
+    private boolean nodeAtUriExists(IRI nodeUri) {
+        Graph mGraph = getGraph();
         Lock readLock = mGraph.getLock().readLock();
         readLock.lock();
         try {
@@ -524,9 +523,9 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
         }
     }
 
-    private Response resourceUnavailable(UriRef nodeUri,
+    private Response resourceUnavailable(IRI nodeUri,
             UriInfo uriInfo) {
-        UriRef oppositUri = makeOppositeUriRef(nodeUri);
+        IRI oppositUri = makeOppositeIRI(nodeUri);
         if (nodeAtUriExists(oppositUri)) {
             return RedirectUtil.createSeeOtherResponse(
                     oppositUri.getUnicodeString(), uriInfo);
@@ -541,16 +540,16 @@ public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
      * @param uri
      * @return
      */
-    private static UriRef makeOppositeUriRef(UriRef uri) {
+    private static IRI makeOppositeIRI(IRI uri) {
         String uriString = uri.getUnicodeString();
         if (uriString.endsWith("/")) {
-            return new UriRef(uriString.substring(0, uriString.length() - 1));
+            return new IRI(uriString.substring(0, uriString.length() - 1));
         } else {
-            return new UriRef(uriString + "/");
+            return new IRI(uriString + "/");
         }
     }
 
-    private UriRef createAnyHostUri(UriInfo uriInfo) {
-        return new UriRef(Constants.ALL_HOSTS_URI_PREFIX+uriInfo.getPath());
+    private IRI createAnyHostUri(UriInfo uriInfo) {
+        return new IRI(Constants.ALL_HOSTS_URI_PREFIX+uriInfo.getPath());
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java
index 5e7940d..f011815 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java
@@ -37,7 +37,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.Providers;
-import org.apache.clerezza.rdf.utils.MGraphUtils.NoSuchSubGraphException;
+import org.apache.clerezza.rdf.utils.GraphUtils.NoSuchSubGraphException;
 
 import org.osgi.framework.Bundle;
 import org.osgi.service.component.ComponentContext;
@@ -49,13 +49,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.clerezza.jaxrs.utils.TrailingSlash;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
+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.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.utils.MGraphUtils;
+import org.apache.clerezza.rdf.utils.GraphUtils;
 import org.apache.clerezza.web.fileserver.BundlePathNode;
 import org.apache.clerezza.web.fileserver.FileServer;
 import org.wymiwyg.commons.util.dirbrowser.PathNode;
@@ -114,10 +114,10 @@ public class Editor extends FileServer {
 
     @GET
     @Path("get")
-    public GraphNode getDiscobit(@QueryParam("resource") UriRef uri,
-            @QueryParam("graph") UriRef graphUri) {
-        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
-            tcManager.getMGraph(graphUri);
+    public GraphNode getDiscobit(@QueryParam("resource") IRI uri,
+            @QueryParam("graph") IRI graphUri) {
+        final Graph mGraph = graphUri == null ? cgProvider.getContentGraph() :
+            tcManager.getGraph(graphUri);
         return new GraphNode(uri, mGraph);
     }
 
@@ -127,12 +127,12 @@ public class Editor extends FileServer {
      *
      * @param graphUri the graph within which the replacement has to take place or null
      * for the content graph
-     * @param assertedString the asserted Graph as RDF/XML
-     * @param revokedString the revoked Graph as RDF/XML
+     * @param assertedString the asserted ImmutableGraph as RDF/XML
+     * @param revokedString the revoked ImmutableGraph as RDF/XML
      */
     @POST
     @Path("post")
-    public void postDiscobit(@QueryParam("graph") UriRef graphUri,
+    public void postDiscobit(@QueryParam("graph") IRI graphUri,
             @FormParam("assert") String assertedString,
             @FormParam("revoke") String revokedString,
             @FormParam("rdfFormat") String rdfFormat) {
@@ -140,24 +140,24 @@ public class Editor extends FileServer {
             rdfFormat = rdfXml;
         }
         MediaType mediaType = MediaType.valueOf(rdfFormat);
-        MessageBodyReader<Graph> graphReader = providers.getMessageBodyReader(Graph.class, Graph.class, null,mediaType);
-        final Graph assertedGraph;
-        final Graph revokedGraph;
+        MessageBodyReader<ImmutableGraph> graphReader = providers.getMessageBodyReader(ImmutableGraph.class, ImmutableGraph.class, null,mediaType);
+        final ImmutableGraph assertedGraph;
+        final ImmutableGraph revokedGraph;
         try {
-            assertedGraph = graphReader.readFrom(Graph.class, Graph.class, new Annotation[0], mediaType, null, new ByteArrayInputStream(assertedString.getBytes()));
-            revokedGraph = graphReader.readFrom(Graph.class, Graph.class, new Annotation[0], mediaType, null, new ByteArrayInputStream(revokedString.getBytes()));
+            assertedGraph = graphReader.readFrom(ImmutableGraph.class, ImmutableGraph.class, new Annotation[0], mediaType, null, new ByteArrayInputStream(assertedString.getBytes()));
+            revokedGraph = graphReader.readFrom(ImmutableGraph.class, ImmutableGraph.class, new Annotation[0], mediaType, null, new ByteArrayInputStream(revokedString.getBytes()));
         } catch (IOException ex) {
             logger.error("reading graph {}", ex);
             throw new WebApplicationException(ex, 500);
         }
-        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
-            tcManager.getMGraph(graphUri);
+        final Graph mGraph = graphUri == null ? cgProvider.getContentGraph() :
+            tcManager.getGraph(graphUri);
         try {
             serializer.serialize(System.out, revokedGraph, "text/turtle");
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             serializer.serialize(baos, revokedGraph, "text/turtle");
             System.out.println(new String(baos.toByteArray()).contains("\r"));
-            MGraphUtils.removeSubGraph(mGraph, revokedGraph);
+            GraphUtils.removeSubGraph(mGraph, revokedGraph);
         } catch (NoSuchSubGraphException ex) {
             throw new RuntimeException(ex);
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
index 8693216..7988916 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
@@ -20,10 +20,9 @@ package org.apache.clerezza.platform.content;
 
 import java.util.Iterator;
 import java.util.concurrent.locks.Lock;
-import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 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.utils.GraphNode;
 import org.apache.clerezza.rdf.ontologies.DISCOBITS;
@@ -48,7 +47,7 @@ public class InfoDiscobit {
         Lock l = node.readLock();
         l.lock();
         try {
-            Iterator<Resource> types = node.getObjects(RDF.type);
+            Iterator<RDFTerm> types = node.getObjects(RDF.type);
             while(types.hasNext()) {
                 if (types.next().equals(DISCOBITS.InfoDiscoBit)){
                     return new InfoDiscobit(node);
@@ -87,12 +86,8 @@ public class InfoDiscobit {
             Iterator<Literal> infoBitLits = infoBit.getLiterals(DISCOBITS.infoBit);
             if (infoBitLits.hasNext()) {
                 final Literal literalValue = infoBitLits.next();
-                if (literalValue instanceof TypedLiteral) {
-                    result = LiteralFactory.getInstance().createObject(
-                            (new byte[0]).getClass(), (TypedLiteral) literalValue);
-                } else {
-                    throw new RuntimeException("InfoDiscobit has infoBit value which is not a TypedLiteral but "+literalValue);
-                }
+                result = LiteralFactory.getInstance().createObject(
+                        (new byte[0]).getClass(), literalValue);
             } else {
                 throw new RuntimeException("InfoDiscobit has not infoBit property");
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
index ccce889..431be80 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
@@ -30,7 +30,7 @@ public interface PageNotFoundService {
 
     /**
      * Creates a response when a resource could not be found in the Content 
-     * Graph, this is a 404 response.
+     * ImmutableGraph, this is a 404 response.
      * 
      * @param uriInfo
      * @return

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
index 69171ff..6a86009 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.platform.content;
 
 import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
 import java.util.Set;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.commons.rdf.Graph;
 
 /**
  *
@@ -28,14 +28,14 @@ import org.apache.clerezza.rdf.core.MGraph;
  */
 class SimpleDiscobitsHandler extends AbstractDiscobitsHandler {
     
-    private final MGraph mGraph;
+    private final Graph mGraph;
 
-    public SimpleDiscobitsHandler(MGraph mGraph) {
+    public SimpleDiscobitsHandler(Graph mGraph) {
         this.mGraph = mGraph;
     }
 
     @Override
-    protected MGraph getMGraph() {
+    protected Graph getGraph() {
         return mGraph;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
index 094e773..02d36a0 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
@@ -32,9 +32,9 @@ import java.util.TreeSet;
 import javax.ws.rs.core.MediaType;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
 import org.apache.clerezza.platform.typerendering.Renderlet;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
+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.rdf.ontologies.DISCOBITS;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
@@ -70,8 +70,8 @@ public class TitledContentRenderlet implements Renderlet {
         PrintWriter writer = new PrintWriter(os);
         List<GraphNode> containedNodes = getContainedNodes(res);
         if (containedNodes.size() < 2) {
-            String nodeLabel = res.getNode() instanceof UriRef ?
-                ((UriRef)res.getNode()).getUnicodeString() : " Bnode";
+            String nodeLabel = res.getNode() instanceof IRI ?
+                ((IRI)res.getNode()).getUnicodeString() : " Bnode";
             writer.print(nodeLabel+": titled and/or content could not be found");
             writer.flush();
             return;
@@ -112,14 +112,14 @@ public class TitledContentRenderlet implements Renderlet {
             }
 
         });
-        final Iterator<Resource> entriesIter = titledContent.getObjects(DISCOBITS.contains);
+        final Iterator<RDFTerm> entriesIter = titledContent.getObjects(DISCOBITS.contains);
         while (entriesIter.hasNext()) {
-            Resource resource = entriesIter.next();
-            entries.add(new GraphNode((NonLiteral) resource,titledContent.getGraph()));
+            RDFTerm resource = entriesIter.next();
+            entries.add(new GraphNode((BlankNodeOrIRI) resource,titledContent.getGraph()));
         }
         final List<GraphNode> result = new ArrayList<GraphNode>();
         for (GraphNode graphNode : entries) {
-            Iterator<Resource> holded = graphNode.getObjects(DISCOBITS.holds);
+            Iterator<RDFTerm> holded = graphNode.getObjects(DISCOBITS.holds);
             if (!holded.hasNext()) {
                 throw new RuntimeException(
                         "Titled Content must contain a first element: "+graphNode.getNodeContext());


Mime
View raw message