You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2015/04/14 15:12:36 UTC

[01/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Repository: clerezza
Updated Branches:
  refs/heads/master 6ba32deb9 -> 9e95aae0e


http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
deleted file mode 100644
index dfeccd3..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.webdav;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.ws.rs.HttpMethod;
-
-/**
- * Indicates that the annotated method responds to HTTP MKCOL requests
- * @author ali
- */
-
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@HttpMethod("MKCOL")
-public @interface MKCOL {
-}


[71/87] [abbrv] clerezza git commit: CLEREZZA-982: using new package names for rdf-core

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
index 9b9961b..190d398 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * is thrown on an attempt to create an entity with a name which already exists

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
index a6cf537..43a16c1 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * is thrown on an attempt to delete an entity with a provider that

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
index b6ee4a1..aaa3e07 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
@@ -21,8 +21,8 @@ package org.apache.clerezza.rdf.core.access;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
index a231733..3f189d9 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.core.access;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
index 3678d2f..551d9b8 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * is thrown on an attempt to perform an operation on an entity (i.e. a

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
index e4e9cc1..4f804a1 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.Query;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
index add4c7d..51591b7 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
@@ -22,18 +22,18 @@ import java.security.AccessControlException;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.security.TcAccessController;
 import org.apache.clerezza.rdf.core.impl.WriteBlockedGraph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.WatchableGraph;
-import org.apache.commons.rdf.event.FilterTriple;
-import org.apache.commons.rdf.event.GraphListener;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.WatchableGraph;
+import org.apache.clerezza.commons.rdf.event.FilterTriple;
+import org.apache.clerezza.commons.rdf.event.GraphListener;
 
 /**
  * A Secured triple collection wraps a triple collection checking each access

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
index 45ced37..35bfdd2 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
@@ -31,11 +31,11 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.security.TcAccessController;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.impl.WriteBlockedGraph;
 import org.apache.clerezza.rdf.core.sparql.NoQueryEngineException;
 import org.apache.clerezza.rdf.core.sparql.ParseException;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
index 2201e2a..ef8fa0b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
@@ -20,9 +20,9 @@ package org.apache.clerezza.rdf.core.access;
 
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * A TC (Graph) Provider allows access to and optionally 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
index a084158..7b7eea9 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
@@ -30,10 +30,10 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.QueryEngine;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
index c4d1264..1079a9d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
@@ -32,17 +32,17 @@ import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.concurrent.locks.Lock;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.utils.security.PermissionParser;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * Controls the permissions needed to access a triple collection provided by

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
index f89ba89..76a8b79 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
@@ -22,16 +22,16 @@ import java.util.AbstractCollection;
 import java.util.Collection;
 import java.util.Iterator;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.ReadOnlyException;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.event.FilterTriple;
-import org.apache.commons.rdf.event.GraphListener;
-import org.apache.commons.rdf.impl.utils.AbstractGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.event.FilterTriple;
+import org.apache.clerezza.commons.rdf.event.GraphListener;
+import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
index bde1f16..5e1968c 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
@@ -23,15 +23,15 @@ import java.security.PrivilegedAction;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.event.FilterTriple;
-import org.apache.commons.rdf.event.GraphListener;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+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.event.FilterTriple;
+import org.apache.clerezza.commons.rdf.event.GraphListener;
 
 /**
  * Calls the methods of the wrapped <code>Graph</code> as privileged

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedImmuatbleGraphWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedImmuatbleGraphWrapper.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedImmuatbleGraphWrapper.java
index fdf0b5a..edc3a14 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedImmuatbleGraphWrapper.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedImmuatbleGraphWrapper.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.impl.util;
 
-import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
 
 /**
  * Calls the methods of the wrapped <code>ImmutableGraph</code> as privileged

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
index 2799379..9ee6979 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.impl.util;
 
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
 import java.math.BigInteger;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -31,10 +31,10 @@ import java.util.Set;
 import org.apache.clerezza.rdf.core.InvalidLiteralTypeException;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.rdf.core.NoConvertorException;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.impl.util.Base64;
 import org.apache.clerezza.rdf.core.impl.util.W3CDateFormat;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * An implementation of literal factory currently supporting only

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
index 944fd5d..bd28749 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
@@ -32,10 +32,10 @@ import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.logging.Level;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
+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.impl.utils.simple.SimpleMGraph;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
index 9f45c7a..24da826 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
@@ -20,8 +20,8 @@ package org.apache.clerezza.rdf.core.serializedform;
 
 import java.io.InputStream;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * An instance of this class parses RDF-ImmutableGraph from one or more serialization

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Serializer.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Serializer.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Serializer.java
index 8624722..48fa0b7 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Serializer.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Serializer.java
@@ -32,7 +32,7 @@ import java.util.Map;
 import java.util.ServiceLoader;
 import java.util.Set;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SerializingProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SerializingProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SerializingProvider.java
index 2f49216..ecf4ab8 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SerializingProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/SerializingProvider.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.serializedform;
 
 import java.io.OutputStream;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/QueryEngine.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/QueryEngine.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/QueryEngine.java
index 9bcdb70..0fb56bf 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/QueryEngine.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/QueryEngine.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.sparql.query.Query;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
index f1561c2..1868ec1 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql;
 
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import java.util.Map;
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 
 /**
  * A set of mapping from variable names to solutions.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
index 0829d2a..4ada2b8 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
@@ -22,7 +22,7 @@ import java.io.StringReader;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
index d4b95b6..f35a609 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/DataSet.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * This interface definition is not yet stable and may change in future.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
index a20ebda..387ced6 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/FunctionCall.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Defines a function call which is one form of {@link Expression}.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
index 95990a9..787cbdd 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/GroupGraphPattern.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Defines a group ImmutableGraph pattern.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
index 8670598..49e0b68 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/InlineData.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.query;
 
 import java.util.List;
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 
 /**
  *

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
index 18b0efe..9c0989d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/PredicatePath.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
index c2d4fac..e9e14aa 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/ResourceOrVariable.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 
 /**
  * Wraps either a {@link RdfTerm} or a {@link Variable}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
index bfb01df..8d6206b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefExpression.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Wraps a {@link Iri} in an {@link Expression}.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
index 1b4feb1..a0e007f 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/UriRefOrVariable.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Wraps either a {@link Iri} or a {@link Variable}.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
index af1ea2f..1e1ddbe 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
index 5a92b41..b9d74db 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleGroupGraphPattern.java
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.BasicGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.Expression;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
index dd5b55b..8b193e7 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleInlineData.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 import org.apache.clerezza.rdf.core.sparql.query.InlineData;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
index 446e903..7a77138 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathExpression;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathExpressionOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathPattern;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
index bad769b..7a60d8f 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleQuery.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.InlineData;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
index 4a916c2..a27d12b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
@@ -20,9 +20,9 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.StringQuerySerializer;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
index 68571c4..1067e8b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
@@ -18,9 +18,9 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.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.rdf.core.sparql.query.ResourceOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.TriplePattern;
 import org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
index 73fe749..4c13613 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/Update.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
index 2623142..ba6b54e 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/UpdateOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
index 41ce0ff..5aa0bdd 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/BaseUpdateOperation.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
index 31730a2..eb68e56 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ClearOrDropOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
index 4952497..3196043 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/CreateOperation.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
index cb1429e..f0de8fc 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/LoadOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
index f5b2f6d..c3ca5ce 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/ModifyOperation.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.impl.SimpleDataSet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
index f075e7a..626bfc5 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdate.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.update.Update;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
index 5e02afa..72c87d4 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/SimpleUpdateOperation.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.sparql.update.impl;
 
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.update.UpdateOperation;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
index f641d0b..a0a412d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/update/impl/UpdateOperationWithQuads.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.TriplePattern;
 import org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
index db5ad01..f8711c6 100644
--- a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
+++ b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
@@ -39,14 +39,14 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.Iri;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.GroupGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.BinaryOperation;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
index 1064cb8..35050c0 100644
--- a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
+++ b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
@@ -38,14 +38,14 @@ import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.Iri;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.BinaryOperation;
 import org.apache.clerezza.rdf.core.sparql.query.BinaryPropertyPathOperation;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
index 3242e33..e5a42fa 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core;
 
 
-import org.apache.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.Language;
 import org.junit.Test;
 import junit.framework.Assert;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
index 71d21e6..e333535 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
@@ -19,8 +19,8 @@
 package org.apache.clerezza.rdf.core;
 
 
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Iri;
 import java.util.Arrays;
 import java.util.Date;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
index 2ce68a7..27ab33e 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/UriRefTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
index 97a0fd4..35bf406 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
@@ -33,15 +33,15 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.providers.WeightedA;
 import org.apache.clerezza.rdf.core.access.providers.WeightedDummy;
 import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
index 138fe34..6e3ab07 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
@@ -24,16 +24,16 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+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.rdf.core.access.providers.WeightedA;
 import org.apache.clerezza.rdf.core.access.providers.WeightedA1;
 import org.apache.clerezza.rdf.core.access.providers.WeightedAHeavy;
 import org.apache.clerezza.rdf.core.access.providers.WeightedBlight;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.sparql.NoQueryEngineException;
 import org.apache.clerezza.rdf.core.sparql.QueryEngine;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
index 364d252..0216dd6 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
@@ -22,15 +22,15 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.rdf.core.access.TcManagerTest;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
index 2fe8336..f121cdf 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
@@ -21,16 +21,16 @@ package org.apache.clerezza.rdf.core.access.providers;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.rdf.core.access.TcManagerTest;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  * Same weight as WeightedA, but later in string-ordering

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
index c0cec77..ef9497e 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
@@ -22,17 +22,17 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.rdf.core.access.TcManagerTest;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
index ef7068f..d528fbd 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
@@ -21,16 +21,16 @@ package org.apache.clerezza.rdf.core.access.providers;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.rdf.core.access.TcManagerTest;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
index b464033..64c164d 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
@@ -23,16 +23,16 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+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;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleMGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
index 886648b..36d3584 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
@@ -20,8 +20,8 @@ package org.apache.clerezza.rdf.core.impl.util;
 
 import junit.framework.Assert;
 import org.apache.clerezza.rdf.core.impl.util.SimpleLiteralFactory;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
index 27a56d9..2919ba4 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.serializedform;
 
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
 import java.io.InputStream;
 import junit.framework.Assert;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
index f947a04..0cc59a6 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/SerializerTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.serializedform;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import java.io.OutputStream;
 
 import junit.framework.Assert;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
index f344939..6bf5c91 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
@@ -19,10 +19,10 @@
 package org.apache.clerezza.rdf.core.serializedform;
 
 import java.io.InputStream;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * This class is listed in

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
index a923f8a..69f33bc 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QueryParserTest.java
@@ -23,9 +23,9 @@ import java.util.List;
 import java.util.Set;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;
 import org.apache.clerezza.rdf.core.sparql.query.BasicGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.BuiltInCall;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
index d088dc1..f463ed8 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/QuerySerializerTest.java
@@ -23,7 +23,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.query.BinaryOperation;
 import org.apache.clerezza.rdf.core.sparql.query.BuiltInCall;
 import org.apache.clerezza.rdf.core.sparql.query.Expression;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
index 490d296..8472dc6 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParserTest.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.junit.Assert;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
index e9143f9..388bbdb 100644
--- a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
@@ -29,12 +29,12 @@ import java.net.URI;
 import java.util.Collection;
 
 import java.util.Iterator;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+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.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
index 0b4fd33..40c29f2 100644
--- a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
@@ -33,9 +33,9 @@ import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.osgi.service.component.ComponentContext;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
index e24edb9..86f4a41 100644
--- a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
@@ -28,9 +28,9 @@ import java.util.Iterator;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
index aeff78d..7d9c9c4 100644
--- a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
@@ -31,15 +31,15 @@ import java.util.Set;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.NoSuchEntityException;
 
 import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.test.TcProviderTest;
 import static org.junit.Assert.*;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
index 842c118..9a94c75 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
@@ -20,15 +20,15 @@ package org.apache.clerezza.rdf.jena.commons;
 
 import com.hp.hpl.jena.graph.Node;
 import java.util.Map;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.impl.utils.LiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+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.Triple;
+import org.apache.clerezza.commons.rdf.impl.utils.LiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/JenaBNodeWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/JenaBNodeWrapper.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/JenaBNodeWrapper.java
index 777986d..2c4d823 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/JenaBNodeWrapper.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/JenaBNodeWrapper.java
@@ -20,7 +20,7 @@
 package org.apache.clerezza.rdf.jena.commons;
 
 import com.hp.hpl.jena.graph.Node;
-import org.apache.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNode;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
index 5e878a6..c84a1a8 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
@@ -21,12 +21,12 @@ package org.apache.clerezza.rdf.jena.commons;
 import com.hp.hpl.jena.datatypes.TypeMapper;
 import com.hp.hpl.jena.graph.Node;
 import java.util.Map;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+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.Triple;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java b/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
index 2a7c8a6..f59342c 100644
--- a/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
+++ b/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
@@ -27,11 +27,11 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+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.rdf.jena.commons.Jena2TriaUtil;
 import org.apache.clerezza.rdf.jena.commons.Tria2JenaUtil;
 import org.wymiwyg.commons.util.collections.BidiMap;
@@ -57,14 +57,14 @@ public class JenaGraph extends GraphBase implements com.hp.hpl.jena.graph.Graph
 
 
 
-    final org.apache.commons.rdf.Graph graph;
+    final org.apache.clerezza.commons.rdf.Graph graph;
     final BidiMap<BlankNode, Node> tria2JenaBNodes = new BidiMapImpl<BlankNode, Node>();
     final Jena2TriaUtil jena2TriaUtil =
             new Jena2TriaUtil(tria2JenaBNodes.inverse());
     final Tria2JenaUtil tria2JenaUtil =
             new Tria2JenaUtil(tria2JenaBNodes);
 
-    public JenaGraph(org.apache.commons.rdf.Graph graph) {
+    public JenaGraph(org.apache.clerezza.commons.rdf.Graph graph) {
         this.graph = graph;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
----------------------------------------------------------------------
diff --git a/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java b/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
index 1a3d5e0..7896aa6 100644
--- a/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
+++ b/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
@@ -34,12 +34,12 @@ import com.hp.hpl.jena.vocabulary.RDF;
 import com.hp.hpl.jena.vocabulary.RDFS;
 import java.io.StringWriter;
 import org.junit.Test;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.jena.facade.JenaGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+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.simple.SimpleGraph;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java b/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
index a1167b5..6adfc8b 100644
--- a/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
+++ b/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
@@ -30,7 +30,7 @@ import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedParsingFormatException;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 /**
  * A {@link org.apache.clerezza.rdf.core.serializedform.ParsingProvider} based on Jena
  *
@@ -51,7 +51,7 @@ import org.apache.commons.rdf.Iri;
 public class JenaParserProvider implements ParsingProvider {
 
     @Override
-    public void parse(org.apache.commons.rdf.Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
+    public void parse(org.apache.clerezza.commons.rdf.Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
         String jenaFormat = getJenaFormat(formatIdentifier);
         com.hp.hpl.jena.graph.Graph graph = new JenaGraph(target);
         Model model = ModelFactory.createModelForGraph(graph);


[42/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..40bfb21
--- /dev/null
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+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.utils.IteratorMerger
+import org.wymiwyg.commons.util.dirbrowser.PathNode
+import java.util.Iterator
+
+class DirectoryOverlay(pathNode: PathNode, base: TripleCollection)
+  extends AbstractTripleCollection {
+
+  
+
+  import collection.JavaConversions._
+
+  
+
+  override def performFilter(s: NonLiteral, p: UriRef,
+    o: Resource): Iterator[Triple] = {
+    val addedTriples = new SimpleMGraph()
+
+    PathNode2MGraph.describeInGraph(pathNode, addedTriples)
+    
+    val subjects = (for (triple <- addedTriples; subject = triple.getSubject) yield {
+      subject
+    }).toSet
+  
+    class FilteringIterator(baseIter: Iterator[Triple]) extends Iterator[Triple] {
+      var nextElem: Triple = null
+      def prepareNext {
+        nextElem = if (baseIter.hasNext) baseIter.next else null
+        if ((nextElem != null) && 
+          (subjects.contains(nextElem.getSubject))) {
+            //println("skipping "+nextElem)
+            prepareNext
+        }
+      }
+      prepareNext
+  
+      override def next = {
+        val result = nextElem
+        prepareNext
+        result
+      }
+      override def hasNext = nextElem != null
+      override def remove = throw new UnsupportedOperationException
+    }
+      
+    new IteratorMerger(new FilteringIterator(base.filter(s, p, o)), addedTriples.filter(s,p, o))
+  }
+
+  /**
+   * returns an upper bound of the size (removals in abse are not deducted)
+   */
+  override def size = {
+    val addedTriples = new SimpleMGraph()
+
+      PathNode2MGraph.describeInGraph(pathNode, addedTriples)
+
+   base.size+addedTriples.size 
+  }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
new file mode 100644
index 0000000..684992a
--- /dev/null
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.content.fsadaptor
+
+import org.slf4j.LoggerFactory
+//import org.slf4j.ext.LoggerWrapper
+
+trait Logger {
+
+  private val slf4jLogger = LoggerFactory.getLogger(this.getClass)
+//  val logger: org.slf4j.Logger = new LoggerWrapper(slf4jLogger, this.getClass.getName)
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..8a62774
--- /dev/null
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+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.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
+import org.apache.clerezza.rdf.utils.GraphNode
+import org.apache.clerezza.web.fileserver.util.MediaTypeGuesser
+import org.wymiwyg.commons.util.dirbrowser.PathNode
+
+
+/**
+ *
+ * @author reto
+ */
+object PathNode2MGraph {
+
+  private val URI_PREFIX = Constants.URN_LOCAL_INSTANCE
+
+  private val literalFactory = LiteralFactory.getInstance
+
+  private def getMediaType(file: PathNode) = {
+    val guessedMediaType: MediaType = MediaTypeGuesser.getInstance().guessTypeForName(file.getPath());
+    if (guessedMediaType != null) {
+      guessedMediaType.toString
+    } else {
+      "application/octet-stream"
+    }
+
+  }
+
+  private def getData(file: PathNode) = {
+    val baos = new ByteArrayOutputStream
+    val in = file.getInputStream()
+    val buffer = new Array[Byte](4096)
+    var read = in.read(buffer)
+    while (read != -1) {
+      baos.write(buffer, 0, read)
+      read = in.read(buffer)
+    }
+    in.close()
+    baos.toByteArray
+  }
+
+  def describeInGraph(directory: PathNode, mGraph: MGraph) {
+    val basePathLength = directory.getPath.length
+    def createUriRef(file: PathNode, isDirectory: Boolean) = {
+      def addSlashIfNeeded(s: String) = {
+         if (s.endsWith("/")) {
+           s
+         } else {
+           s+'/'
+         }
+      }
+      val path =  if (isDirectory) {
+        addSlashIfNeeded(file.getPath.substring(basePathLength))
+      } else {
+        file.getPath.substring(basePathLength)
+      }
+      new UriRef(URI_PREFIX+path)
+    }
+    def processDirectory(directory: PathNode) {
+      val directoryResource = createUriRef(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)
+        mGraph.add(new TripleImpl(resource, HIERARCHY.parent, directoryResource))
+        if (isDirectory) {
+          processDirectory(file)
+        } else {
+          mGraph.add(new TripleImpl(resource, RDF.`type`, DISCOBITS.InfoDiscoBit))
+          val data = getData(file)
+          mGraph.add(new TripleImpl(resource, DISCOBITS.infoBit, literalFactory.createTypedLiteral(data)))
+          mGraph.add(new TripleImpl(resource, DISCOBITS.mediaType,
+                        literalFactory.createTypedLiteral(getMediaType(file))));
+        }
+      }
+    }
+    processDirectory(directory)
+  }
+
+  def removeNodesFromGraph(directory: PathNode, mGraph: MGraph) {
+    val basePathLength = directory.getPath.length
+    def createUriRef(file: PathNode, isDirectory: Boolean) = {
+      def addSlashIfNeeded(s: String) = {
+         if (s.endsWith("/")) {
+           s
+         } else {
+           s+'/'
+         }
+      }
+      val path =  if (isDirectory) {
+        addSlashIfNeeded(file.getPath.substring(basePathLength))
+      } else {
+        file.getPath.substring(basePathLength)
+      }
+      new UriRef(URI_PREFIX+path)
+    }
+    def processDirectory(directory: PathNode) {
+      val directoryResource = createUriRef(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 node = new GraphNode(resource, mGraph)
+        if (isDirectory) {
+          processDirectory(file)
+        }
+        node.deleteProperties(HIERARCHY.parent)
+        node.deleteProperties(RDF.`type`)
+        node.deleteProperties(DISCOBITS.infoBit)
+        node.deleteProperties(DISCOBITS.mediaType)
+      }
+    }
+    processDirectory(directory)
+  }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.imagemetadata/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.imagemetadata/LICENSE b/platform/content.imagemetadata/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.imagemetadata/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.imagemetadata/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.imagemetadata/pom.xml b/platform/content.imagemetadata/pom.xml
new file mode 100644
index 0000000..6b82b03
--- /dev/null
+++ b/platform/content.imagemetadata/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.imagemetadata</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content Image Metadata</name>
+    <description>Provides a Meta Data Generator that generates metadata for
+    images.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils.imageprocessing</artifactId>
+            <version>0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.metadata</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
----------------------------------------------------------------------
diff --git a/platform/content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java b/platform/content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
new file mode 100644
index 0000000..b49bffc
--- /dev/null
+++ b/platform/content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.imagemetadata;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import org.apache.clerezza.rdf.ontologies.EXIF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.utils.imageprocessing.ImageReaderService;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+
+/**
+ * This class generates metadata about image data.
+ *
+ * @author mir, hasan
+ */
+@Component(metatype=true)
+@Service(MetaDataGenerator.class)
+public class ImageMetaDataGenerator implements MetaDataGenerator {
+
+    @Reference
+    private ImageReaderService imageReaderService;
+        
+    @Override
+    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
+
+        if (mediaType.getType().startsWith("image")) {
+            try {
+                BufferedImage buffImage = imageReaderService.getBufferedImage(
+                                        new ByteArrayInputStream(data));
+                node.deleteProperties(EXIF.width);
+                node.deleteProperties(EXIF.height);
+                node.addProperty(EXIF.width, LiteralFactory.getInstance().
+                        createTypedLiteral(Integer.valueOf(buffImage.getWidth())));
+                node.addProperty(EXIF.height, LiteralFactory.getInstance().
+                        createTypedLiteral(Integer.valueOf(buffImage.getHeight())));
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.representations/LICENSE b/platform/content.representations/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.representations/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.core/LICENSE b/platform/content.representations/platform.content.representations.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.core/pom.xml b/platform/content.representations/platform.content.representations.core/pom.xml
new file mode 100644
index 0000000..996e2a0
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.core/pom.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>platform.content.representations</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.representations.core</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content Representations Core</name>
+    <description>Provides a Meta Data Generator that generates alternative
+        representations for data of    various media types</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.metadata</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils.imageprocessing</artifactId>
+            <version>0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content</artifactId>
+            <version>0.14</version>
+        </dependency>
+<!--
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.resources.style</artifactId>
+        </dependency>
+-->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.representations.ontologies</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java b/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
new file mode 100644
index 0000000..f7e5f57
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
@@ -0,0 +1,327 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.representations.core;
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.concurrent.locks.Lock;
+import javax.imageio.ImageIO;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.platform.content.DiscobitsHandler;
+import org.apache.clerezza.platform.content.InfoDiscobit;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import org.apache.clerezza.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.utils.imageprocessing.ImageProcessor;
+import org.apache.clerezza.utils.imageprocessing.ImageReaderService;
+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;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * This class provides a method that generates a thumbnail for specified data
+ * if the specified media type is supported. The supported media types are "image/*".
+ * The generated thumbnail is added as a property to the specified
+ * <code>GraphNode</code>. The property URI is
+ * "http://discobits.org/ontology#thumbnail".
+ *
+ * @author mir
+ */
+@Component(metatype=true)
+@Service({
+    MetaDataGenerator.class,
+    AlternativeRepresentationGenerator.class
+})
+
+public class AlternativeRepresentationGenerator implements MetaDataGenerator {
+
+    private static class Resolution {
+
+        private int width;
+
+        private int height;
+        /**
+         * Takes a String, which contains a resoultion in the format
+         * [width]x[height].
+         *
+         * @param resoulutionString
+         */
+        public Resolution(String resoulutionString) {
+            String[] widthAndHeight = resoulutionString.split("x");
+            width = new Integer(widthAndHeight[0]);
+            height = new Integer(widthAndHeight[1]);
+        }
+
+        /**
+         * A Resolution with the specified width and height.
+         *
+         * @param width
+         * @param height
+         */
+        public Resolution(int width, int height) {
+            this.width = width;
+            this.height = height;
+        }
+
+        public int getHeight() {
+            return height;
+        }
+
+        public int getWidth() {
+            return width;
+        }
+    }
+    final static String EXACT_APPENDIX = "-exact";
+
+    @Reference
+    private ImageProcessor imageProcessor;
+        
+        @Reference
+    private ImageReaderService imageReaderService;
+
+    @Property(value="100x100,200x200", description="Specifies the resolutions of alternative" +
+            " representations in the format [width]x[height]. Multiple resolutions" +
+            " are separated by comma (e.g. 100x100,30x30)")
+    public static final String RESOLUTIONS = "resolutions";
+
+    @Property(value="100x100,200x200", description="Specifies the exact resolutions of alternative" +
+            " representations in the format [width]x[height]. Multiple resolutions" +
+            " are separated by comma (e.g. 100x100,30x30). The image will be cropped if it has not " +
+            "the needed proportions")
+    public static final String EXACT_RESOLUTIONS = "exact_resolutions";
+    
+    private volatile ServiceTracker discobitTracker;
+    private Resolution[] resolutions;
+    private Resolution[] exactResolutions;
+
+    /**
+     * Indicates if data given to the AlternativeRepresentationGenerator is a
+     * alternative representation itself and therefore does not have to have a
+     * alternative representation generated for it.
+     */
+    private ThreadLocal<Boolean> isAltRepresentation = new ThreadLocal<Boolean>() {
+
+        @Override
+        protected Boolean initialValue() {
+            return false;
+        }
+    };
+
+    protected void activate(ComponentContext context) {
+        resolutions = createResolutionArray((String) context.getProperties().get(RESOLUTIONS));
+        exactResolutions = createResolutionArray((String) context.getProperties().get(EXACT_RESOLUTIONS));
+        discobitTracker = new ServiceTracker(context.getBundleContext(),
+                DiscobitsHandler.class.getName(), null);
+        new Thread() {
+            @Override
+            public void run() {
+                discobitTracker.open();
+            }
+        }.start();
+    }
+
+    private Resolution[] createResolutionArray(String resolutionsString) {
+        String[] resoultionStrings = resolutionsString.split(",");
+        Resolution[] resolutionArray = new Resolution[resoultionStrings.length];
+        for (int i = 0; i < resoultionStrings.length; i++) {
+            resolutionArray[i] = new Resolution(resoultionStrings[i].trim());
+        }
+        return resolutionArray;
+    }
+
+    protected void deactivate(ComponentContext context) {
+        discobitTracker.close();
+        discobitTracker = null;
+    }
+
+    @Override
+    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
+        if (isAltRepresentation.get()) {
+            return;
+        }
+        if (mediaType.getType().startsWith("image")) {
+            generateAlternativeImages(data, mediaType, node);
+        }
+    }
+
+    /**
+     * Generates an alternative image of the image at the specified infoBitNode.
+     * The parameters width and height specify the dimensions the generated
+     * image should have. The image will be resized to fit the specified
+     * dimensions (height and width of the generated image will be smaller
+     * or equals the specified width and height). Returns the URI of the
+     * generated image.
+     *
+     * @param infoBitNode an infoDiscoBit of media type image
+     * @param width the width the generated image should have
+     * @param height the height the generated image should have
+     * @return the URI of the generated image
+     */
+    public UriRef generateAlternativeImage(GraphNode infoBitNode, int width, int height) {
+        return generateAlternativeImage(infoBitNode, width, height, false);
+    }
+
+    /**
+     * Generates an alternative image of the image at the specified infoBitNode.
+     * The parameters width and height specify the dimensions the generated
+     * image should have. If exact is true, then the generated image will be
+     * resized and cropped to match the specified width and height exactly. If
+     * exact is false, then the image will be resized to fit the specified
+     * dimensions (height and width of the generated image will be smaller
+     * or equals the specified width and height). Returns the URI of the
+     * generated image.
+     *
+     * @param infoBitNode an infoDiscoBit of media type image
+     * @param width the width the generated image should have
+     * @param height the height the generated image should have
+     * @param exact specifies if the generated image must have the exact
+     *        width and height or not.
+     * @return the URI of the generated image
+     */
+    public UriRef generateAlternativeImage(GraphNode infoBitNode, int width, int height, 
+            boolean exact) {
+        try {
+            isAltRepresentation.set(Boolean.TRUE);
+            InfoDiscobit infoBit = InfoDiscobit.createInstance(infoBitNode);
+            BufferedImage buffImage = imageReaderService.getBufferedImage(
+                                new ByteArrayInputStream(infoBit.getData()));
+            return generateAlternativeImage(buffImage, new Resolution(width, height), 
+                    MediaType.valueOf(infoBit.getContentType()), infoBitNode, exact);
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        } finally {
+            isAltRepresentation.set(Boolean.FALSE);
+        }
+    }
+
+    private void generateAlternativeImages(byte[] data, MediaType mediaType,
+            GraphNode node) throws RuntimeException {
+        try {
+            isAltRepresentation.set(Boolean.TRUE);
+            BufferedImage buffImage = imageReaderService.getBufferedImage(
+                                new ByteArrayInputStream(data));
+            int imgWidth = buffImage.getWidth();
+            int imgHeigth = buffImage.getHeight();
+            for (Resolution resolution : resolutions) {
+                if (imgWidth > resolution.getWidth() || imgHeigth > resolution.getHeight()) {
+                    generateAlternativeImage(buffImage, resolution, mediaType, node, false);
+                }
+            }
+            for (Resolution resolution : exactResolutions) {
+                if (imgWidth > resolution.getWidth() && imgHeigth > resolution.getHeight()) {
+                    generateAlternativeImage(buffImage, resolution, mediaType, node, true);
+                }
+            }
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        } finally {
+            isAltRepresentation.set(Boolean.FALSE);
+        }
+    }
+
+    private UriRef generateAlternativeImage(BufferedImage buffImage, Resolution resolution,
+            MediaType mediaType, GraphNode node, boolean extact) throws IOException {
+        BufferedImage alternativeImage;
+        if (extact) {
+            alternativeImage = resizeAndCrop(resolution, buffImage);
+            if (alternativeImage == null) {
+                return null;
+            }
+        } else {
+            alternativeImage = imageProcessor.makeAThumbnail(buffImage,
+                    resolution.getWidth(), resolution.getHeight());
+        }
+        byte[] alternativeImageBytes = bufferedImage2ByteArray(alternativeImage, mediaType);
+        DiscobitsHandler contentHandler = (DiscobitsHandler) discobitTracker.getService();
+        
+        UriRef thumbnailUri = createThumbnailUri((UriRef) node.getNode(), alternativeImage, extact);
+        contentHandler.put(thumbnailUri, mediaType, alternativeImageBytes);
+        Lock writeLock = node.writeLock();
+        writeLock.lock();
+        try {
+            node.addProperty(DISCOBITS.thumbnail, thumbnailUri);
+            return thumbnailUri;
+        } finally {
+            writeLock.unlock();
+        }
+    }
+    
+        private BufferedImage resizeAndCrop(Resolution resolution, BufferedImage buffImage) {
+        BufferedImage alternativeImage;
+        int imageHeight = 0;
+        int imageWidth = 0;
+        int widthDiff = buffImage.getWidth() - resolution.getWidth() ;
+        int heightDiff = buffImage.getHeight() - resolution.getHeight();
+        // resize if both dimension are bigger than the dimensions of the needed resolution
+        if (widthDiff >= 0 && heightDiff >= 0) {
+            if (widthDiff < heightDiff) {
+                imageWidth = resolution.getWidth();
+            } else {
+                imageHeight = resolution.getHeight();
+            }
+            alternativeImage = imageProcessor.resizeProportional(buffImage, imageWidth, imageHeight);
+        } else {
+            return null;
+        }
+        // crop image to fit exact the resolution
+        if (widthDiff < heightDiff) {
+            heightDiff = alternativeImage.getHeight() - resolution.getHeight();
+            alternativeImage = alternativeImage.getSubimage(0, heightDiff/2, resolution.getWidth(),
+                    resolution.getHeight());
+        } else {
+            widthDiff = alternativeImage.getWidth() - resolution.getWidth();
+            alternativeImage = alternativeImage.getSubimage(widthDiff/2, 0, resolution.getWidth(),
+                    resolution.getHeight());
+        }
+        return alternativeImage;
+    }
+
+    private byte[] bufferedImage2ByteArray(BufferedImage image,
+            MediaType mediaType) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageIO.write(image, mediaType.getSubtype(), baos);
+        byte[] bytes = baos.toByteArray();
+        baos.flush();
+        return bytes;
+    }
+
+    private UriRef createThumbnailUri(UriRef uriRef, BufferedImage img, boolean exact) {
+        String resolution = "-" + img.getWidth() + "x" + img.getHeight() + (exact ? EXACT_APPENDIX: "");
+        String oldUri = uriRef.getUnicodeString();
+        String newUri;
+        int lastIndexOfDot = oldUri.lastIndexOf(".");
+        int lastIndexOfSlash = oldUri.lastIndexOf("/");
+        // 6 characters to keep the extension at the end.
+        if (lastIndexOfSlash < lastIndexOfDot &&
+                lastIndexOfDot >= (oldUri.length() - 6)) {
+            String firstPart = oldUri.substring(0, lastIndexOfDot);
+            String lastPart = oldUri.substring(lastIndexOfDot, oldUri.length());
+            newUri = firstPart + resolution + lastPart;
+        } else {
+            newUri = oldUri + resolution;
+        }
+        return new UriRef(newUri);
+    }
+}


[80/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 2), also renamed IriSet -> IRISet and IriUtils -> IRIUtils

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IRIUtil.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IRIUtil.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IRIUtil.java
new file mode 100644
index 0000000..f33a351
--- /dev/null
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IRIUtil.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.utils;
+
+
+/**
+ * A utility class for IRI and String manipulations.
+ *
+ * @author tio
+ */
+public class IRIUtil {
+
+    /**
+     * Strips #x00 - #x1F and #x7F-#x9F from a Unicode string
+     * @see <a href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">
+     * http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference</a> and
+     * replaces all US-ASCII space character with a "+".
+     *
+     * @param inputChars
+     * @return the stripped string
+     * 
+     */
+    public static String stripNonIRIChars(CharSequence inputChars) {
+
+        if (inputChars == null) {
+            return "";
+        }
+
+        StringBuffer buffer = new StringBuffer();
+
+        for (int i = 0; i < inputChars.length(); i++) {
+            char c = inputChars.charAt(i);
+
+            if (!isIllegal(c)) {
+                buffer.append(c);
+            }
+        }
+        return buffer.toString().replaceAll("\\s+", "+");
+    }
+
+    private static boolean isIllegal(char ch) {
+        if ((ch >= 0x7F) && (ch <= 0x9F)) {
+            return true;
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IriUtil.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IriUtil.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IriUtil.java
deleted file mode 100644
index 323c9f2..0000000
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/IriUtil.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.utils;
-
-
-/**
- * A utility class for Iri and String manipulations.
- *
- * @author tio
- */
-public class IriUtil {
-
-    /**
-     * Strips #x00 - #x1F and #x7F-#x9F from a Unicode string
-     * @see <a href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">
-     * http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference</a> and
-     * replaces all US-ASCII space character with a "+".
-     *
-     * @param inputChars
-     * @return the stripped string
-     * 
-     */
-    public static String stripNonIriChars(CharSequence inputChars) {
-
-        if (inputChars == null) {
-            return "";
-        }
-
-        StringBuffer buffer = new StringBuffer();
-
-        for (int i = 0; i < inputChars.length(); i++) {
-            char c = inputChars.charAt(i);
-
-            if (!isIllegal(c)) {
-                buffer.append(c);
-            }
-        }
-        return buffer.toString().replaceAll("\\s+", "+");
-    }
-
-    private static boolean isIllegal(char ch) {
-        if ((ch >= 0x7F) && (ch <= 0x9F)) {
-            return true;
-        }
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/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 e9192ab..9419a5c 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
@@ -73,13 +73,13 @@ public class RdfList extends AbstractList<RDFTerm> {
      * Get a list for the specified resource.
      *
      * If the list is modified using the created instance
-     * <code>listRdfTerm</code> will always be the first list.
+     * <code>listRDFTerm</code> will always be the first list.
      *
-     * @param listRdfTerm
+     * @param listRDFTerm
      * @param tc
      */
-    public RdfList(BlankNodeOrIRI listRdfTerm, Graph tc) {
-        firstList = listRdfTerm;
+    public RdfList(BlankNodeOrIRI listRDFTerm, Graph tc) {
+        firstList = listRDFTerm;
         this.tc = tc;
 
     }
@@ -95,23 +95,23 @@ public class RdfList extends AbstractList<RDFTerm> {
 
     /**
      * Creates an empty RdfList by writing a triple
-     * "{@code listRdfTerm} owl:sameAs rdf.nil ." to {@code tc}.
+     * "{@code listRDFTerm} owl:sameAs rdf.nil ." to {@code tc}.
      *
-     * @param listRdfTerm
+     * @param listRDFTerm
      * @param tc
      * @return    an empty rdf:List.
      * @throws IllegalArgumentException
-     *        if the provided {@code  listRdfTerm} is a non-empty rdf:List.
+     *        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()) {
-            RdfList list = new RdfList(listRdfTerm, tc);
-            list.tc.add(new TripleImpl(listRdfTerm, OWL.sameAs, RDF_NIL));
+        if (!tc.filter(listRDFTerm, RDF.first, null).hasNext()) {
+            RdfList list = new RdfList(listRDFTerm, tc);
+            list.tc.add(new TripleImpl(listRDFTerm, OWL.sameAs, RDF_NIL));
             return list;
         } else {
-            throw new IllegalArgumentException(listRdfTerm + "is a non-empty rdf:List.");
+            throw new IllegalArgumentException(listRDFTerm + "is a non-empty rdf:List.");
         }
     }
 
@@ -237,16 +237,16 @@ public class RdfList extends AbstractList<RDFTerm> {
         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();
+            return tc.filter(listRDFTerm, RDF.first, null).next().getObject();
         } catch (final NullPointerException e) {
             RuntimeException runtimeEx = AccessController.doPrivileged(new PrivilegedAction<RuntimeException>() {
                 @Override
                 public RuntimeException run(){
                     try {
                         final FileOutputStream fileOutputStream = new FileOutputStream("/tmp/broken-list.nt");
-                        final GraphNode graphNode = new GraphNode(listRdfTerm, tc);
+                        final GraphNode graphNode = new GraphNode(listRDFTerm, tc);
                         Serializer.getInstance().serialize(fileOutputStream, graphNode.getNodeContext(), SupportedFormat.N_TRIPLE);
                         fileOutputStream.flush();
                         logger.warn("GraphNode: " + graphNode);
@@ -254,7 +254,7 @@ public class RdfList extends AbstractList<RDFTerm> {
                         while (properties.hasNext()) {
                             logger.warn("available: " + properties.next());
                         }
-                        return new RuntimeException("broken list " + listRdfTerm, e);
+                        return new RuntimeException("broken list " + listRDFTerm, e);
                     } catch (Exception ex) {
                         return new RuntimeException(ex);
                     }
@@ -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/f2811c72/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 5513dca..d202388 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
@@ -33,7 +33,7 @@ import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
 
 /**
- * This wrapps a Triplecollection changing a prefix for the Iris contained
+ * This wrapps a Triplecollection changing a prefix for the IRIs contained
  * in subject or object position.
  *
  * Currently it only supports read opearations.
@@ -57,50 +57,50 @@ 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;
-            if (sourceIri.getUnicodeString().startsWith(sourcePrefix)) {
-                final String uriRest = sourceIri.getUnicodeString()
+    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 sourceRdfTerm;            
+        return sourceRDFTerm;            
     }
 
     private Triple toTargetTriple(Triple triple) {
         if (triple == null) {
             return null;
         }
-        return new TripleImpl(toTargetRdfTerm(triple.getSubject()),
-                triple.getPredicate(), toTargetRdfTerm(triple.getObject()));
+        return new TripleImpl(toTargetRDFTerm(triple.getSubject()),
+                triple.getPredicate(), toTargetRDFTerm(triple.getObject()));
     }
 
-    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()
+    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 targetRdfTerm;
+        return targetRDFTerm;
     }
 
     private Triple toSourceTriple(Triple triple) {
         if (triple == null) {
             return null;
         }
-        return new TripleImpl(toSourceRdfTerm(triple.getSubject()),
-                triple.getPredicate(), toSourceRdfTerm(triple.getObject()));
+        return new TripleImpl(toSourceRDFTerm(triple.getSubject()),
+                triple.getPredicate(), toSourceRDFTerm(triple.getObject()));
     }
 
     @Override
     public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-        final Iterator<Triple> baseIter = base.filter(toSourceRdfTerm(subject),
-                predicate, toSourceRdfTerm(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/f2811c72/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 90f3c26..bf25a99 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
@@ -105,15 +105,15 @@ public class BaseSmusher {
             case 0:
                 return new BlankNode();
         }
-        final IRI preferedIri = getPreferedIri(uriRefs);
+        final IRI preferedIRI = getPreferedIRI(uriRefs);
         final Iterator<IRI> uriRefIter = uriRefs.iterator();
         while (uriRefIter.hasNext()) {
             IRI uriRef = uriRefIter.next();
-            if (!uriRef.equals(preferedIri)) {
-                owlSameAsGraph.add(new TripleImpl(uriRef, OWL.sameAs, preferedIri));
+            if (!uriRef.equals(preferedIRI)) {
+                owlSameAsGraph.add(new TripleImpl(uriRef, OWL.sameAs, preferedIRI));
             }
         }
-        return preferedIri;
+        return preferedIRI;
     }
 
     
@@ -125,7 +125,7 @@ public class BaseSmusher {
      * @param uriRefs
      * @return 
      */
-    protected IRI getPreferedIri(Set<IRI> uriRefs) {
+    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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
index aba1626..78e8893 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
@@ -44,10 +44,10 @@ public class SameAsSmusher extends BaseSmusher {
     
     /**
      * This will ensure that all properties of sameAs resources are associated
-     * to the preferedIri as returned by {@code getPreferedIri}
+     * to the preferedIRI as returned by {@code getPreferedIRI}
      * @param mGraph
      * @param owlSameStatements 
-     * @param addCanonicalSameAsStatements if true owl:sameAsStatements with the preferedIri as object will be added
+     * @param addCanonicalSameAsStatements if true owl:sameAsStatements with the preferedIRI as object will be added
      */
     public void smush(Graph mGraph, 
             Graph owlSameStatements,

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
index c9a8f0a..2d9e4c6 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
@@ -81,7 +81,7 @@ public class IfpSmushTest {
     }
 
     @Test
-    public void oneIri()  {
+    public void oneIRI()  {
         Graph mGraph = new SimpleGraph();
         IRI mbox1 = new IRI("mailto:foo@example.org");
         final IRI resource = new IRI("http://example.org/");
@@ -97,7 +97,7 @@ public class IfpSmushTest {
     }
 
     @Test
-    public void twoIris()  {
+    public void twoIRIs()  {
         Graph mGraph = new SimpleGraph();
         IRI mbox1 = new IRI("mailto:foo@example.org");
         final IRI resource1 = new IRI("http://example.org/");

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
index 4386039..2fdd2f4 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
@@ -184,7 +184,7 @@ public class TestGraphNode {
         BlankNode newBnode = new BlankNode();
         IRI property1 = new IRI("http://example.org/property1");
         IRI property2 = new IRI("http://example.org/property2");
-        IRI newIri = new IRI("http://example.org/newName");
+        IRI newIRI = new IRI("http://example.org/newName");
         Literal literal1 = new PlainLiteralImpl("literal");
         Literal literal2 = new PlainLiteralImpl("bla bla");
 
@@ -201,12 +201,12 @@ public class TestGraphNode {
         GraphNode node = new GraphNode(property1,
                 new SimpleGraph(initialGraph.iterator()));
 
-        node.replaceWith(newIri, true);
+        node.replaceWith(newIRI, true);
         Assert.assertEquals(5, node.getGraph().size());
-        Triple expectedTriple1 = new TripleImpl(bNode1, newIri, literal1);
-        Triple expectedTriple2 = new TripleImpl(bNode1, property2, newIri);
-        Triple expectedTriple3 = new TripleImpl(newIri, newIri, bNode2);
-        Triple expectedTriple4 = new TripleImpl(newIri, newIri, literal2);
+        Triple expectedTriple1 = new TripleImpl(bNode1, newIRI, literal1);
+        Triple expectedTriple2 = new TripleImpl(bNode1, property2, newIRI);
+        Triple expectedTriple3 = new TripleImpl(newIRI, newIRI, bNode2);
+        Triple expectedTriple4 = new TripleImpl(newIRI, newIRI, literal2);
 
         Assert.assertTrue(node.getGraph().contains(expectedTriple1));
         Assert.assertTrue(node.getGraph().contains(expectedTriple2));
@@ -235,10 +235,10 @@ public class TestGraphNode {
         Assert.assertTrue(node.getGraph().contains(expectedTriple8));
 
         node = new GraphNode(property1, new SimpleGraph(initialGraph.iterator()));
-        node.replaceWith(newIri);
-        Triple expectedTriple9 = new TripleImpl(bNode1, property2, newIri);
-        Triple expectedTriple10 = new TripleImpl(newIri, property1, bNode2);
-        Triple expectedTriple11 = new TripleImpl(newIri, property1, literal2);
+        node.replaceWith(newIRI);
+        Triple expectedTriple9 = new TripleImpl(bNode1, property2, newIRI);
+        Triple expectedTriple10 = new TripleImpl(newIRI, property1, bNode2);
+        Triple expectedTriple11 = new TripleImpl(newIRI, property1, literal2);
         Assert.assertTrue(node.getGraph().contains(triple1));
         Assert.assertTrue(node.getGraph().contains(expectedTriple9));
         Assert.assertTrue(node.getGraph().contains(expectedTriple10));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
index f2d2539..6e67ed4 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
@@ -64,7 +64,7 @@ public class SameAsSmushTest {
         SameAsSmusher smusher = new SameAsSmusher() {
 
             @Override
-            protected IRI getPreferedIri(Set<IRI> uriRefs) {
+            protected IRI getPreferedIRI(Set<IRI> uriRefs) {
                 if (!uriRefs.contains(uriA)) throw new RuntimeException("not the set we excpect");
                 if (!uriRefs.contains(uriB)) throw new RuntimeException("not the set we excpect");
                 return uriC;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
index ea34a4f..c0584af 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
@@ -129,9 +129,9 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
             compressedTcs.putNextEntry(new ZipEntry(folder));
 
             Set<IRI> tripleCollections = tcManager.listGraphs();
-            Iterator<IRI> tcIris = tripleCollections.iterator();
-            while (tcIris.hasNext()) {
-                IRI tcUri = tcIris.next();
+            Iterator<IRI> tcIRIs = tripleCollections.iterator();
+            while (tcIRIs.hasNext()) {
+                IRI tcUri = tcIRIs.next();
                 String fileName = folder + getTcFileName(tcUri, ".nt",
                         fileNameCount);
                 Graph tripleCollection = tcManager.getGraph(tcUri);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
index 85f32ee..802bd62 100644
--- a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
@@ -19,9 +19,9 @@
  *
 */
 
-def gm(s: Any) = new Iri("http://clerezza.org/2010/03/graph-management#"+s)
-def rdf(s: Any) = new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
-def tcp(s: Any) = new Iri("http://clerezza.org/2009/06/tcprovider#"+s)
+def gm(s: Any) = new IRI("http://clerezza.org/2010/03/graph-management#"+s)
+def rdf(s: Any) = new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
+def tcp(s: Any) = new IRI("http://clerezza.org/2009/06/tcprovider#"+s)
 
 resultDocModifier.setTitle("Manage Triple Collections");
 resultDocModifier.addNodes2Elem("tx-module", <h1>Manage Triple Collections</h1>);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
index 5d2b0c1..4af5add 100644
--- a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
@@ -19,7 +19,7 @@
  *
 */
 
-def se(s: Any) = new Iri("http://clerezza.org/2009/11/sparql-endpoint#"+s)
+def se(s: Any) = new IRI("http://clerezza.org/2009/11/sparql-endpoint#"+s)
 <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
 	<head>
 		<title>SPARQL Endpoint</title>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
index c4b8fba..6517caf 100644
--- a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
+++ b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
@@ -166,7 +166,7 @@ public class GraphNodeTest {
     }
 
     @Test
-    public void simpleIriRoot() throws IOException {
+    public void simpleIRIRoot() throws IOException {
         Graph mGraph = new SimpleGraph();
         BlankNodeOrIRI resource = new IRI("http://example.org/");
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));


[05/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.config/pom.xml b/platform/platform.config/pom.xml
deleted file mode 100644
index 111680c..0000000
--- a/platform/platform.config/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.config</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Configuration</name>
-    <description>This bundles initializes the system graph with default values,
-    provides a service to access configuration default values, and a GUI to
-    edit such values.
-    </description>
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>permissiondescriptions</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.file.storage</artifactId>
-            <version>0.4</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
deleted file mode 100644
index ebc0bf9..0000000
--- a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.config;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import org.apache.clerezza.platform.Constants;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-
-/**
- * This class provides a OSGi service for getting system properties from
- * the sytem graph.
- * 
- * @author mir
- */
-@Component
-@Service(PlatformConfig.class)
-public class PlatformConfig {
-
-    @Reference(target = SystemConfig.SYSTEM_GRAPH_FILTER)
-    private LockableMGraph systemGraph;
-    private BundleContext context;
-    private static String DEFAULT_PORT = "8080";
-
-    /**
-     * @deprecated use org.apache.clerezza.platform.Contants instead
-     */
-    @Deprecated
-    public static final UriRef CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
-
-    /**
-     * A filter that can be used to get the config graph as OSGi service,
-     * that is provided by <code>org.apache.clerezza.rdf.core.access.TcManager</code>.
-     */
-    public static final String CONFIG_GRAPH_FILTER =
-            "(name="+ Constants.CONFIG_GRAPH_URI_STRING +")";
-
-    @Reference
-    private TcManager tcManager;
-
-
-    /**
-     * Returns the default base URI of the Clerezza platform instance.
-     * @return the base URI of the Clerezza platform
-     */
-    public UriRef getDefaultBaseUri() {
-        return AccessController.doPrivileged(new PrivilegedAction<UriRef>() {
-
-            @Override
-            public UriRef run() {
-                GraphNode platformInstance = getPlatformInstance();
-                Lock l = platformInstance.readLock();
-                l.lock();
-                try {
-                    Iterator<Resource> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
-                    if (triples.hasNext()) {
-                        return (UriRef) triples.next();
-                    } else {
-                        String port = context.getProperty("org.osgi.service.http.port");
-                        if (port == null) {
-                            port = DEFAULT_PORT;
-                        }
-                        if (port.equals("80")) {
-                            return new UriRef("http://localhost/");
-                        }
-                        return new UriRef("http://localhost:" + port + "/");
-                    }
-                } finally {
-                    l.unlock();
-                }
-            }
-        });
-    }
-
-    /**
-     * Returns the platforminstance as <code>GraphNode</code> of the system
-     * graph (a LockableMGraph). Access controls applies to the system graph
-     * instance underlying the <code>GraphNode</code>.
-     *
-     * @return
-     */
-    public GraphNode getPlatformInstance() {
-        return new GraphNode(getPlatformInstanceResource(), systemGraph);
-    }
-
-    private NonLiteral getPlatformInstanceResource() {
-        Lock l = systemGraph.getLock().readLock();
-        l.lock();
-        try {
-            Iterator<Triple> instances = systemGraph.filter(null, RDF.type, PLATFORM.Instance);
-            if (!instances.hasNext()) {
-                throw new RuntimeException("No Platform:Instance in system graph.");
-            }
-            return instances.next().getSubject();
-        } finally {
-            l.unlock();
-        }
-    }
-
-    /**
-     * Returns the base URIs of the Clerezza platform instance.
-     * A base Uri is the shortest URI of a URI-Hierarhy the platform handles.
-     * @return the base URI of the Clerezza platform
-     */
-    //todo: if this is the only class that sets and reads base uris then getBaseURIs should keep a cache
-    public Set<UriRef> getBaseUris() {
-
-        return AccessController.doPrivileged(new PrivilegedAction<Set<UriRef>>() {
-
-            @Override
-            public Set<UriRef> run() {
-                Iterator<Resource> baseUrisIter = getPlatformInstance().
-                        getObjects(PLATFORM.baseUri);
-                Set<UriRef> baseUris = new HashSet<UriRef>();
-                while (baseUrisIter.hasNext()) {
-                    UriRef baseUri = (UriRef) baseUrisIter.next();
-                    baseUris.add(baseUri);
-                }
-                baseUris.add(getDefaultBaseUri());
-                return baseUris;
-            }
-        });
-
-    }
-
-    /**
-     * Adds a base URI to the Clerezza platform instance.
-     *
-     * @param baseUri The base URI which will be added to the platform instance
-     */
-    public void addBaseUri(UriRef baseUri) {
-        systemGraph.add(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
-    }
-
-    /**
-     * Removes a base URI from the Clerezza platform instance.
-     *
-     * @param baseUri The base URI which will be removed from the platform instance
-     */
-    public void removeBaseUri(UriRef baseUri) {
-        systemGraph.remove(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
-    }
-
-    protected void activate(ComponentContext componentContext) {
-        this.context = componentContext.getBundleContext();
-        try {
-            tcManager.getMGraph(Constants.CONFIG_GRAPH_URI);
-        } catch (NoSuchEntityException nsee) {
-            tcManager.createMGraph(Constants.CONFIG_GRAPH_URI);            
-        }
-    }
-    
-    protected void deactivate(ComponentContext componentContext) {
-        this.context = null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
deleted file mode 100644
index 285300d..0000000
--- a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.config;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Set;
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
-import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.file.storage.FileMGraph;
-import org.apache.felix.scr.annotations.Service;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Deactivate;
-
-/**
- * When the
- * <code>SystemConfig</code> component is activated it checks if the system
- * graph exists, in case it does not exist then it creates the system graph and
- * writes the default platform configuration into it.
- *
- * @author mir
- */
-@Component(immediate = true)
-@Service(WeightedTcProvider.class)
-public class SystemConfig implements WeightedTcProvider {
-
-    public static final String DEFAULT_SYSTEM_GRAPH = "default-system-graph.rdf";
-    private static final String DATA_FILE_SYSTEM_GRAPH = "system-graph.nt";
-    private final Logger logger = LoggerFactory.getLogger(getClass());
-    /**
-     *
-     * @deprecated use org.apache.clerezza.platform.Contants instead
-     */
-    @Deprecated
-    public static final UriRef SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
-    /**
-     * A filter that can be used to get the system graph as OSGi service, that
-     * is provided by
-     * <code>org.apache.clerezza.rdf.core.access.TcManager</code>.
-     */
-    public static final String SYSTEM_GRAPH_FILTER =
-            "(name=" + Constants.SYSTEM_GRAPH_URI_STRING + ")";
-    
-    public static final String PARSER_FILTER =
-            "(&("+SupportedFormat.supportedFormat+"=" + SupportedFormat.RDF_XML + ") "+
-            "("+SupportedFormat.supportedFormat+"=" + SupportedFormat.N_TRIPLE + "))";
-    @Reference(target = PARSER_FILTER)
-    private Parser parser;
-    
-    public static final String SERIALIZER_FILTER =
-            "("+SupportedFormat.supportedFormat+"=" + SupportedFormat.N_TRIPLE + ")";
-    @Reference(target = SERIALIZER_FILTER)
-    private Serializer serializer;
-    private MGraph systemGraph;
-
-    @Activate
-    protected void activate(ComponentContext componentContext) {
-        final BundleContext bundleContext = componentContext.getBundleContext();
-        File systemGraphFile = bundleContext.getDataFile(DATA_FILE_SYSTEM_GRAPH);
-        boolean dataFileExisted = systemGraphFile.exists();
-        //yould be good to use IndexedMGraph to be faster
-        systemGraph = new FileMGraph(systemGraphFile, parser, serializer);
-        if (!dataFileExisted) {
-            readConfigGraphFile(systemGraph);
-            logger.info("Add initial configuration to system graph");
-        }
-    }
-
-    @Deactivate
-    protected void deactivate(ComponentContext componentContext) {
-        systemGraph = null;
-    }
-
-    private void readConfigGraphFile(MGraph mGraph) {
-        URL config = getClass().getResource(DEFAULT_SYSTEM_GRAPH);
-        if (config == null) {
-            throw new RuntimeException("no config file found");
-        }
-        try {
-            parser.parse(mGraph, config.openStream(),
-                    SupportedFormat.RDF_XML, null);
-        } catch (IOException ex) {
-            logger.warn("Cannot parse coniguration at URL: {}", config);
-            throw new RuntimeException(ex);
-        }
-    }
-
-    /*
-     * Reason to be high: don't allow overwriting of system graph (by accident or as an attack)
-     * Reason to be low: avoid that TcManager always first tries to create TripleCollections using this provider
-     */
-    @Override
-    public int getWeight() {
-        return Integer.MAX_VALUE;
-    }
-
-    @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
-        throw new NoSuchEntityException(name);
-    }
-
-    @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
-        if (name.equals(Constants.SYSTEM_GRAPH_URI)) {
-            return systemGraph;
-        } else {
-            throw new NoSuchEntityException(name);
-        }
-    }
-
-    @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
-        return getMGraph(name);
-    }
-
-    @Override
-    public Set<UriRef> listGraphs() {
-        return Collections.emptySet();
-    }
-
-    @Override
-    public Set<UriRef> listMGraphs() {
-        return Collections.singleton(Constants.SYSTEM_GRAPH_URI);
-    }
-
-    @Override
-    public Set<UriRef> listTripleCollections() {
-        return listMGraphs();
-    }
-
-    @Override
-    public MGraph createMGraph(UriRef name) throws UnsupportedOperationException, EntityAlreadyExistsException {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public void deleteTripleCollection(UriRef name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Set<UriRef> getNames(Graph graph) {
-        return Collections.emptySet();
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java b/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
deleted file mode 100644
index dd5199f..0000000
--- a/platform/platform.config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.config;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider;
-import org.apache.clerezza.permissiondescriptions.PermissionDescripton;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-
-/**
- * <code>PermissionDescriptionsProvider</code> implementation that provides
- * <code>PermissionDescripton</code>s of the graph access permissions for
- * the graphs used by the platform.
- * The access permissions for the following graphs are described:
- * <ul>
- *    <li>system graph</li>
- *    <li>config graph</li>
- * </ul>
- *
- * @author mir
- */
-@Component
-@Service(PermissionDescriptionsProvider.class)
-public class TcPermissionDescriptionsProvider implements PermissionDescriptionsProvider {
-
-    private static final Set<PermissionDescripton> GRAPH_ACCESS_PERMISSION_DESCRIPTIONS =
-            new HashSet<PermissionDescripton>();
-    static {
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read Permission",
-                "Grants permission to the user to read the system graph", null, TcPermission.class,
-                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"read\")"));
-
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read/Write Permission",
-                "Grants permission to the user to read and write the system graph", null, TcPermission.class,
-                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"readwrite\")"));
-
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read Permission",
-                "Grants permission to the user to read the configuration graph", null, TcPermission.class,
-                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"read\")"));
-
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read/Write Permission",
-                "Grants permission to the user to read and write the configuration graph", null, TcPermission.class,
-                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"readwrite\")"));
-    }
-
-    @Override
-    public Set<PermissionDescripton> getPermissionDescriptors() {
-        return GRAPH_ACCESS_PERMISSION_DESCRIPTIONS;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
----------------------------------------------------------------------
diff --git a/platform/platform.config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf b/platform/platform.config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
deleted file mode 100644
index f530afd..0000000
--- a/platform/platform.config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-		xmlns:perm="http://clerezza.org/2008/10/permission#"
-		xmlns:foaf="http://xmlns.com/foaf/0.1/"
-		xmlns:dc="http://purl.org/dc/elements/1.1/"
-		xmlns:sioc="http://rdfs.org/sioc/ns#"
-		xmlns:plat="http://clerezza.org/2009/08/platform#"
-		xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
-	<perm:Role>
-		<dc:title>CommunityUser</dc:title>
-		<perm:hasPermission rdf:parseType="Resource">
-			<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/user/{username}/*" "readwrite")</perm:javaPermissionEntry>
-		</perm:hasPermission>
-		<perm:hasPermission rdf:parseType="Resource">
-			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission "{username}" "")</perm:javaPermissionEntry>
-		</perm:hasPermission>
-	</perm:Role>
-	<plat:Instance></plat:Instance>
-	<foaf:Agent>
-		<plat:userName>anonymous</plat:userName>
-		<sioc:has_function>
-			<perm:Role>
-				<dc:title>BasePermissionsRole</dc:title>
-				<rdfs:comment>Every user implicitely has this role as this is a perm:BaseRole</rdfs:comment>
-				<rdf:type rdf:resource="http://clerezza.org/2008/10/permission#BaseRole"/>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(java.util.PropertyPermission "*" "read")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.osgi.framework.AdminPermission "*" "resource")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.osgi.framework.ServicePermission "*" "get")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(java.lang.RuntimePermission "accessDeclaredMembers" "")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-                                <perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(java.lang.RuntimePermission "getClassLoader" "")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<!-- it seems pax-logger impl needs this, see comment to https://issues.apache.org/jira/browse/CLEREZZA-205 -->
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.osgi.framework.AdminPermission "*" "metadata")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/content.graph" "read")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/documentation.graph" "read")</perm:javaPermissionEntry>
-				</perm:hasPermission>
-				<perm:hasPermission rdf:parseType="Resource">
-					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/config.graph" "read")</perm:javaPermissionEntry>
-				</perm:hasPermission>				
-			</perm:Role>
-		</sioc:has_function>
-	</foaf:Agent>
-	<perm:Role>
-		<dc:title>DefaultRole</dc:title>
-		<rdfs:comment>A role regular users typically have</rdfs:comment>
-		<perm:hasPermission rdf:parseType="Resource">
-			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission "{username}" "")</perm:javaPermissionEntry>
-		</perm:hasPermission>
-		<perm:hasPermission rdf:parseType="Resource">
-			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission "{username}" "")</perm:javaPermissionEntry>
-		</perm:hasPermission>
-	</perm:Role>
-	<rdf:Description rdf:about="urn:x-localinstance:/typePriorityList">
-		<rdf:rest rdf:parseType="Collection">
-			<rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#Resource"/>
-		</rdf:rest>
-		<rdf:first rdf:resource="http://clerezza.org/2009/07/script#ScriptGeneratedResource"/>
-	</rdf:Description>
-	<foaf:Agent>
-		<perm:hasPermission rdf:parseType="Resource">
-			<perm:javaPermissionEntry>(java.security.AllPermission "" "")</perm:javaPermissionEntry>
-		</perm:hasPermission>
-		<plat:userName>admin</plat:userName>
-		<foaf:mbox rdf:resource="mailto:noreply@clerezza.org"/>
-		<perm:passwordSha1>d033e22ae348aeb5660fc2140aec35850c4da997</perm:passwordSha1>
-	</foaf:Agent>
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.default404/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.default404/LICENSE b/platform/platform.content.default404/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.default404/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.default404/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.default404/pom.xml b/platform/platform.content.default404/pom.xml
deleted file mode 100644
index 0cedbc1..0000000
--- a/platform/platform.content.default404/pom.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.default404</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content Default 404 response provider</name>
-    <description>
-        Provides a default implementation of PageNotFoundService
-    </description>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.content</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-library</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <sourceDirectory>src/main/scala</sourceDirectory>
-        <testSourceDirectory>src/test/scala</testSourceDirectory>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>compile</goal>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <!-- <scalaVersion>${scala.version}</scalaVersion> -->
-                    <!-- <args>
-                        <arg>-target:jvm-1.5</arg>
-                    </args> -->
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
-                        <Export-Package>org.apache.clerezza.platform.content.default404</Export-Package>
-                        <!-- <Bundle-SymbolicName>org.apache.clerezza.platform.users.core</Bundle-SymbolicName> -->
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.default404/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform/platform.content.default404/src/main/resources/META-INF/documentation.nt b/platform/platform.content.default404/src/main/resources/META-INF/documentation.nt
deleted file mode 100644
index d5a8a00..0000000
--- a/platform/platform.content.default404/src/main/resources/META-INF/documentation.nt
+++ /dev/null
@@ -1,35 +0,0 @@
-<bundle:///intro-content-el/0> <http://discobits.org/ontology#infoBit> "The default 404 Response Provider budle with id org.apache.clerezza.platform.content.default404 provides an implementation of the PageNotFoundService (package/bundle: org.apache.clerezza.platform.content) that the delivers the response retrieved from the uri with the same protocol and host and the /page-not-found. For example if 404 is to be generated for http://example.org/foo/bar the entity obtained by dereferencing http://example.org/page-not-found will be returned."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///intro-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///intro-content-el/1-content> <http://discobits.org/ontology#infoBit> "example: curl -u admin:admin -H \"Content-type: text/html\" -T tmp.html http://127.0.0.1:8080/page-not-found"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///intro-content-el/1-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///intro-content-el/1-title> <http://discobits.org/ontology#infoBit> "Uploading 404 response page with curl"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///intro-content-el/1-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///intro-content-el/1> <http://discobits.org/ontology#contains> _:6a610bd3bb246f2a6afd9624eeb843581 . 
-<bundle:///intro-content-el/1> <http://discobits.org/ontology#contains> _:e696a99dc91ebddcf13b5a4fd83e55991 . 
-<bundle:///intro-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///intro-content> <http://discobits.org/ontology#contains> _:86e4309edd82a6d415338546caff2d551 . 
-<bundle:///intro-content> <http://discobits.org/ontology#contains> _:8ced329518dac9ef741f4099548bb8451 . 
-<bundle:///intro-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
-<bundle:///intro-title> <http://discobits.org/ontology#infoBit> "Default 404 Response Provider "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///intro-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///intro> <http://discobits.org/ontology#contains> _:566a75916142ac411441d067f09a49f71 . 
-<bundle:///intro> <http://discobits.org/ontology#contains> _:eb4272f6f47656ae428d834bb170dfe81 . 
-<bundle:///intro> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#holds> <bundle:///intro-content> . 
-_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#pos> "1" . 
-_:566a75916142ac411441d067f09a49f71 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
-_:6a610bd3bb246f2a6afd9624eeb843581 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1-title> . 
-_:6a610bd3bb246f2a6afd9624eeb843581 <http://discobits.org/ontology#pos> "0" . 
-_:6a610bd3bb246f2a6afd9624eeb843581 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
-_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1> . 
-_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#pos> "1" . 
-_:86e4309edd82a6d415338546caff2d551 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
-_:8ced329518dac9ef741f4099548bb8451 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/0> . 
-_:8ced329518dac9ef741f4099548bb8451 <http://discobits.org/ontology#pos> "0" . 
-_:8ced329518dac9ef741f4099548bb8451 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
-_:e696a99dc91ebddcf13b5a4fd83e55991 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1-content> . 
-_:e696a99dc91ebddcf13b5a4fd83e55991 <http://discobits.org/ontology#pos> "1" . 
-_:e696a99dc91ebddcf13b5a4fd83e55991 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
-_:eb4272f6f47656ae428d834bb170dfe81 <http://discobits.org/ontology#holds> <bundle:///intro-title> . 
-_:eb4272f6f47656ae428d834bb170dfe81 <http://discobits.org/ontology#pos> "0" . 
-_:eb4272f6f47656ae428d834bb170dfe81 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.default404/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/platform.content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
deleted file mode 100644
index 71c9b2b..0000000
--- a/platform/platform.content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
-    <scr:component enabled="true" immediate="true" name="org.apache.clerezza.platform.content.default404.DefaultPageNotFoundService">
-        <implementation class="org.apache.clerezza.platform.content.default404.DefaultPageNotFoundService"/>
-        <service>
-            <provide interface="org.apache.clerezza.platform.content.PageNotFoundService" />
-        </service>
-    </scr:component>
-</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
----------------------------------------------------------------------
diff --git a/platform/platform.content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala b/platform/platform.content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
deleted file mode 100644
index a0c4ab6..0000000
--- a/platform/platform.content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.content.default404
-
-import org.apache.clerezza.platform.content.PageNotFoundService
-import javax.ws.rs.core.UriInfo
-import java.io.FileNotFoundException
-import java.io.InputStream
-import java.net.URL
-import java.security.AccessController
-import java.security.PrivilegedAction
-import javax.ws.rs.core.Response
-import javax.ws.rs.core.Response.Status
-
-/**
- * This returns the content of the resource /page-not-found dereferenced as uri
- * with the same authority section as the request.
- */
-class DefaultPageNotFoundService extends PageNotFoundService {
-
-  private val notFoundPagePath = "/page-not-found"
-
-  override def createResponse(uriInfo: UriInfo) = {
-    if (uriInfo.getPath == notFoundPagePath) {
-      Response.status(Status.NOT_FOUND).build();
-    } else {
-      val pageNotFoundUrl = new URL(uriInfo.getBaseUri.toURL, notFoundPagePath)
-      AccessController.doPrivileged(
-        new PrivilegedAction[Option[(String, InputStream)]] {
-          def run() = {
-            val connection = pageNotFoundUrl.openConnection()
-            try {
-              Some(connection.getContentType, connection.getInputStream)
-            } catch {
-              case _: FileNotFoundException => None
-            }
-          }
-        }
-      ) match {
-        case Some((mediaTypeString, in)) => Response.status(Status.NOT_FOUND).`type`(mediaTypeString).entity(in).build();
-        case None => Response.status(Status.NOT_FOUND).build();
-      }
-
-    }
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/LICENSE b/platform/platform.content.fsadaptor/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.fsadaptor/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/pom.xml b/platform/platform.content.fsadaptor/pom.xml
deleted file mode 100644
index 1097fb9..0000000
--- a/platform/platform.content.fsadaptor/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.fsadaptor</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content Filesystem Adaptor</name>
-    <description>
-        Makes directories appear as a graph describing the files and theits
-        contents with the discobits ontology.
-    </description>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.scala.utils</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.scala-lang</groupId>
-            <artifactId>scala-library</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <sourceDirectory>src/main/scala</sourceDirectory>
-        <testSourceDirectory>src/test/scala</testSourceDirectory>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>compile</goal>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <!-- <scalaVersion>${scala.version}</scalaVersion> -->
-                    <!-- <args>
-                        <arg>-target:jvm-1.5</arg>
-                    </args> -->
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
-                        <Export-Package>org.apache.clerezza.platform.content.fsadaptor</Export-Package>
-                        <!-- <Bundle-SymbolicName>org.apache.clerezza.platform.users.core</Bundle-SymbolicName> -->
-                    </instructions>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/platform.content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
deleted file mode 100644
index 75b5938..0000000
--- a/platform/platform.content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
-    <scr:component enabled="true" immediate="true" name="org.apache.clerezza.platform.content.fsadaptor.BundleFsLoader">
-        <implementation class="org.apache.clerezza.platform.content.fsadaptor.BundleFsLoader"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"/>
-        </service>
-        <reference name="tcManager" interface="org.apache.clerezza.rdf.core.access.TcManager"
-        cardinality="1..1" policy="static" bind="bindTcManager" unbind="unbindTcManager"/>
-        <reference name="cgProvider" interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider"
-        cardinality="1..1" policy="static" bind="bindContentGraphProvider" unbind="unbindContentGraphProvider"/>
-        <reference name="startLevel" interface="org.osgi.service.startlevel.StartLevel"
-        cardinality="1..1" policy="static" bind="bindStartLevel" unbind="unbindStartLevel"/>
-        <reference name="pathNode" interface="org.wymiwyg.commons.util.dirbrowser.PathNode"
-        cardinality="0..n" policy="dynamic" bind="bindPathNode" unbind="unbindPathNode"/>
-    </scr:component>
-</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala b/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
deleted file mode 100644
index 645dab1..0000000
--- a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-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.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.utils.osgi.BundlePathNode
-import org.osgi.framework.Bundle
-import org.osgi.framework.BundleEvent
-import org.osgi.framework.BundleListener
-import org.osgi.service.component.ComponentContext
-import org.osgi.service.startlevel.StartLevel
-import org.slf4j.LoggerFactory
-import org.wymiwyg.commons.util.dirbrowser.MultiPathNode
-import org.wymiwyg.commons.util.dirbrowser.PathNode
-import scala.util._
-
-/**
- * This weighted TcProvider provides a graph named urn:x-localinstance/web-resources.graph which contains descriptions
- * of the files below the CLEREZZA-INF/web-resources directory in every bundles. The
- * name of these descriptions (i.e. the rdf resources) use the urn:x-localinstance uri scheme to indicate that
- * they are local to the instance and they will thus be returned as description
- * for all uris with a local authority and the specified path-section.
- */
-class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider {
-
-  private val RESOURCE_MGRAPH_URI = new UriRef(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 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 frequentUpdateDirectory: Option[PathNode] = None
-
-  private val virtualMGraph: MGraph = new AbstractMGraph() {
-    
-    private def baseGraph: TripleCollection = frequentUpdateDirectory match {
-        case Some(p) => new DirectoryOverlay(p, currentCacheMGraph)
-        case None => currentCacheMGraph
-    }
-    
-    override def performFilter(s: NonLiteral, p: UriRef,
-                      o: Resource): java.util.Iterator[Triple] = {
-      val baseIter = baseGraph.filter(s,p,o)
-      new java.util.Iterator[Triple]() {
-        override def next = {
-          baseIter.next
-        }
-        override def hasNext = baseIter.hasNext
-        override def remove = throw new UnsupportedOperationException
-      }
-    }
-
-    override def size = baseGraph.size
-    
-    override def toString = "BundleFsLoader virtual graph"
-    
-  }
-
-  class UpdateThread extends Thread {
-
-    private var updateRequested = false;
-
-    start()
-
-    override def run() {
-      try {
-        while (!isInterrupted) {
-          synchronized {
-            while (!updateRequested) wait();
-          }
-          updateRequested = false
-          updateCache()
-        }
-      } catch {
-        case e: InterruptedException => BundleFsLoader.log.debug("Update thread interrupted");
-      }
-    }
-
-    def update() = {
-      synchronized {
-        updateRequested = true
-        notify();
-      }
-    }
-  }
-  
-  private var updateThread: UpdateThread = null
-
-
-  private def deleteCacheGraphs() {
-    import collection.JavaConversions._
-    for(mGraphUri <- tcManager.listMGraphs) {
-      if(mGraphUri.getUnicodeString.startsWith(cacheGraphPrefix)) {
-        tcManager.deleteTripleCollection(mGraphUri);
-      }
-    }
-  }
-
-  protected def activate(context: ComponentContext) {
-    synchronized {
-      deleteCacheGraphs()
-      for (bundle <- context.getBundleContext().getBundles();
-          if bundle.getState == Bundle.ACTIVE) {
-        bundleList ::= bundle
-      }
-      updateCache
-      tcManager.getTcAccessController.setRequiredReadPermissions(
-          RESOURCE_MGRAPH_URI, Collections.singleton(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ)))
-      cgProvider.addTemporaryAdditionGraph(RESOURCE_MGRAPH_URI)
-      updateThread = new UpdateThread()
-      context.getBundleContext().addBundleListener(this);
-    }
-  }
-  protected def deactivate(context: ComponentContext) {
-    synchronized {
-      context.getBundleContext().removeBundleListener(this);
-      updateThread.interrupt()
-      cgProvider.removeTemporaryAdditionGraph(RESOURCE_MGRAPH_URI)
-      tcManager.deleteTripleCollection(currentCacheUri);
-      updateThread == null;
-    }
-  }
-
-  private def updateCache() = {
-    def getVirtualTripleCollection(bundles: Seq[Bundle]): TripleCollection = {
-      if (bundles.isEmpty) {
-        new SimpleMGraph()
-      } 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))
-        } else {
-          getVirtualTripleCollection(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);
-      tcManager.getTcAccessController.setRequiredReadPermissions(
-          newCacheUri, Collections.singleton(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ)))
-      newChacheMGraph.addAll(getVirtualTripleCollection(sortedList))
-      currentCacheMGraph = newChacheMGraph
-      val oldCacheUri = currentCacheUri
-      currentCacheUri = newCacheUri
-      if (oldCacheUri != null) tcManager.deleteTripleCollection(oldCacheUri);
-      BundleFsLoader.log.debug("updated web-resource cache")
-    }
-  }
-
-  
-
-  override def getWeight() = 30
-
-  override def getMGraph(name: UriRef) = {
-    if (name.equals(RESOURCE_MGRAPH_URI)) {
-      virtualMGraph
-    } else {
-      throw new NoSuchEntityException(name);
-    }
-  }
-
-  override def getTriples(name: UriRef) = {
-    getMGraph(name);
-  }
-
-  override def getGraph(name: UriRef) = {
-    throw new NoSuchEntityException(name);
-  }
-
-
-  override def listMGraphs(): java.util.Set[UriRef] = {
-    java.util.Collections.singleton(RESOURCE_MGRAPH_URI);
-  }
-
-  override def listGraphs() = {
-    new java.util.HashSet[UriRef]();
-  }
-
-  override def listTripleCollections() = {
-    Collections.singleton(RESOURCE_MGRAPH_URI);
-  }
-
-  override def createMGraph(name: UriRef) =  {
-    throw new UnsupportedOperationException("Not supported.");
-  }
-
-  override def createGraph(name: UriRef, triples: TripleCollection): Graph = {
-    throw new UnsupportedOperationException("Not supported.");
-  }
-
-  override def deleteTripleCollection(name: UriRef) {
-    throw new UnsupportedOperationException("Not supported.");
-  }
-
-  override def getNames(graph: Graph) = {
-    val result = new java.util.HashSet[UriRef]();
-    result;
-  }
-
-
-  def bundleChanged(event: BundleEvent) {
-    val updateThread = this.updateThread
-    if (updateThread == null) {
-      BundleFsLoader.log.error("UpdateThread is null, yet we get bundle Events")
-    }
-    val bundle = event.getBundle();
-    event.getType() match  {
-      case BundleEvent.STARTED => {
-        bundleList ::= bundle
-        updateThread.update()
-      }
-      case BundleEvent.STOPPED => {
-        bundleList = bundleList.filterNot(b => b == bundle)
-        updateThread.update()
-      }
-      case _ => BundleFsLoader.log.debug("only reacting on bundle start and stop")
-    }
-  }
-
-
-  def bindTcManager(tcManager: TcManager) {
-    this.tcManager = tcManager;
-  }
-
-  def unbindTcManager(tcManager: TcManager) {
-    this.tcManager = null;
-  }
-
-  def bindContentGraphProvider(p: ContentGraphProvider) {
-    cgProvider = p
-  }
-
-  def unbindContentGraphProvider(p: ContentGraphProvider) {
-    cgProvider = null
-  }
-
-  def bindStartLevel(startLevel: StartLevel) {
-    this.startLevel = startLevel;
-  }
-
-  def unbindStartLevel(startLevel: StartLevel) {
-    this.startLevel = null;
-  }
-  
-  def bindPathNode(pathNode: PathNode) {
-    this.pathNodes ::= pathNode;
-    frequentUpdateDirectory = Some(new MultiPathNode(pathNodes: _*))
-  }
-  
-  def unbindPathNode(pathNode: PathNode) {
-    this.pathNodes = this.pathNodes.filter(_ != pathNode);
-    frequentUpdateDirectory = pathNodes match {
-      case Nil => None
-      case _ => Some(new MultiPathNode(pathNodes: _*))
-    }
-  }
-  
-}
-object BundleFsLoader {
-  private val log = LoggerFactory.getLogger(classOf[BundleFsLoader])
-}
\ No newline at end of file


[16/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaApp.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaApp.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaApp.java
new file mode 100644
index 0000000..cbe8636
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaApp.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.launcher;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.security.AllPermission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeSet;
+import org.apache.felix.framework.Felix;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.startlevel.StartLevel;
+import org.wymiwyg.commons.util.arguments.AnnotatedInterfaceArguments;
+import org.wymiwyg.commons.util.arguments.ArgumentHandler;
+import org.wymiwyg.commons.util.arguments.ArgumentProcessor;
+import org.wymiwyg.commons.util.arguments.InvalidArgumentsException;
+import org.wymiwyg.commons.util.dirbrowser.PathNameFilter;
+import org.wymiwyg.commons.util.dirbrowser.PathNode;
+import org.wymiwyg.commons.util.dirbrowser.PathNodeFactory;
+
+/**
+ * Clerezza Launcher Application.
+ *
+ *
+ * @author daniel, reto
+ */
+public class ClerezzaApp {
+
+    private Felix felixInstance = null;
+    private int exitCode = -1;
+    private List<ShutdownListener> shutdownListeners =
+            new ArrayList<ShutdownListener>(1);
+
+    /**
+     * Install bundles after core framework launch.
+     *
+     * @param context    the bundle context.
+     * @param artDescs    the bundles to install.
+     * @param nextLevel    the start level to change to after the installation.
+     * 
+     * @return    the installed bundles.
+     *
+     */
+    static Set<Bundle> installBundles(BundleContext context,
+            Collection<MavenArtifactDesc> artDescs,
+            int nextLevel) throws IOException, BundleException {
+
+        Set<Bundle> installedBundles = new HashSet<Bundle>();
+        for (MavenArtifactDesc artDesc : artDescs) {
+            try {
+                final Bundle installedBundle = context.installBundle(artDesc.toString(), artDesc.getInputStream());
+                installedBundles.add(installedBundle);
+            } catch (BundleException e) {
+                System.out.println(e.toString());
+            }
+        }
+
+        ServiceReference startLevelRef =
+                context.getServiceReference(StartLevel.class.getName());
+        StartLevel startLevel = (StartLevel) context.getService(startLevelRef);
+        for (Bundle bundle : installedBundles) {
+            startLevel.setBundleStartLevel(bundle, nextLevel);
+        }
+        return installedBundles;
+    }
+
+    /**
+     * Set Clerezza Instance system exit code.
+     *
+     * @param code    the code to set.
+     */
+    public void setExitCode(int code) {
+        exitCode = code;
+    }
+
+    /**
+     * Get Clerezza Instance system exit code.
+     *
+     * @return    the exit code.
+     */
+    public int getExitCode() {
+        return exitCode;
+    }
+
+    /**
+     * Add a shutdown listener.
+     * 
+     * @param shutdownListener    the shutdown listener.
+     */
+    public void addShutdownListener(ShutdownListener shutdownListener) {
+        shutdownListeners.add(shutdownListener);
+    }
+
+    /**
+     * Remove a shutdown Listener.
+     *
+     * @param shutdownListener    the shutdown listener.
+     */
+    public void removeShutdownListener(ShutdownListener shutdownListener) {
+        shutdownListeners.remove(shutdownListener);
+    }
+
+    /**
+     * Start this Clerezza Instance.
+     *
+     * Starts the Felix framework and installs CLerezza Bundles.
+     *
+     * This method exits after installing all bundles.
+     * It does not wait for the bundle installations to complete.
+     *
+     * @param args    Command line arguments.
+     */
+    public void start(String... args) throws Throwable {
+        LauncherArguments arguments;
+        try {
+            final ArgumentHandler argumentHandler = new ArgumentHandler(args);
+            arguments = argumentHandler.getInstance(LauncherArguments.class);
+            argumentHandler.processArguments(new ArgumentProcessor() {
+
+                @Override
+                public void process(List<String> remaining) throws InvalidArgumentsException {
+                    if (remaining.size() > 0) {
+                        throw new InvalidArgumentsException("The following arguments could not be understood: " + remaining);
+                    }
+                }
+            });
+        } catch (InvalidArgumentsException e) {
+            System.out.println(e.getMessage());
+            showUsage();
+            return;
+        }
+        if (arguments.getHelp()) {
+            showUsage();
+            return;
+        }
+        start(arguments);
+    }
+
+    private void start(LauncherArguments arguments) throws Throwable {
+        Properties configProps = getConfigProps(arguments);
+        Policy.setPolicy(new Policy() {
+
+            @Override
+            public PermissionCollection getPermissions(ProtectionDomain domain) {
+                PermissionCollection result = new Permissions();
+                result.add(new AllPermission());
+                return result;
+            }
+        });
+        System.setSecurityManager(new SecurityManager());
+        felixInstance = new Felix(configProps);
+        System.out.println("starting felix");
+        felixInstance.start();
+        final String revertParam = arguments.getRevertParam();
+        final PathNode bundlesRoot = PathNodeFactory.getPathNode(Main.class.getResource("/bundles"));
+        final BundleContext bundleContext = felixInstance.getBundleContext();
+        installBundlesForStartLevels(bundleContext, bundlesRoot, revertParam);
+    }
+
+    /**
+     * Stop this Clerezza instance.
+     *
+     * This method does not wait for the shutdown to complete before it exits.
+     */
+    public void stop() throws Throwable {
+        if (felixInstance != null) {
+            felixInstance.stop();
+        }
+    }
+
+    /**
+     * Wait for this Clerezza instance to shut down.
+     *
+     * After shut down all shutdown listeners are notified.
+     */
+    public void waitForStop() throws Throwable {
+        FrameworkEvent event = null;
+        try {
+            if (felixInstance != null) {
+                event = felixInstance.waitForStop(0);
+            }
+            setExitCode(0);
+        } catch (Throwable t) {
+            setExitCode(-1);
+            event = new FrameworkEvent(FrameworkEvent.ERROR, null, t);
+            throw t;
+        } finally {
+            notifyShutdownListeners(event);
+        }
+    }
+
+    private void notifyShutdownListeners(FrameworkEvent event) {
+        for (ShutdownListener shutdownListener : shutdownListeners) {
+            shutdownListener.notify(event);
+        }
+    }
+
+    private void installBundlesForStartLevels(final BundleContext bundleContext,
+            final PathNode bundlesRoot, final String revertParam) throws IOException, BundleException {
+        final String startlevelpathprefix = "startlevel-";
+        final String[] startLevelePaths = bundlesRoot.list(new PathNameFilter() {
+
+            @Override
+            public boolean accept(PathNode dir, String name) {
+                return name.startsWith(startlevelpathprefix);
+            }
+        });
+        Arrays.sort(startLevelePaths);
+        final Bundle[] installedBundles = bundleContext.getBundles();
+        final Set<Bundle> newlyInstalledBundles = new HashSet<Bundle>();
+        byte startLevel = 0;
+        for (String startLevelPath : startLevelePaths) {
+            startLevel = Byte.parseByte(
+                    startLevelPath.substring(startlevelpathprefix.length(),
+                    startLevelPath.length() - 1));
+            final PathNode startLevelPathNode = bundlesRoot.getSubPath(startLevelPath);
+            Set<MavenArtifactDesc> artDescs = getArtDescsFrom(startLevelPathNode);
+            if (revertParam != null) {
+                artDescs = getRevertArtifacts(revertParam, artDescs, installedBundles);
+            }
+            if (!alreadyInstalled(artDescs, installedBundles) || revertParam != null) {
+                newlyInstalledBundles.addAll(installBundles(bundleContext, new TreeSet(artDescs), startLevel));
+                System.out.println("level " + startLevel + " bundles installed");
+            }
+        }
+
+        for (Bundle bundle : newlyInstalledBundles) {
+            try {
+                bundle.start();
+            } catch (BundleException e) {
+                System.out.println("Exception installing Bundle " + bundle + ": " + e.toString());
+            }
+        }
+
+        ServiceReference startLevelRef =
+                bundleContext.getServiceReference(StartLevel.class.getName());
+        StartLevel startLevelService = (StartLevel) bundleContext.getService(startLevelRef);
+        startLevelService.setInitialBundleStartLevel(startLevel + 1);
+        startLevelService.setStartLevel(startLevel + 20);
+    }
+
+    private Set<MavenArtifactDesc> getArtDescsFrom(PathNode pathNode) {
+        Set<MavenArtifactDesc> result = new HashSet<MavenArtifactDesc>();
+        List<PathNode> jarPaths = getJarPaths(pathNode);
+        for (PathNode jarPath : jarPaths) {
+            result.add(MavenArtifactDesc.parseFromPath(jarPath));
+        }
+
+        return result;
+    }
+
+    private List<PathNode> getJarPaths(PathNode pathNode) {
+        List<PathNode> result = new ArrayList<PathNode>();
+        for (String childName : pathNode.list()) {
+            PathNode childNode = pathNode.getSubPath(childName);
+            if ((!childNode.isDirectory()) && (childName.endsWith(".jar"))) {
+                result.add(childNode);
+            } else {
+                for (PathNode subPath : getJarPaths(childNode)) {
+                    result.add(subPath);
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Returns true if a bundle is found, whose location starts with a short URI
+     * ("mvn:[groupId]/[artifactId]") of a Maven Artifact specified.
+     *
+     * Returns false iff none of the specified Maven Artifacts is installed.
+     *
+     * @param artDescs MavenArtifacts to be checked if a corresponding bundle is
+     *        already installed
+     * @param installedBundles Bundles installed in the framework
+     * @return
+     */
+    private boolean alreadyInstalled(Set<MavenArtifactDesc> artDescs,
+            Bundle[] installedBundles) {
+        for (int i = 0; i < installedBundles.length; i++) {
+            String bundleLocation = installedBundles[i].getLocation();
+            for (Iterator<MavenArtifactDesc> it = artDescs.iterator(); it.hasNext();) {
+                MavenArtifactDesc mavenArtifactDesc = it.next();
+                if (bundleLocation.matches(mavenArtifactDesc.getShortUri() + "/.*[0-9].*")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns the Maven Artifacts that have to be reverted to default.
+     * If the revertParam equals "all", then all platform bundles already installed
+     * are uninstalled and the returned <code>Set</code> contains all
+     * Maven Artifacts.
+     * If the revertParam is a regular expression, then the returned <code>Set</code>
+     * contains all Maven Artifacts, whose short URI matches the expression. If
+     * a corresponding bundle is installed, then it is uninstalled.
+     * If the revertParam equals "missing" then the returned <code>Set</code>
+     * contains all Maven Artifacts that are not installed.
+     * @param revertParam
+     * @param artDescs
+     * @param installedBundles
+     * @return
+     * @throws org.osgi.framework.BundleException
+     */
+    private Set<MavenArtifactDesc> getRevertArtifacts(String revertParam,
+            Set<MavenArtifactDesc> artDescs,
+            Bundle[] installedBundles) throws BundleException {
+        boolean installMissing = revertParam.toLowerCase().equals("missing");
+        if (revertParam.equals("all")) {
+            revertParam = ".*";
+        }
+        Set<MavenArtifactDesc> artsToBeInstalled = new HashSet<MavenArtifactDesc>();
+        for (Iterator<MavenArtifactDesc> it = artDescs.iterator(); it.hasNext();) {
+            MavenArtifactDesc mavenArtifactDesc = it.next();
+            boolean isInstalled = false;
+            if (mavenArtifactDesc.getShortUri().matches(revertParam) || installMissing) {
+                for (int i = 0; i < installedBundles.length; i++) {
+                    Bundle bundle = installedBundles[i];
+                    if (bundle.getLocation().matches(mavenArtifactDesc.getShortUri() + "/.*[0-9].*")) {
+                        if (installMissing) {
+                            isInstalled = true;
+                        } else {
+                            bundle.uninstall();
+                        }
+                    }
+                }
+                if (!installMissing || (installMissing && !isInstalled)) {
+                    artsToBeInstalled.add(mavenArtifactDesc);
+                }
+            }
+        }
+        return artsToBeInstalled;
+    }
+
+    /**
+     * Prints usage instructions to stdout
+     */
+    public static void showUsage() {
+        System.out.print("Usage: LaunchBundle ");
+        System.out.println(AnnotatedInterfaceArguments.getArgumentsSyntax(LauncherArguments.class));
+        PrintWriter out = new PrintWriter(System.out, true);
+        AnnotatedInterfaceArguments.printArgumentDescriptions(
+                LauncherArguments.class, out);
+        out.flush();
+    }
+    
+
+    private Properties getConfigProps(LauncherArguments arguments) {
+
+        Properties configProps = new Properties();
+        
+        configProps.putAll(System.getProperties());
+        //ignored as we're setting the starlevel manually to last used start-level + 20
+        //configProps.put("org.osgi.framework.startlevel.beginning", "20");
+        {
+            if (arguments.getNotConsoleShell()) {
+                configProps.put("clerezza.shell.disable",
+                    "true");
+            }
+        }
+        
+        {
+            String argLogLevel = arguments.getLogLevel();
+            if (argLogLevel == null) {
+                argLogLevel = "INFO";
+            }
+            System.out.println("setting log-level to: " + argLogLevel);
+            configProps.put("org.ops4j.pax.logging.DefaultServiceLog.level",
+                    argLogLevel);
+        }
+        {
+            final String port = arguments.getPort();
+            if (port != null) {
+                configProps.put("org.osgi.service.http.port", port);
+            }
+            configProps.put("org.ops4j.pax.url.mvn.repositories", getCommaSeparatedListOfMavenRepos());
+        }
+        
+        {
+            //sun.reflect added because of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6265952 and loading of scala scripts
+            String extraPackages = (String) configProps.get("org.osgi.framework.system.packages.extra");
+            if (extraPackages == null) {
+                extraPackages = "sun.misc;sun.reflect";
+            } else {
+                extraPackages = "sun.misc;sun.reflect;"+extraPackages;
+            }
+            configProps.put("org.osgi.framework.system.packages.extra",extraPackages);
+        }
+
+        //public static final String CONTEXT_PROPERTY_HTTP_PORT_SECURE = "";
+        boolean httpsEnabled = false;
+        {
+
+            final String httpsPort = arguments.getSecurePort();
+            if (httpsPort != null && !"".equals(httpsPort)) {
+                configProps.put("org.osgi.service.http.port.secure", httpsPort);
+                httpsEnabled = true;
+            }
+        }
+        {
+
+            final String keyStorePath = arguments.getKeyStorePath();
+            if (keyStorePath != null && !"".equals(keyStorePath)) {
+                configProps.put("org.wymiwyg.jetty.httpservice.https.keystore.path", keyStorePath);
+                httpsEnabled = true;
+            }
+        }
+        {
+
+            final String keyStorePassword = arguments.getKeyStorePassword();
+            if (keyStorePassword != null && !"".equals(keyStorePassword)) {
+                configProps.put("org.wymiwyg.jetty.httpservice.https.keystore.password", keyStorePassword);
+                httpsEnabled = true;
+            }
+        }
+        {
+
+            final String keyStoreType = arguments.getKeyStoreType();
+            if (keyStoreType != null && !"".equals(keyStoreType)) {
+                configProps.put("org.wymiwyg.jetty.httpservice.https.keystore.type", keyStoreType);
+                httpsEnabled = true;
+            }
+        }
+
+        {
+
+            final String clientAuth = arguments.getClientAuth();
+            if (clientAuth != null && !"".equals(clientAuth)) {
+                configProps.put("org.wymiwyg.jetty.httpservice.clientauth", clientAuth);
+                httpsEnabled = true;
+            }
+        }
+
+        if (httpsEnabled) {
+            configProps.put("org.osgi.service.http.secure.enabled", "true");
+        }
+        return configProps;
+
+    }
+
+    private String getCommaSeparatedListOfMavenRepos() {
+        return "http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases@id=apache-snapshots,"
+                + "http://repo1.maven.org/maven2/@id=central";
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/LauncherArguments.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/LauncherArguments.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/LauncherArguments.java
new file mode 100644
index 0000000..fb99d3b
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/LauncherArguments.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.launcher;
+
+import org.wymiwyg.commons.util.arguments.CommandLine;
+
+/**
+ *
+ * @author mir
+ */
+public interface LauncherArguments {
+
+    @CommandLine(longName = "revert", shortName = {"R"}, required = false,
+    description = "Command to revert platform bundles to default. all|missing|<bundle-uri-pattern>")
+    public String getRevertParam();
+
+    @CommandLine(longName = "help", shortName = {"H"}, required = false,
+    isSwitch = true, description = "Show help on command line arguments")
+    public boolean getHelp();
+
+    @CommandLine(longName = "log", shortName = {"L"}, required = false,
+    description = "set the log-level, the value is one of the following: " +
+    "TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE")
+    public String getLogLevel();
+
+    @CommandLine(longName = "port", shortName = {"P"}, required = false,
+    description = "The port on which the default webservice shall listen")
+    public String getPort();
+    
+    @CommandLine(longName = "https_port", shortName = {}, required = false,
+    description = "The port on which the https secure webserver shall listen")
+    public String getSecurePort();
+    
+    @CommandLine(longName = "https_keystore_path", shortName = {}, required = false,
+    description = "The folder with the keystore for https")
+    public String getKeyStorePath();
+    
+    @CommandLine(longName = "https_keystore_password", shortName = {}, required = false,
+    description = "The password for accessing the keystore for https")
+    public String getKeyStorePassword();
+    
+    @CommandLine(longName = "https_keystore_type", shortName = {}, required = false,
+    description = "The type of the key-store")
+    public String getKeyStoreType();
+    
+    @CommandLine(longName = "https_keystore_clientauth", shortName = {}, required = false,
+    description = "Client Auth request, one of \"none\", \"want\" or \"need\"")
+    public String getClientAuth();
+
+    @CommandLine(longName = "noConsoleShell", shortName = {"NCS"}, required = false,
+    isSwitch = true, description = "Disable the console shell")
+    public boolean getNotConsoleShell();
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/Main.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/Main.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/Main.java
new file mode 100644
index 0000000..cfa3366
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/Main.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.launcher;
+
+import java.io.IOException;
+
+/**
+ * Clerezza Application launcher class.
+ *
+ * @author daniel
+ */
+public class Main {
+    
+    public static void main(String... args) throws IOException {
+        ClerezzaApp clerezza = new ClerezzaApp();
+
+        try {
+            clerezza.start(args);
+        } catch (Throwable t) {
+            System.err.println("Could not start Clerezza: " + t);
+            t.printStackTrace();
+            System.exit(clerezza.getExitCode());
+        }
+        try {
+            clerezza.waitForStop();
+        } catch (Throwable t) {
+            System.err.println("Exception during Clerezza shutdown: " + t);
+            t.printStackTrace();
+            System.exit(-1);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/MavenArtifactDesc.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/MavenArtifactDesc.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/MavenArtifactDesc.java
new file mode 100644
index 0000000..c8a02bc
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/MavenArtifactDesc.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.launcher;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import org.wymiwyg.commons.util.dirbrowser.PathNode;
+
+/**
+ * Maven Artifact Description
+ * 
+ * @author daniel
+ */
+class MavenArtifactDesc implements Comparable<MavenArtifactDesc> {
+
+    //one of these is null
+    URL bundleUrl;
+    PathNode pathNode;
+    String groupId;
+    String artifactId;
+    String version;
+
+    /**
+     * Constructor with bundle URL.
+     *
+     * @param groupId    the group id.
+     * @param artifactId    the artifact id.
+     * @param version    the version.
+     * @param bundleUrl    the bundle URL.
+     */
+    MavenArtifactDesc(String groupId, String artifactId, String version, URL bundleUrl) {
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.version = version;
+        this.bundleUrl = bundleUrl;
+    }
+
+    /**
+     * Constructor with bundle path.
+     * 
+     * @param groupId    the group id.
+     * @param artifactId    the artifact id.
+     * @param version    the version.
+     * @param pathNode    the bundle path node.
+     */
+    MavenArtifactDesc(String groupId, String artifactId, String version, PathNode pathNode) {
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.version = version;
+        this.pathNode = pathNode;
+    }
+
+    /**
+     * Parse Maven Artifact Description from an URL.
+     *
+     * @param bundleUrl the URL.
+     * @return    A new MavenArtifactDesc object.
+     */
+    static MavenArtifactDesc parseFromURL(URL bundleUrl) {
+        String string = bundleUrl.toString();
+        int posSlashM1 = string.lastIndexOf('/');
+        int posSlashM2 = string.lastIndexOf('/', posSlashM1 - 1);
+        int posSlashM3 = string.lastIndexOf('/', posSlashM2 - 1);
+        String version = string.substring(posSlashM2 + 1, posSlashM1);
+        String artifactId = string.substring(posSlashM3 + 1, posSlashM2);
+        String groupId = getGroupId(string.substring(0, posSlashM3));
+        return new MavenArtifactDesc(groupId, artifactId, version, bundleUrl);
+    }
+
+    /**
+     * Parse Maven Artifact Description from a path node.
+     *
+     * @param pathNode    The path node.
+     * @return    A new MavenArtifactDesc object.
+     */
+    static MavenArtifactDesc parseFromPath(PathNode pathNode) {
+        String string = pathNode.getPath();
+        int posSlashM1 = string.lastIndexOf('/');
+        int posSlashM2 = string.lastIndexOf('/', posSlashM1 - 1);
+        int posSlashM3 = string.lastIndexOf('/', posSlashM2 - 1);
+        String version = string.substring(posSlashM2 + 1, posSlashM1);
+        String artifactId = string.substring(posSlashM3 + 1, posSlashM2);
+        String groupId = getGroupId(string.substring(0, posSlashM3));
+        return new MavenArtifactDesc(groupId, artifactId, version, pathNode);
+    }
+
+    /**
+     * Assembles group-id from the diretories after "bundles/"
+     *
+     * @param string a path-string. Must contain "bundles/".
+     */
+    static String getGroupId(String string) {
+        int startPos = string.indexOf("bundles/") + 8;
+        startPos = string.indexOf('/', startPos) + 1;
+        return string.substring(startPos).replace('/', '.');
+    }
+    
+    /**
+     * Returns an URI in the form "mvn:groupId/artifactId/version"
+     *
+     * @return the URI.
+     */
+    public String getShortUri() {
+        return "mvn:" + groupId + "/" + artifactId;
+    }
+
+    /**
+     * Returns a string representation of this object in the form
+     * "mvn:groupId/artifactId/version"
+     *
+     * @return    the string representation of this Maven Artifact Description.
+     */
+    @Override
+    public String toString() {
+        return "mvn:" + groupId + "/" + artifactId + "/" + version;
+    }
+
+    InputStream getInputStream() throws IOException {
+        if (bundleUrl == null) {
+            return pathNode.getInputStream();
+        }
+        return bundleUrl.openStream();
+    }
+
+    @Override
+    public int compareTo(MavenArtifactDesc o) {
+        return toString().compareTo(o.toString());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ShutdownListener.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ShutdownListener.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ShutdownListener.java
new file mode 100644
index 0000000..1d406ce
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ShutdownListener.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.launcher;
+
+import org.osgi.framework.FrameworkEvent;
+
+/**
+ * A listener that gets notified when the Felix Framework is shut down.
+ *
+ * @author daniel
+ */
+public interface ShutdownListener {
+
+    /**
+     * Notify listener of complete Clerezza shut down.
+     *
+     * @param event
+     *        What event caused the shutdown. Note: event may be null.
+     */
+    public void notify(FrameworkEvent event);
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/images/tut_1_class_diagram.png
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/images/tut_1_class_diagram.png b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/images/tut_1_class_diagram.png
new file mode 100644
index 0000000..0bd04f4
Binary files /dev/null and b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/images/tut_1_class_diagram.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/style/style.css b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/images/clerezza.png b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/site.xml b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/site.xml
new file mode 100644
index 0000000..8d5a4cb
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/site.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Usage" href="documentation/usage.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/sitemap.xml b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..38be885
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>usage.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/usage.xhtml
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/usage.xhtml b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/usage.xhtml
new file mode 100644
index 0000000..4db0157
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/content/usage.xhtml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Usage: How to launch the clerezza platform</title>
+	</head>
+	<body>
+		<h1>Usage: How to launch the clerezza platform</h1>
+		<p>Author: Daniel Spicar, Tsuyoshi Ito - clerezza.org</p>
+		<p>Date: March 25, 2009</p>
+		<h2 id="download">1. Download the launcher</h2>
+		<p>
+			The latest snapshots of the launcher can be found on:
+            <br />
+            <br />
+			<a href="http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.platform.launcher/" target="_blank">
+               http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.platform.launcher/
+            </a>
+            <br />
+            <br />
+			or get a stable release from:
+            <br />
+            <br />
+			<a href="http://repo.trialox.org/release/org/apache/clerezza/org.apache.clerezza.platform.launcher/" target="_blank">
+                http://repo.trialox.org/release/org/apache/clerezza/org.apache.clerezza.platform.launcher/
+            </a>
+            <br />
+            <br />
+			(e.g. org.apache.clerezza.platform.launcher-0.2-20090421.105711-13.jar from <a href="http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.platform.launcher/0.2-SNAPSHOT/" target="_blank">
+			http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.platform.launcher/0.2-SNAPSHOT/
+            </a>).
+		</p>
+		<h2 id="run">2. Run the platform</h2>
+		<p>
+            Execute the jar by typing
+            the following into a console:
+        </p>
+		<pre>
+            <code>$ java -Dorg.ops4j.pax.logging.DefaultServiceLog.level=ERROR -jar '/path/to/org.apache.clerezza.platform.launcher-0.2-20090421.105711-13.jar'</code>
+        </pre>
+		<p>
+            This will launch the platform and send the logger output from the 
+			level ERROR and above to the console.
+            If problems are encountered, make sure the jar archive is executeable.
+            In a desktop environment like Microsoft Windows it can be enough to
+            double click the file in order to launch it.
+            <br />
+            If the platform was launched in the console, hit the return key to get a promt (->).
+            The loaded bundles and their state can be checked by typing:
+        </p>
+		<pre>
+            <code>
+                -> ps
+            </code>
+        </pre>
+        <p>
+            The output should look like this:
+        </p>
+        <pre>
+            <code>
+                START LEVEL 30
+                   ID   State         Level  Name
+                [   0] [Active     ] [    0] System Bundle (1.4.1)
+                [   1] [Resolved   ] [    1] Clerezza - Platform Security Conditions (0.2.0.SNAPSHOT)
+                [   2] [Active     ] [    2] Apache Felix Bundle Repository (1.2.1)
+                [   3] [Active     ] [    2] Apache Felix Configuration Admin Service (1.0.10)
+                    ...
+                    
+                    
+                <strong>[  28] [Active     ] [    3] Clerezza - Platform Account Control Panel (0.3.0.SNAPSHOT)</strong>
+                <strong>[  29] [Active     ] [    3] Clerezza - Platform Content (0.7.0.SNAPSHOT)</strong>
+                <strong>[  30] [Active     ] [    3] Clerezza - Platform Template Manager (0.2.0.SNAPSHOT)</strong>
+                <strong>[  32] [Active     ] [    3] Clerezza - Platform Type Handler Space (0.2.0.SNAPSHOT)</strong>
+                <strong>[  33] [Active     ] [    3] Clerezza - Platform Usermanager and Rolemanager (0.7.0.SNAPSHOT)</strong>
+                    ...
+                ->
+            </code>
+        </pre>
+        <p>
+            To see a list of available services type:
+        </p>
+        <pre>
+            <code>
+                -> scr list
+            </code>
+        </pre>
+        <p>
+            The output should look like this:
+        </p>
+        <pre>
+            <code>
+                   Id   State          Name
+                [   0] [active       ] org.apache.clerezza.platform.security.PermissionManager
+                [   1] [active       ] org.apache.clerezza.platform.security.auth.AuthenticatingFilter
+                [   2] [active       ] org.apache.clerezza.jaxrs.rdf.providers.GraphReader
+                [   3] [active       ] org.apache.clerezza.jaxrs.rdf.providers.GraphWriter
+
+
+                    ...
+                ->
+            </code>
+        </pre>
+        <p>
+            Now the platform can be accessed in a web browser by going to <i>http://localhost:8080/path_to_service/</i>, whereas <i>path_to_service</i> has to be replaced by the path to a service/module (when asked to authenticate use username "admin" and password "admin". The user account "admin" has all permissions).
+            <br />Try the following modules:
+        </p>
+        <ul>
+            <li><a href="http://localhost:8080/admin/user-manager/" target="_blank">http://localhost:8080/admin/user-manager/</a></li>
+            <li><a href="http://localhost:8080/admin/role-manager/" target="_blank">http://localhost:8080/admin/role-manager/</a></li>
+            <li><a href="http://localhost:8080/admin/template-manager/" target="_blank">http://localhost:8080/admin/template-manager/</a></li>
+            <li>
+                <a href="http://localhost:8080/user/admin/control-panel/" target="_blank">
+                    http://localhost:8080/user/admin/control-panel/
+                </a>
+                  (where <i>admin</i> can be the username of an arbitary user)
+            </li>
+            <li><a href="http://localhost:8080/tools/editor/" target="_blank">http://localhost:8080/tools/editor/</a></li>
+        </ul>
+        <p>
+            Check out the following sites for more information:
+        </p>
+        <ul>
+            <li>
+                <a href="http://clerezza.org/projects/org.apache.clerezza.platform.usermanager/" target="_blank">
+                   http://clerezza.org/projects/org.apache.clerezza.platform.usermanager/
+                </a>
+            </li>
+             <li><a href="http://clerezza.org/projects/org.apache.clerezza.platform.accountcontrolpanel/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.accountcontrolpanel/</a></li>
+             <li><a href="http://clerezza.org/projects/org.apache.clerezza.platform.templating.manager/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.templating.manager/</a></li>
+            <li><a href="http://clerezza.org/projects/org.apache.clerezza.platform.content/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.content/</a></li>
+        </ul>
+        <h2 id="shutdown">3. Shutdown the platform</h2>
+        <p>
+            The platform can be stopped by typing:
+        </p>
+            <pre>
+                <code>
+                    -> shutdown
+                </code>
+            </pre>
+
+		<h2 id="shutdown">4. Felix webconsole</h2>
+        <p>
+            As an alternative to the command-line interface Felix also provides
+			a web-based management interface available by default at
+			<a href="http://localhost:8080/system/console">http://localhost:8080/system/console</a>.
+			The port at which the console is accessible can be set with the
+			<code>org.osgi.service.http.port</code> system property.
+        </p>
+		<pre>
+            <code>$ java -Dorg.osgi.service.http.port=8383 -jar '/path/to/org.apache.clerezza.platform.launcher-0.2-20090421.105711-13.jar'</code>
+        </pre>
+		<p>
+           Starting the platform as above the web-console will be available on
+		   port 8383, note that this has no impact on the port of the plaftform's
+		   webserver which by default listens to port 8080.
+        </p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/templates/skin.html b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..bb1b45d
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>


[08/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
deleted file mode 100644
index 7932829..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.util.Iterator;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.Literal;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-import org.apache.clerezza.rdf.ontologies.SKOS;
-import org.apache.clerezza.rdf.utils.GraphNode;
-
-/**
- * This class stores description of concepts resulted from searches
- * performed by {@link RemoteConceptProvider}s.
- *
- * @author hasan
- */
-public class RemoteConceptsDescriptionManager {
-
-    private UriRef REMOTE_CONCEPTS_DESCRIPTION_MGRAPH =
-            new UriRef("urn:x-localinstance:/remote.concepts.description");
-
-    /**
-     * Stores SKOS:prefLabel and RDFS.comment of concepts available in the
-     * specified Graph.
-     *
-     * @param graph
-     *        the Graph which contains concepts and their descriptions.
-     */
-    void storeConceptsDescription(Graph graph) {
-        MGraph remoteConceptsDescriptionMGraph =
-                getRemoteConceptsDescriptionMGraph();
-
-        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
-        while (concepts.hasNext()) {
-            UriRef concept = (UriRef) concepts.next().getSubject();
-            copyConceptDescription(new GraphNode(concept, graph),
-                    new GraphNode(concept, remoteConceptsDescriptionMGraph));
-        }
-    }
-
-    /**
-     * This method creates an {@link MGraph} to store concepts' descriptions
-     * if this graph does not already exist.
-     *
-     * @return
-     *        an {@link MGraph}
-     */
-    public MGraph getRemoteConceptsDescriptionMGraph() {
-        MGraph remoteConceptsDescriptionMGraph = null;
-        TcManager tcManager = TcManager.getInstance();
-        try {
-            remoteConceptsDescriptionMGraph =
-                    tcManager.getMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
-        } catch (NoSuchEntityException nsee) {
-            remoteConceptsDescriptionMGraph =
-                    tcManager.createMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
-        }
-        return remoteConceptsDescriptionMGraph;
-    }
-
-    private void copyConceptDescription(GraphNode sourceGraphNode,
-            GraphNode destinationGraphNode) {
-
-        destinationGraphNode.deleteNodeContext();
-
-        Iterator<Literal> prefLabelStatements =
-                sourceGraphNode.getLiterals(SKOS.prefLabel);
-        if (prefLabelStatements.hasNext()) {
-            destinationGraphNode.addProperty(SKOS.prefLabel,
-                    prefLabelStatements.next());
-        }
-        Iterator<Literal> commentStatements =
-                sourceGraphNode.getLiterals(RDFS.comment);
-        while (commentStatements.hasNext()) {
-            destinationGraphNode.addProperty(RDFS.comment,
-                    commentStatements.next());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
deleted file mode 100644
index 3bff348..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.List;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.ontologies.DCTERMS;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-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;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * This JAX-RS resource can be used for adding concepts to a resource.
- *
- * The URI path of this service is /concepts/tagger.
- *
- * @author tio
- */
-@Component
-@Service(Object.class)
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/concepts/tagger/")
-public class ResourceTagger {
-
-    @Reference
-    protected ContentGraphProvider cgProvider;
-    @Reference
-    private ScalaServerPagesService scalaServerPagesService;
-
-    protected void activate(ComponentContext context)
-            throws URISyntaxException {
-
-        BundleContext bundleContext = context.getBundleContext();
-        URL template = getClass().getResource("concept-existing-subjects.ssp");
-
-        scalaServerPagesService.registerScalaServerPage(
-                template,
-                RDFS.Resource, "concept-existing-subjects-naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
-
-        template = getClass().getResource("concept-tagging.ssp");
-        scalaServerPagesService.registerScalaServerPage(
-                template,
-                RDFS.Resource, "concept-tagging-naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
-
-        template = getClass().getResource("concept-find-create.ssp");
-        scalaServerPagesService.registerScalaServerPage(
-                template,
-                RDFS.Resource, "concept-find-create-naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
-
-        template = getClass().getResource("selected-concepts.ssp");
-        scalaServerPagesService.registerScalaServerPage(
-                template,
-                RDFS.Resource, "selectedconcepts-naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
-    }
-
-    /**
-     * Adds concepts to a resource. If parameters uri and
-     * concepts are not defined a response with code BAD_REQUEST is returned. If
-     * the relation is succefully added a redirect to /concepts/generic-resource with
-     * the UriRef of the resource as parameter.
-     *
-     * @param uri specifies the uri of a resource
-     * @param concepts specifies a list of concept uris.
-     *
-     * @return
-     *        A Response
-     */
-    @POST
-    @Path("set")
-    public Response updateConcepts(@FormParam("uri") UriRef uri,
-            @FormParam("concepts") List<String> concepts,
-            @Context UriInfo uriInfo) {
-
-        
-        if (uri != null) {
-            GraphNode node = new GraphNode(uri, cgProvider.getContentGraph());
-            node.deleteProperties(DCTERMS.subject);
-            if(concepts != null) {
-                for (String subject : concepts) {
-                    node.addProperty(DCTERMS.subject, new UriRef(subject));
-                }
-            }
-        } else {
-            throw new WebApplicationException(Response.status(
-                    Status.BAD_REQUEST).entity("No resource uri defined.").build());
-        }
-        return RedirectUtil.createSeeOtherResponse("/concepts/generic-resource?uri=" +
-                uri.getUnicodeString(), uriInfo);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
deleted file mode 100644
index 98ee7cc..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
-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;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-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.TcManager;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-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.RdfList;
-import org.apache.clerezza.rdf.utils.UnionMGraph;
-import org.apache.felix.scr.annotations.Services;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * This service manages concept providers. Concept providers are prioritized.
- *
- * The URI path of this service is /concepts/provider-manager.
- *
- * @author hasan, tio
- */
-@Component
-@Services({
-    @Service(Object.class),
-    @Service(ConceptProviderManager.class),
-    @Service(GlobalMenuItemsProvider.class)
-})
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/concepts/provider-manager")
-public class SimpleConceptProviderManager implements ConceptProviderManager,
-        GlobalMenuItemsProvider {
-
-    @Reference
-    private TcManager tcManager;
-
-    @Reference
-    protected ContentGraphProvider cgProvider;
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    private List<ConceptProvider> conceptProviderList =
-            new ArrayList<ConceptProvider>();
-
-    /**
-     * The activate method is called when SCR activates the component
-     * configuration. 
-     * 
-     * @param context
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected void activate(ComponentContext context)
-            throws IOException,
-            URISyntaxException {
-
-        URL template = getClass().getResource("manage-concept-providers-page.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(template.toURI().toString()),
-                CONCEPTS.ManageConceptProvidersPage, "naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        instantiateConceptProviders();
-    }
-
-    protected void deactivate(ComponentContext context) {
-        conceptProviderList.clear();
-    }
-
-    private void instantiateConceptProviders() {
-        conceptProviderList.clear();
-        MGraph contentGraph = cgProvider.getContentGraph();
-
-        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
-        RdfList cpl = new RdfList(cplNode, contentGraph);
-        for (int i = 0; i < cpl.size(); i++) {
-            NonLiteral conceptProvider = (NonLiteral) cpl.get(i);
-            Iterator<Triple> conceptProviderTypes = contentGraph.filter(
-                    conceptProvider, RDF.type, null);
-            if (conceptProviderTypes.hasNext()) {
-                UriRef conceptProviderType = (UriRef) conceptProviderTypes.next().getObject();
-                if (conceptProviderType.equals(CONCEPTS.LocalConceptProvider)) {
-                    instantiateLocalConceptProvider(contentGraph, conceptProvider);
-                } else {
-                    instantiateRemoteConceptProvider(contentGraph, conceptProvider);
-                }
-            }
-        }
-    }
-
-    private NonLiteral getConceptProviderListNode(MGraph contentGraph) {
-        Iterator<Triple> triples = contentGraph.filter(null, RDF.type,
-                CONCEPTS.ConceptProviderList);
-        if (triples.hasNext()) {
-            return triples.next().getSubject();
-        }
-        NonLiteral cplNode = new BNode();
-        new RdfList(cplNode, contentGraph);
-        contentGraph.add(new TripleImpl(cplNode, RDF.type,
-                CONCEPTS.ConceptProviderList));
-        return cplNode;
-    }
-
-    private void instantiateLocalConceptProvider(MGraph contentGraph,
-            NonLiteral conceptProvider) {
-        Iterator<Triple> selectedSchemes = contentGraph.filter(
-                conceptProvider, CONCEPTS.selectedScheme, null);
-        if (selectedSchemes.hasNext()) {
-            UriRef selectedScheme = (UriRef) selectedSchemes.next().getObject();
-            conceptProviderList.add(new LocalConceptProvider(tcManager,
-                    cgProvider, selectedScheme));
-        }
-    }
-
-    private void instantiateRemoteConceptProvider(MGraph contentGraph,
-            NonLiteral conceptProvider) {
-        Iterator<Triple> endPoints = contentGraph.filter(
-                conceptProvider, CONCEPTS.sparqlEndPoint, null);
-        if (endPoints.hasNext()) {
-            UriRef sparqlEndPoint = (UriRef) endPoints.next().getObject();
-            Iterator<Triple> defaultGraphs = contentGraph.filter(
-                    conceptProvider, CONCEPTS.defaultGraph, null);
-            UriRef defaultGraph = null;
-            if (defaultGraphs.hasNext()) {
-                defaultGraph = (UriRef) defaultGraphs.next().getObject();
-            }
-            Iterator<Triple> queryTemplates = contentGraph.filter(
-                    conceptProvider, CONCEPTS.queryTemplate, null);
-            if (queryTemplates.hasNext()) {
-                TypedLiteral queryTemplate =
-                        (TypedLiteral) queryTemplates.next().getObject();
-                conceptProviderList.add(
-                        new RemoteConceptProvider(sparqlEndPoint,
-                        defaultGraph, queryTemplate.getLexicalForm()));
-            }
-        }
-    }
-
-    /**
-     * Returns a GraphNode containing a list of {@link ConceptProvider}s stored
-     * in the content graph to be managed. The order in the list represents
-     * the priority of the providers.
-     * This resource is accessible through a GET request on the URI sub-path
-     * "edit-concept-provider-list".
-     *
-     */
-    @GET
-    @Path("edit-concept-provider-list")
-    public GraphNode getProviderList(@Context UriInfo uriInfo) {
-        AccessController.checkPermission(
-                new ConceptProviderManagerAppPermission());
-        TrailingSlash.enforceNotPresent(uriInfo);
-        MGraph contentGraph = cgProvider.getContentGraph();
-        MGraph resultGraph = new SimpleMGraph();
-
-        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
-        GraphNode resultNode = new GraphNode(cplNode, resultGraph);
-
-        resultNode.addProperty(RDF.type, CONCEPTS.ManageConceptProvidersPage);
-        resultNode.addProperty(RDF.type, PLATFORM.HeadedPage);
-        return new GraphNode(resultNode.getNode(),
-                new UnionMGraph(resultGraph, contentGraph));
-    }
-
-    /**
-     * Allows the list of {@link ConceptProvider}s stored in the content graph
-     * to be updated with the list POSTed via the URI sub-path
-     * "update-concept-provider-list".
-     * The order in the list represents the priority of the providers.
-     *
-     * @param types
-     *        specify the type of each ConceptProvider: either a
-     *        LocalConceptProvider or a RemoteConceptProvider.
-     * @param sparqlEndPoints
-     *        the SPARQL EndPoint to connect to in case of a RemoteConceptProvider.
-     * @param defaultGraphs
-     *        the Graph to be queried in case of a RemoteConceptProvider.
-     * @param queryTemplates
-     *        the template for the query to be used in case of a RemoteConceptProvider.
-     * @param conceptSchemes
-     *        the concept scheme within which concepts are to be searched,
-     *        in case of a LocalConceptProvider.
-     * @return
-     *        - a 200 (OK) response if everything is fine.
-     *        - a 400 (BAD REQUEST) response if types parameter is undefined.
-     */
-    @POST
-    @Path("update-concept-provider-list")
-    public Response updateConceptProviders(
-            @FormParam("types") List<String> types,
-            @FormParam("sparqlEndPoints") List<String> sparqlEndPoints,
-            @FormParam("defaultGraphs") List<String> defaultGraphs,
-            @FormParam("queryTemplates") List<String> queryTemplates,
-            @FormParam("conceptSchemes") List<String> conceptSchemes) {
-
-        if (types == null) {
-            //types is null when all provider have been removed, processing empty list
-            types = new ArrayList<String>();
-        }
-        MGraph contentGraph = cgProvider.getContentGraph();
-        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
-        GraphNode cplGraphNode = new GraphNode(cplNode, contentGraph);
-        cplGraphNode.deleteNodeContext();
-
-        cplNode = getConceptProviderListNode(contentGraph);
-        RdfList cpl = new RdfList(cplNode, contentGraph);
-
-        int length = types.size();
-        for (int i=0; i<length; i++) {
-            UriRef conceptProviderType = new UriRef(types.get(i));
-            BNode conceptProvider = new BNode();
-            contentGraph.add(new TripleImpl(conceptProvider, RDF.type,
-                    conceptProviderType));
-            if (conceptProviderType.equals(CONCEPTS.LocalConceptProvider)) {
-                contentGraph.add(new TripleImpl(conceptProvider,
-                        CONCEPTS.selectedScheme,
-                        new UriRef(conceptSchemes.get(i))));
-            } else {
-                contentGraph.add(new TripleImpl(conceptProvider,
-                        CONCEPTS.sparqlEndPoint,
-                        new UriRef(sparqlEndPoints.get(i))));
-                String defaultGraph = defaultGraphs.get(i);
-                if (!defaultGraph.trim().isEmpty()) {
-                    contentGraph.add(new TripleImpl(conceptProvider,
-                            CONCEPTS.defaultGraph,
-                            new UriRef(defaultGraph)));
-                }
-                contentGraph.add(new TripleImpl(conceptProvider,
-                        CONCEPTS.queryTemplate,
-                        LiteralFactory.getInstance().createTypedLiteral(
-                        queryTemplates.get(i))));
-            }
-            cpl.add(i, conceptProvider);
-        }
-        instantiateConceptProviders();
-        return Response.status(Status.OK).build();
-    }
-
-    @Override
-    public List<ConceptProvider> getConceptProviders() {
-        return conceptProviderList;
-    }
-
-    @Override
-    public Set<GlobalMenuItem> getMenuItems() {
-        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
-        try {
-            AccessController.checkPermission(
-                    new TcPermission("urn:x-localinstance:/content.graph",
-                    TcPermission.READWRITE));
-        } catch (AccessControlException e) {
-            return items;
-        }
-        try {
-            AccessController.checkPermission(
-                    new ConceptProviderManagerAppPermission());
-        } catch (AccessControlException e) {
-            return items;
-        }
-        items.add(new GlobalMenuItem("/concepts/provider-manager/edit-concept-provider-list",
-                "CPM", "Concept Providers", 5, "Administration"));
-        return items;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
deleted file mode 100644
index 67c4ee4..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
deleted file mode 100644
index 67c4ee4..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
deleted file mode 100644
index 67c4ee4..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css b/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
deleted file mode 100644
index 67c4ee4..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
deleted file mode 100644
index 823cb97..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
-def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
-def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s);
-
-<form method="post" action="/concepts/tagger/set" id="selected-concepts-form">
-	<input type="hidden" name="uri" value={res/cpt("resource")*}></input>
-	{render(res/cpt("resource"), "selectedconcepts-naked")}
-</form>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
deleted file mode 100644
index c0436d8..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
-resultDocModifier.addScriptReference("/scripts/ajax-options.js");
-//resultDocModifier.addScriptReference("/scripts/modification-status.js");
-resultDocModifier.addScriptReference("/scripts/status-message.js");
-
-resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/concept-find-create.js");
-resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/jquery.rdfquery.core-1.0.js");
-
-resultDocModifier.addScriptReference("/scripts/alert-message.js");
-resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
-resultDocModifier.addScriptReference("/yui/2/element/element-min.js");
-resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
-resultDocModifier.addStyleSheet("/yui/2/container/assets/container-core.css");
-
-
-<div>Add Concepts</div>
-<form onsubmit="return ConceptFinder.search()" id="search-form">
-	<br/>
-	<input type="text" value="" name="search-term"/>
-	<a href="#" id="go-button" class="tx-icon tx-icon-search">Go</a>
-	<br/>
-	<br/>
-	<div id="system-found-concepts-area">
-		<div id="label-for-search-results">
-			Found Concepts:
-		</div>
-		<br/>
-		<div id="system-found-concepts"></div>
-	</div>
-	<br/>
-	<div id="user-defined-concept-area">
-		<div id="add-button-label"></div>
-		<div>Description (optional):</div>
-		<textarea rows="8" id="concept-description" name="comment"/>
-		<input type="hidden" value="en" name="lang"/>
-		<div>
-			<a href="#" class="tx-icon tx-icon-plus" id="add-user-defined-concept">Add</a>
-		</div>
-	</div>
-</form>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
deleted file mode 100644
index a81d5a2..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-<div class="concept-tagging">{render(res,"concept-existing-subjects-naked")}
-{render(res,"concept-find-create-naked")}</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
deleted file mode 100644
index e27759b..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
-def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
-def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s);
-
-resultDocModifier.setTitle("Generic Resource Page");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Generic Resource Page</h1>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Resource</a></li>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="addButton" class="tx-button tx-button-create" href="#">Save</a></li>);
-
-<div id="tx-content">
-	<script type="text/javascript">
-		$(document).ready(function() {{
-			$("#addButton").click(function() {{
-				$("#selected-concepts-form").submit();
-			}});
-		}});
-	</script>
-	<h4>About: {res/cpt("resource")*}</h4>
-	<div><object width="80%" data={res/cpt("resource")*}></object></div>
-	<br/>
-	{render(res,"concept-tagging-naked")}
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
deleted file mode 100644
index e0ef754..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
-def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s)
-def lingvoj(s: Any) = new UriRef("http://www.lingvoj.org/ontology#"+s)
-def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
-def rdf(s: Any) = new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
-
-def createProvider(rdfType: String, selectedScheme: String, sparqlEndPoint: String, defaultGraph: String, query: String) =
-						<tr>
-							<td>
-								<input type="checkbox" value={rdfType}/>
-							</td>
-							<td>
-							<div>Provider:
-							</div>
-								{createSelection(!selectedScheme.equals(""))}
-							<br/>
-							<div>Concept Scheme:</div>
-							<input type="text" value={selectedScheme} name="conceptSchemes"/>
-							<div>SPARQL Endpoint:</div>
-							<input type="text" value={sparqlEndPoint} name="sparqlEndPoints"/>
-							<div>Default Graph:</div>
-							<input type="text" value={defaultGraph} name="defaultGraphs"/>
-							<div>Query Template:</div>
-							<textarea rows="8" name="queryTemplates">{query}</textarea>
-							<br/>
-							<br/>
-							</td>
-						</tr>
-
-
-def createSelection(isLocal: Boolean) = <select name="types">
-									{if(isLocal) {
-										<option value={cpt("LocalConceptProvider").getUnicodeString()} selected="selected">LocalConceptProvider</option>
-										<option value={cpt("RemoteConceptProvider").getUnicodeString()} >RemoteConceptProvider</option>
-									} else {
-										<option value={cpt("LocalConceptProvider").getUnicodeString()}>LocalConceptProvider</option>
-										<option value={cpt("RemoteConceptProvider").getUnicodeString()} selected="selected">RemoteConceptProvider</option>
-									}}
-						</select>
-
-resultDocModifier.addStyleSheet("/static/concepts/style/form.css");
-resultDocModifier.addScriptReference("/jquery/jquery.tooltip.pack.js");
-resultDocModifier.addScriptReference("/jquery/jquery.ajaxQueue.js");
-resultDocModifier.addScriptReference("/jquery/jquery.autocomplete.min.js");
-resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
-/*resultDocModifier.addScriptReference("/yui/2/container/assets/container-core.css");*/
-resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
-resultDocModifier.addScriptReference("/scripts/alert-message.js");
-resultDocModifier.addScriptReference("/scripts/ajax-options.js");
-resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/concept-provider-manipulation.js");
-resultDocModifier.setTitle("Resource Tagging");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Resource Tagging</h1>);
-
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="">Concept Providers Manager</a></li>);
-
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="deleteButton" class="tx-button tx-button-remove" href="#">Remove</a></li>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="addButton" class="tx-button tx-button-create" href="#">Save</a></li>);
-
-<div id="tx-content">
-	<div  class="tx-tree">
-		<form action="" id="providers" method="post">
-			<fieldset>
-				<table>
-					<thead>
-						<tr>
-							<th><a href="#"></a></th>
-							<th style="width: 95%"><a href="#"></a>Concept Providers</th>
-						</tr>
-					</thead>
-					<tbody>
-						{	for (provider <- (res!!)) yield {
-								if((provider/rdf("type")*).indexOf("LocalConceptProvider") != -1) {
-									createProvider((provider/rdf("type")*), provider/cpt("selectedScheme")*, "", "", "")
-								} else {
-									createProvider((provider/rdf("type")*), "", provider/cpt("sparqlEndPoint")*, provider/cpt("defaultGraph")*, provider/cpt("queryTemplate")*)
-								}
-							}
-						}
-						<tr id="last">
-							<td></td>
-							<td>
-								<div>Add Concept Provider:</div>
-								<select id="type">
-									<option value={cpt("LocalConceptProvider").getUnicodeString()}>LocalConceptProvider</option>
-									<option value={cpt("RemoteConceptProvider").getUnicodeString()}>RemoteConceptProvider</option>
-								</select>
-								<div>Concept Scheme:</div>
-								<input type="text" name="conceptScheme" id="conceptScheme"/>
-								<div>SPARQL Endpoint</div>
-								<input type="text" name="sparqlEndPoint" id="sparqlEndPoint" />
-								<div>Default Graph:</div>
-								<input type="text" name="defaultGraph" id="defaultGraph"/>
-								<div>Query Template:</div>
-								<textarea rows="8" id="query"/>
-								<br/>
-								<br/>
-								<div>
-									<a href="#" class="tx-icon tx-icon-ok" id="addProvider">Add</a>
-								</div>
-							</td>
-						</tr>
-					</tbody>
-				</table>
-			</fieldset>
-		</form>
-	</div>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
deleted file mode 100644
index 707c11a..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
-def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
-
-resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/selected-concepts.js");
-
-<div>
-	<div id="selected-concepts">
-		{for (concept <- (res/dct("subject"))) yield {
-		<div>
-			<div>PrefLabel: {concept/skos("prefLabel")*}</div>
-			<div>Uri: {concept*}</div>
-			<input type="hidden" name="concepts" value={concept*}></input>
-			<a href="#" class="tx-icon tx-icon-delete" >Remove</a>
-			<br />
-			<br />
-		</div>
-		}
-		}
-	</div>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
deleted file mode 100644
index 5ee4663..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-import org.json.simple.JSONObject
-
-def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
-
-"{\"concepts\":" +
-	(for (concept <- (res/skos("member"))) yield {
-		"{" +
-			"\"prefLabel\":\"" + JSONObject.escape(concept/skos("prefLabel")*) + "\"," +
-			"\"uri\":\"" + JSONObject.escape(concept*) + "\"" +
-		"}"
-	}).mkString("[", ",", "]") +
-"}";

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
deleted file mode 100644
index e31bd88..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- * @author hasan, andre
- */
-function ConceptFinder(){
-};
-
-ConceptFinder.callback;
-
-ConceptFinder.setAddConceptCallback = function(callback){
-	this.callback = callback;
-}
-
-/**
- * Request the server concepts that match the search term in the input field "search-term"
- */
-ConceptFinder.search = function(){
-	$("#system-found-concepts").empty();
-	var queryResult = null;
-	var searchTerm = $(":text[name=\"search-term\"]").val();
-	if (searchTerm.length > 0) {
-		var options = new AjaxOptions("find-concepts", "finding concepts", function(data){
-			var databank = $.rdf.databank();
-			var store = databank.load(data, {});
-			var query = $.rdf({
-				databank: store
-			});
-			query.prefix('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
-			query.prefix('concepts', 'http://clerezza.org/2010/01/concepts#');
-			query.prefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#');
-			query.prefix('qr', 'http://clerezza.org/2010/04/queryresult#');
-			var resultSet = query.where('?subject rdf:type qr:QueryResult');
-			if (resultSet.size() != 1) {
-				AlertMessage.show(function(){
-				}, "The query results did not match what's expected: exactly 1 result");
-			}
-			var queryResult = query.node(resultSet.get(0).subject);
-			var conceptProperty = $.rdf.resource("<http://clerezza.org/2010/04/queryresult#concept>");
-			var conceptProperties = queryResult.get(conceptProperty);
-			if (conceptProperties) {
-				ConceptFinder.addFoundConcepts(conceptProperties);
-			}
-			$("#add-button-label").html("<div>Add '" + searchTerm + "' as new Free Concept</div>");
-			$("#system-found-concepts-area").show();
-			var newFreeConceptProperty = $.rdf.resource("<http://clerezza.org/2010/04/queryresult#creationOfNewFreeConceptSuggested>");
-			var creationOfNewFreeConceptSuggested = queryResult.get(newFreeConceptProperty)[0].value.toString() == "true";
-			if (creationOfNewFreeConceptSuggested) {
-				$("#user-defined-concept-area").show();
-			} else {
-				$("#user-defined-concept-area").hide();
-			}
-		});
-		options.url = "/concepts/find";
-		options.data = "searchTerm=" + encodeURIComponent(searchTerm) + "&xPropObj=http://clerezza.org/2010/04/queryresult%23concept";
-		options.dataType = "json";
-		options.beforeSend = function(req){
-			req.setRequestHeader("Accept", "application/rdf+json");
-		};
-		
-		$.ajax(options);
-	}
-	return false;
-}
-
-/**
- * Adds the given (array of) concepts to the UI (that's currently being displayed). Displays them by a 
- * +-button and labels (for each of them)
- *
- * @param Json array of concepts
- */
-ConceptFinder.addFoundConcepts = function(concepts){
-	var selectedConceptsExists = false;
-	if (typeof(SelectedConcepts) != "undefined") {
-		selectedConceptsExists = true;
-	}
-	var added = false;
-	for (var i = 0; i < concepts.length; i++) {
-		var concept = concepts[i];
-		if (!selectedConceptsExists || !SelectedConcepts.exists(concept.value)) {
-			added = true;
-			var prefLabelProperty = $.rdf.resource("<http://www.w3.org/2008/05/skos#prefLabel>"); 
-			var prefLabel = concept.get(prefLabelProperty).value;
-			var uri = concept.value;
-			ConceptFinder.createSystemFoundConcept(prefLabel, uri);
-		}
-	}
-	if (added) {
-		$("#label-for-search-results").text("Concepts found:");
-	}
-	else {
-		$("#label-for-search-results").text("No additional concepts found.");
-	}
-}
-
-/**
- * Creates the widget that show the user a concept that was found on the backend. Shows prefLabel, 
- * uri and a button to add the concept to the backend
- * 
- * @param {Object} prefLabel
- * @param {Object} uri
- */
-ConceptFinder.createSystemFoundConcept = function(prefLabel, uri) {
-	var div = $("<div/>");
-	ConceptFinder.createConceptWidgets(prefLabel, uri).appendTo(div)
-	$("<a/>").addClass("tx-icon tx-icon-plus").attr({
-		href: "#"
-	}).text("Add").click(ConceptFinder.onAddClicked(prefLabel, uri)).appendTo(div);
-	$("<br/>").appendTo(div);
-	$("<br/>").appendTo(div);
-	div.appendTo("#system-found-concepts")
-}
-
-ConceptFinder.onAddClicked = function(prefLabel, uri){
-	return function(){
-		if (typeof(SelectedConcepts) != "undefined") {
-			SelectedConcepts.addConcept(prefLabel, uri);
-		}
-		if (typeof(ConceptFinder.callback) == "function") {
-			ConceptFinder.callback(prefLabel, uri);
-		}
-		$(this).parent().remove();
-	};
-}
-
-/**
- * Creates html elements that show the given pref label and uri. Appends them to the given div.
- * 
- * @param {Object} prefLabel
- * @param {Object} uri
- * @param {Object} div
- */
-ConceptFinder.createConceptWidgets = function(prefLabel, uri) {
-	var div = $("<div/>");
-	if (prefLabel.substr(0,1) == "\"") {
-		prefLabel = prefLabel.substring(1, prefLabel.length - 1);
-	}
-	$("<div/>").text("PrefLabel: " + prefLabel).appendTo(div);
-	$("<div/>").text("Uri: " + uri).appendTo(div);
-	$("<input/>").attr({
-		"type": "hidden",
-		"name": "concepts"
-	}).val(uri).appendTo(div);
-	return div;
-}
-
-/**
- * Checks if a concept with the given uri already exists
- * @param {Object} uri
- */
-ConceptFinder.exists = function(uri){
-
-};
-
-function ConceptManipulator(){
-};
-
-ConceptManipulator.callback;
-
-ConceptManipulator.setAddConceptCallback = function(callback){
-	this.callback = callback;
-}
-
-/**
- * sends a new concept to the backend for addition. Uses the search term entered by the user (in the same form).
- */
-ConceptManipulator.addConcept = function(){
-	var searchTerm = $(":text[name='search-term']").val();
-	if (searchTerm.length > 0) {
-		var options = new AjaxOptions("add-concepts", "adding concepts", function(uri){
-			$("#concept-description").val("");
-			if (typeof(SelectedConcepts) != "undefined") {
-				SelectedConcepts.addConcept(searchTerm, uri);
-			}
-			if (typeof(this.callback) == "function") {
-				this.callback(searchTerm, uri);
-			}
-		});
-		options.type = "POST";
-		options.url = "/concepts/manipulator/add-concept";
-		options.data = {
-			"pref-label": searchTerm,
-			lang: $(":input[name='lang']").val(),
-			comment: $(":textarea[name='comment']").val()
-		}
-		
-		$.ajax(options);
-	}
-	return false;
-}
-
-$(document).ready(function(){
-	$("#go-button").click(function(){
-		ConceptFinder.search();
-	});
-	$("#add-user-defined-concept").click(function(){
-		ConceptManipulator.addConcept();
-		$("#user-defined-concept-area").hide();
-	});
-	$("#system-found-concepts-area").hide();
-	$("#user-defined-concept-area").hide();
-});

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
deleted file mode 100644
index fcab2c1..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-function ConceptProviderGui(){};
-
-ConceptProviderGui.isModified = false;
-
-ConceptProviderGui.query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> \n" +
-	"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" +
-	"PREFIX skos08: <http://www.w3.org/2008/05/skos#> \n" +
-	"PREFIX skos04: <http://www.w3.org/2004/02/skos/core#> \n" +
-	"CONSTRUCT { ?concept a skos08:Concept; skos08:prefLabel ?prefLabel; " +
-		"rdfs:comment ?comment; owl:sameAs ?sameConcept . } \n" +
-	"WHERE { ?concept a skos04:Concept; skos04:prefLabel ?prefLabel . \n" +
-	"OPTIONAL { ?concept rdfs:comment ?comment . } \n" +
-	"OPTIONAL { ?concept owl:sameAs ?sameConcept . } \n" +
-	"FILTER (REGEX(STR(?prefLabel), '${searchTerm}', 'i'))}";
-
-ConceptProviderGui.initButtons = function() {
-
-	ConceptProviderGui.updateButtonState();
-
-	$("#deleteButton").click(function(event) {
-		$("input:checked").each(function() {
-			$(this).parent().parent().remove();
-		});
-		$(this).addClass("tx-inactive");
-		ConceptProviderGui.isModified = true;
-	});
-
-	$("#addProvider").click(function(event) {
-		ConceptProviderGui.addProvider($("#type").val(),
-					$("#conceptScheme").val(),
-					$("#sparqlEndPoint").val(),
-					$("#defaultGraph").val(),
-					$("#query").val());
-		$("#conceptScheme").val("");
-		$("#sparqlEndPoint").val("");
-		$("#defaultGraph").val("");
-		$("#query").val("");
-	});
-
-	$("#addButton").click(function(event) {
-		if($(this).text() == "Save") {
-			var options = new AjaxOptions("update-providers", "updating providers", function(obj) {
-			});
-			$("textarea[id!=query]").each(function() {
-				$(this).removeAttr("disabled");
-			});
-			options.type = "POST";
-			options.url = "update-concept-provider-list";
-			options.data = $("#providers").serialize();
-			$.ajax(options);
-		}
-	});
-}
-
-ConceptProviderGui.addProvider = function(rdfType, conceptScheme, sparqlEndPoint, defaultGraph, query) {
-	var tr = $("<tr/>").attr("id", "");
-	var td1 = $("<td/>");
-	var div = $("<div/>").text("Provider:");
-	var td2 = $("<td/>");
-
-	var selection = $("<select/>").attr("name","types");
-
-	$("#type > option:not(:selected)").each(function() {
-		selection.append($(this).clone());
-	});
-	$("#type > option:selected").each(function() {
-		var option = $(this).clone();
-		option.attr("selected", "selected");
-		selection.append(option);
-	});
-
-	td2.append(div);
-	td2.append(selection);
-	
-	var inputText = $("<input/>").attr({
-				"type":"text",
-				"name":"conceptSchemes",
-				"value": conceptScheme
-				});
-	
-	div = $("<div/>").text("Concept Scheme:");
-	td2.append(div);
-	td2.append(inputText);
-
-	inputText = $("<input/>").attr({
-				"type":"text",
-				"name":"sparqlEndPoints",
-				"value": sparqlEndPoint
-				});
-
-	div = $("<div/>").text("SPARQL End Point");
-	td2.append(div);
-	td2.append(inputText);
-
-	inputText = $("<input/>").attr({
-				"type":"text",
-				"name":"defaultGraphs",
-				"value": defaultGraph
-				});
-
-	div = $("<div/>").text("Default Graph:");
-	td2.append(div);
-	td2.append(inputText)
-	var inputCheckbox = $("<input/>").attr({
-				"type":"checkbox",
-				"value": rdfType
-				});
-
-	inputCheckbox.appendTo(td1);
-
-	td1.appendTo(tr);
-	
-	var textArea = $("<textarea/>").attr({
-				"rows":"8",
-				"name":"queryTemplates"
-				}).val(query);
-	div = $("<div/>").text("Query Template:");
-	td2.append(div);
-	td2.append(textArea);
-	td2.append($("<br/>"));
-	td2.append($("<br/>"));
-	td2.appendTo(tr);
-	tr.insertBefore("#last");
-	ConceptProviderGui.isModified = true;
-
-	$("select[name=types] > option:selected").each(function() {
-		ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
-	});
-}
-
-ConceptProviderGui.updateDropDown = function (obj, name) {
-	if(obj.val().indexOf("Local") != -1) {
-		obj.parent().parent().find("input[name!=" + name + "]").each(function() {
-			$(this).prev().hide();
-			$(this).hide();
-		});
-		obj.parent().parent().find("input[name=" + name + "]").each(function() {
-			$(this).prev().show();
-			$(this).show();
-		});
-		obj.parent().parent().find("textarea").each(function() {
-			$(this).prev().hide();
-			$(this).hide();
-		});
-	} else {
-		obj.parent().parent().find("input[name!=" + name + "]").each(function() {
-			$(this).prev().show();
-			$(this).show();
-		});
-		obj.parent().parent().find("input[name=" + name + "]").each(function() {
-			$(this).prev().hide();
-			$(this).hide();
-		});
-		obj.parent().parent().find("textarea").each(function() {
-			$(this).prev().show();
-			$(this).show();
-		});
-	}
-}
-
-ConceptProviderGui.updateButtonState = function() {
-	var counter = $("input:checked").length;
-	if(counter == 0) {
-		$("#deleteButton").addClass("tx-inactive");
-	} else {
-		$("#deleteButton").removeClass("tx-inactive");
-	}
-}
-
-$(document).ready(function () {
-
-	$("select[name=types]").live("change", function() {
-		$("select[name=types] > option:selected").each(function(){
-			ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
-		});
-	});
-	$("select[name=types] > option:selected").each(function() {
-		ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
-	});
-	$("#type").live("change", function() {
-		$("#type > option:selected").each(function(){
-			ConceptProviderGui.updateDropDown($(this), "conceptScheme");
-			$("#query").val(ConceptProviderGui.query);
-		});
-	});
-	$("#type > option:selected").each(function() {
-		ConceptProviderGui.updateDropDown($(this), "conceptScheme");
-		$("#query").val(ConceptProviderGui.query);
-	});
-	$("input:checkbox").live("change",function() {
-		ConceptProviderGui.updateButtonState();
-	});
-
-	ConceptProviderGui.initButtons();
-});


[31/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/ontologies/LICENSE b/platform/curieprefixmanager/ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/curieprefixmanager/ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/ontologies/pom.xml b/platform/curieprefixmanager/ontologies/pom.xml
new file mode 100644
index 0000000..c479410
--- /dev/null
+++ b/platform/curieprefixmanager/ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.curieprefixmanager</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.curieprefixmanager.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - CURIE prefix manager Ontologies</name>
+    <description>
+        Skeleton Ontologies
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/ontologies/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/ontologies/curie.ttl
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/ontologies/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/ontologies/curie.ttl b/platform/curieprefixmanager/ontologies/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/ontologies/curie.ttl
new file mode 100644
index 0000000..5d8c314
--- /dev/null
+++ b/platform/curieprefixmanager/ontologies/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/ontologies/curie.ttl
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+@prefix : <http://clerezza.apache.org/platform/curieprefix#>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
+@prefix skos: <http://www.w3.org/2008/05/skos#>.
+@prefix owl: <http://www.w3.org/2002/07/owl#>.
+
+
+: a owl:Ontology.
+
+:CuriePrefixBinding a rdfs:Class;
+	skos:definition "A binding of a CURIE prefix to the string which has to be prepended to reference part of the CURIE to produce a IRI."@en.
+
+:prefix a rdf:Property;
+	skos:definition "The CURIE pefix, i.e. a NCName according to http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName."@en;
+	rdfs:Domain :CuriePrefixBinding.
+
+:binding a rdf:Property;
+	skos:definition "The value to which the pefix associated with the subject is bound to."@en;
+	rdfs:Domain :CuriePrefixBinding.
+
+:CuriePrefixBindingList a rdfs:Class;
+	skos:definition "A List of CURIE prefix bindings"@en;
+	rdfs:subClassOf rdf:List.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/pom.xml
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/pom.xml b/platform/curieprefixmanager/pom.xml
new file mode 100644
index 0000000..04ef3e3
--- /dev/null
+++ b/platform/curieprefixmanager/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.curieprefixmanager</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - CURIE prefix manager</name>
+    <modules>
+        <module>ontologies</module>
+        <module>core</module>
+    </modules>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>platform.curieprefixmanager.ontologies</artifactId>
+                <version>0.2</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <!-- <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.archetype</groupId>
+                    <artifactId>archetype-packaging:maven-plugin</artifactId>
+                    <version>2.0-alpha-5</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build> -->
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard.webinterface/LICENSE
----------------------------------------------------------------------
diff --git a/platform/dashboard.webinterface/LICENSE b/platform/dashboard.webinterface/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/dashboard.webinterface/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard.webinterface/pom.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard.webinterface/pom.xml b/platform/dashboard.webinterface/pom.xml
new file mode 100644
index 0000000..66ff34d
--- /dev/null
+++ b/platform/dashboard.webinterface/pom.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.dashboard.webinterface</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Dashboard Webinterface</name>
+    <description>Provides a dashboard</description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.extensions</artifactId>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.ontologies</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
----------------------------------------------------------------------
diff --git a/platform/dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java b/platform/dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
new file mode 100644
index 0000000..ccdb0ff
--- /dev/null
+++ b/platform/dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.dashboard.webinterface;
+
+import java.net.URL;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+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;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.dashboard.ontologies.DASHBOARD;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.felix.scr.annotations.Services;
+
+/**
+ *
+ * @author tio
+ */
+@Component
+@Services({
+    @Service(Object.class),
+    @Service(GlobalMenuItemsProvider.class)
+})
+
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/dashboard")
+public class DashBoard implements GlobalMenuItemsProvider{
+
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Reference
+    private TcManager tcMgr;
+    
+    @Reference
+    private RenderletManager renderletManager;
+
+    protected void activate(ComponentContext cCtx) throws Exception {
+        logger.debug("Activating DashBoard");    
+    
+        URL template = getClass().getResource("dashboard-template.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(), 
+                new UriRef(template.toURI().toString()), DASHBOARD.DashBoard,
+                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+    }
+    
+    /**
+     * Redirects to the overview page
+     * 
+     * @return {@link Response}
+     * 
+     */
+    @GET
+    public Response redirectToHomePage(@Context UriInfo uriInfo) {
+        if (uriInfo.getAbsolutePath().toString().endsWith("/")) {
+            return RedirectUtil.createSeeOtherResponse("overview", uriInfo);
+        }
+        return RedirectUtil.createSeeOtherResponse(
+                "dashboard/overview", uriInfo);
+    }
+
+    /**
+     * Returns the overview page of the dashboard.
+     * 
+     * @return {@link GraphNode}
+     * 
+     */
+    @GET
+    @Path("overview")
+    public GraphNode getHomePage(@Context UriInfo uriInfo) {
+
+        TrailingSlash.enforceNotPresent(uriInfo);
+
+        MGraph mGraph = new SimpleMGraph(); 
+        NonLiteral overview = new BNode();
+        mGraph.add(new TripleImpl(overview, RDF.type, DASHBOARD.DashBoard));
+        mGraph.add(new TripleImpl(overview, RDF.type, PLATFORM.HeadedPage));
+        return new GraphNode(overview, mGraph);
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        items.add(new GlobalMenuItem("/dashboard", "DHB", "Dashboard", 10000,
+                null));
+        return items;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard.webinterface/src/main/resources/org/apache/clerezza/platform/dashboard/webinterface/dashboard-template.ssp
----------------------------------------------------------------------
diff --git a/platform/dashboard.webinterface/src/main/resources/org/apache/clerezza/platform/dashboard/webinterface/dashboard-template.ssp b/platform/dashboard.webinterface/src/main/resources/org/apache/clerezza/platform/dashboard/webinterface/dashboard-template.ssp
new file mode 100644
index 0000000..26d15d3
--- /dev/null
+++ b/platform/dashboard.webinterface/src/main/resources/org/apache/clerezza/platform/dashboard/webinterface/dashboard-template.ssp
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+resultDocModifier.setTitle("Dashboard");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Dashboard</h1>);
+
+resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Overview</a></li>);
+
+<div id="tx-content">
+
+	<div id="tx-list" class="tx-list">
+
+		
+	</div>
+</div>
+
+
+
+
+
+
+
+	

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/LICENSE
----------------------------------------------------------------------
diff --git a/platform/dashboard/LICENSE b/platform/dashboard/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/dashboard/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/LICENSE b/platform/dashboard/platform.dashboard.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/pom.xml b/platform/dashboard/platform.dashboard.core/pom.xml
new file mode 100644
index 0000000..313dc24
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/pom.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.dashboard</artifactId>
+        <version>0.5</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.dashboard.core</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Dashboard Core</name>
+    <description>
+        Dashboard core
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.ontologies</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.users.core</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.xsite</groupId>
+                <artifactId>xsite-maven-plugin</artifactId>
+                <configuration>
+                    <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                    <sitemapPath>content/sitemap.xml</sitemapPath>
+                    <skinPath>templates/skin.html</skinPath>
+                    <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>site</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java b/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
new file mode 100644
index 0000000..968692a
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.dashboard;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.clerezza.platform.typerendering.UserContextProvider;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.platform.dashboard.ontologies.*;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.DCTERMS;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.utils.RdfList;
+
+/**
+ * Attaches the global menu to the context node.
+ * 
+ * @author mir
+ */
+@Component(enabled=true, immediate=true)
+@Service(UserContextProvider.class)
+@Reference(name="globalMenuItemsProvider",
+        cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
+        policy=ReferencePolicy.DYNAMIC,
+        referenceInterface=GlobalMenuItemsProvider.class)
+        
+public class ContextualMenuGenerator implements UserContextProvider {
+
+    Set<GlobalMenuItemsProvider> globalMenuItemsProviders = 
+            new HashSet<GlobalMenuItemsProvider>();
+
+    private static class Menu implements Comparable<Menu> {
+        GlobalMenuItem root;
+        SortedSet<GlobalMenuItem> children = new TreeSet<GlobalMenuItem>();
+
+        private Menu(GlobalMenuItem root) {
+            this.root = root;
+        }
+
+        private Menu(String identifier) {
+            this.root = new GlobalMenuItem(null,identifier ,
+                    identifier.replace('_', ' '), 0, null);
+        }
+
+        @Override
+        public int compareTo(Menu o) {
+            return root.compareTo(o.root);
+        }
+    }
+
+    @Override
+    public GraphNode addUserContext(GraphNode node) {
+        node.addProperty(GLOBALMENU.globalMenu, 
+                asRdfList(createMenus(), node.getGraph()));
+        return node;
+    }
+
+    protected void bindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider) {
+        globalMenuItemsProviders.add(provider);
+    }
+
+    protected void unbindGlobalMenuItemsProvider(GlobalMenuItemsProvider provider) {
+        globalMenuItemsProviders.remove(provider);
+    }
+
+    private SortedSet<Menu> createMenus() {
+        Set<GlobalMenuItem> allItems = new HashSet<GlobalMenuItem>();
+        for (GlobalMenuItemsProvider provider : globalMenuItemsProviders) {
+            Set<GlobalMenuItem> items = provider.getMenuItems();
+            for (GlobalMenuItem item: items) {
+                allItems.add(item);
+            }
+        }
+
+        SortedSet<Menu> menus = new TreeSet<Menu>();
+        Map<String, Menu> idMenuMap = new HashMap<String, Menu>();
+        Iterator<GlobalMenuItem> globalMenuItems = allItems.iterator();
+        while (globalMenuItems.hasNext()) {
+            GlobalMenuItem globalMenuItem = globalMenuItems.next();
+            if (globalMenuItem.getGroupIdentifier() == null) {
+                final Menu menu = new Menu(globalMenuItem);
+                idMenuMap.put(menu.root.getIdentifier(), menu);
+                menus.add(menu);
+                globalMenuItems.remove();
+            }
+        }
+        globalMenuItems = allItems.iterator();
+        while (globalMenuItems.hasNext()) {
+            GlobalMenuItem globalMenuItem = globalMenuItems.next();
+            Menu menu = idMenuMap.get(globalMenuItem.getGroupIdentifier());
+            if (menu != null) {
+                menu.children.add(globalMenuItem);
+                globalMenuItems.remove();
+            }
+        }
+        Set<String> implicitGroups = new HashSet<String>();
+        for (GlobalMenuItem globalMenuItem : allItems) {
+            final String groupIdentifier = globalMenuItem.getGroupIdentifier();
+            implicitGroups.add(groupIdentifier);
+        }
+        for (String implicitGroupId : implicitGroups) {
+            Menu menu = new Menu(implicitGroupId);
+            idMenuMap.put(menu.root.getIdentifier(), menu);
+            menus.add(menu);
+        }
+
+        for (GlobalMenuItem item : allItems) {
+            Menu menu = idMenuMap.get(item.getGroupIdentifier());
+            if (menu != null) {
+                menu.children.add(item);
+            }
+        }
+        return menus;
+    }
+    
+    private NonLiteral asRdfList(SortedSet<Menu> menus, TripleCollection mGraph) {
+        NonLiteral result = new BNode();
+        RdfList list = new RdfList(result, mGraph);
+        for (Menu menu : menus) {
+            BNode node = new BNode();
+            final String label = menu.root.getLabel();
+            Literal labelLiteral = new PlainLiteralImpl(label);
+            mGraph.add(new TripleImpl(node, RDFS.label,labelLiteral));
+            final String description = menu.root.getDescription();
+            if (description != null) {
+                Literal descLiteral = new PlainLiteralImpl(description);
+                mGraph.add(new TripleImpl(node, DCTERMS.description, descLiteral));
+            }
+            final String path = menu.root.getPath();
+            if (path != null) {
+                Literal pathLiteral = LiteralFactory.getInstance().
+                        createTypedLiteral(path);
+                mGraph.add(new TripleImpl(node, GLOBALMENU.path, pathLiteral));
+            }
+            if (menu.children.size() > 0) {
+                mGraph.add(new TripleImpl(node, GLOBALMENU.children, 
+                        itemsAsRdfList(menu.children, mGraph)));
+                mGraph.add(new TripleImpl(node, RDF.type, GLOBALMENU.Menu));
+            } else {
+                mGraph.add(new TripleImpl(node, RDF.type, GLOBALMENU.MenuItem));
+            }
+            list.add(node);
+            
+        }
+        return result;
+    }
+
+    private NonLiteral itemsAsRdfList(SortedSet<GlobalMenuItem> menus, TripleCollection mGraph) {
+        NonLiteral result = new BNode();
+        RdfList list = new RdfList(result, mGraph);
+        for (GlobalMenuItem item : menus) {
+            BNode node = new BNode();
+            final String label = item.getLabel();
+            Literal labelLiteral = new PlainLiteralImpl(label);
+            mGraph.add(new TripleImpl(node, RDFS.label,labelLiteral));
+            final String description = item.getDescription();
+            if (description != null) {
+                Literal descLiteral = new PlainLiteralImpl(description);
+                mGraph.add(new TripleImpl(node, DCTERMS.description, descLiteral));
+            }
+            final String path = item.getPath();
+            if (path != null) {
+                Literal pathLiteral = LiteralFactory.getInstance().
+                        createTypedLiteral(path);
+                mGraph.add(new TripleImpl(node, GLOBALMENU.path, pathLiteral));
+            }
+            mGraph.add(new TripleImpl(node, RDF.type, GLOBALMENU.MenuItem));
+            list.add(node);
+        }
+        return result;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/UserLoginNode.java
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/UserLoginNode.java b/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/UserLoginNode.java
new file mode 100644
index 0000000..8dedbc2
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/UserLoginNode.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.dashboard;
+
+import org.apache.stanbol.commons.security.UserUtil;
+import org.apache.clerezza.platform.typerendering.UserContextProvider;
+import org.apache.clerezza.platform.usermanager.UserManager;
+import org.apache.clerezza.platform.users.WebIdGraphsService;
+import org.apache.clerezza.platform.users.WebIdInfo;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.ontologies.PERMISSION;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+import org.apache.commons.lang.Validate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Iterator;
+
+/**
+ * The login name is added to the user context node. The name is accessable via
+ * ssp template by using the context node
+ * (e.g. context/platform("user")/platform("userName")).
+ *
+ * @author tio
+ */
+@Component(enabled=true, immediate=true)
+@Service(UserContextProvider.class)
+
+public class UserLoginNode implements UserContextProvider {
+
+    @Reference
+    protected UserManager userManager;
+
+    @Reference
+    private WebIdGraphsService webIdGraphsService;
+
+    @Override
+    public GraphNode addUserContext(GraphNode node) {
+
+        final AccessControlContext context = AccessController.getContext();
+        GraphNode agent = AccessController.doPrivileged(new PrivilegedAction<GraphNode>() {
+            @Override
+            public GraphNode run() {
+                final String userName = UserUtil.getUserName(context);
+                if (userName == null) {
+                    return null;
+                }
+                return userManager.getUserGraphNode(userName);
+            }
+        });
+        if (agent != null) {
+            if (agent.getNode() instanceof UriRef) {
+                WebIdInfo webIdInfo = webIdGraphsService.getWebIdInfo((UriRef)agent.getNode());
+                MGraph userGraph = webIdInfo.localPublicUserData();
+                agent = new GraphNode(agent.getNode(), new UnionMGraph(agent.getGraph(), userGraph));
+            }
+            node.addProperty(PLATFORM.user, agent.getNode());
+            MGraph userContext = new SimpleMGraph(agent.getNodeContext());
+            removeTripleWithProperty(userContext, PERMISSION.password);
+            removeTripleWithProperty(userContext, PERMISSION.passwordSha1);
+            node.getGraph().addAll(userContext);            
+        }
+        return node;
+    }
+
+    private void removeTripleWithProperty(MGraph userContext, UriRef property) {
+        Iterator<Triple> propertyTriples = userContext.filter(null, property, null);
+        while (propertyTriples.hasNext()) {
+            propertyTriples.next();
+            propertyTriples.remove();
+        }
+    }
+}


[43/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/pom.xml
----------------------------------------------------------------------
diff --git a/platform/config/pom.xml b/platform/config/pom.xml
new file mode 100644
index 0000000..111680c
--- /dev/null
+++ b/platform/config/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.config</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Configuration</name>
+    <description>This bundles initializes the system graph with default values,
+    provides a service to access configuration default values, and a GUI to
+    edit such values.
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.file.storage</artifactId>
+            <version>0.4</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
new file mode 100644
index 0000000..ebc0bf9
--- /dev/null
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.config;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import org.apache.clerezza.platform.Constants;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.Resource;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * This class provides a OSGi service for getting system properties from
+ * the sytem graph.
+ * 
+ * @author mir
+ */
+@Component
+@Service(PlatformConfig.class)
+public class PlatformConfig {
+
+    @Reference(target = SystemConfig.SYSTEM_GRAPH_FILTER)
+    private LockableMGraph systemGraph;
+    private BundleContext context;
+    private static String DEFAULT_PORT = "8080";
+
+    /**
+     * @deprecated use org.apache.clerezza.platform.Contants instead
+     */
+    @Deprecated
+    public static final UriRef CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
+
+    /**
+     * A filter that can be used to get the config graph as OSGi service,
+     * that is provided by <code>org.apache.clerezza.rdf.core.access.TcManager</code>.
+     */
+    public static final String CONFIG_GRAPH_FILTER =
+            "(name="+ Constants.CONFIG_GRAPH_URI_STRING +")";
+
+    @Reference
+    private TcManager tcManager;
+
+
+    /**
+     * Returns the default base URI of the Clerezza platform instance.
+     * @return the base URI of the Clerezza platform
+     */
+    public UriRef getDefaultBaseUri() {
+        return AccessController.doPrivileged(new PrivilegedAction<UriRef>() {
+
+            @Override
+            public UriRef run() {
+                GraphNode platformInstance = getPlatformInstance();
+                Lock l = platformInstance.readLock();
+                l.lock();
+                try {
+                    Iterator<Resource> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
+                    if (triples.hasNext()) {
+                        return (UriRef) triples.next();
+                    } else {
+                        String port = context.getProperty("org.osgi.service.http.port");
+                        if (port == null) {
+                            port = DEFAULT_PORT;
+                        }
+                        if (port.equals("80")) {
+                            return new UriRef("http://localhost/");
+                        }
+                        return new UriRef("http://localhost:" + port + "/");
+                    }
+                } finally {
+                    l.unlock();
+                }
+            }
+        });
+    }
+
+    /**
+     * Returns the platforminstance as <code>GraphNode</code> of the system
+     * graph (a LockableMGraph). Access controls applies to the system graph
+     * instance underlying the <code>GraphNode</code>.
+     *
+     * @return
+     */
+    public GraphNode getPlatformInstance() {
+        return new GraphNode(getPlatformInstanceResource(), systemGraph);
+    }
+
+    private NonLiteral getPlatformInstanceResource() {
+        Lock l = systemGraph.getLock().readLock();
+        l.lock();
+        try {
+            Iterator<Triple> instances = systemGraph.filter(null, RDF.type, PLATFORM.Instance);
+            if (!instances.hasNext()) {
+                throw new RuntimeException("No Platform:Instance in system graph.");
+            }
+            return instances.next().getSubject();
+        } finally {
+            l.unlock();
+        }
+    }
+
+    /**
+     * Returns the base URIs of the Clerezza platform instance.
+     * A base Uri is the shortest URI of a URI-Hierarhy the platform handles.
+     * @return the base URI of the Clerezza platform
+     */
+    //todo: if this is the only class that sets and reads base uris then getBaseURIs should keep a cache
+    public Set<UriRef> getBaseUris() {
+
+        return AccessController.doPrivileged(new PrivilegedAction<Set<UriRef>>() {
+
+            @Override
+            public Set<UriRef> run() {
+                Iterator<Resource> baseUrisIter = getPlatformInstance().
+                        getObjects(PLATFORM.baseUri);
+                Set<UriRef> baseUris = new HashSet<UriRef>();
+                while (baseUrisIter.hasNext()) {
+                    UriRef baseUri = (UriRef) baseUrisIter.next();
+                    baseUris.add(baseUri);
+                }
+                baseUris.add(getDefaultBaseUri());
+                return baseUris;
+            }
+        });
+
+    }
+
+    /**
+     * Adds a base URI to the Clerezza platform instance.
+     *
+     * @param baseUri The base URI which will be added to the platform instance
+     */
+    public void addBaseUri(UriRef baseUri) {
+        systemGraph.add(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
+    }
+
+    /**
+     * Removes a base URI from the Clerezza platform instance.
+     *
+     * @param baseUri The base URI which will be removed from the platform instance
+     */
+    public void removeBaseUri(UriRef baseUri) {
+        systemGraph.remove(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
+    }
+
+    protected void activate(ComponentContext componentContext) {
+        this.context = componentContext.getBundleContext();
+        try {
+            tcManager.getMGraph(Constants.CONFIG_GRAPH_URI);
+        } catch (NoSuchEntityException nsee) {
+            tcManager.createMGraph(Constants.CONFIG_GRAPH_URI);            
+        }
+    }
+    
+    protected void deactivate(ComponentContext componentContext) {
+        this.context = null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
new file mode 100644
index 0000000..285300d
--- /dev/null
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.config;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
+import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.clerezza.rdf.file.storage.FileMGraph;
+import org.apache.felix.scr.annotations.Service;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Deactivate;
+
+/**
+ * When the
+ * <code>SystemConfig</code> component is activated it checks if the system
+ * graph exists, in case it does not exist then it creates the system graph and
+ * writes the default platform configuration into it.
+ *
+ * @author mir
+ */
+@Component(immediate = true)
+@Service(WeightedTcProvider.class)
+public class SystemConfig implements WeightedTcProvider {
+
+    public static final String DEFAULT_SYSTEM_GRAPH = "default-system-graph.rdf";
+    private static final String DATA_FILE_SYSTEM_GRAPH = "system-graph.nt";
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+    /**
+     *
+     * @deprecated use org.apache.clerezza.platform.Contants instead
+     */
+    @Deprecated
+    public static final UriRef SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
+    /**
+     * A filter that can be used to get the system graph as OSGi service, that
+     * is provided by
+     * <code>org.apache.clerezza.rdf.core.access.TcManager</code>.
+     */
+    public static final String SYSTEM_GRAPH_FILTER =
+            "(name=" + Constants.SYSTEM_GRAPH_URI_STRING + ")";
+    
+    public static final String PARSER_FILTER =
+            "(&("+SupportedFormat.supportedFormat+"=" + SupportedFormat.RDF_XML + ") "+
+            "("+SupportedFormat.supportedFormat+"=" + SupportedFormat.N_TRIPLE + "))";
+    @Reference(target = PARSER_FILTER)
+    private Parser parser;
+    
+    public static final String SERIALIZER_FILTER =
+            "("+SupportedFormat.supportedFormat+"=" + SupportedFormat.N_TRIPLE + ")";
+    @Reference(target = SERIALIZER_FILTER)
+    private Serializer serializer;
+    private MGraph systemGraph;
+
+    @Activate
+    protected void activate(ComponentContext componentContext) {
+        final BundleContext bundleContext = componentContext.getBundleContext();
+        File systemGraphFile = bundleContext.getDataFile(DATA_FILE_SYSTEM_GRAPH);
+        boolean dataFileExisted = systemGraphFile.exists();
+        //yould be good to use IndexedMGraph to be faster
+        systemGraph = new FileMGraph(systemGraphFile, parser, serializer);
+        if (!dataFileExisted) {
+            readConfigGraphFile(systemGraph);
+            logger.info("Add initial configuration to system graph");
+        }
+    }
+
+    @Deactivate
+    protected void deactivate(ComponentContext componentContext) {
+        systemGraph = null;
+    }
+
+    private void readConfigGraphFile(MGraph mGraph) {
+        URL config = getClass().getResource(DEFAULT_SYSTEM_GRAPH);
+        if (config == null) {
+            throw new RuntimeException("no config file found");
+        }
+        try {
+            parser.parse(mGraph, config.openStream(),
+                    SupportedFormat.RDF_XML, null);
+        } catch (IOException ex) {
+            logger.warn("Cannot parse coniguration at URL: {}", config);
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /*
+     * Reason to be high: don't allow overwriting of system graph (by accident or as an attack)
+     * Reason to be low: avoid that TcManager always first tries to create TripleCollections using this provider
+     */
+    @Override
+    public int getWeight() {
+        return Integer.MAX_VALUE;
+    }
+
+    @Override
+    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+        if (name.equals(Constants.SYSTEM_GRAPH_URI)) {
+            return systemGraph;
+        } else {
+            throw new NoSuchEntityException(name);
+        }
+    }
+
+    @Override
+    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+        return getMGraph(name);
+    }
+
+    @Override
+    public Set<UriRef> listGraphs() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public Set<UriRef> listMGraphs() {
+        return Collections.singleton(Constants.SYSTEM_GRAPH_URI);
+    }
+
+    @Override
+    public Set<UriRef> listTripleCollections() {
+        return listMGraphs();
+    }
+
+    @Override
+    public MGraph createMGraph(UriRef name) throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Graph createGraph(UriRef name, TripleCollection triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("Not supported yet."); 
+    }
+
+    @Override
+    public void deleteTripleCollection(UriRef name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Set<UriRef> getNames(Graph graph) {
+        return Collections.emptySet();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
new file mode 100644
index 0000000..dd5199f
--- /dev/null
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.config;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider;
+import org.apache.clerezza.permissiondescriptions.PermissionDescripton;
+import org.apache.clerezza.rdf.core.access.security.TcPermission;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+/**
+ * <code>PermissionDescriptionsProvider</code> implementation that provides
+ * <code>PermissionDescripton</code>s of the graph access permissions for
+ * the graphs used by the platform.
+ * The access permissions for the following graphs are described:
+ * <ul>
+ *    <li>system graph</li>
+ *    <li>config graph</li>
+ * </ul>
+ *
+ * @author mir
+ */
+@Component
+@Service(PermissionDescriptionsProvider.class)
+public class TcPermissionDescriptionsProvider implements PermissionDescriptionsProvider {
+
+    private static final Set<PermissionDescripton> GRAPH_ACCESS_PERMISSION_DESCRIPTIONS =
+            new HashSet<PermissionDescripton>();
+    static {
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read Permission",
+                "Grants permission to the user to read the system graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"read\")"));
+
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read/Write Permission",
+                "Grants permission to the user to read and write the system graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"readwrite\")"));
+
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read Permission",
+                "Grants permission to the user to read the configuration graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"read\")"));
+
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read/Write Permission",
+                "Grants permission to the user to read and write the configuration graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"readwrite\")"));
+    }
+
+    @Override
+    public Set<PermissionDescripton> getPermissionDescriptors() {
+        return GRAPH_ACCESS_PERMISSION_DESCRIPTIONS;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
----------------------------------------------------------------------
diff --git a/platform/config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf b/platform/config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
new file mode 100644
index 0000000..f530afd
--- /dev/null
+++ b/platform/config/src/main/resources/org/apache/clerezza/platform/config/default-system-graph.rdf
@@ -0,0 +1,103 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+		xmlns:perm="http://clerezza.org/2008/10/permission#"
+		xmlns:foaf="http://xmlns.com/foaf/0.1/"
+		xmlns:dc="http://purl.org/dc/elements/1.1/"
+		xmlns:sioc="http://rdfs.org/sioc/ns#"
+		xmlns:plat="http://clerezza.org/2009/08/platform#"
+		xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
+	<perm:Role>
+		<dc:title>CommunityUser</dc:title>
+		<perm:hasPermission rdf:parseType="Resource">
+			<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/user/{username}/*" "readwrite")</perm:javaPermissionEntry>
+		</perm:hasPermission>
+		<perm:hasPermission rdf:parseType="Resource">
+			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission "{username}" "")</perm:javaPermissionEntry>
+		</perm:hasPermission>
+	</perm:Role>
+	<plat:Instance></plat:Instance>
+	<foaf:Agent>
+		<plat:userName>anonymous</plat:userName>
+		<sioc:has_function>
+			<perm:Role>
+				<dc:title>BasePermissionsRole</dc:title>
+				<rdfs:comment>Every user implicitely has this role as this is a perm:BaseRole</rdfs:comment>
+				<rdf:type rdf:resource="http://clerezza.org/2008/10/permission#BaseRole"/>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(java.util.PropertyPermission "*" "read")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.osgi.framework.AdminPermission "*" "resource")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.osgi.framework.ServicePermission "*" "get")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(java.lang.RuntimePermission "accessDeclaredMembers" "")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+                                <perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(java.lang.RuntimePermission "getClassLoader" "")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<!-- it seems pax-logger impl needs this, see comment to https://issues.apache.org/jira/browse/CLEREZZA-205 -->
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.osgi.framework.AdminPermission "*" "metadata")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/content.graph" "read")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/documentation.graph" "read")</perm:javaPermissionEntry>
+				</perm:hasPermission>
+				<perm:hasPermission rdf:parseType="Resource">
+					<perm:javaPermissionEntry>(org.apache.clerezza.rdf.core.access.security.TcPermission "urn:x-localinstance:/config.graph" "read")</perm:javaPermissionEntry>
+				</perm:hasPermission>				
+			</perm:Role>
+		</sioc:has_function>
+	</foaf:Agent>
+	<perm:Role>
+		<dc:title>DefaultRole</dc:title>
+		<rdfs:comment>A role regular users typically have</rdfs:comment>
+		<perm:hasPermission rdf:parseType="Resource">
+			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission "{username}" "")</perm:javaPermissionEntry>
+		</perm:hasPermission>
+		<perm:hasPermission rdf:parseType="Resource">
+			<perm:javaPermissionEntry>(org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission "{username}" "")</perm:javaPermissionEntry>
+		</perm:hasPermission>
+	</perm:Role>
+	<rdf:Description rdf:about="urn:x-localinstance:/typePriorityList">
+		<rdf:rest rdf:parseType="Collection">
+			<rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+		</rdf:rest>
+		<rdf:first rdf:resource="http://clerezza.org/2009/07/script#ScriptGeneratedResource"/>
+	</rdf:Description>
+	<foaf:Agent>
+		<perm:hasPermission rdf:parseType="Resource">
+			<perm:javaPermissionEntry>(java.security.AllPermission "" "")</perm:javaPermissionEntry>
+		</perm:hasPermission>
+		<plat:userName>admin</plat:userName>
+		<foaf:mbox rdf:resource="mailto:noreply@clerezza.org"/>
+		<perm:passwordSha1>d033e22ae348aeb5660fc2140aec35850c4da997</perm:passwordSha1>
+	</foaf:Agent>
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.default404/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.default404/LICENSE b/platform/content.default404/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.default404/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.default404/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.default404/pom.xml b/platform/content.default404/pom.xml
new file mode 100644
index 0000000..0cedbc1
--- /dev/null
+++ b/platform/content.default404/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.default404</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content Default 404 response provider</name>
+    <description>
+        Provides a default implementation of PageNotFoundService
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/main/scala</sourceDirectory>
+        <testSourceDirectory>src/test/scala</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!-- <scalaVersion>${scala.version}</scalaVersion> -->
+                    <!-- <args>
+                        <arg>-target:jvm-1.5</arg>
+                    </args> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+                        <Export-Package>org.apache.clerezza.platform.content.default404</Export-Package>
+                        <!-- <Bundle-SymbolicName>org.apache.clerezza.platform.users.core</Bundle-SymbolicName> -->
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.default404/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform/content.default404/src/main/resources/META-INF/documentation.nt b/platform/content.default404/src/main/resources/META-INF/documentation.nt
new file mode 100644
index 0000000..d5a8a00
--- /dev/null
+++ b/platform/content.default404/src/main/resources/META-INF/documentation.nt
@@ -0,0 +1,35 @@
+<bundle:///intro-content-el/0> <http://discobits.org/ontology#infoBit> "The default 404 Response Provider budle with id org.apache.clerezza.platform.content.default404 provides an implementation of the PageNotFoundService (package/bundle: org.apache.clerezza.platform.content) that the delivers the response retrieved from the uri with the same protocol and host and the /page-not-found. For example if 404 is to be generated for http://example.org/foo/bar the entity obtained by dereferencing http://example.org/page-not-found will be returned."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/1-content> <http://discobits.org/ontology#infoBit> "example: curl -u admin:admin -H \"Content-type: text/html\" -T tmp.html http://127.0.0.1:8080/page-not-found"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/1-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/1-title> <http://discobits.org/ontology#infoBit> "Uploading 404 response page with curl"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/1-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/1> <http://discobits.org/ontology#contains> _:6a610bd3bb246f2a6afd9624eeb843581 . 
+<bundle:///intro-content-el/1> <http://discobits.org/ontology#contains> _:e696a99dc91ebddcf13b5a4fd83e55991 . 
+<bundle:///intro-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:86e4309edd82a6d415338546caff2d551 . 
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:8ced329518dac9ef741f4099548bb8451 . 
+<bundle:///intro-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///intro-title> <http://discobits.org/ontology#infoBit> "Default 404 Response Provider "^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro> <http://discobits.org/ontology#contains> _:566a75916142ac411441d067f09a49f71 . 
+<bundle:///intro> <http://discobits.org/ontology#contains> _:eb4272f6f47656ae428d834bb170dfe81 . 
+<bundle:///intro> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#holds> <bundle:///intro-content> . 
+_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#pos> "1" . 
+_:566a75916142ac411441d067f09a49f71 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:6a610bd3bb246f2a6afd9624eeb843581 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1-title> . 
+_:6a610bd3bb246f2a6afd9624eeb843581 <http://discobits.org/ontology#pos> "0" . 
+_:6a610bd3bb246f2a6afd9624eeb843581 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1> . 
+_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#pos> "1" . 
+_:86e4309edd82a6d415338546caff2d551 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:8ced329518dac9ef741f4099548bb8451 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/0> . 
+_:8ced329518dac9ef741f4099548bb8451 <http://discobits.org/ontology#pos> "0" . 
+_:8ced329518dac9ef741f4099548bb8451 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:e696a99dc91ebddcf13b5a4fd83e55991 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1-content> . 
+_:e696a99dc91ebddcf13b5a4fd83e55991 <http://discobits.org/ontology#pos> "1" . 
+_:e696a99dc91ebddcf13b5a4fd83e55991 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:eb4272f6f47656ae428d834bb170dfe81 <http://discobits.org/ontology#holds> <bundle:///intro-title> . 
+_:eb4272f6f47656ae428d834bb170dfe81 <http://discobits.org/ontology#pos> "0" . 
+_:eb4272f6f47656ae428d834bb170dfe81 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/content.default404/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
new file mode 100644
index 0000000..71c9b2b
--- /dev/null
+++ b/platform/content.default404/src/main/resources/OSGI-INF/serviceComponents.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
+    <scr:component enabled="true" immediate="true" name="org.apache.clerezza.platform.content.default404.DefaultPageNotFoundService">
+        <implementation class="org.apache.clerezza.platform.content.default404.DefaultPageNotFoundService"/>
+        <service>
+            <provide interface="org.apache.clerezza.platform.content.PageNotFoundService" />
+        </service>
+    </scr:component>
+</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
----------------------------------------------------------------------
diff --git a/platform/content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala b/platform/content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
new file mode 100644
index 0000000..a0c4ab6
--- /dev/null
+++ b/platform/content.default404/src/main/scala/org/apache/clerezza/platform/content/default404/DefaultPageNotFoundService.scala
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.content.default404
+
+import org.apache.clerezza.platform.content.PageNotFoundService
+import javax.ws.rs.core.UriInfo
+import java.io.FileNotFoundException
+import java.io.InputStream
+import java.net.URL
+import java.security.AccessController
+import java.security.PrivilegedAction
+import javax.ws.rs.core.Response
+import javax.ws.rs.core.Response.Status
+
+/**
+ * This returns the content of the resource /page-not-found dereferenced as uri
+ * with the same authority section as the request.
+ */
+class DefaultPageNotFoundService extends PageNotFoundService {
+
+  private val notFoundPagePath = "/page-not-found"
+
+  override def createResponse(uriInfo: UriInfo) = {
+    if (uriInfo.getPath == notFoundPagePath) {
+      Response.status(Status.NOT_FOUND).build();
+    } else {
+      val pageNotFoundUrl = new URL(uriInfo.getBaseUri.toURL, notFoundPagePath)
+      AccessController.doPrivileged(
+        new PrivilegedAction[Option[(String, InputStream)]] {
+          def run() = {
+            val connection = pageNotFoundUrl.openConnection()
+            try {
+              Some(connection.getContentType, connection.getInputStream)
+            } catch {
+              case _: FileNotFoundException => None
+            }
+          }
+        }
+      ) match {
+        case Some((mediaTypeString, in)) => Response.status(Status.NOT_FOUND).`type`(mediaTypeString).entity(in).build();
+        case None => Response.status(Status.NOT_FOUND).build();
+      }
+
+    }
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.fsadaptor/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/LICENSE b/platform/content.fsadaptor/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.fsadaptor/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.fsadaptor/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/pom.xml b/platform/content.fsadaptor/pom.xml
new file mode 100644
index 0000000..1097fb9
--- /dev/null
+++ b/platform/content.fsadaptor/pom.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.fsadaptor</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content Filesystem Adaptor</name>
+    <description>
+        Makes directories appear as a graph describing the files and theits
+        contents with the discobits ontology.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <sourceDirectory>src/main/scala</sourceDirectory>
+        <testSourceDirectory>src/test/scala</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!-- <scalaVersion>${scala.version}</scalaVersion> -->
+                    <!-- <args>
+                        <arg>-target:jvm-1.5</arg>
+                    </args> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+                        <Export-Package>org.apache.clerezza.platform.content.fsadaptor</Export-Package>
+                        <!-- <Bundle-SymbolicName>org.apache.clerezza.platform.users.core</Bundle-SymbolicName> -->
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
new file mode 100644
index 0000000..75b5938
--- /dev/null
+++ b/platform/content.fsadaptor/src/main/resources/OSGI-INF/serviceComponents.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
+    <scr:component enabled="true" immediate="true" name="org.apache.clerezza.platform.content.fsadaptor.BundleFsLoader">
+        <implementation class="org.apache.clerezza.platform.content.fsadaptor.BundleFsLoader"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"/>
+        </service>
+        <reference name="tcManager" interface="org.apache.clerezza.rdf.core.access.TcManager"
+        cardinality="1..1" policy="static" bind="bindTcManager" unbind="unbindTcManager"/>
+        <reference name="cgProvider" interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider"
+        cardinality="1..1" policy="static" bind="bindContentGraphProvider" unbind="unbindContentGraphProvider"/>
+        <reference name="startLevel" interface="org.osgi.service.startlevel.StartLevel"
+        cardinality="1..1" policy="static" bind="bindStartLevel" unbind="unbindStartLevel"/>
+        <reference name="pathNode" interface="org.wymiwyg.commons.util.dirbrowser.PathNode"
+        cardinality="0..n" policy="dynamic" bind="bindPathNode" unbind="unbindPathNode"/>
+    </scr:component>
+</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..645dab1
--- /dev/null
+++ b/platform/content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/BundleFsLoader.scala
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+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.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.utils.osgi.BundlePathNode
+import org.osgi.framework.Bundle
+import org.osgi.framework.BundleEvent
+import org.osgi.framework.BundleListener
+import org.osgi.service.component.ComponentContext
+import org.osgi.service.startlevel.StartLevel
+import org.slf4j.LoggerFactory
+import org.wymiwyg.commons.util.dirbrowser.MultiPathNode
+import org.wymiwyg.commons.util.dirbrowser.PathNode
+import scala.util._
+
+/**
+ * This weighted TcProvider provides a graph named urn:x-localinstance/web-resources.graph which contains descriptions
+ * of the files below the CLEREZZA-INF/web-resources directory in every bundles. The
+ * name of these descriptions (i.e. the rdf resources) use the urn:x-localinstance uri scheme to indicate that
+ * they are local to the instance and they will thus be returned as description
+ * for all uris with a local authority and the specified path-section.
+ */
+class BundleFsLoader extends BundleListener with Logger with WeightedTcProvider {
+
+  private val RESOURCE_MGRAPH_URI = new UriRef(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 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 frequentUpdateDirectory: Option[PathNode] = None
+
+  private val virtualMGraph: MGraph = new AbstractMGraph() {
+    
+    private def baseGraph: TripleCollection = frequentUpdateDirectory match {
+        case Some(p) => new DirectoryOverlay(p, currentCacheMGraph)
+        case None => currentCacheMGraph
+    }
+    
+    override def performFilter(s: NonLiteral, p: UriRef,
+                      o: Resource): java.util.Iterator[Triple] = {
+      val baseIter = baseGraph.filter(s,p,o)
+      new java.util.Iterator[Triple]() {
+        override def next = {
+          baseIter.next
+        }
+        override def hasNext = baseIter.hasNext
+        override def remove = throw new UnsupportedOperationException
+      }
+    }
+
+    override def size = baseGraph.size
+    
+    override def toString = "BundleFsLoader virtual graph"
+    
+  }
+
+  class UpdateThread extends Thread {
+
+    private var updateRequested = false;
+
+    start()
+
+    override def run() {
+      try {
+        while (!isInterrupted) {
+          synchronized {
+            while (!updateRequested) wait();
+          }
+          updateRequested = false
+          updateCache()
+        }
+      } catch {
+        case e: InterruptedException => BundleFsLoader.log.debug("Update thread interrupted");
+      }
+    }
+
+    def update() = {
+      synchronized {
+        updateRequested = true
+        notify();
+      }
+    }
+  }
+  
+  private var updateThread: UpdateThread = null
+
+
+  private def deleteCacheGraphs() {
+    import collection.JavaConversions._
+    for(mGraphUri <- tcManager.listMGraphs) {
+      if(mGraphUri.getUnicodeString.startsWith(cacheGraphPrefix)) {
+        tcManager.deleteTripleCollection(mGraphUri);
+      }
+    }
+  }
+
+  protected def activate(context: ComponentContext) {
+    synchronized {
+      deleteCacheGraphs()
+      for (bundle <- context.getBundleContext().getBundles();
+          if bundle.getState == Bundle.ACTIVE) {
+        bundleList ::= bundle
+      }
+      updateCache
+      tcManager.getTcAccessController.setRequiredReadPermissions(
+          RESOURCE_MGRAPH_URI, Collections.singleton(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ)))
+      cgProvider.addTemporaryAdditionGraph(RESOURCE_MGRAPH_URI)
+      updateThread = new UpdateThread()
+      context.getBundleContext().addBundleListener(this);
+    }
+  }
+  protected def deactivate(context: ComponentContext) {
+    synchronized {
+      context.getBundleContext().removeBundleListener(this);
+      updateThread.interrupt()
+      cgProvider.removeTemporaryAdditionGraph(RESOURCE_MGRAPH_URI)
+      tcManager.deleteTripleCollection(currentCacheUri);
+      updateThread == null;
+    }
+  }
+
+  private def updateCache() = {
+    def getVirtualTripleCollection(bundles: Seq[Bundle]): TripleCollection = {
+      if (bundles.isEmpty) {
+        new SimpleMGraph()
+      } 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))
+        } else {
+          getVirtualTripleCollection(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);
+      tcManager.getTcAccessController.setRequiredReadPermissions(
+          newCacheUri, Collections.singleton(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ)))
+      newChacheMGraph.addAll(getVirtualTripleCollection(sortedList))
+      currentCacheMGraph = newChacheMGraph
+      val oldCacheUri = currentCacheUri
+      currentCacheUri = newCacheUri
+      if (oldCacheUri != null) tcManager.deleteTripleCollection(oldCacheUri);
+      BundleFsLoader.log.debug("updated web-resource cache")
+    }
+  }
+
+  
+
+  override def getWeight() = 30
+
+  override def getMGraph(name: UriRef) = {
+    if (name.equals(RESOURCE_MGRAPH_URI)) {
+      virtualMGraph
+    } else {
+      throw new NoSuchEntityException(name);
+    }
+  }
+
+  override def getTriples(name: UriRef) = {
+    getMGraph(name);
+  }
+
+  override def getGraph(name: UriRef) = {
+    throw new NoSuchEntityException(name);
+  }
+
+
+  override def listMGraphs(): java.util.Set[UriRef] = {
+    java.util.Collections.singleton(RESOURCE_MGRAPH_URI);
+  }
+
+  override def listGraphs() = {
+    new java.util.HashSet[UriRef]();
+  }
+
+  override def listTripleCollections() = {
+    Collections.singleton(RESOURCE_MGRAPH_URI);
+  }
+
+  override def createMGraph(name: UriRef) =  {
+    throw new UnsupportedOperationException("Not supported.");
+  }
+
+  override def createGraph(name: UriRef, triples: TripleCollection): Graph = {
+    throw new UnsupportedOperationException("Not supported.");
+  }
+
+  override def deleteTripleCollection(name: UriRef) {
+    throw new UnsupportedOperationException("Not supported.");
+  }
+
+  override def getNames(graph: Graph) = {
+    val result = new java.util.HashSet[UriRef]();
+    result;
+  }
+
+
+  def bundleChanged(event: BundleEvent) {
+    val updateThread = this.updateThread
+    if (updateThread == null) {
+      BundleFsLoader.log.error("UpdateThread is null, yet we get bundle Events")
+    }
+    val bundle = event.getBundle();
+    event.getType() match  {
+      case BundleEvent.STARTED => {
+        bundleList ::= bundle
+        updateThread.update()
+      }
+      case BundleEvent.STOPPED => {
+        bundleList = bundleList.filterNot(b => b == bundle)
+        updateThread.update()
+      }
+      case _ => BundleFsLoader.log.debug("only reacting on bundle start and stop")
+    }
+  }
+
+
+  def bindTcManager(tcManager: TcManager) {
+    this.tcManager = tcManager;
+  }
+
+  def unbindTcManager(tcManager: TcManager) {
+    this.tcManager = null;
+  }
+
+  def bindContentGraphProvider(p: ContentGraphProvider) {
+    cgProvider = p
+  }
+
+  def unbindContentGraphProvider(p: ContentGraphProvider) {
+    cgProvider = null
+  }
+
+  def bindStartLevel(startLevel: StartLevel) {
+    this.startLevel = startLevel;
+  }
+
+  def unbindStartLevel(startLevel: StartLevel) {
+    this.startLevel = null;
+  }
+  
+  def bindPathNode(pathNode: PathNode) {
+    this.pathNodes ::= pathNode;
+    frequentUpdateDirectory = Some(new MultiPathNode(pathNodes: _*))
+  }
+  
+  def unbindPathNode(pathNode: PathNode) {
+    this.pathNodes = this.pathNodes.filter(_ != pathNode);
+    frequentUpdateDirectory = pathNodes match {
+      case Nil => None
+      case _ => Some(new MultiPathNode(pathNodes: _*))
+    }
+  }
+  
+}
+object BundleFsLoader {
+  private val log = LoggerFactory.getLogger(classOf[BundleFsLoader])
+}
\ No newline at end of file


[78/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
index 4dcee16..d60d9af 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
@@ -29,7 +29,7 @@ import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
@@ -79,9 +79,8 @@ public class TypeRenderingExceptionMapper implements ExceptionMapper<TypeRenderi
      */
     protected void activate(ComponentContext componentContext) throws Exception {
         URL template = getClass().getResource("exception-template.ssp");
-        renderletManager.registerRenderlet(
-                "org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet",
-                new Iri(template.toURI().toString()),
+        renderletManager.registerRenderlet("org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet",
+                new IRI(template.toURI().toString()),
                 TYPERENDERING.Exception, ".*",
                 MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
index ecbaae5..851d725 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
@@ -25,7 +25,7 @@ import java.security.PrivilegedAction;
 import java.util.Map;
 import javax.ws.rs.core.*;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -126,7 +126,7 @@ public interface TypeRenderlet {
     /**
      * @return the rdf type rendered by this renderlet
      */
-    Iri getRdfType();
+    IRI getRdfType();
 
     /**
      * The renderer may render resources in different modes. Such a mode is

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
index 6cc9691..41bb488 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -57,15 +57,15 @@ public interface UserManager {
     /**
      *
      * @param title
-     * @return BlankNodeOrIri which is either a BlankNode or a Iri
+     * @return BlankNodeOrIRI which is either a BlankNode or a Iri
      */
-    public BlankNodeOrIri getRoleByTitle(String title);
+    public BlankNodeOrIRI getRoleByTitle(String title);
 
     /**
      *
      * @return Iterator defining all roles, except base roles
      */
-    public Iterator<BlankNodeOrIri> getRoles();
+    public Iterator<BlankNodeOrIRI> getRoles();
 
     /**
      *
@@ -74,7 +74,7 @@ public interface UserManager {
      *
      * @return Iterator defining all the Roles the specified user owns
      */
-    public Iterator<BlankNodeOrIri> getRolesOfUser(BlankNodeOrIri user);
+    public Iterator<BlankNodeOrIRI> getRolesOfUser(BlankNodeOrIRI user);
 
     /**
      *
@@ -99,7 +99,7 @@ public interface UserManager {
      *
      * @return Iterator defining all permissions of a role
      */
-    public Iterator<BlankNodeOrIri> getPermissionsOfRole(BlankNodeOrIri role);
+    public Iterator<BlankNodeOrIRI> getPermissionsOfRole(BlankNodeOrIRI role);
 
     /**
      *  Deletes the defined permissions of the role
@@ -171,10 +171,10 @@ public interface UserManager {
     /**
      *
      * @param name specifies the username of the user
-     * @return BlankNodeOrIri representing the user in the system ImmutableGraph
+     * @return BlankNodeOrIRI representing the user in the system ImmutableGraph
      */
     @Deprecated
-    public BlankNodeOrIri getUserByName(String name);
+    public BlankNodeOrIRI getUserByName(String name);
 
     /**
      * Returns the user with the specified name in an (editable) Graph
@@ -216,7 +216,7 @@ public interface UserManager {
      *
      * @return Iterator of users in the system ImmutableGraph.
      */
-    public Iterator<BlankNodeOrIri> getUsers();
+    public Iterator<BlankNodeOrIRI> getUsers();
 
     /**
      *
@@ -237,7 +237,7 @@ public interface UserManager {
      *            the user is either a BlankNode or a Iri
      * @return  Iterator defining all permissions of the specified user
      */
-    public Iterator<BlankNodeOrIri> getPermissionsOfUser(BlankNodeOrIri user);
+    public Iterator<BlankNodeOrIRI> getPermissionsOfUser(BlankNodeOrIRI user);
 
     /**
      *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
index 847de60..ce712f3 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
@@ -40,10 +40,10 @@ import org.slf4j.LoggerFactory;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
 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.rdf.core.access.SecuredGraph;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
@@ -103,14 +103,14 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public BlankNodeOrIri getRoleByTitle(String title) {
+    public BlankNodeOrIRI getRoleByTitle(String title) {
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             Iterator<Triple> triples = systemGraph.filter(null, DC.title,
                     new PlainLiteralImpl(title));
-            BlankNodeOrIri role = null;
+            BlankNodeOrIRI role = null;
             while (triples.hasNext()) {
                 role = triples.next().getSubject();
                 if (systemGraph.filter(role, RDF.type, PERMISSION.Role).hasNext()) {
@@ -129,18 +129,18 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<BlankNodeOrIri> getRoles() {
+    public Iterator<BlankNodeOrIRI> getRoles() {
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
-            final Iterator<BlankNodeOrIri> allRolesIter = getResourcesOfType(PERMISSION.Role);
-            final Set<BlankNodeOrIri> allRolesSet = new HashSet<BlankNodeOrIri>();
+            final Iterator<BlankNodeOrIRI> allRolesIter = getResourcesOfType(PERMISSION.Role);
+            final Set<BlankNodeOrIRI> allRolesSet = new HashSet<BlankNodeOrIRI>();
             while (allRolesIter.hasNext()) {
                 allRolesSet.add(allRolesIter.next());
             }
-            final Set<BlankNodeOrIri> nonBaseRolesSet = new HashSet<BlankNodeOrIri>();
-            for (BlankNodeOrIri role : allRolesSet) {
+            final Set<BlankNodeOrIRI> nonBaseRolesSet = new HashSet<BlankNodeOrIRI>();
+            for (BlankNodeOrIRI role : allRolesSet) {
                 if (!systemGraph.filter(role, RDF.type, PERMISSION.BaseRole).hasNext()) {
                     nonBaseRolesSet.add(role);
                 }
@@ -152,15 +152,15 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<BlankNodeOrIri> getRolesOfUser(BlankNodeOrIri user){
+    public Iterator<BlankNodeOrIRI> getRolesOfUser(BlankNodeOrIRI user){
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(user,SIOC.has_function, null);
-            Set<BlankNodeOrIri> userRoles = new HashSet<BlankNodeOrIri>();
+            Set<BlankNodeOrIRI> userRoles = new HashSet<BlankNodeOrIRI>();
             while (triples.hasNext()) {
-                userRoles.add((BlankNodeOrIri) triples.next().getObject());
+                userRoles.add((BlankNodeOrIRI) triples.next().getObject());
             }
             return userRoles.iterator();
         } finally {
@@ -174,7 +174,7 @@ public class UserManagerImpl implements UserManager {
             return;
         }
 
-        BlankNodeOrIri role = getRoleByTitle(title);
+        BlankNodeOrIRI role = getRoleByTitle(title);
         if (role == null) {
             return;
         }
@@ -184,7 +184,7 @@ public class UserManagerImpl implements UserManager {
         deleteTriplesOfASubject(role);
     }
 
-    private boolean isBaseRole(BlankNodeOrIri role) {
+    private boolean isBaseRole(BlankNodeOrIRI role) {
         Graph systemGraph = getSystemGraph();
         GraphNode roleNode = new GraphNode(role, systemGraph);
         Lock readLock = roleNode.readLock();
@@ -197,7 +197,7 @@ public class UserManagerImpl implements UserManager {
         
     }
 
-    private void deleteTriplesOfASubject(BlankNodeOrIri subject) {
+    private void deleteTriplesOfASubject(BlankNodeOrIRI subject) {
         Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
@@ -225,7 +225,7 @@ public class UserManagerImpl implements UserManager {
                 permissionEntries);
     }
 
-    private void addPermissionEntriesForARole(BlankNodeOrIri role,
+    private void addPermissionEntriesForARole(BlankNodeOrIRI role,
             String id, List<String> permissionEntries) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
@@ -261,7 +261,7 @@ public class UserManagerImpl implements UserManager {
      * @param permissionString the specified java permission entry
      * @return permission node
      */
-    private BlankNodeOrIri getPermissionOfAJavaPermEntry(
+    private BlankNodeOrIRI getPermissionOfAJavaPermEntry(
             String permissionString) {
         Graph systemGraph = getSystemGraph();
         Literal javaPermEntry = new PlainLiteralImpl(permissionString);
@@ -290,16 +290,16 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<BlankNodeOrIri> getPermissionsOfRole(BlankNodeOrIri role) {
+    public Iterator<BlankNodeOrIRI> getPermissionsOfRole(BlankNodeOrIRI role) {
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(role,
                     PERMISSION.hasPermission, null);
-            Set<BlankNodeOrIri> permissions = new HashSet<BlankNodeOrIri>();
+            Set<BlankNodeOrIRI> permissions = new HashSet<BlankNodeOrIRI>();
             while (triples.hasNext()) {
-                permissions.add((BlankNodeOrIri) triples.next().getObject());
+                permissions.add((BlankNodeOrIRI) triples.next().getObject());
             }
             return permissions.iterator();
         } finally {
@@ -320,7 +320,7 @@ public class UserManagerImpl implements UserManager {
                 permissionEntries);
     }
 
-    private void deletePermissionEntriesOfARole(BlankNodeOrIri role,
+    private void deletePermissionEntriesOfARole(BlankNodeOrIRI role,
             String id, List<String> permissionEntries) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
@@ -335,7 +335,7 @@ public class UserManagerImpl implements UserManager {
         writeLock.lock();
         try {
             for (String permissionEntry : permissionEntries) {
-                BlankNodeOrIri permission = getPermissionOfAJavaPermEntry(permissionEntry);
+                BlankNodeOrIRI permission = getPermissionOfAJavaPermEntry(permissionEntry);
                 systemGraph.remove(new TripleImpl(role, PERMISSION.hasPermission,
                         permission));
             }
@@ -356,7 +356,7 @@ public class UserManagerImpl implements UserManager {
                 getRoleByTitle(title));
     }
 
-    private void deleteAllPermissionEntriesOfARole(BlankNodeOrIri role) {
+    private void deleteAllPermissionEntriesOfARole(BlankNodeOrIRI role) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
             return;
@@ -401,7 +401,7 @@ public class UserManagerImpl implements UserManager {
                     new PlainLiteralImpl(name)));
             if (email != null) {
                 systemGraph.add(new TripleImpl(user, FOAF.mbox,
-                        new Iri("mailto:" + email)));
+                        new IRI("mailto:" + email)));
             }
             if (password != null) {
                 try {
@@ -446,11 +446,11 @@ public class UserManagerImpl implements UserManager {
         readLock.lock();
         try {
             Iterator<Triple> triples = systemGraph.filter(null, FOAF.mbox,
-                    new Iri("mailto:" + email));
+                    new IRI("mailto:" + email));
             if (!triples.hasNext()) {
                 return null;
             }
-            BlankNodeOrIri user = triples.next().getSubject();
+            BlankNodeOrIRI user = triples.next().getSubject();
             triples = systemGraph.filter(user, PLATFORM.userName, null);
             if (!triples.hasNext()) {
                 throw new UserHasNoNameException("User with email address" + email
@@ -470,7 +470,7 @@ public class UserManagerImpl implements UserManager {
         if (name == null) {
             throw new IllegalArgumentException("userName may not be null");
         }
-        BlankNodeOrIri user = getUserByUserName(name);
+        BlankNodeOrIRI user = getUserByUserName(name);
         if (user == null) {
             throw new UserNotExistsException(name);
         }
@@ -480,7 +480,7 @@ public class UserManagerImpl implements UserManager {
         writeLock.lock();
         try {
             if (email != null) {
-                updateProperty(userGraphNode, FOAF.mbox, new Iri("mailto:" + email));
+                updateProperty(userGraphNode, FOAF.mbox, new IRI("mailto:" + email));
             }
 
             if (password != null) {
@@ -499,7 +499,7 @@ public class UserManagerImpl implements UserManager {
             }
             if (!assignedRoles.isEmpty()) {
                 userGraphNode.deleteProperties(SIOC.has_function);
-                addRolesToUser(assignedRoles, (BlankNodeOrIri) userGraphNode.getNode());
+                addRolesToUser(assignedRoles, (BlankNodeOrIRI) userGraphNode.getNode());
                 //refresh the policy so it will recheck the permissions
                 Policy.getPolicy().refresh();
             }
@@ -508,14 +508,14 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private void addRolesToUser(Collection<String> assignedRoles, BlankNodeOrIri user) throws RoleUnavailableException {
+    private void addRolesToUser(Collection<String> assignedRoles, BlankNodeOrIRI user) throws RoleUnavailableException {
         Graph systemGraph = getSystemGraph();
         for (String roleTitle : assignedRoles) {
             // skip empty strings
             if ((roleTitle == null) || (roleTitle.trim().length() == 0)) {
                 continue;
             }
-            BlankNodeOrIri role = getRoleByTitle(roleTitle);
+            BlankNodeOrIRI role = getRoleByTitle(roleTitle);
             if (role == null) {
                 throw new RoleUnavailableException(roleTitle);
             }
@@ -523,7 +523,7 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private void updateProperty(GraphNode node, Iri predicate, RdfTerm object) {
+    private void updateProperty(GraphNode node, IRI predicate, RDFTerm object) {
         node.deleteProperties(predicate);
         node.addProperty(predicate, object);
     }
@@ -548,29 +548,29 @@ public class UserManagerImpl implements UserManager {
         readLock.lock();
         try {
             return systemGraph.filter(null, FOAF.mbox,
-                    new Iri("mailto:" + email)).hasNext();
+                    new IRI("mailto:" + email)).hasNext();
         } finally {
             readLock.unlock();
         }
     }
 
     @Override
-    public BlankNodeOrIri getUserByName( String name) {
+    public BlankNodeOrIRI getUserByName( String name) {
         return getUserByUserName(name);
     }
 
     @Override
-    public Iterator<BlankNodeOrIri> getUsers() {
+    public Iterator<BlankNodeOrIRI> getUsers() {
         return getResourcesOfType(FOAF.Agent);
     }
 
-    private Iterator<BlankNodeOrIri> getResourcesOfType(Iri type) {
+    private Iterator<BlankNodeOrIRI> getResourcesOfType(IRI type) {
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(null, RDF.type, type);
-            Set<BlankNodeOrIri> userRoles = new HashSet<BlankNodeOrIri>();
+            Set<BlankNodeOrIRI> userRoles = new HashSet<BlankNodeOrIRI>();
             while (triples.hasNext()) {
                 userRoles.add(triples.next().getSubject());
             }
@@ -586,7 +586,7 @@ public class UserManagerImpl implements UserManager {
             return;
         }
 
-        BlankNodeOrIri user = getUserByUserName(name);
+        BlankNodeOrIRI user = getUserByUserName(name);
         if (user != null) {
             deleteTriplesOfASubject(user);
         }
@@ -606,7 +606,7 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<BlankNodeOrIri> getPermissionsOfUser(BlankNodeOrIri user) {
+    public Iterator<BlankNodeOrIRI> getPermissionsOfUser(BlankNodeOrIRI user) {
         return getPermissionsOfRole(user);
     }
 
@@ -653,7 +653,7 @@ public class UserManagerImpl implements UserManager {
     @Override
     public GraphNode getUserInSystemGraph(final String name) {
         Graph systemGraph = getSystemGraph();
-        BlankNodeOrIri user = getUserByUserName(name);
+        BlankNodeOrIRI user = getUserByUserName(name);
         if (user != null) {
             return new GraphNode(user, systemGraph);
         } else {
@@ -676,11 +676,10 @@ public class UserManagerImpl implements UserManager {
                 readLock.unlock();
             }            
         } else {
-            BlankNodeOrIri user = AccessController.doPrivileged(
-                    new PrivilegedAction<BlankNodeOrIri>() {
+            BlankNodeOrIRI user = AccessController.doPrivileged(new PrivilegedAction<BlankNodeOrIRI>() {
 
                         @Override
-                        public BlankNodeOrIri run() {
+                        public BlankNodeOrIRI run() {
                             return getUserByUserName(name);
                         }
                     });
@@ -703,7 +702,7 @@ public class UserManagerImpl implements UserManager {
     @Override
     public GraphNode getUserGraphNode(final String name) {
         Graph systemGraph = getSystemGraph();
-        BlankNodeOrIri user = getUserByUserName(name);
+        BlankNodeOrIRI user = getUserByUserName(name);
         if (user != null) {
             GraphNode userNodeInSystemGraph =
                     new GraphNode(getUserByUserName(name), systemGraph);
@@ -715,7 +714,7 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private BlankNodeOrIri getUserByUserName(String name) {
+    private BlankNodeOrIRI getUserByUserName(String name) {
         Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
index f4966b2..f110041 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
@@ -26,10 +26,10 @@ import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 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.TripleImpl;
 import org.junit.Test;
 import org.apache.clerezza.commons.rdf.Language;
@@ -47,16 +47,16 @@ import org.junit.Assert;
  */
 public abstract class GraphTest {
 
-    private final Iri uriRef1 =
-            new Iri("http://example.org/ontology#res1");
-    private final Iri uriRef2 =
-            new Iri("http://example.org/ontology#res2");
-    private final Iri uriRef3 =
-            new Iri("http://example.org/ontology#res3");
-    private final Iri uriRef4 =
-            new Iri("http://example.org/ontology#res4");
-    private final Iri xmlLiteralType =
-            new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
+    private final IRI uriRef1 =
+            new IRI("http://example.org/ontology#res1");
+    private final IRI uriRef2 =
+            new IRI("http://example.org/ontology#res2");
+    private final IRI uriRef3 =
+            new IRI("http://example.org/ontology#res3");
+    private final IRI uriRef4 =
+            new IRI("http://example.org/ontology#res4");
+    private final IRI xmlLiteralType =
+            new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
     private Literal literal1 = new PlainLiteralImpl("literal1");
     private Literal literal2 = new PlainLiteralImpl("literal2");
     private BlankNode bnode1 = new BlankNode();
@@ -91,8 +91,8 @@ public abstract class GraphTest {
         graph.add(new TripleImpl(bnode, uriRef1, uriRef3));
         graph.add(new TripleImpl(bnode, uriRef1, uriRef4));
         tripleIter = graph.filter(null, uriRef1, null);
-        Set<BlankNodeOrIri> subjectInMatchingTriples = new HashSet<BlankNodeOrIri>();
-        Set<RdfTerm> objectsInMatchingTriples = new HashSet<RdfTerm>();
+        Set<BlankNodeOrIRI> subjectInMatchingTriples = new HashSet<BlankNodeOrIRI>();
+        Set<RDFTerm> objectsInMatchingTriples = new HashSet<RDFTerm>();
         while (tripleIter.hasNext()) {
             Triple triple = tripleIter.next();
             subjectInMatchingTriples.add(triple.getSubject());
@@ -100,7 +100,7 @@ public abstract class GraphTest {
         }
         Assert.assertEquals(1, subjectInMatchingTriples.size());
         Assert.assertEquals(2, objectsInMatchingTriples.size());
-        Set<RdfTerm> expectedObjects = new HashSet<RdfTerm>();
+        Set<RDFTerm> expectedObjects = new HashSet<RDFTerm>();
         expectedObjects.add(uriRef3);
         expectedObjects.add(uriRef4);
         Assert.assertEquals(expectedObjects, objectsInMatchingTriples);
@@ -137,7 +137,7 @@ public abstract class GraphTest {
         graph.add(triple1);
         Iterator<Triple> tripleIter = graph.filter(uriRef1, uriRef2, null);
         Assert.assertTrue(tripleIter.hasNext());
-        RdfTerm gotValue = tripleIter.next().getObject();
+        RDFTerm gotValue = tripleIter.next().getObject();
         Assert.assertEquals(value, gotValue);
     }
 
@@ -151,7 +151,7 @@ public abstract class GraphTest {
         graph.add(triple1);
         Iterator<Triple> tripleIter = graph.filter(uriRef1, uriRef2, null);
         Assert.assertTrue(tripleIter.hasNext());
-        RdfTerm gotValue = tripleIter.next().getObject();
+        RDFTerm gotValue = tripleIter.next().getObject();
         Assert.assertEquals(value, gotValue);
         Assert.assertEquals(language, ((Literal)gotValue).getLanguage());
     }
@@ -242,7 +242,7 @@ public abstract class GraphTest {
     public void testGetSameBlankNode() throws Exception {
         Graph graph = getEmptyGraph();
         BlankNode bNode = new BlankNode();
-        final Iri HAS_NAME = new Iri("http://example.org/ontology/hasName");
+        final IRI HAS_NAME = new IRI("http://example.org/ontology/hasName");
         final PlainLiteralImpl name = new PlainLiteralImpl("http://example.org/people/alice");
         final PlainLiteralImpl name2 = new PlainLiteralImpl("http://example.org/people/bob");
         final Triple tripleAlice = new TripleImpl(bNode, HAS_NAME, name);
@@ -335,14 +335,14 @@ public abstract class GraphTest {
 
         // Find bob
         iterator = graph.filter(null, null,
-                new Iri("http://example.org/people/bob"));
+                new IRI("http://example.org/people/bob"));
         resultSet= toCollection(iterator);
         Assert.assertEquals(1, resultSet.size());
         Assert.assertTrue(resultSet.contains(tripleBob));
 
         // Find alice
         iterator = graph.filter(null, null,
-                new Iri("http://example.org/people/alice"));
+                new IRI("http://example.org/people/alice"));
         resultSet= toCollection(iterator);
         Assert.assertEquals(1, resultSet.size());
         Assert.assertTrue(resultSet.contains(tripleAlice));
@@ -566,8 +566,8 @@ public abstract class GraphTest {
      */
     private Triple createTriple(String subject, String predicate,
             String object) {
-        return new TripleImpl(new Iri(subject), new Iri(predicate),
-                new Iri(object));
+        return new TripleImpl(new IRI(subject), new IRI(predicate),
+                new IRI(object));
     }
     
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
index e977eba..5b84df0 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
@@ -22,12 +22,12 @@ package org.apache.clerezza.rdf.core.test;
 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.BlankNodeOrIRI;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
-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.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 
 /**
@@ -43,7 +43,7 @@ class GraphWrapper implements Graph {
     }
 
     @Override
-    public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         return wrapped.filter(subject, predicate, object);
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
index 3d49c2b..980f6d2 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
@@ -22,10 +22,10 @@ import java.util.Iterator;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 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;
 
 /**
  * Wrappes an Graph as a LockableGraph. If a method is called that reads
@@ -51,7 +51,7 @@ public class LockableMGraphWrapperForTesting extends GraphWrapper {
     }
 
     @Override
-    public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         LockChecker.checkIfReadLocked(lock);
         readLock.lock();
         try {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
index a71e298..7e6741b 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
@@ -22,10 +22,10 @@ import java.util.Iterator;
 import java.util.UUID;
 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.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.commons.lang.RandomStringUtils;
@@ -113,52 +113,52 @@ public class RandomGraph extends GraphWrapper {
         return new TripleImpl(getSubject(), getPredicate(), getObject());
     }
 
-    private BlankNodeOrIri getSubject() {
+    private BlankNodeOrIRI getSubject() {
         int random = rollDice(interconnectivity);
         if (size() == 0) {
             random = 0;
         }
         switch (random) {
-            case 0: // create new BlankNodeOrIri
-                RdfTerm newRdfTerm;
+            case 0: // create new BlankNodeOrIRI
+                RDFTerm newRdfTerm;
                 do {
                     newRdfTerm = createRandomRdfTerm();
-                } while (!(newRdfTerm instanceof BlankNodeOrIri));
-                return (BlankNodeOrIri) newRdfTerm;
-            default: // get existing BlankNodeOrIri
-                RdfTerm existingRdfTerm;
+                } while (!(newRdfTerm instanceof BlankNodeOrIRI));
+                return (BlankNodeOrIRI) newRdfTerm;
+            default: // get existing BlankNodeOrIRI
+                RDFTerm existingRdfTerm;
                 do {
                     existingRdfTerm = getExistingRdfTerm();
                     if (existingRdfTerm == null) {
                         random = 0;
                     }
-                } while (!(existingRdfTerm instanceof BlankNodeOrIri));
+                } while (!(existingRdfTerm instanceof BlankNodeOrIRI));
 
-                return (BlankNodeOrIri) existingRdfTerm;
+                return (BlankNodeOrIRI) existingRdfTerm;
         }
     }
 
-    private Iri getPredicate() {
+    private IRI getPredicate() {
         int random = rollDice(interconnectivity);
         if (size() == 0) {
             random = 0;
         }
         switch (random) {
-            case 0: // create new Iri
+            case 0: // create new IRI
                 return createRandomIri();
-            default: // get existing Iri
-                RdfTerm existingRdfTerm;
+            default: // get existing IRI
+                RDFTerm existingRdfTerm;
                 do {
                     existingRdfTerm = getExistingRdfTerm();
                     if (existingRdfTerm == null) {
                         random = 0;
                     }
-                } while (!(existingRdfTerm instanceof Iri));
-                return (Iri) existingRdfTerm;
+                } while (!(existingRdfTerm instanceof IRI));
+                return (IRI) existingRdfTerm;
         }
     }
 
-    private RdfTerm getObject() {
+    private RDFTerm getObject() {
         int random = rollDice(interconnectivity);
         if (size() == 0) {
             random = 0;
@@ -167,7 +167,7 @@ public class RandomGraph extends GraphWrapper {
             case 0: // create new resource
                 return createRandomRdfTerm();
             default: // get existing resource
-                RdfTerm existingRdfTerm = getExistingRdfTerm();
+                RDFTerm existingRdfTerm = getExistingRdfTerm();
                 if (existingRdfTerm == null) {
                     random = 0;
                 }
@@ -179,7 +179,7 @@ public class RandomGraph extends GraphWrapper {
         return Double.valueOf(Math.random() * faces).intValue();
     }
 
-    private RdfTerm createRandomRdfTerm() {
+    private RDFTerm createRandomRdfTerm() {
         switch (rollDice(3)) {
             case 0:
                 return new BlankNode();
@@ -191,7 +191,7 @@ public class RandomGraph extends GraphWrapper {
         throw new RuntimeException("in createRandomRdfTerm()");
     }
 
-    private RdfTerm getExistingRdfTerm() {
+    private RDFTerm getExistingRdfTerm() {
         Triple triple = getRandomTriple();
         if (triple == null) {
             return null;
@@ -207,8 +207,8 @@ public class RandomGraph extends GraphWrapper {
         return null;
     }
 
-    private Iri createRandomIri() {
-        return new Iri("http://" + UUID.randomUUID().toString());
+    private IRI createRandomIri() {
+        return new IRI("http://" + UUID.randomUUID().toString());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
index bafd251..856bdcc 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
@@ -26,9 +26,9 @@ import org.junit.Test;
 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.BlankNodeOrIRI;
 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.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 
@@ -43,14 +43,14 @@ import static org.junit.Assert.*;
  */
 public abstract class TcProviderTest {
 
-    protected final Iri uriRefA = generateUri("a");
-    protected final Iri uriRefA1 = generateUri("a1");
-    protected final Iri uriRefB = generateUri("b");
-    protected final Iri uriRefB1 = generateUri("b1");
-    protected final Iri uriRefC = generateUri("c");
+    protected final IRI uriRefA = generateUri("a");
+    protected final IRI uriRefA1 = generateUri("a1");
+    protected final IRI uriRefB = generateUri("b");
+    protected final IRI uriRefB1 = generateUri("b1");
+    protected final IRI uriRefC = generateUri("c");
 
-    protected final Iri graphIri = generateUri("myGraph");
-    protected final Iri otherGraphIri = new Iri(graphIri.getUnicodeString());
+    protected final IRI graphIri = generateUri("myGraph");
+    protected final IRI otherGraphIri = new IRI(graphIri.getUnicodeString());
 
     @Test
     public void testCreateImmutableGraph() {
@@ -408,10 +408,10 @@ public abstract class TcProviderTest {
 //        Graph triples = createTestTripleCollection(createTestTriple());
 //
 //        TcProvider provider = getInstance();
-//        Iri name1 = new Iri("http://myGraph1");
+//        IRI name1 = new IRI("http://myGraph1");
 //        ImmutableGraph graph = provider.createGraph(name1, triples);
 //
-//        Iri name2 = new Iri("http://myGraph2");
+//        IRI name2 = new IRI("http://myGraph2");
 //        ImmutableGraph secondGraph = provider.createGraph(name2, triples);
 //
 //        Set<Iri> names = provider.getNames(graph);
@@ -425,10 +425,10 @@ public abstract class TcProviderTest {
         Graph triples = createTestTripleCollection(createTestTriple());
 
         TcProvider provider = getInstance();
-        Iri name1 = new Iri("http://myGraph1");
+        IRI name1 = new IRI("http://myGraph1");
         ImmutableGraph graph = provider.createImmutableGraph(name1, triples);
 
-        Iri name2 = new Iri("http://myGraph2");
+        IRI name2 = new IRI("http://myGraph2");
         ImmutableGraph secondGraph = provider.createImmutableGraph(name2, triples);
 
         //if we delete graph with name1, the second graph should still be there
@@ -465,9 +465,9 @@ public abstract class TcProviderTest {
     }
 
     private Triple createTestTriple() {
-        BlankNodeOrIri subject = new BlankNode() {};
-        Iri predicate = new Iri("http://test.com/");
-        BlankNodeOrIri object = new Iri("http://test.com/myObject");
+        BlankNodeOrIRI subject = new BlankNode() {};
+        IRI predicate = new IRI("http://test.com/");
+        BlankNodeOrIRI object = new IRI("http://test.com/myObject");
         return new TripleImpl(subject, predicate, object);
     }
 
@@ -477,8 +477,8 @@ public abstract class TcProviderTest {
         return new SimpleGraph(ts);
     }
 
-    protected Iri generateUri(String name) {
-        return new Iri("http://example.org/" + name);
+    protected IRI generateUri(String name) {
+        return new IRI("http://example.org/" + name);
     }
     
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
index 8238be6..923ea6b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * Thrown when a literal is of the wrong type for conversion to a java-type
@@ -34,7 +34,7 @@ public class InvalidLiteralTypeException extends RuntimeException {
      * @param javaType the <code>Class</code> to convert to
      * @param literalType the literalType which can't be converted
      */
-    public InvalidLiteralTypeException(Class<?> javaType, Iri literalType) {
+    public InvalidLiteralTypeException(Class<?> javaType, IRI literalType) {
         super("Cannot create a "+javaType+" from a literal of type "+literalType);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
index 190d398..3057789 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityAlreadyExistsException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * is thrown on an attempt to create an entity with a name which already exists
@@ -27,7 +27,7 @@ import org.apache.clerezza.commons.rdf.Iri;
  */
 public class EntityAlreadyExistsException extends RuntimeException {
 
-    private Iri entityName;
+    private IRI entityName;
 
     /**
      * creates an exception indicating that an entity with the specified name
@@ -35,7 +35,7 @@ public class EntityAlreadyExistsException extends RuntimeException {
      * 
      * @param entityName the name of the entity which already exists
      */
-    public EntityAlreadyExistsException(Iri entityName) {
+    public EntityAlreadyExistsException(IRI entityName) {
         super("An entity with this name already exists: "+entityName);
         this.entityName = entityName;
     }
@@ -44,7 +44,7 @@ public class EntityAlreadyExistsException extends RuntimeException {
      * 
      * @return the name of the entity which already exists
      */
-    public Iri getEntityName() {
+    public IRI getEntityName() {
         return entityName;
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
index 43a16c1..f11742b 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/EntityUndeletableException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * is thrown on an attempt to delete an entity with a provider that
@@ -27,7 +27,7 @@ import org.apache.clerezza.commons.rdf.Iri;
  * @author reto
  */
 public class EntityUndeletableException extends RuntimeException {
-    private Iri entityName;
+    private IRI entityName;
 
     /**
      * creates an exception indicating that the entity with the specified name
@@ -35,7 +35,7 @@ public class EntityUndeletableException extends RuntimeException {
      * 
      * @param entityName the name of the entity which is undeletable
      */
-    public EntityUndeletableException(Iri entityName) {
+    public EntityUndeletableException(IRI entityName) {
         super("This entity is undeletable: "+entityName);
         this.entityName = entityName;
     }
@@ -44,7 +44,7 @@ public class EntityUndeletableException extends RuntimeException {
      * 
      * @return the name of the entity which is undeletable
      */
-    public Iri getEntityName() {
+    public IRI getEntityName() {
         return entityName;
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
index aaa3e07..35ef2f9 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/ImmutableGraphServiceFactory.java
@@ -22,7 +22,7 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
 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.security.TcAccessController;
 
 /**
@@ -34,10 +34,10 @@ import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 public class ImmutableGraphServiceFactory implements ServiceFactory {
     
     private final TcManager tcManager;
-    private final Iri name;
+    private final IRI name;
     private final TcAccessController tcAccessController;
 
-    ImmutableGraphServiceFactory(TcManager tcManager, Iri name,
+    ImmutableGraphServiceFactory(TcManager tcManager, IRI name,
             TcAccessController tcAccessController) {
         this.tcManager = tcManager;
         this.name = name;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
index 3f189d9..5253201 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/MGraphServiceFactory.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.core.access;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 
 /**
@@ -33,10 +33,10 @@ import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 public class MGraphServiceFactory implements ServiceFactory {
     
     private TcManager tcManager;
-    private Iri name;
+    private IRI name;
     private final TcAccessController tcAccessController;
 
-    MGraphServiceFactory(TcManager tcManager, Iri name,
+    MGraphServiceFactory(TcManager tcManager, IRI name,
             TcAccessController tcAccessController) {
         this.tcManager = tcManager;
         this.name = name;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
index 551d9b8..a39c63f 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/NoSuchEntityException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * is thrown on an attempt to perform an operation on an entity (i.e. a
@@ -27,7 +27,7 @@ import org.apache.clerezza.commons.rdf.Iri;
  * @author reto
  */
 public class NoSuchEntityException extends RuntimeException {
-    private Iri entityName;
+    private IRI entityName;
 
     /**
      * creates an exception indicating that the entity with the specified name
@@ -35,7 +35,7 @@ public class NoSuchEntityException extends RuntimeException {
      * 
      * @param entityName the name for which no entity exists
      */
-    public NoSuchEntityException(Iri entityName) {
+    public NoSuchEntityException(IRI entityName) {
         super("No such entity: "+entityName);
         this.entityName = entityName;
     }
@@ -45,7 +45,7 @@ public class NoSuchEntityException extends RuntimeException {
      * 
      * @return the name of the entity that doesn't exist
      */
-    public Iri getEntityName() {
+    public IRI getEntityName() {
         return entityName;
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
index 4f804a1..0f38bee 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/QueryableTcProvider.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core.access;
 
 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.sparql.query.Query;
 
 /**
@@ -38,6 +38,6 @@ public interface QueryableTcProvider extends TcProvider {
      *            FROM clause is present
      * @return the resulting ResultSet, ImmutableGraph or Boolean value
      */
-    public Object executeSparqlQuery(String query, Iri defaultGraphUri);
+    public Object executeSparqlQuery(String query, IRI defaultGraphUri);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
index 51591b7..9cf5be7 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
@@ -22,11 +22,11 @@ import java.security.AccessControlException;
 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.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.security.TcAccessController;
 import org.apache.clerezza.rdf.core.impl.WriteBlockedGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
@@ -45,10 +45,10 @@ import org.apache.clerezza.commons.rdf.event.GraphListener;
 public class SecuredGraph implements Graph {
 
     private final Graph wrapped;
-    private final Iri name;
+    private final IRI name;
     private final TcAccessController tcAccessController;
 
-    public SecuredGraph(Graph wrapped, Iri name,
+    public SecuredGraph(Graph wrapped, IRI name,
             TcAccessController tcAccessController) {
         this.wrapped = wrapped;
         this.name = name;
@@ -56,7 +56,7 @@ public class SecuredGraph implements Graph {
     }
 
     @Override
-    public Iterator<Triple> filter(final BlankNodeOrIri subject, final Iri predicate, final RdfTerm object) {
+    public Iterator<Triple> filter(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object) {
         final Iterator<Triple> baseIter = wrapped.filter(subject, predicate, object);
         return new Iterator<Triple>() {
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
index 35bfdd2..f62b209 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcManager.java
@@ -33,7 +33,7 @@ import java.util.TreeSet;
 
 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.security.TcAccessController;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.impl.WriteBlockedGraph;
@@ -118,8 +118,8 @@ public class TcManager extends TcProviderMultiplexer {
         }
             
     };
-    private Map<Iri, ServiceRegistration> serviceRegistrations = Collections
-            .synchronizedMap(new HashMap<Iri, ServiceRegistration>());
+    private Map<IRI, ServiceRegistration> serviceRegistrations = Collections
+            .synchronizedMap(new HashMap<IRI, ServiceRegistration>());
     
     protected QueryEngine queryEngine;
     private boolean isActivated = false;
@@ -206,13 +206,13 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         tcAccessController.checkReadPermission(name);
         return super.getImmutableGraph(name);
     }
 
     @Override
-    public Graph getMGraph(Iri name) {
+    public Graph getMGraph(IRI name) {
         try {
             tcAccessController.checkReadWritePermission(name);
         } catch (AccessControlException e) {
@@ -223,7 +223,7 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    public Graph getGraph(Iri name) {
+    public Graph getGraph(IRI name) {
         try {
             tcAccessController.checkReadWritePermission(name);
         } catch (AccessControlException e) {
@@ -235,54 +235,54 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    public Graph createGraph(Iri name)
+    public Graph createGraph(IRI name)
             throws UnsupportedOperationException {
         tcAccessController.checkReadWritePermission(name);
         return super.createGraph(name);
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         tcAccessController.checkReadWritePermission(name);
         return super.createImmutableGraph(name, triples);
     }
 
     @Override
-    public void deleteGraph(Iri name) {
+    public void deleteGraph(IRI name) {
         tcAccessController.checkReadWritePermission(name);
         super.deleteGraph(name);
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         return super.getNames(ImmutableGraph);
     }
 
     @Override
-    public Set<Iri> listGraphs() {
-        Set<Iri> result = super.listGraphs();
+    public Set<IRI> listGraphs() {
+        Set<IRI> result = super.listGraphs();
         return excludeNonReadable(result);
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        Set<Iri> result = super.listMGraphs();
+    public Set<IRI> listMGraphs() {
+        Set<IRI> result = super.listMGraphs();
         return excludeNonReadable(result);
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
-        Set<Iri> result = super.listImmutableGraphs();
+    public Set<IRI> listImmutableGraphs() {
+        Set<IRI> result = super.listImmutableGraphs();
         return excludeNonReadable(result);
     }
 
-    private Set<Iri> excludeNonReadable(Set<Iri> tcNames) {
+    private Set<IRI> excludeNonReadable(Set<IRI> tcNames) {
         SecurityManager security = System.getSecurityManager();
         if (security == null) {
             return tcNames;
         }
-        Set<Iri> result = new HashSet<Iri>();
-        for (Iri name : tcNames) {
+        Set<IRI> result = new HashSet<IRI>();
+        for (IRI name : tcNames) {
             try {
                 tcAccessController.checkReadPermission(name);
             } catch (AccessControlException e) {
@@ -306,9 +306,9 @@ public class TcManager extends TcProviderMultiplexer {
     public Object executeSparqlQuery(String query, Graph defaultGraph) throws ParseException {
         TcProvider singleTargetTcProvider = null;
 
-        final Iri defaultGraphName = new Iri("urn:x-temp:/kjsfadfhfasdffds");
+        final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds");
         final SparqlPreParser sparqlPreParser = new SparqlPreParser(this);
-        final Set<Iri> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
+        final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
         if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) {
             singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
         }
@@ -337,9 +337,9 @@ public class TcManager extends TcProviderMultiplexer {
     	if (forceFastlane) {
             singleTargetTcProvider = getSingleTargetTcProvider(Collections.EMPTY_SET);
     	} else {    	
-	        final Iri defaultGraphName = new Iri("urn:x-temp:/kjsfadfhfasdffds");
+	        final IRI defaultGraphName = new IRI("urn:x-temp:/kjsfadfhfasdffds");
 	        SparqlPreParser sparqlPreParser = new SparqlPreParser(this);
-	        final Set<Iri> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
+	        final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
 	        if ((referencedGraphs != null) && (!referencedGraphs.contains(defaultGraphName))) {
 	            singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
 	        }
@@ -365,7 +365,7 @@ public class TcManager extends TcProviderMultiplexer {
      * @param defaultGraphName the ImmutableGraph to be used as default ImmutableGraph in the Sparql ImmutableGraph Store
      * @return the resulting ResultSet, ImmutableGraph or Boolean value
      */
-    public Object executeSparqlQuery(String query, Iri defaultGraphName) throws ParseException {
+    public Object executeSparqlQuery(String query, IRI defaultGraphName) throws ParseException {
       return executeSparqlQuery(query, defaultGraphName, false);
     }
 
@@ -379,13 +379,13 @@ public class TcManager extends TcProviderMultiplexer {
      * @param forceFastlane indicate whether to force fastlane usage.
      * @return the resulting ResultSet, ImmutableGraph or Boolean value
      */
-    public Object executeSparqlQuery(String query, Iri defaultGraphName, boolean forceFastlane) throws ParseException {
+    public Object executeSparqlQuery(String query, IRI defaultGraphName, boolean forceFastlane) throws ParseException {
         TcProvider singleTargetTcProvider = null;
     	if (forceFastlane) {
             singleTargetTcProvider = getSingleTargetTcProvider(Collections.singleton(defaultGraphName));
     	} else {    	
 	        SparqlPreParser sparqlPreParser = new SparqlPreParser(this);
-	        final Set<Iri> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
+	        final Set<IRI> referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
 	        if ((referencedGraphs != null)) {
 	            singleTargetTcProvider = getSingleTargetTcProvider(referencedGraphs);
 	        }
@@ -552,7 +552,7 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    protected void mGraphAppears(Iri name) {
+    protected void mGraphAppears(IRI name) {
     	if (isTcServicesEnabled()) {
     		// Only create the service when activated. When not activated
     		// creating will be delayed till after activation.
@@ -563,7 +563,7 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    protected void graphAppears(Iri name) {
+    protected void graphAppears(IRI name) {
     	if (isTcServicesEnabled()) {
     		// Only create the service when activated. When not activated
     		// creating will be delayed till after activation.
@@ -573,7 +573,7 @@ public class TcManager extends TcProviderMultiplexer {
     	}
     }
 
-    private void registerGraphAsService(Iri name, boolean isMGraph) {
+    private void registerGraphAsService(IRI name, boolean isMGraph) {
         Dictionary<String,Object> props = new Hashtable<String, Object>();
         props.put("name", name.getUnicodeString());
         String[] interfaceNames;
@@ -597,7 +597,7 @@ public class TcManager extends TcProviderMultiplexer {
     }
 
     @Override
-    protected void tcDisappears(Iri name) {
+    protected void tcDisappears(IRI name) {
         ServiceRegistration reg = serviceRegistrations.get(name);
         if (reg != null) {
             reg.unregister();
@@ -605,15 +605,15 @@ public class TcManager extends TcProviderMultiplexer {
         }
     }
 
-    private TcProvider getSingleTargetTcProvider(final Set<Iri> referencedGraphs) {
+    private TcProvider getSingleTargetTcProvider(final Set<IRI> referencedGraphs) {
         TcProvider singleTargetTcProvider = null;
         for (WeightedTcProvider provider : providerList) {
-            final Set<Iri> providerGraphs = provider.listGraphs();
+            final Set<IRI> providerGraphs = provider.listGraphs();
             if (providerGraphs.containsAll(referencedGraphs)) {
                singleTargetTcProvider = provider;
                break; //success
             }
-            for (Iri graphName : referencedGraphs) {
+            for (IRI graphName : referencedGraphs) {
                 if (providerGraphs.contains(graphName)) {
                     break; //failure
                 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
index ef8fa0b..31b8fe7 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProvider.java
@@ -22,7 +22,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;
 
 /**
  * A TC (Graph) Provider allows access to and optionally 
@@ -40,7 +40,7 @@ public interface TcProvider {
      * @throws NoSuchEntityException if there is no <code>ImmutableGraph</code>
      *         with the specified name
      */
-    ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException;
+    ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException;
 
     /**
      * Get an <code>Graph</code> taht is not <code>ImmutableGrah</code>. The instances
@@ -51,7 +51,7 @@ public interface TcProvider {
      * @throws NoSuchEntityException if there is no <code>Graph</code>
      *         with the specified name
      */
-    Graph getMGraph(Iri name) throws NoSuchEntityException;
+    Graph getMGraph(IRI name) throws NoSuchEntityException;
     
     /**
      * This method is used to get a <code>Graph</code> indifferently
@@ -66,7 +66,7 @@ public interface TcProvider {
      * @throws NoSuchEntityException if there is no <code>ImmutableGraph</code>
      *         or <code>Graph</code> with the specified name
      */
-    Graph getGraph(Iri name) throws NoSuchEntityException;
+    Graph getGraph(IRI name) throws NoSuchEntityException;
 
     /**
      * Lists the name of the <Code>ImmutableGraph</code>s available through this
@@ -76,7 +76,7 @@ public interface TcProvider {
      *
      * @return the list of <Code>ImmutableGraph</code>s
      */
-    Set<Iri> listImmutableGraphs();
+    Set<IRI> listImmutableGraphs();
 
     /**
      * Lists the name of the <Code>Graph</code>s available through this
@@ -86,7 +86,7 @@ public interface TcProvider {
      *
      * @return the list of <Code>Graph</code>s
      */
-    Set<Iri> listMGraphs();
+    Set<IRI> listMGraphs();
 
     /**
      * Lists the name of the <Code>Graph</code>s available through this
@@ -96,7 +96,7 @@ public interface TcProvider {
      *
      * @return the list of <Code>Graph</code>s
      */
-    Set<Iri> listGraphs();
+    Set<IRI> listGraphs();
 
     /**
      * Creates an initially empty <code>Graph</code> with a specified name
@@ -108,7 +108,7 @@ public interface TcProvider {
      * @throws EntityAlreadyExistsException if an Graph with the specified name
      *         already exists
      */
-    Graph createGraph(Iri name) throws UnsupportedOperationException, 
+    Graph createGraph(IRI name) throws UnsupportedOperationException, 
             EntityAlreadyExistsException;
 
     /**
@@ -122,7 +122,7 @@ public interface TcProvider {
      * @throws EntityAlreadyExistsException if a ImmutableGraph with the specified name
      *         already exists
      */
-    ImmutableGraph createImmutableGraph(Iri name, Graph triples) 
+    ImmutableGraph createImmutableGraph(IRI name, Graph triples) 
             throws UnsupportedOperationException, EntityAlreadyExistsException;
     
     /**
@@ -137,7 +137,7 @@ public interface TcProvider {
      *           <code>ImmutableGraph</code> or an <code>Graph</code>.
      * @throws EntityUndeletableException if the specified ImmutableGraph is undeletable
      */
-    void deleteGraph(Iri name) throws UnsupportedOperationException,
+    void deleteGraph(IRI name) throws UnsupportedOperationException,
             NoSuchEntityException, EntityUndeletableException;
 
     /**
@@ -147,5 +147,5 @@ public interface TcProvider {
      * @return the set names of <code>ImmutableGraph</code>, the set is empty if
      *         <code>ImmutableGraph</code> is unknown
      */
-    Set<Iri> getNames(ImmutableGraph immutableGraph);
+    Set<IRI> getNames(ImmutableGraph immutableGraph);
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
index 7b7eea9..094238d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/TcProviderMultiplexer.java
@@ -33,7 +33,7 @@ import java.util.TreeSet;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.Graph;
 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.sparql.QueryEngine;
 
 /**
@@ -52,7 +52,7 @@ public class TcProviderMultiplexer implements TcProvider {
      * otherwise the locks in the <code>Graph</code>s would have no effect
      * between different instances and concurrency issues could occur.
      */
-    private Map<Iri, MGraphHolder> mGraphCache = Collections.synchronizedMap(new HashMap<Iri, MGraphHolder>());
+    private Map<IRI, MGraphHolder> mGraphCache = Collections.synchronizedMap(new HashMap<IRI, MGraphHolder>());
 
 	/**
 	 * Flag to indicate whether mgraphs should be cached for faster access. By
@@ -91,7 +91,7 @@ public class TcProviderMultiplexer implements TcProvider {
      *
      * @param name
      */
-    protected void graphAppears(Iri name) {
+    protected void graphAppears(IRI name) {
     }
 
     /**
@@ -102,7 +102,7 @@ public class TcProviderMultiplexer implements TcProvider {
      *
      * @param name
      */
-    protected void mGraphAppears(Iri name) {
+    protected void mGraphAppears(IRI name) {
     }
 
     /**
@@ -115,7 +115,7 @@ public class TcProviderMultiplexer implements TcProvider {
      *
      * @param name
      */
-    protected void tcDisappears(Iri name) {
+    protected void tcDisappears(IRI name) {
     }
 
     /**
@@ -135,7 +135,7 @@ public class TcProviderMultiplexer implements TcProvider {
      */
     private void updateGraphCache(WeightedTcProvider provider,
             boolean providerAdded) {
-        Set<Iri> uriSet = provider.listGraphs();
+        Set<IRI> uriSet = provider.listGraphs();
         if (!(uriSet == null || uriSet.isEmpty())) {
             if (providerAdded) {
                 weightedProviderAdded(provider, uriSet);
@@ -146,10 +146,10 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     private void weightedProviderAdded(WeightedTcProvider newProvider,
-            Set<Iri> newProvidedUris) {
+            Set<IRI> newProvidedUris) {
         Set<WeightedTcProvider> lowerWeightedProviderList = getLowerWeightedProvider(newProvider);
     	if (isCachingEnabled()) {
-	        for (Iri name : newProvidedUris) {
+	        for (IRI name : newProvidedUris) {
 	            final MGraphHolder holder = mGraphCache.get(name);
 	            if ((holder != null) && (holder.getWeightedTcProvider() != null)) {
 	                if (lowerWeightedProviderList.contains(holder.getWeightedTcProvider())) {
@@ -187,8 +187,8 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     private void weightedProviderRemoved(WeightedTcProvider oldProvider,
-            Set<Iri> oldProvidedUris) {
-        for (Iri name : oldProvidedUris) {
+            Set<IRI> oldProvidedUris) {
+        for (IRI name : oldProvidedUris) {
             final MGraphHolder holder = mGraphCache.get(name);
             if ((holder != null) && (holder.getWeightedTcProvider() != null)
                     && holder.getWeightedTcProvider().equals(oldProvider)) {
@@ -218,7 +218,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         for (TcProvider provider : providerList) {
             try {
                 return provider.getImmutableGraph(name);
@@ -232,7 +232,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name)
+    public Graph getMGraph(IRI name)
             throws NoSuchEntityException {
         Graph result = getMGraphFromCache(name);
         if (result == null) {
@@ -246,7 +246,7 @@ public class TcProviderMultiplexer implements TcProvider {
         return result;
     }
 
-    private Graph getMGraphFromCache(Iri name) {
+    private Graph getMGraphFromCache(IRI name) {
         MGraphHolder holder = mGraphCache.get(name);
         if (holder == null) {
             return null;
@@ -254,7 +254,7 @@ public class TcProviderMultiplexer implements TcProvider {
         return holder.getMGraph();
     }
 
-    private Graph getUnsecuredMGraphAndAddToCache(Iri name)
+    private Graph getUnsecuredMGraphAndAddToCache(IRI name)
             throws NoSuchEntityException {
         for (WeightedTcProvider provider : providerList) {
             try {
@@ -276,7 +276,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Graph getGraph(Iri name)
+    public Graph getGraph(IRI name)
             throws NoSuchEntityException {
         Graph result;
         for (WeightedTcProvider provider : providerList) {
@@ -298,7 +298,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Graph createGraph(Iri name)
+    public Graph createGraph(IRI name)
             throws UnsupportedOperationException {
 
         for (WeightedTcProvider provider : providerList) {
@@ -323,7 +323,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         for (WeightedTcProvider provider : providerList) {
             try {
                 ImmutableGraph result = provider.createImmutableGraph(name, triples);
@@ -347,7 +347,7 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public void deleteGraph(Iri name) {
+    public void deleteGraph(IRI name) {
         for (TcProvider provider : providerList) {
             try {
                 provider.deleteGraph(name);
@@ -375,8 +375,8 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
-        Set<Iri> result = new HashSet<Iri>();
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
+        Set<IRI> result = new HashSet<IRI>();
         for (TcProvider provider : providerList) {
             result.addAll(provider.getNames(ImmutableGraph));
         }
@@ -384,8 +384,8 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Set<Iri> listGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
+    public Set<IRI> listGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
         for (TcProvider provider : providerList) {
             result.addAll(provider.listGraphs());
         }
@@ -393,8 +393,8 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
+    public Set<IRI> listMGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
         for (TcProvider provider : providerList) {
             result.addAll(provider.listMGraphs());
         }
@@ -402,8 +402,8 @@ public class TcProviderMultiplexer implements TcProvider {
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
+    public Set<IRI> listImmutableGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
         for (TcProvider provider : providerList) {
             result.addAll(provider.listImmutableGraphs());
         }


[68/87] [abbrv] clerezza git commit: CLEREZZA-960: fixed spaqrl form ssp

Posted by re...@apache.org.
CLEREZZA-960: fixed spaqrl form ssp

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

Branch: refs/heads/master
Commit: 741e8dfd3cf241f730aa99f56e64123f36b9a0f8
Parents: f221ae6
Author: Reto Gmuer <re...@apache.org>
Authored: Sun Mar 29 20:26:24 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Sun Mar 29 20:26:24 2015 +0000

----------------------------------------------------------------------
 .../resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/741e8dfd/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
index 1e6e233..5d2b0c1 100644
--- a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
@@ -19,7 +19,7 @@
  *
 */
 
-def se(s: Any) = new UriRef("http://clerezza.org/2009/11/sparql-endpoint#"+s)
+def se(s: Any) = new Iri("http://clerezza.org/2009/11/sparql-endpoint#"+s)
 <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
 	<head>
 		<title>SPARQL Endpoint</title>


[27/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFa.1.3.0.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFa.1.3.0.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFa.1.3.0.js
new file mode 100644
index 0000000..4cc83b4
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFa.1.3.0.js
@@ -0,0 +1,3380 @@
+/** @preserve green-turtle version 1.3.0 Copyright (c) 2011-2013, R. Alexander Milowski <al...@milowski.com> All rights reserved. */
+/**         
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+if (typeof GreenTurtle == "undefined") {
+
+var GreenTurtle = (function() {
+
+var env = {};
+
+      env.version = "1.3.0";
+   function URIResolver() {
+}
+URIResolver.SCHEME = /^[A-Za-z][A-Za-z0-9\+\-\.]*\:/;
+
+URIResolver.prototype.parseURI = function(uri) {
+   var match = URIResolver.SCHEME.exec(uri);
+   if (!match) {
+      throw "Bad URI value, no scheme: "+uri;
+   }
+   var parsed = { spec: uri };
+   parsed.scheme = match[0].substring(0,match[0].length-1);
+   parsed.schemeSpecificPart = parsed.spec.substring(match[0].length);
+   if (parsed.schemeSpecificPart.charAt(0)=='/' && parsed.schemeSpecificPart.charAt(1)=='/') {
+      this.parseGeneric(parsed);
+   } else {
+      parsed.isGeneric = false;
+   }
+   parsed.normalize = function() {
+      if (!this.isGeneric) {
+         return;
+      }
+      if (this.segments.length==0) {
+         return;
+      }
+      // edge case of ending in "/."
+      if (this.path.length>1 && this.path.substring(this.path.length-2)=="/.") {
+         this.path = this.path.substring(0,this.path.length-1);
+         this.segments.splice(this.segments.length-1,1);
+         this.schemeSpecificPart = "//"+this.authority+this.path;
+         if (typeof this.query != "undefined") {
+            this.schemeSpecificPart += "?" + this.query;
+         }
+         if (typeof this.fragment != "undefined") {
+            this.schemeSpecificPart += "#" + this.fragment;
+         }
+         this.spec = this.scheme+":"+this.schemeSpecificPart;
+         return;
+      }
+      var end = this.path.charAt(this.path.length-1);
+      if (end!="/") {
+         end = "";
+      }
+      for (var i=0; i<this.segments.length; i++) {
+         if (i>0 && this.segments[i]=="..") {
+            this.segments.splice(i-1,2);
+            i -= 2;
+         }
+         if (this.segments[i]==".") {
+            this.segments.splice(i,1);
+            i--;
+         }
+      }
+      this.path = this.segments.length==0 ? "/" : "/"+this.segments.join("/")+end;
+      this.schemeSpecificPart = "//"+this.authority+this.path;
+      if (typeof this.query != "undefined") {
+         this.schemeSpecificPart += "?" + this.query;
+      }
+      if (typeof this.fragment != "undefined") {
+         this.schemeSpecificPart += "#" + this.fragment;
+      }
+      this.spec = this.scheme+":"+this.schemeSpecificPart;
+   }
+   parsed.resolve = function(href) {
+      if (!href) {
+         return this.spec;
+      }
+      if (href.charAt(0)=='#') {
+         var lastHash = this.spec.lastIndexOf('#');
+         return lastHash<0 ? this.spec+href : this.spec.substring(0,lastHash)+href;
+      }
+      if (!this.isGeneric) {
+         throw "Cannot resolve uri against non-generic URI: "+this.spec;
+      }
+      var colon = href.indexOf(':');
+      if (href.charAt(0)=='/') {
+         return this.scheme+"://"+this.authority+href;
+      } else if (href.charAt(0)=='.' && href.charAt(1)=='/') {
+         if (this.path.charAt(this.path.length-1)=='/') {
+            return this.scheme+"://"+this.authority+this.path+href.substring(2);
+         } else {
+            var last = this.path.lastIndexOf('/');
+            return this.scheme+"://"+this.authority+this.path.substring(0,last)+href.substring(1);
+         }
+      } else if (URIResolver.SCHEME.test(href)) {
+         return href;
+      } else if (href.charAt(0)=="?") {
+         return this.scheme+"://"+this.authority+this.path+href;
+      } else {
+         if (this.path.charAt(this.path.length-1)=='/') {
+            return this.scheme+"://"+this.authority+this.path+href;
+         } else {
+            var last = this.path.lastIndexOf('/');
+            return this.scheme+"://"+this.authority+this.path.substring(0,last+1)+href;
+         }
+      }
+   };
+   parsed.relativeTo = function(otherURI) {
+      if (otherURI.scheme!=this.scheme) {
+         return this.spec;
+      }
+      if (!this.isGeneric) {
+         throw "A non generic URI cannot be made relative: "+this.spec;
+      }
+      if (!otherURI.isGeneric) {
+         throw "Cannot make a relative URI against a non-generic URI: "+otherURI.spec;
+      }
+      if (otherURI.authority!=this.authority) {
+         return this.spec;
+      }
+      var i=0;
+      for (; i<this.segments.length && i<otherURI.segments.length; i++) {
+         if (this.segments[i]!=otherURI.segments[i]) {
+            //alert(this.path+" different from "+otherURI.path+" at '"+this.segments[i]+"' vs '"+otherURI.segments[i]+"'");
+            var relative = "";
+            for (var j=i; j<otherURI.segments.length; j++) {
+               relative += "../";
+            }
+            for (var j=i; j<this.segments.length; j++) {
+               relative += this.segments[j];
+               if ((j+1)<this.segments.length) {
+                  relative += "/";
+               }
+            }
+            if (this.path.charAt(this.path.length-1)=='/') {
+               relative += "/";
+            }
+            return relative;
+         }
+      }
+      if (this.segments.length==otherURI.segments.length) {
+         return this.hash ? this.hash : (this.query ? this.query : "");
+      } else if (i<this.segments.length) {
+         var relative = "";
+         for (var j=i; j<this.segments.length; j++) {
+            relative += this.segments[j];
+            if ((j+1)<this.segments.length) {
+               relative += "/";
+            }
+         }
+         if (this.path.charAt(this.path.length-1)=='/') {
+            relative += "/";
+         }
+         return relative;
+      } else {
+         throw "Cannot calculate a relative URI for "+this.spec+" against "+otherURI.spec;
+      } 
+   };
+   return parsed;
+}
+
+URIResolver.prototype.parseGeneric = function(parsed) {
+   if (parsed.schemeSpecificPart.charAt(0)!='/' || parsed.schemeSpecificPart.charAt(1)!='/') {
+      throw "Generic URI values should start with '//':"+parsed.spec;
+   }
+  
+   var work = parsed.schemeSpecificPart.substring(2);
+   var pathStart = work.indexOf("/");
+   parsed.authority = pathStart<0 ? work : work.substring(0,pathStart);
+   parsed.path = pathStart<0 ? "" : work.substring(pathStart);
+   var hash = parsed.path.indexOf('#');
+   if (hash>=0) {
+      parsed.fragment = parsed.path.substring(hash+1);
+      parsed.path = parsed.path.substring(0,hash);
+   }
+   var questionMark = parsed.path.indexOf('?');
+   if (questionMark>=0) {
+      parsed.query = parsed.path.substring(questionMark+1);
+      parsed.path = parsed.path.substring(0,questionMark);
+   }
+   if (parsed.path=="/" || parsed.path=="") {
+      parsed.segments = [];
+   } else {
+      parsed.segments = parsed.path.split(/\//);
+      if (parsed.segments.length>0 && parsed.segments[0]=='' && parsed.path.length>1 && parsed.path.charAt(1)!='/') {
+         // empty segment at the start, remove it
+         parsed.segments.shift();
+      }
+      if (parsed.segments.length>0 && parsed.path.length>0 && parsed.path.charAt(parsed.path.length-1)=='/' && parsed.segments[parsed.segments.length-1]=='') {
+         // we may have an empty the end
+         // check to see if it is legimate
+         if (parsed.path.length>1 && parsed.path.charAt(parsed.path.length-2)!='/') {
+            parsed.segments.pop();
+         }
+      }
+      // check for non-escaped characters
+      for (var i=0; i<parsed.segments.length; i++) {
+         var check = parsed.segments[i].split(/%[A-Za-z0-9][A-Za-z0-9]|[\ud800-\udfff][\ud800-\udfff]|[A-Za-z0-9\-\._~!$&'()*+,;=@:\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/);
+
+                 for (var j=0; j<check.length; j++) {
+            if (check[j].length>0) {
+               throw "Unecaped character "+check[j].charAt(0)+" ("+check[j].charCodeAt(0)+") in URI "+parsed.spec;
+            }
+         }
+      }
+   }
+   parsed.isGeneric = true;
+}
+
+RDFaProcessor.prototype = new URIResolver();
+RDFaProcessor.prototype.constructor=RDFaProcessor;
+function RDFaProcessor(targetObject) {
+   if (targetObject) {
+      this.target = targetObject;
+   } else {
+      this.target = {
+         graph: {
+            subjects: {},
+            prefixes: {},
+            terms: {}
+         }
+      };
+   }
+   this.theOne = "_:"+(new Date()).getTime();
+   this.language = null;
+   this.vocabulary = null;
+   this.blankCounter = 0;
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" } ];
+   this.inXHTMLMode = false;
+   this.absURIRE = /[\w\_\-]+:\S+/;
+   this.finishedHandlers = [];
+   this.init();
+}
+
+RDFaProcessor.prototype.newBlankNode = function() {
+   this.blankCounter++;
+   return "_:"+this.blankCounter;
+}
+
+RDFaProcessor.XMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"; 
+RDFaProcessor.HTMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML"; 
+RDFaProcessor.PlainLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral";
+RDFaProcessor.objectURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#object";
+RDFaProcessor.typeURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
+
+RDFaProcessor.nameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]';
+RDFaProcessor.nameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0
 B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u
 1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]';
+RDFaProcessor.NCNAME = new RegExp('^' + RDFaProcessor.nameStartChar + RDFaProcessor.nameChar + '*$');
+
+RDFaProcessor.trim = function(str) {
+   return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+}
+
+RDFaProcessor.prototype.tokenize = function(str) {
+   return RDFaProcessor.trim(str).split(/\s+/);
+}
+
+
+RDFaProcessor.prototype.parseSafeCURIEOrCURIEOrURI = function(value,prefixes,base) {
+   value = RDFaProcessor.trim(value);
+   if (value.charAt(0)=='[' && value.charAt(value.length-1)==']') {
+      value = value.substring(1,value.length-1);
+      value = value.trim(value);
+      if (value.length==0) {
+         return null;
+      }
+      if (value=="_:") {
+         // the one node
+         return this.theOne;
+      }
+      return this.parseCURIE(value,prefixes,base);
+   } else {
+      return this.parseCURIEOrURI(value,prefixes,base);
+   }
+}
+
+RDFaProcessor.prototype.parseCURIE = function(value,prefixes,base) {
+   var colon = value.indexOf(":");
+   if (colon>=0) {
+      var prefix = value.substring(0,colon);
+      if (prefix=="") {
+         // default prefix
+         var uri = prefixes[""];
+         return uri ? uri+value.substring(colon+1) : null;
+      } else if (prefix=="_") {
+         // blank node
+         return "_:"+value.substring(colon+1);
+      } else if (RDFaProcessor.NCNAME.test(prefix)) {
+         var uri = prefixes[prefix];
+         if (uri) {
+            return uri+value.substring(colon+1);
+         }
+      }
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.parseCURIEOrURI = function(value,prefixes,base) {
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   }
+   return this.resolveAndNormalize(base,value);
+}
+
+RDFaProcessor.prototype.parsePredicate = function(value,defaultVocabulary,terms,prefixes,base,ignoreTerms) {
+   if (value=="") {
+      return null;
+   }
+   var predicate = this.parseTermOrCURIEOrAbsURI(value,defaultVocabulary,ignoreTerms ? null : terms,prefixes,base);
+   if (predicate && predicate.indexOf("_:")==0) {
+      return null;
+   }
+   return predicate;
+}
+
+RDFaProcessor.prototype.parseTermOrCURIEOrURI = function(value,defaultVocabulary,terms,prefixes,base) {
+   //alert("Parsing "+value+" with default vocab "+defaultVocabulary);
+   value = RDFaProcessor.trim(value);
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   } else {
+       var term = terms[value];
+       if (term) {
+          return term;
+       }
+       var lcvalue = value.toLowerCase();
+       term = terms[lcvalue];
+       if (term) {
+          return term;
+       }
+       if (defaultVocabulary && !this.absURIRE.exec(value)) {
+          return defaultVocabulary+value
+       }
+   }
+   return this.resolveAndNormalize(base,value);
+}
+
+RDFaProcessor.prototype.parseTermOrCURIEOrAbsURI = function(value,defaultVocabulary,terms,prefixes,base) {
+   //alert("Parsing "+value+" with default vocab "+defaultVocabulary);
+   value = RDFaProcessor.trim(value);
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   } else if (terms) {
+       if (defaultVocabulary && !this.absURIRE.exec(value)) {
+          return defaultVocabulary+value
+       }
+       var term = terms[value];
+       if (term) {
+          return term;
+       }
+       var lcvalue = value.toLowerCase();
+       term = terms[lcvalue];
+       if (term) {
+          return term;
+       }
+   }
+   if (this.absURIRE.exec(value)) {
+      return this.resolveAndNormalize(base,value);
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.resolveAndNormalize = function(base,href) {
+   var u = base.resolve(href);
+   var parsed = this.parseURI(u);
+   parsed.normalize();
+   return parsed.spec;
+}
+
+RDFaProcessor.prototype.parsePrefixMappings = function(str,target) {
+   var values = this.tokenize(str);
+   var prefix = null;
+   var uri = null;
+   for (var i=0; i<values.length; i++) {
+      if (values[i][values[i].length-1]==':') {
+         prefix = values[i].substring(0,values[i].length-1);
+      } else if (prefix) {
+         target[prefix] = this.target.baseURI ? this.target.baseURI.resolve(values[i]) : values[i];
+         prefix = null;
+      }
+   }
+}
+
+RDFaProcessor.prototype.copyMappings = function(mappings) {
+   var newMappings = {};
+   for (var k in mappings) {
+      newMappings[k] = mappings[k];
+   }
+   return newMappings;
+}
+
+RDFaProcessor.prototype.ancestorPath = function(node) {
+   var path = "";
+   while (node && node.nodeType!=Node.DOCUMENT_NODE) {
+      path = "/"+node.localName+path;
+      node = node.parentNode;
+   }
+   return path;
+}
+
+RDFaProcessor.prototype.setContext = function(node) {
+
+   // We only recognized XHTML+RDFa 1.1 if the version is set propertyly
+   if (node.localName=="html" && node.getAttribute("version")=="XHTML+RDFa 1.1") {
+      this.setXHTMLContext();
+   } else if (node.localName=="html" || node.namespaceURI=="http://www.w3.org/1999/xhtml") {
+      if (document.doctype) {
+         if (document.doctype.publicId=="-//W3C//DTD XHTML+RDFa 1.0//EN" && document.doctype.systemId=="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") {
+            console.log("WARNING: RDF 1.0 is not supported.  Defaulting to HTML5 mode.");
+            this.setHTMLContext();
+         } else if (document.doctype.publicId=="-//W3C//DTD XHTML+RDFa 1.1//EN" && document.doctype.systemId=="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd") {
+            this.setXHTMLContext();
+         } else {
+            this.setHTMLContext();
+         }
+      } else {
+         this.setHTMLContext();
+      }
+   } else {
+      this.setXMLContext();
+   }
+
+}
+
+RDFaProcessor.prototype.setInitialContext = function() {
+   this.vocabulary = null;
+   // By default, the prefixes are terms are loaded to the RDFa 1.1. standard within the graph constructor
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" } ];
+}
+
+RDFaProcessor.prototype.setXMLContext = function() {
+   this.setInitialContext();
+   this.inXHTMLMode = false;
+   this.inHTMLMode = false;
+}
+
+RDFaProcessor.prototype.setHTMLContext = function() {
+   this.setInitialContext();
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" },
+                           { namespaceURI: null, localName: "lang" }];
+   this.inXHTMLMode = false;
+   this.inHTMLMode = true;
+}
+
+RDFaProcessor.prototype.setXHTMLContext = function() {
+
+   this.setInitialContext();
+   
+   this.inXHTMLMode = true;
+   this.inHTMLMode = false;
+   
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" },
+                           { namespaceURI: null, localName: "lang" }];
+
+   // From http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1
+   this.target.graph.terms["alternate"] = "http://www.w3.org/1999/xhtml/vocab#alternate";
+   this.target.graph.terms["appendix"] = "http://www.w3.org/1999/xhtml/vocab#appendix";
+   this.target.graph.terms["bookmark"] = "http://www.w3.org/1999/xhtml/vocab#bookmark";
+   this.target.graph.terms["cite"] = "http://www.w3.org/1999/xhtml/vocab#cite"
+   this.target.graph.terms["chapter"] = "http://www.w3.org/1999/xhtml/vocab#chapter";
+   this.target.graph.terms["contents"] = "http://www.w3.org/1999/xhtml/vocab#contents";
+   this.target.graph.terms["copyright"] = "http://www.w3.org/1999/xhtml/vocab#copyright";
+   this.target.graph.terms["first"] = "http://www.w3.org/1999/xhtml/vocab#first";
+   this.target.graph.terms["glossary"] = "http://www.w3.org/1999/xhtml/vocab#glossary";
+   this.target.graph.terms["help"] = "http://www.w3.org/1999/xhtml/vocab#help";
+   this.target.graph.terms["icon"] = "http://www.w3.org/1999/xhtml/vocab#icon";
+   this.target.graph.terms["index"] = "http://www.w3.org/1999/xhtml/vocab#index";
+   this.target.graph.terms["last"] = "http://www.w3.org/1999/xhtml/vocab#last";
+   this.target.graph.terms["license"] = "http://www.w3.org/1999/xhtml/vocab#license";
+   this.target.graph.terms["meta"] = "http://www.w3.org/1999/xhtml/vocab#meta";
+   this.target.graph.terms["next"] = "http://www.w3.org/1999/xhtml/vocab#next";
+   this.target.graph.terms["prev"] = "http://www.w3.org/1999/xhtml/vocab#prev";
+   this.target.graph.terms["previous"] = "http://www.w3.org/1999/xhtml/vocab#previous";
+   this.target.graph.terms["section"] = "http://www.w3.org/1999/xhtml/vocab#section";
+   this.target.graph.terms["stylesheet"] = "http://www.w3.org/1999/xhtml/vocab#stylesheet";
+   this.target.graph.terms["subsection"] = "http://www.w3.org/1999/xhtml/vocab#subsection";
+   this.target.graph.terms["start"] = "http://www.w3.org/1999/xhtml/vocab#start";
+   this.target.graph.terms["top"] = "http://www.w3.org/1999/xhtml/vocab#top";
+   this.target.graph.terms["up"] = "http://www.w3.org/1999/xhtml/vocab#up";
+   this.target.graph.terms["p3pv1"] = "http://www.w3.org/1999/xhtml/vocab#p3pv1";
+
+   // other
+   this.target.graph.terms["related"] = "http://www.w3.org/1999/xhtml/vocab#related";
+   this.target.graph.terms["role"] = "http://www.w3.org/1999/xhtml/vocab#role";
+   this.target.graph.terms["transformation"] = "http://www.w3.org/1999/xhtml/vocab#transformation";
+}
+
+RDFaProcessor.prototype.init = function() {
+}
+
+RDFaProcessor.prototype.newSubjectOrigin = function(origin,subject) {
+}
+
+RDFaProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+}
+
+RDFaProcessor.dateTimeTypes = [
+   { pattern: /-?P(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]+)?S)?)?/,
+     type: "http://www.w3.org/2001/XMLSchema#duration" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9]T(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#dateTime" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9](?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#date" },
+   { pattern: /(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#time" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]/,
+     type: "http://www.w3.org/2001/XMLSchema#gYearMonth" },
+   { pattern: /-?[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9]/,
+     type: "http://www.w3.org/2001/XMLSchema#gYear" }
+];
+
+RDFaProcessor.deriveDateTimeType = function(value) {
+   for (var i=0; i<RDFaProcessor.dateTimeTypes.length; i++) {
+      //console.log("Checking "+value+" against "+RDFaProcessor.dateTimeTypes[i].type);
+      var matched = RDFaProcessor.dateTimeTypes[i].pattern.exec(value);
+      if (matched && matched[0].length==value.length) {
+         //console.log("Matched!");
+         return RDFaProcessor.dateTimeTypes[i].type;
+      }
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.process = function(node,options) {
+
+   /*
+   if (!window.console) {
+      window.console = { log: function() {} };
+   }*/
+   if (node.nodeType==Node.DOCUMENT_NODE) {
+      node = node.documentElement;
+      this.setContext(node);
+   } else if (node.parentNode.nodeType==Node.DOCUMENT_NODE) {
+      this.setContext(node);
+   } 
+   var queue = [];
+   // Fix for Firefox that includes the hash in the base URI
+   var removeHash = function(baseURI) {
+      var hash = baseURI.indexOf("#");
+      if (hash>=0) {
+         baseURI = baseURI.substring(0,hash);
+      }
+      if (options && options.baseURIMap) {
+         baseURI = options.baseURIMap(baseURI);
+      }
+      return baseURI;
+   }
+   queue.push({ current: node, context: this.push(null,removeHash(node.baseURI))});
+   while (queue.length>0) {
+      var item = queue.shift();
+      if (item.parent) {
+         // Sequence Step 14: list triple generation
+         if (item.context.parent && item.context.parent.listMapping==item.listMapping) {
+            // Skip a child context with exactly the same mapping
+            continue;
+         }
+         //console.log("Generating lists for "+item.subject+", tag "+item.parent.localName);
+         for (var predicate in item.listMapping) {
+            var list = item.listMapping[predicate];
+            if (list.length==0) {
+               this.addTriple(item.parent,item.subject,predicate,{ type: RDFaProcessor.objectURI, value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" });
+               continue;
+            }
+            var bnodes = [];
+            for (var i=0; i<list.length; i++) {
+               bnodes.push(this.newBlankNode());
+               //this.newSubject(item.parent,bnodes[i]);
+            }
+            for (var i=0; i<bnodes.length; i++) {
+               this.addTriple(item.parent,bnodes[i],"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",list[i]);
+               this.addTriple(item.parent,bnodes[i],"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",{ type: RDFaProcessor.objectURI , value: (i+1)<bnodes.length ? bnodes[i+1] : "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" });
+            }
+            this.addTriple(item.parent,item.subject,predicate,{ type: RDFaProcessor.objectURI, value: bnodes[0] });
+         }
+         continue;
+      }
+      var current = item.current;
+      var context = item.context;
+
+      //console.log("Tag: "+current.localName+", listMapping="+JSON.stringify(context.listMapping));
+
+      // Sequence Step 1
+      var skip = false;
+      var newSubject = null;
+      var currentObjectResource = null;
+      var typedResource = null;
+      var prefixes = context.prefixes;
+      var prefixesCopied = false;
+      var incomplete = [];
+      var listMapping = context.listMapping;
+      var listMappingDifferent = context.parent ? false : true;
+      var language = context.language;
+      var vocabulary = context.vocabulary;
+
+      // TODO: the "base" element may be used for HTML+RDFa 1.1
+      var base = this.parseURI(removeHash(current.baseURI));
+      current.item = null;
+
+      // Sequence Step 2: set the default vocabulary
+      var vocabAtt = current.getAttributeNode("vocab");
+      if (vocabAtt) {
+         var value = RDFaProcessor.trim(vocabAtt.value);
+         if (value.length>0) {
+            vocabulary = value;
+            var baseSubject = base.spec;
+            //this.newSubject(current,baseSubject);
+            this.addTriple(current,baseSubject,"http://www.w3.org/ns/rdfa#usesVocabulary",{ type: RDFaProcessor.objectURI , value: vocabulary});
+         } else {
+            vocabulary = this.vocabulary;
+         }
+      }
+
+      // Sequence Step 3: IRI mappings
+      // handle xmlns attributes
+      for (var i=0; i<current.attributes.length; i++) {
+         var att = current.attributes[i];
+         //if (att.namespaceURI=="http://www.w3.org/2000/xmlns/") {
+         if (att.nodeName.charAt(0)=="x" && att.nodeName.indexOf("xmlns:")==0) {
+            if (!prefixesCopied) {
+               prefixes = this.copyMappings(prefixes);
+               prefixesCopied = true;
+            }
+            var prefix = att.nodeName.substring(6);
+            // TODO: resolve relative?
+            var ref = RDFaProcessor.trim(att.value);
+            prefixes[prefix] = this.target.baseURI ? this.target.baseURI.resolve(ref) : ref;
+         }
+      }
+      // Handle prefix mappings (@prefix)
+      var prefixAtt = current.getAttributeNode("prefix");
+      if (prefixAtt) {
+         if (!prefixesCopied) {
+            prefixes = this.copyMappings(prefixes);
+            prefixesCopied = true;
+         }
+         this.parsePrefixMappings(prefixAtt.value,prefixes);
+      }
+
+
+      // Sequence Step 4: language
+      var xmlLangAtt = null;
+      for (var i=0; !xmlLangAtt && i<this.langAttributes.length; i++) {
+         xmlLangAtt = current.getAttributeNodeNS(this.langAttributes[i].namespaceURI,this.langAttributes[i].localName);
+      }
+      if (xmlLangAtt) {
+         var value = RDFaProcessor.trim(xmlLangAtt.value);
+         if (value.length>0) {
+            language = value;
+         } else {
+            language = null;
+         }
+      }
+
+      var relAtt = current.getAttributeNode("rel");
+      var revAtt = current.getAttributeNode("rev");
+      var typeofAtt = current.getAttributeNode("typeof");
+      var propertyAtt = current.getAttributeNode("property");
+      var datatypeAtt = current.getAttributeNode("datatype");
+      var datetimeAtt = this.inHTMLMode ? current.getAttributeNode("datetime") : null;
+      var contentAtt = current.getAttributeNode("content");
+      var aboutAtt = current.getAttributeNode("about");
+      var srcAtt = current.getAttributeNode("src");
+      var resourceAtt = current.getAttributeNode("resource");
+      var hrefAtt = current.getAttributeNode("href");
+      var inlistAtt = current.getAttributeNode("inlist");
+      
+      var relAttPredicates = [];
+      if (relAtt) {
+         var values = this.tokenize(relAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base,this.inHTMLMode && propertyAtt!=null);
+            if (predicate) {
+               relAttPredicates.push(predicate);
+            }
+         }
+      }
+      var revAttPredicates = [];
+      if (revAtt) {
+         var values = this.tokenize(revAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base,this.inHTMLMode && propertyAtt!=null);
+            if (predicate) {
+               revAttPredicates.push(predicate);
+            }
+         }
+      }
+      
+      // Section 3.1, bullet 7
+      if (this.inHTMLMode && (relAtt!=null || revAtt!=null) && propertyAtt!=null) {
+         if (relAttPredicates.length==0) {
+            relAtt = null;
+         }
+         if (revAttPredicates.length==0) {
+            revAtt = null;
+         }
+      }
+
+      if (relAtt || revAtt) {
+         // Sequence Step 6: establish new subject and value
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+         }
+         if (typeofAtt) {
+            typedResource = newSubject;
+         }
+         if (!newSubject) {
+            if (current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+               newSubject = removeHash(current.baseURI);
+            } else if (context.parentObject) {
+               // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+            }
+         }
+         if (resourceAtt) {
+            currentObjectResource = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+         }
+         
+         if (!currentObjectResource) {
+            if (hrefAtt) {
+               currentObjectResource = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            } else if (srcAtt) {
+               currentObjectResource = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            } else if (typeofAtt && !aboutAtt && !(this.inXHTMLMode && (current.localName=="head" || current.localName=="body"))) {
+               currentObjectResource = this.newBlankNode();
+            }
+         }
+         if (typeofAtt && !aboutAtt && this.inXHTMLMode && (current.localName=="head" || current.localName=="body")) {
+            typedResource = newSubject;
+         } else if (typeofAtt && !aboutAtt) {
+            typedResource = currentObjectResource;
+         }
+
+      } else if (propertyAtt && !contentAtt && !datatypeAtt) {
+         // Sequence Step 5.1: establish a new subject
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+            if (typeofAtt) {
+               typedResource = newSubject;
+            }
+         }
+         if (!newSubject && current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+            newSubject = removeHash(current.baseURI);
+            if (typeofAtt) {
+               typedResource = newSubject;
+            }
+         } else if (!newSubject && context.parentObject) {
+            // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+            newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+         }
+         if (typeofAtt && !typedResource) {
+            if (resourceAtt) {
+               typedResource = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+            }
+            if (!typedResource &&hrefAtt) {
+               typedResource = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            }
+            if (!typedResource && srcAtt) {
+               typedResource = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            }
+            if (!typedResource && (this.inXHTMLMode || this.inHTMLMode) && (current.localName=="head" || current.localName=="body")) {
+               typedResource = newSubject;
+            }
+            if (!typedResource) {
+               typedResource = this.newBlankNode();
+            }
+            currentObjectResource = typedResource;
+         }
+         //console.log(current.localName+", newSubject="+newSubject+", typedResource="+typedResource+", currentObjectResource="+currentObjectResource);
+      } else {
+         // Sequence Step 5.2: establish a new subject
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+         }
+         if (!newSubject && resourceAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+         }
+         if (!newSubject && hrefAtt) {
+            newSubject = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+         }
+         if (!newSubject && srcAtt) {
+            newSubject = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+         }
+         if (!newSubject) {
+            if (current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+               newSubject = removeHash(current.baseURI);
+            } else if ((this.inXHTMLMode || this.inHTMLMode) && (current.localName=="head" || current.localName=="body")) {
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+            } else if (typeofAtt) {
+               newSubject = this.newBlankNode();
+            } else if (context.parentObject) {
+               // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+               if (!propertyAtt) {
+                  skip = true;
+               }
+            }
+         }
+         if (typeofAtt) {
+            typedResource = newSubject;
+         }
+      }
+
+      //console.log(current.tagName+": newSubject="+newSubject+", currentObjectResource="+currentObjectResource+", typedResource="+typedResource+", skip="+skip);
+
+      var rdfaData = null;
+      if (newSubject) {
+         //this.newSubject(current,newSubject);
+         if (aboutAtt || resourceAtt || typedResource) {
+            var id = newSubject;
+            if (typeofAtt && !aboutAtt && !resourceAtt && currentObjectResource) {
+               id = currentObjectResource;
+            }
+            //console.log("Setting data attribute for "+current.localName+" for subject "+id);
+            this.newSubjectOrigin(current,id);
+         }
+      }
+      
+      // Sequence Step 7: generate type triple
+      if (typedResource) {
+         var values = this.tokenize(typeofAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var object = this.parseTermOrCURIEOrAbsURI(values[i],vocabulary,context.terms,prefixes,base);
+            if (object) {
+               this.addTriple(current,typedResource,RDFaProcessor.typeURI,{ type: RDFaProcessor.objectURI , value: object});
+            }
+         }
+      }
+
+      // Sequence Step 8: new list mappings if there is a new subject
+      //console.log("Step 8: newSubject="+newSubject+", context.parentObject="+context.parentObject);
+      if (newSubject && newSubject!=context.parentObject) {
+         //console.log("Generating new list mapping for "+newSubject);
+         listMapping = {};
+         listMappingDifferent = true;
+      }
+
+      // Sequence Step 9: generate object triple
+      if (currentObjectResource) {
+         if (relAtt && inlistAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               var list = listMapping[relAttPredicates[i]];
+               if (!list) {
+                  list = [];
+                  listMapping[relAttPredicates[i]] = list;
+               }
+               list.push({ type: RDFaProcessor.objectURI, value: currentObjectResource });
+            }
+         } else if (relAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               this.addTriple(current,newSubject,relAttPredicates[i],{ type: RDFaProcessor.objectURI, value: currentObjectResource});
+            }
+         }
+         if (revAtt) {
+            for (var i=0; i<revAttPredicates.length; i++) {
+               this.addTriple(current,currentObjectResource, revAttPredicates[i], { type: RDFaProcessor.objectURI, value: newSubject});
+            }
+         }
+      } else {
+         // Sequence Step 10: incomplete triples
+         if (newSubject && !currentObjectResource && (relAtt || revAtt)) {
+            currentObjectResource = this.newBlankNode();
+            //alert(current.tagName+": generated blank node, newSubject="+newSubject+" currentObjectResource="+currentObjectResource);
+         }
+         if (relAtt && inlistAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               var list = listMapping[relAttPredicates[i]];
+               if (!list) {
+                  list = [];
+                  listMapping[predicate] = list;
+               }
+               //console.log("Adding incomplete list for "+predicate);
+               incomplete.push({ predicate: relAttPredicates[i], list: list });
+            }
+         } else if (relAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               incomplete.push({ predicate: relAttPredicates[i], forward: true });
+            }
+         }
+         if (revAtt) {
+            for (var i=0; i<revAttPredicates.length; i++) {
+               incomplete.push({ predicate: revAttPredicates[i], forward: false });
+            }
+         }
+      }
+
+      // Step 11: Current property values
+      if (propertyAtt) {
+         var datatype = null;
+         var content = null; 
+         if (datatypeAtt) {
+            datatype = datatypeAtt.value=="" ? RDFaProcessor.PlainLiteralURI : this.parseTermOrCURIEOrAbsURI(datatypeAtt.value,vocabulary,context.terms,prefixes,base);
+            if (datetimeAtt && !contentAtt) {
+               content = datetimeAtt.value;
+            } else {
+               content = datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI ? null : (contentAtt ? contentAtt.value : current.textContent);
+            }
+         } else if (contentAtt) {
+            datatype = RDFaProcessor.PlainLiteralURI;
+            content = contentAtt.value;
+         } else if (datetimeAtt) {
+            content = datetimeAtt.value;
+            datatype = RDFaProcessor.deriveDateTimeType(content);
+            if (!datatype) {
+               datatype = RDFaProcessor.PlainLiteralURI;
+            }
+         } else if (!relAtt && !revAtt) {
+            if (resourceAtt) {
+               content = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+            }
+            if (!content && hrefAtt) {
+               content = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            } else if (!content && srcAtt) {
+               content = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            }
+            if (content) {
+               datatype = RDFaProcessor.objectURI;
+            }
+         }
+         if (!datatype) {
+            if (typeofAtt && !aboutAtt) {
+               datatype = RDFaProcessor.objectURI;
+               content = typedResource;
+            } else {
+               content = current.textContent;
+               if (this.inHTMLMode && current.localName=="time") {
+                  datatype = RDFaProcessor.deriveDateTimeType(content);
+               }
+               if (!datatype) {
+                  datatype = RDFaProcessor.PlainLiteralURI;
+               }
+            }
+         }
+         var values = this.tokenize(propertyAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base);
+            if (predicate) {
+               if (inlistAtt) {
+                  var list = listMapping[predicate];
+                  if (!list) {
+                     list = [];
+                     listMapping[predicate] = list;
+                  }
+                  list.push((datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI) ? { type: datatype, value: current.childNodes} : { type: datatype ? datatype : RDFaProcessor.PlainLiteralURI, value: content, language: language});
+               } else {
+                  if (datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI) {
+                     this.addTriple(current,newSubject,predicate,{ type: datatype, value: current.childNodes});
+                  } else {
+                     this.addTriple(current,newSubject,predicate,{ type: datatype ? datatype : RDFaProcessor.PlainLiteralURI, value: content, language: language});
+                     //console.log(newSubject+" "+predicate+"="+content);
+                  }
+               }
+            }
+         }
+      }
+
+      // Sequence Step 12: complete incomplete triples with new subject
+      if (newSubject && !skip) {
+         for (var i=0; i<context.incomplete.length; i++) {
+            if (context.incomplete[i].list) {
+               //console.log("Adding subject "+newSubject+" to list for "+context.incomplete[i].predicate);
+               // TODO: it is unclear what to do here
+               context.incomplete[i].list.push({ type: RDFaProcessor.objectURI, value: newSubject });
+            } else if (context.incomplete[i].forward) {
+               //console.log(current.tagName+": completing forward triple "+context.incomplete[i].predicate+" with object="+newSubject);
+               this.addTriple(current,context.subject,context.incomplete[i].predicate, { type: RDFaProcessor.objectURI, value: newSubject});
+            } else {
+               //console.log(current.tagName+": completing reverse triple with object="+context.subject);
+               this.addTriple(current,newSubject,context.incomplete[i].predicate,{ type: RDFaProcessor.objectURI, value: context.subject});
+            }
+         }
+      }
+
+      var childContext = null;
+      var listSubject = newSubject;
+      if (skip) {
+         // TODO: should subject be null?
+         childContext = this.push(context,context.subject);
+         // TODO: should the entObject be passed along?  If not, then intermediary children will keep properties from being associated with incomplete triples.
+         // TODO: Verify: if the current baseURI has changed and the parentObject is the parent's base URI, then the baseURI should change
+         childContext.parentObject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+         childContext.incomplete = context.incomplete;
+         childContext.language = language;
+         childContext.prefixes = prefixes;
+         childContext.vocabulary = vocabulary;
+      } else {
+         childContext = this.push(context,newSubject);
+         childContext.parentObject = currentObjectResource ? currentObjectResource : (newSubject ? newSubject : context.subject);
+         childContext.prefixes = prefixes;
+         childContext.incomplete = incomplete;
+         if (currentObjectResource) {
+            //console.log("Generating new list mapping for "+currentObjectResource);
+            listSubject = currentObjectResource;
+            listMapping = {};
+            listMappingDifferent = true;
+         }
+         childContext.listMapping = listMapping;
+         childContext.language = language;
+         childContext.vocabulary = vocabulary;
+      }
+      if (listMappingDifferent) {
+         //console.log("Pushing list parent "+current.localName);
+         queue.unshift({ parent: current, context: context, subject: listSubject, listMapping: listMapping});
+      }
+      for (var child = current.lastChild; child; child = child.previousSibling) {
+         if (child.nodeType==Node.ELEMENT_NODE) {
+            //console.log("Pushing child "+child.localName);
+            queue.unshift({ current: child, context: childContext});
+         }
+      }
+   }
+   
+   if (this.inHTMLMode) {
+      this.copyProperties();
+   }
+
+   for (var i=0; i<this.finishedHandlers.length; i++) {
+      this.finishedHandlers[i](node);
+   }
+}
+
+RDFaProcessor.prototype.copyProperties = function() {
+}
+
+
+RDFaProcessor.prototype.push = function(parent,subject) {
+   return {
+      parent: parent,
+      subject: subject ? subject : (parent ? parent.subject : null),
+      parentObject: null,
+      incomplete: [],
+      listMapping: parent ? parent.listMapping : {},
+      language: parent ? parent.language : this.language,
+      prefixes: parent ? parent.prefixes : this.target.graph.prefixes,
+      terms: parent ? parent.terms : this.target.graph.terms,
+      vocabulary: parent ? parent.vocabulary : this.vocabulary
+   };
+};
+
+function RDFaGraph()
+{
+   var dataContext = this;
+   this.curieParser = {
+      trim: function(str) {
+         return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+      },
+      parse: function(value,resolve) {
+         value = this.trim(value);
+         if (value.charAt(0)=='[' && value.charAt(value.length-1)==']') {
+            value = value.substring(1,value.length-1);
+         }
+         var colon = value.indexOf(":");
+         if (colon>=0) {
+            var prefix = value.substring(0,colon);
+            if (prefix=="") {
+               // default prefix
+               var uri = dataContext.prefixes[""];
+               return uri ? uri+value.substring(colon+1) : null;
+            } else if (prefix=="_") {
+               // blank node
+               return "_:"+value.substring(colon+1);
+            } else if (DocumentData.NCNAME.test(prefix)) {
+               var uri = dataContext.prefixes[prefix];
+               if (uri) {
+                  return uri+value.substring(colon+1);
+               }
+            }
+         }
+
+         return resolve ? dataContext.baseURI.resolve(value) : value;
+      }
+   };
+   this.base =  null;
+   this.toString = function(requestOptions) {
+      var options = requestOptions && requestOptions.shorten ? { graph: this, shorten: true, prefixesUsed: {} } : null;
+      if (requestOptions && requestOptions.blankNodePrefix) {
+         options.filterBlankNode = function(id) {
+            return "_:"+requestOptions.blankNodePrefix+id.substring(2);
+         }
+      }
+      if (requestOptions && requestOptions.numericalBlankNodePrefix) {
+         var onlyNumbers = /^[0-9]+$/;
+         options.filterBlankNode = function(id) {
+            var label = id.substring(2);
+            return onlyNumbers.test(label) ? "_:"+requestOptions.numericalBlankNodePrefix+label : id;
+         }
+      }
+      s = "";
+      for (var subject in this.subjects) {
+         var snode = this.subjects[subject];
+         s += snode.toString(options);
+         s += "\n";
+      }
+      var prolog = requestOptions && requestOptions.baseURI ? "@base <"+baseURI+"> .\n" : "";
+      if (options && options.shorten) {
+         for (var prefix in options.prefixesUsed) {
+            prolog += "@prefix "+prefix+": <"+this.prefixes[prefix]+"> .\n";
+         }
+      }
+      return prolog.length==0 ? s : prolog+"\n"+s;
+   };
+   this.blankNodeCounter = 0;
+   this.clear = function() {
+      this.subjects = {};
+      this.prefixes = {};
+      this.terms = {};
+      this.blankNodeCounter = 0;
+   }
+   this.clear();
+   this.prefixes[""] = "http://www.w3.org/1999/xhtml/vocab#";
+
+   // w3c
+   this.prefixes["grddl"] = "http://www.w3.org/2003/g/data-view#";
+   this.prefixes["ma"] = "http://www.w3.org/ns/ma-ont#";
+   this.prefixes["owl"] = "http://www.w3.org/2002/07/owl#";
+   this.prefixes["rdf"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   this.prefixes["rdfa"] = "http://www.w3.org/ns/rdfa#";
+   this.prefixes["rdfs"] = "http://www.w3.org/2000/01/rdf-schema#";
+   this.prefixes["rif"] = "http://www.w3.org/2007/rif#";
+   this.prefixes["skos"] = "http://www.w3.org/2004/02/skos/core#";
+   this.prefixes["skosxl"] = "http://www.w3.org/2008/05/skos-xl#";
+   this.prefixes["wdr"] = "http://www.w3.org/2007/05/powder#";
+   this.prefixes["void"] = "http://rdfs.org/ns/void#";
+   this.prefixes["wdrs"] = "http://www.w3.org/2007/05/powder-s#";
+   this.prefixes["xhv"] = "http://www.w3.org/1999/xhtml/vocab#";
+   this.prefixes["xml"] = "http://www.w3.org/XML/1998/namespace";
+   this.prefixes["xsd"] = "http://www.w3.org/2001/XMLSchema#";
+   // non-rec w3c
+   this.prefixes["sd"] = "http://www.w3.org/ns/sparql-service-description#";
+   this.prefixes["org"] = "http://www.w3.org/ns/org#";
+   this.prefixes["gldp"] = "http://www.w3.org/ns/people#";
+   this.prefixes["cnt"] = "http://www.w3.org/2008/content#";
+   this.prefixes["dcat"] = "http://www.w3.org/ns/dcat#";
+   this.prefixes["earl"] = "http://www.w3.org/ns/earl#";
+   this.prefixes["ht"] = "http://www.w3.org/2006/http#";
+   this.prefixes["ptr"] = "http://www.w3.org/2009/pointers#";
+   // widely used
+   this.prefixes["cc"] = "http://creativecommons.org/ns#";
+   this.prefixes["ctag"] = "http://commontag.org/ns#";
+   this.prefixes["dc"] = "http://purl.org/dc/terms/";
+   this.prefixes["dcterms"] = "http://purl.org/dc/terms/";
+   this.prefixes["foaf"] = "http://xmlns.com/foaf/0.1/";
+   this.prefixes["gr"] = "http://purl.org/goodrelations/v1#";
+   this.prefixes["ical"] = "http://www.w3.org/2002/12/cal/icaltzd#";
+   this.prefixes["og"] = "http://ogp.me/ns#";
+   this.prefixes["rev"] = "http://purl.org/stuff/rev#";
+   this.prefixes["sioc"] = "http://rdfs.org/sioc/ns#";
+   this.prefixes["v"] = "http://rdf.data-vocabulary.org/#";
+   this.prefixes["vcard"] = "http://www.w3.org/2006/vcard/ns#";
+   this.prefixes["schema"] = "http://schema.org/";
+   
+   // terms
+   this.terms["describedby"] = "http://www.w3.org/2007/05/powder-s#describedby";
+   this.terms["license"] = "http://www.w3.org/1999/xhtml/vocab#license";
+   this.terms["role"] = "http://www.w3.org/1999/xhtml/vocab#role";
+
+   Object.defineProperty(this,"tripleCount",{
+      enumerable: true,
+      configurable: false,
+      get: function() {
+         var count = 0;
+         for (var s in this.subjects) {
+            var snode = this.subjects[s];
+            for (var p in snode.predicates) {
+               count += snode.predicates[p].objects.length;
+            }
+         }
+         return count;
+      }
+   });
+}
+
+RDFaGraph.prototype.newBlankNode = function() {
+   this.blankNodeCounter++;
+   return "_:"+this.blankNodeCounter;
+}
+
+RDFaGraph.prototype.expand = function(curie) {
+   return this.curieParser.parse(curie,true);  
+}
+
+RDFaGraph.prototype.shorten = function(uri,prefixesUsed) {
+   for (prefix in this.prefixes) {
+      var mapped = this.prefixes[prefix];
+      if (uri.indexOf(mapped)==0) {
+         if (prefixesUsed) {
+            prefixesUsed[prefix] = mapped;
+         }
+         return prefix+":"+uri.substring(mapped.length);
+      }
+   }
+   return null;
+}
+
+RDFaGraph.prototype.add = function(subject,predicate,object,options) {
+   if (!subject || !predicate || !object) {
+      return;
+   }
+   subject = this.expand(subject);
+   predicate = this.expand(predicate);
+   var snode = this.subjects[subject];
+   if (!snode) {
+      snode = new RDFaSubject(this,subject);
+      this.subjects[subject] = snode;
+   }
+   if (options && options.origin) {
+      snode.origins.push(options.origin);
+   }
+   if (predicate=="http://www.w3.org/1999/02/22-rdf-syntax-ns#type") {
+      snode.types.push(object);
+   }
+   var pnode = snode.predicates[predicate];
+   if (!pnode) {
+      pnode = new RDFaPredicate(predicate);
+      snode.predicates[predicate] = pnode;
+   }
+   
+   if (typeof object == "string") {
+      pnode.objects.push({
+         type: RDFaProcessor.PlainLiteralURI,
+         value: object
+      });
+   } else {
+      pnode.objects.push({
+         type: object.type ? this.expand(object.type) : RDFaProcessor.PlainLiteralURI,
+         value: object.value ? object.value : "",
+         origin: object.origin,
+         language: object.language
+      });
+   }
+   
+}
+
+RDFaGraph.prototype.addCollection = function(subject,predicate,objectList,options) {
+   if (!subject || !predicate || !objectList) {
+      return;
+   }
+   
+   var lastSubject = subject;
+   var lastPredicate = predicate;
+   for (var i=0; i<objectList.length; i++) {
+      var object = { type: options && options.type ? options.type : "rdf:PlainLiteral"};
+      if (options && options.language) {
+         object.language = options.language;
+      }
+      if (options && options.datatype) {
+         object.datatype = options.datatype;
+      }
+      if (typeof objectList[i] == "object") {
+         object.value = objectList[i].value ?  objectList[i].value : "";
+         if (objectList[i].type) {
+            object.type = objectList[i].type;
+         }
+         if (objectList[i].language) {
+            object.language = objectList[i].language;
+         }
+         if (objectList[i].datatype) {
+            object.datatype = objectList[i].datatype;
+         }
+      } else {
+         object.value = objectList[i]
+      }
+      var bnode = this.newBlankNode();
+      this.add(lastSubject,lastPredicate,{ type: "rdf:object", value: bnode});
+      this.add(bnode,"rdf:first",object);
+      lastSubject = bnode;
+      lastPredicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest";
+   }
+   this.add(lastSubject,lastPredicate,{ type: "rdf:object", value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"});
+}
+
+RDFaGraph.prototype.remove = function(subject,predicate) {
+   if (!subject) {
+      this.subjects = {};
+      return;
+   }
+   subject = this.expand(subject);
+   var snode = this.subjects[snode];
+   if (!snode) {
+      return;
+   }
+   if (!predicate) {
+      delete this.subjects[subject];
+      return;
+   }
+   predicate = this.expand(predicate);
+   delete snode.predicates[predicate];
+}
+
+function RDFaSubject(graph,subject) {
+   this.graph = graph;
+   // TODO: subject or id?
+   this.subject = subject
+   this.id = subject;
+   this.predicates =  {};
+   this.origins = [];
+   this.types = [];
+}
+
+RDFaSubject.prototype.toString = function(options) {
+   var s = null;
+   if (this.subject.substring(0,2)=="_:") {
+      if (options && options.filterBlankNode) {
+         s = options.filterBlankNode(this.subject);
+      } else {
+         s = this.subject;
+      }
+   } else if (options && options.shorten) {
+      s = this.graph.shorten(this.subject,options.prefixesUsed);
+      if (!s) {
+         s = "<" + this.subject + ">";
+      }
+   } else {
+      s = "<" + this.subject + ">";
+   }
+   var first = true;
+   for (var predicate in this.predicates) {
+      if (!first) {
+         s += ";\n";
+      } else {
+         first = false;
+      }
+      s += " " + this.predicates[predicate].toString(options);
+   }
+   s += " .";
+   return s;
+}
+
+RDFaSubject.prototype.toObject = function() {
+   var o = { subject: this.subject, predicates: {} };
+   for (var predicate in this.predicates) {
+      var pnode = this.predicates[predicate];
+      var p = { predicate: predicate, objects: [] };
+      o.predicates[predicate] = p;
+      for (var i=0; i<pnode.objects.length; i++) {
+         var object = pnode.objects[i];
+         if (object.type==RDFaProcessor.XMLLiteralURI) {
+            var serializer = new XMLSerializer();
+            var value = "";
+            for (var x=0; x<object.value.length; x++) {
+               if (object.value[x].nodeType==Node.ELEMENT_NODE) {
+                  value += serializer.serializeToString(object.value[x]);
+               } else if (object.value[x].nodeType==Node.TEXT_NODE) {
+                  value += object.value[x].nodeValue;
+               }
+            } 
+            p.objects.push({ type: object.type, value: value, language: object.language });
+         } else {
+            p.objects.push({ type: object.type, value: object.value, language: object.language });
+         }
+      }
+   }
+   return o;
+   
+}
+
+RDFaSubject.prototype.getValues = function() {
+   var values = [];
+   for (var i=0; i<arguments.length; i++) {
+      var property = this.graph.curieParser.parse(arguments[i],true)
+      var pnode = this.predicates[property];
+      if (pnode) {
+         for (var j=0; j<pnode.objects.length; j++) {
+            values.push(pnode.objects[j].value);
+         }
+      }
+   }
+   return values;
+}
+
+function RDFaPredicate(predicate) {
+   this.id = predicate;
+   this.predicate = predicate;
+   this.objects = [];
+}
+
+RDFaPredicate.getPrefixMap = function(e) {
+   var prefixMap = {};
+   while (e.attributes) {
+      for (var i=0; i<e.attributes.length; i++) {
+         if (e.attributes[i].namespaceURI=="http://www.w3.org/2000/xmlns/") {
+            var prefix = e.attributes[i].localName;
+            if (e.attributes[i].localName=="xmlns") {
+               prefix = "";
+            }
+            if (!(prefix in prefixMap)) {
+               prefixMap[prefix] = e.attributes[i].nodeValue;
+            }
+         }
+      }
+      e = e.parentNode;
+   }
+   return prefixMap;
+}
+
+RDFaPredicate.prototype.toString = function(options) {
+   var s = null;
+   if (options && options.shorten && options.graph) {
+      s = options.graph.shorten(this.predicate,options.prefixesUsed);
+      if (!s) {
+         s = "<" + this.predicate + ">"
+      }
+   } else {
+      s = "<" + this.predicate + ">"
+   }
+   s += " ";
+   for (var i=0; i<this.objects.length; i++) {
+      if (i>0) {
+         s += ", ";
+      }
+      // TODO: handle HTML literal
+      if (this.objects[i].type=="http://www.w3.org/1999/02/22-rdf-syntax-ns#object") {
+         if (this.objects[i].value.substring(0,2)=="_:") {
+            if (options && options.filterBlankNode) {
+               s += options.filterBlankNode(this.objects[i].value);
+            } else {
+               s += this.objects[i].value;
+            }
+         } else if (options && options.shorten && options.graph) {
+            u = options.graph.shorten(this.objects[i].value,options.prefixesUsed);
+            if (u) {
+               s += u;
+            } else {
+               s += "<" + this.objects[i].value + ">";
+            }
+         } else {
+            s += "<" + this.objects[i].value + ">";
+         }
+      } else if (this.objects[i].type=="http://www.w3.org/2001/XMLSchema#integer" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#decimal" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#double" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#boolean") {
+         s += this.objects[i].value;
+      } else if (this.objects[i].type=="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") {
+         var serializer = new XMLSerializer();
+         var value = "";
+         for (var x=0; x<this.objects[i].value.length; x++) {
+            if (this.objects[i].value[x].nodeType==Node.ELEMENT_NODE) {
+               var prefixMap = RDFaPredicate.getPrefixMap(this.objects[i].value[x]);
+               var prefixes = [];
+               for (var prefix in prefixMap) {
+                  prefixes.push(prefix);
+               }
+               prefixes.sort();
+               var e = this.objects[i].value[x].cloneNode(true);
+               for (var p=0; p<prefixes.length; p++) {
+                  e.setAttributeNS("http://www.w3.org/2000/xmlns/",prefixes[p].length==0 ? "xmlns" : "xmlns:"+prefixes[p],prefixMap[prefixes[p]]);
+               }
+               value += serializer.serializeToString(e);
+            } else if (this.objects[i].value[x].nodeType==Node.TEXT_NODE) {
+               value += this.objects[i].value[x].nodeValue;
+            }
+         }
+         s += '"""'+value.replace(/"""/,"\\\"\\\"\\\"")+'"""^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>';
+      } else {
+         var l = this.objects[i].value;
+         if (l.indexOf("\n")>=0 || l.indexOf("\r")>=0) {
+            s += '"""' + l.replace(/"""/,"\\\"\\\"\\\"") + '"""';
+         } else {
+            s += '"' + l.replace(/"/,"\\\"") + '"';
+         }
+         if (this.objects[i].type!="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral") {
+             s += "^^<"+this.objects[i].type+">";
+         } else if (this.objects[i].language) {
+             s += "@"+this.objects[i].language;
+         }
+      }
+   }
+   return s;
+}
+GraphRDFaProcessor.prototype = new RDFaProcessor();
+GraphRDFaProcessor.prototype.constructor=RDFaProcessor;
+function GraphRDFaProcessor(target) {
+   RDFaProcessor.call(this,target);
+}
+
+GraphRDFaProcessor.prototype.getObjectSize = function(obj) {
+   var size = 0;
+   for (var key in obj) {
+      if (obj.hasOwnProperty(key)) {
+         size++;
+      }
+   }
+   return size;
+};
+
+
+GraphRDFaProcessor.prototype.init = function() {
+   var thisObj = this;
+   this.finishedHandlers.push(function(node) {
+      for (var subject in thisObj.target.graph.subjects) {
+         var snode = thisObj.target.graph.subjects[subject];
+         if (thisObj.getObjectSize(snode.predicates)==0) {
+            delete thisObj.target.graph.subjects[subject];
+         }
+      }
+   });
+}
+GraphRDFaProcessor.prototype.newBlankNode = function() {
+   return this.target.graph.newBlankNode();
+}
+
+GraphRDFaProcessor.prototype.newSubjectOrigin = function(origin,subject) {
+   var snode = this.newSubject(null,subject);
+   for (var i=0; i<snode.origins.length; i++) {
+      if (snode.origins[i]===origin) {
+         return;
+      }
+   }
+   snode.origins.push(origin);
+   if (!origin.data) {
+      Object.defineProperty(origin,"data", {
+            value: snode,
+            writable: false,
+            configurable: true,
+            enumerable: true
+         });
+   }
+}
+
+GraphRDFaProcessor.prototype.newSubject = function(origin,subject) {
+   var snode = this.target.graph.subjects[subject];
+   if (!snode) {
+      snode = new RDFaSubject(this.target.graph,subject);
+      this.target.graph.subjects[subject] = snode;
+   }
+   return snode;
+}
+
+
+GraphRDFaProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+   var snode = this.newSubject(origin,subject);
+   var pnode = snode.predicates[predicate];
+   if (!pnode) {
+      pnode = new RDFaPredicate(predicate);
+      snode.predicates[predicate] = pnode;
+   }
+
+   for (var i=0; i<pnode.objects.length; i++) {
+      if (pnode.objects[i].type==object.type && pnode.objects[i].value==object.value) {
+         if (pnode.objects[i].origin!==origin) {
+            if (!Array.isArray(pnode.objects[i].origin)) {
+               var origins = [];
+               origins.push(pnode.objects[i].origin);
+               pnode.objects[i].origin = origins;
+            }
+            pnode.objects[i].origin.push(origin);
+         }
+         return;
+      }
+   }
+   pnode.objects.push(object);   
+   object.origin = origin;
+   if (predicate==RDFaProcessor.typeURI) {
+      snode.types.push(object.value);
+   }
+}
+
+GraphRDFaProcessor.rdfaCopyPredicate = "http://www.w3.org/ns/rdfa#copy";
+GraphRDFaProcessor.rdfaPatternType = "http://www.w3.org/ns/rdfa#Pattern";
+
+GraphRDFaProcessor.prototype.copyProperties = function() {
+   var copySubjects = [];
+   var patternSubjects = {};
+   for (var subject in this.target.graph.subjects) {
+      var snode = this.target.graph.subjects[subject];
+      var pnode = snode.predicates[GraphRDFaProcessor.rdfaCopyPredicate];
+      if (!pnode) {
+         continue;
+      }
+      copySubjects.push(subject);
+      for (var i=0; i<pnode.objects.length; i++) {
+         if (pnode.objects[i].type!=RDFaProcessor.objectURI) {
+            continue;
+         }
+         var target = pnode.objects[i].value;
+         var patternSubjectNode = this.target.graph.subjects[target];
+         if (!patternSubjectNode) {
+            continue;
+         }
+         var patternTypes = patternSubjectNode.predicates[RDFaProcessor.typeURI];
+         if (!patternTypes) {
+            continue;
+         }
+         var isPattern = false;
+         for (var j=0; j<patternTypes.objects.length && !isPattern; j++) {
+            if (patternTypes.objects[j].value==GraphRDFaProcessor.rdfaPatternType && 
+                patternTypes.objects[j].type==RDFaProcessor.objectURI) {
+               isPattern = true;
+            }
+         }
+         if (!isPattern) {
+            continue;
+         }
+         patternSubjects[target] = true;
+         for (var predicate in patternSubjectNode.predicates) {
+            var targetPNode = patternSubjectNode.predicates[predicate];
+            if (predicate==RDFaProcessor.typeURI) {
+               if (targetPNode.objects.length==1) {
+                  continue;
+               }
+               for (var j=0; j<targetPNode.objects.length; j++) {
+                  if (targetPNode.objects[j].value!=GraphRDFaProcessor.rdfaPatternType) {
+                      var subjectPNode = snode.predicates[predicate];
+                      if (!subjectPNode) {
+                         subjectPNode = new RDFaPredicate(predicate);
+                         snode.predicates[predicate] = subjectPNode;
+                      }
+                      subjectPNode.objects.push(
+                         { type: targetPNode.objects[j].type, 
+                           value: targetPNode.objects[j].value, 
+                           language: targetPNode.objects[j].language, 
+                           origin: targetPNode.objects[j].origin}
+                      );
+                      snode.types.push(targetPNode.objects[j].value);
+                  }
+               }
+            } else {
+               var subjectPNode = snode.predicates[predicate];
+               if (!subjectPNode) {
+                  subjectPNode = new RDFaPredicate(predicate);
+                  snode.predicates[predicate] = subjectPNode;
+               }
+               for (var j=0; j<targetPNode.objects.length; j++) {
+                   subjectPNode.objects.push(
+                      { type: targetPNode.objects[j].type, 
+                        value: targetPNode.objects[j].value, 
+                        language: targetPNode.objects[j].language, 
+                        origin: targetPNode.objects[j].origin}
+                   );
+               }
+            }
+         }
+      }
+   }
+   for (var i=0; i<copySubjects.length; i++) {
+      var snode = this.target.graph.subjects[copySubjects[i]];
+      delete snode.predicates[GraphRDFaProcessor.rdfaCopyPredicate];
+   }
+   for (var subject in patternSubjects) {
+      delete this.target.graph.subjects[subject];
+   }
+}
+
+function RDFaEnvironment(owner) {
+   this.query = function(query,template) {
+      if (!query) {
+         return owner.getProjections(template);
+      }
+      var projections = [];
+      for (var subject in owner._data_.graph.subjects) {
+         var snode = owner._data_.graph.subjects[subject];
+         for (var key in query) {
+            var predicate = owner._data_.graph.curieParser.parse(key,true);
+            var pnode = snode.predicates[predicate];
+            if (!pnode) {
+               snode = null;
+               break;
+            }
+            var value = owner._data_.graph.curieParser.parse(query[key],false);
+            var object = null;
+            for (var i=0; !object && i<pnode.objects.length; i++) {
+               if (pnode.objects[i].value==value) {
+                  object = pnode.objects[i];
+               }
+            }
+            if (!object) {
+               snode = null;
+               break;
+            }
+         }
+         if (snode) {
+            projections.push(DocumentData.toProjection(owner,snode,template));
+         }
+      }
+      return projections;
+   }
+}
+
+function Projection(owner,subject) {
+   this._data_ = { 
+      owner: owner,
+      subject: subject,
+      properties: {}
+   };
+}
+
+Projection.prototype.getProperties = function() {
+   var propertyNames = [];
+   for (var property in this._data_.properties) {
+      propertyNames.push(property);
+   }
+   return propertyNames;
+}
+
+Projection.prototype.getSubject = function() {
+   return this._data_.subject;
+}
+
+Projection.prototype.get = function(uriOrCurie) {
+   var property = this._data_.owner._data_.graph.curieParser.parse(uriOrCurie,true);
+   var objects = this._data_.properties[property];
+   return objects ? objects[0] : null;
+}
+
+Projection.prototype.getAll = function(uriOrCurie) {
+   var property = this._data_.owner._data_.graph.curieParser.parse(uriOrCurie,true);
+   return this._data_.properties[property];
+}
+
+DocumentData.prototype = new URIResolver();
+DocumentData.prototype.constructor = DocumentData;
+function DocumentData (uri) {
+   this._data_ = { 
+      graph: new RDFaGraph()
+   };
+   this._data_.graph.baseURI = this.parseURI(uri)
+   this._data_.baseURI = this._data_.graph.baseURI;
+
+   var dataContext = this._data_;
+   Object.defineProperty(this,"rdfa", {
+      value: new RDFaEnvironment(this),
+      writable: false,
+      configurable: false,
+      enumerable: true
+   });
+   Object.defineProperty(this,"graph", {
+      value: this._data_.graph,
+      writable: false,
+      configurable: false,
+      enumerable: true
+   });
+   Object.defineProperty(this,"implementation", {
+      value: GreenTurtle.implementation,
+      writable: false,
+      configurable: false,
+      enumerable: true
+   });
+}
+
+DocumentData.nameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]';
+DocumentData.nameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B
 10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1
 F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]';
+DocumentData.NCNAME = new RegExp('^' + RDFaProcessor.nameStartChar + RDFaProcessor.nameChar + '*$');
+
+DocumentData.toProjection = function(owner,snode,template) {
+
+   var projection = new Projection(owner,snode.subject);
+   for (var predicate in snode.predicates) {
+      var pnode = snode.predicates[predicate];
+      var values = [];
+      projection._data_.properties[predicate] = values;
+      for (var i=0; i<pnode.objects.length; i++) {
+         values.push(pnode.objects[i].value);
+      }
+   }
+   if (template) {
+      for (var key in template) {
+         var predicate = template[key];
+         predicate = owner._data_.graph.curieParser.parse(predicate,true);
+         var values = projection._data_.properties[predicate];
+         if (values) {
+            // TODO: API issue: is this the first value or all values?
+            projection[key] = values.length==1 ? values[0] : values;
+         }
+      }
+   }
+   return projection;
+};
+
+
+DocumentData.prototype.getProperties = function(subject) {
+   
+   var properties = [];
+
+   if (subject) {
+      subject = this._data_.graph.curieParser.parse(subject,true);
+      snode = this._data_.graph.subjects[subject];
+      if (snode) {
+         for (var predicate in snode.predicates) {
+            properties.push(predicate);
+         }
+      }
+   } else {
+      var uniqueProperties = {};
+      for (var graphSubject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[graphSubject];
+         if (snode) {
+            for (var predicate in snode.predicates) {
+               if (!uniqueProperties[predicate]) {
+                  uniqueProperties[predicate] = true;
+                  properties.push(predicate);
+               }
+            }
+         }
+      }
+   }
+   return properties;
+};
+
+DocumentData.prototype.getSubjects = function(property,value) {
+   var subjects = [];
+   if (property) {
+      property = this._data_.graph.curieParser.parse(property,true);
+   }
+   if (property && value) {
+      var expanded = this._data_.graph.curieParser.parse(value,true);
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         var pnode = snode.predicates[property];
+         if (pnode) {
+            for (var i=0; i<pnode.objects.length; i++) {
+               if (pnode.objects[i].value==value || pnode.objects[i].value==expanded) {
+                  subjects.push(subject);
+                  break;
+               }
+            }
+         }
+      }
+   } else if (property) {
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         var pnode = snode.predicates[property];
+         if (pnode) {
+            subjects.push(subject);
+         }
+      }
+   } else if (value) {
+      var expanded = this._data_.graph.curieParser.parse(value,true);
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         for (var predicate in snode.predicates) {
+            var pnode = subject.predicates[predicate];
+            if (pnode) {
+               var object = null;
+               for (var i=0; !object && i<pnode.objects.length; i++) {
+                  if (pnode.objects[i].value==value || node.objects[i].value==expanded) {
+                     object = pnode.objects[i];
+                  }
+               }
+               if (object) {
+                  subjects.push(subject);
+                  break;
+               }
+            }
+         }
+      }
+   } else {
+      for (var subject in this._data_.graph.subjects) {
+         subjects.push(subject);
+      }
+   }
+   return subjects;
+};
+
+// TODO: is there a way to merge this with getValueOrigin ?  The code is almost the same
+DocumentData.prototype.getValueOrigins = function(subject,property) {
+   var values = [];
+   var convert = function(pnode) {
+      if (pnode) {
+         for (var i=0; i<pnode.objects.length; i++) {
+            if (Array.isArray(pnode.objects[i].origin)) {
+               for (var j=0; j<pnode.objects[i].origin.length; j++) {
+                  values.push({ origin: pnode.objects[i].origin[j], value: pnode.objects[i].value });
+               }
+            } else {
+               values.push({ origin: pnode.objects[i].origin, value: pnode.objects[i].value });
+            }
+         }
+      }
+   }
+   if (property) {
+      property = this._data_.graph.curieParser.parse(property,true);
+   }
+   if (subject) {
+      subject = this._data_.graph.curieParser.parse(subject,true);
+      var snode = this._data_.graph.subjects[subject];
+      if (snode) {
+         if (property) {
+            convert(snode.predicates[property]);
+         } else {
+            for (var predicate in snode.predicates) {
+               convert(snode.predicates[predicate]);
+            }
+         }
+      }
+   } else if (property) {
+      for (var graphSubject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[graphSubject];
+         convert(snode.predicates[property]);
+      }
+   } else {
+      for (var graphSubject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[graphSubject];
+         for (var predicate in snode.predicates) {
+            convert(snode.predicates[predicate]);
+         }
+      }
+   }
+   return values;
+}
+DocumentData.prototype.getValues = function(subject,property) {
+   var values = [];
+   if (property) {
+      property = this._data_.graph.curieParser.parse(property,true);
+   }
+   if (subject) {
+      subject = this._data_.graph.curieParser.parse(subject,true);
+      var snode = this._data_.graph.subjects[subject];
+      if (snode) {
+         if (property) {
+            var pnode = snode.predicates[property];
+            if (pnode) {
+               for (var i=0; i<pnode.objects.length; i++) {
+                  values.push(pnode.objects[i].value);
+               }
+            }
+         } else {
+            for (var predicate in snode.predicates) {
+               var pnode = snode.predicates[predicate];
+               for (var i=0; i<pnode.objects.length; i++) {
+                  values.push(pnode.objects[i].value);
+               }
+            }
+         }
+      }
+   } else if (property) {
+      for (var graphSubject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[graphSubject];
+         var pnode = snode.predicates[property];
+         if (pnode) {
+            for (var i=0; i<pnode.objects.length; i++) {
+               values.push(pnode.objects[i].value);
+            }
+         }
+      }
+   } else {
+      for (var graphSubject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[graphSubject];
+         for (var predicate in snode.predicates) {
+            var pnode = snode.predicates[predicate];
+            for (var i=0; i<pnode.objects.length; i++) {
+               values.push(pnode.objects[i].value);
+            }
+         }
+      }
+   }
+   return values;
+};
+
+Object.defineProperty(DocumentData.prototype,"prefixes",{
+   enumerable: true,
+   get: function() {
+      return Object.keys(this._data_.graph.prefixes);
+   }
+});
+
+DocumentData.prototype.setMapping = function(prefix,uri) {
+   this._data_.graph.prefixes[prefix] = uri;
+};
+
+DocumentData.prototype.getMapping = function(prefix) {
+   return this._data_.graph.prefixes[prefix];
+};
+
+DocumentData.prototype.expand = function(curie) {
+   return this._data_.graph.expand(curie);  
+}
+
+DocumentData.prototype.shorten = function(uri) {
+   return this._data_.graph.shorten(uri);
+}
+
+DocumentData.prototype.getSubject = function(subject) {
+   if (!subject) { return null; }
+
+   subject = this._data_.graph.curieParser.parse(subject,true);
+ 
+   var snode = this._data_.graph.subjects[subject];
+   return snode ? snode : null;
+}
+
+DocumentData.prototype.getProjection = function(subject, template) {
+   if (!subject) { return null }
+
+   subject = this._data_.graph.curieParser.parse(subject,true);
+   
+   var snode = this._data_.graph.subjects[subject];
+   if (!snode) {
+      return null;
+   }
+
+   return DocumentData.toProjection(this,snode,template);
+}
+
+DocumentData.prototype.getProjections = function(property, value, template) {
+   if (property) {
+      property = this._data_.graph.curieParser.parse(property,true);
+   }
+   var projections = [];
+   if (typeof value == "undefined" && typeof template == "undefined") {
+      template = property;
+   }
+   if (property && value) {
+      var expanded = this._data_.graph.curieParser.parse(value,true);
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         var pnode = snode.predicates[property];
+         if (pnode) {
+            for (var i=0; i<pnode.objects.length; i++) {
+               if (pnode.objects[i].value==value || pnode.objects[i].value==expanded) {
+                  projections.push(DocumentData.toProjection(this,snode,template));
+                  break;
+               }
+            }
+         }
+      }
+   } else if (property) {
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         if (snode.predicates[property]) {
+            projections.push(DocumentData.toProjection(this,snode,template));
+         }
+      }
+   } else {
+      for (var subject in this._data_.graph.subjects) {
+         var snode = this._data_.graph.subjects[subject];
+         projections.push(DocumentData.toProjection(this,snode,template));
+      }
+   }
+   return projections;
+};
+
+DocumentData.prototype.merge = function(graph,options) {
+   var mergeBlank = options && options.mergeBlankNodes ? true : false;
+   var max = 0;
+   if (!mergeBlank) {
+      for (var subject in this._data_.graph.subjects) {
+         var match = /_:([0-9]+)/.exec(subject);
+         if (match) {
+            var n = parseInt(match[1]);
+            if (n>max) {
+               max = n;
+            }
+         }
+      }
+   }
+   if (graph) {
+      var blankMap = {};
+      var subjectMap = mergeBlank ? 
+         function(u) { return u; } :
+         function(u) { 
+            var mapSubject = blankMap[u];
+            if (!mapSubject && /_:([0-9]+)/.test(u)) {
+               max++;
+               mapSubject = "_:"+max;
+               blankMap[u] = mapSubject;
+            }
+            return mapSubject ? mapSubject : u;
+         };
+      for (var subject in graph) {
+         var mapSubject = subjectMap(subject);
+         var snode = graph[subject];
+         subject = mapSubject ? mapSubject : subject;
+         var target = this._data_.graph.subjects[subject];
+         if (target) {
+            for (var predicate in snode.predicates) {
+               var pnode = snode.predicates[predicate];
+               var targetPredicate = target.predicates[predicate];
+               if (targetPredicate) {
+                  for (var i=0; i<pnode.objects.length; i++) {
+                     var object = pnode.objects[i];
+                     var toAdd = [];
+                     for (var j=0; j<targetPredicate.objects.length; j++) {
+                        if (object.type==RDFaProcessor.XMLLiteralURI && (targetPredicate.objects[j].type!=object.type || targetPredicate.objects[j].value!==object.value)) {
+                           toAdd.push(object);
+                        } else if (targetPredicate.objects[j].type!=object.type || targetPredicate.objects[j].value==object.value) {
+                           toAdd.push(object);
+                        }
+                     }
+                     // map object subjects
+                     for (var j=0; j<toAdd.length; j++) {
+                        if (toAdd[j].type==RDFaProcessor.objectURI) {
+                           toAdd[j].value = subjectMap(toAdd[j].value);
+                        }
+                        targetPredicate.objects.push(toAdd[j]);
+                     }
+                  }
+               } else {
+                  target.predicates[predicate] = pnode;
+                  // map object subjects
+                  for (var i=0; i<pnode.objects.length; i++) {
+                     if (pnode.objects[i].type==RDFaProcessor.objectURI) {
+                        pnode.objects[i].value = subjectMap(pnode.objects[i].value);
+                     }
+                  }
+               }
+            }
+         } else {
+            this._data_.graph.subjects[subject] = snode;
+            snode.subject = subject;
+            // map object subjects
+            for (var predicate in snode.predicates) {
+               var pnode = snode.predicates[predicate];
+               for (var i=0; i<pnode.objects.length; i++) {
+                  if (pnode.objects[i].type==RDFaProcessor.objectURI) {
+                     pnode.objects[i].value = subjectMap(pnode.objects[i].value);
+                  }
+               }
+            }
+         }
+      }
+   }
+   if (options && options.prefixes) {
+      for (var prefix in options.prefixes) {
+         if (!this._data_.graph.prefixes[prefix]) {
+            this._data_.graph.prefixes[prefix] = options.prefixes[prefix];
+         }
+      }
+   }
+}
+
+Element.prototype.getElementsByType = function() {
+   var typeList = [];
+   for (var i=0; i<arguments.length; i++) {
+      typeList.push(this.ownerDo

<TRUNCATED>

[15/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/pom.xml b/platform/launcher.storageless.parent/pom.xml
new file mode 100644
index 0000000..1414762
--- /dev/null
+++ b/platform/launcher.storageless.parent/pom.xml
@@ -0,0 +1,927 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.storageless.parent</artifactId>
+    <version>0.9-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>Clerezza - Platform Launcher Storageless Parent POM</name>
+    <description>A parent for Platform launchers, containing the platform bundlessca as runtime dependencies.
+    </description>
+    <modules>
+        <module>platform.launcher.storageless</module>
+    </modules>
+    
+    <dependencyManagement>
+      <dependencies>
+	<!-- Apache Stanbol Dependencies -->
+	<dependency>
+          <groupId>org.apache.stanbol</groupId>
+          <artifactId>org.apache.stanbol.commons.frameworkfragment</artifactId>
+          <version>${stanbol.version}</version>
+        </dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.web.resources</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+      <version>1.0.0</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.authentication.basic</artifactId>
+	  <version>1.0.0</version>
+	</dependency>
+	<dependency>
+          <groupId>org.apache.stanbol</groupId>
+          <artifactId>org.apache.stanbol.commons.security.fexilwebconsole</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+    <!-- 0.12 version is incomaptible with 1.0.0 version of commons.security, so diabling till stanbol 1.0.0 is released
+	<dependency>
+          <groupId>org.apache.stanbol</groupId>
+          <artifactId>org.apache.stanbol.commons.security.usermanagement</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+    -->
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.ldpath.clerezza</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.ldpathtemplate</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.web.viewable</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.web.rdfviewable.writer</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.web.base</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.freemarker</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.indexedgraph</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+	<dependency>
+	  <groupId>org.apache.stanbol</groupId>
+	  <artifactId>org.apache.stanbol.commons.jsonld</artifactId>
+	  <version>${stanbol.version}</version>
+	</dependency>
+      </dependencies>
+    </dependencyManagement>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.frameworkfragment</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!--
+            Clerezza Dependencies
+        -->
+        <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>wymiwyg-commons-core</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-core</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-arq</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-iri</artifactId>
+            <scope>runtime</scope>
+            <version>1.0.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>com.ibm.icu</artifactId>
+            <scope>runtime</scope>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.ops4j.pax.swissbox.tinybundles</artifactId>
+            <scope>runtime</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>javax.mail</artifactId>
+            <scope>runtime</scope>
+            <version>0.5-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.json.simple</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-compiler</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-actors</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-reflect</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.scala</groupId>
+            <artifactId>script-engine</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <!-- <dependency>
+            <groupId>com.sun.script.jruby</groupId>
+            <artifactId>jruby-engine</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.jruby</artifactId>
+            <scope>runtime</scope>
+        </dependency> -->
+        <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore-osgi</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jsslutils</groupId>
+            <artifactId>jsslutils</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <!-- these are now embeded as most recent version is not OSGi bundle
+        <dependency>
+            <groupId>net.rootdev</groupId>
+            <artifactId>java-rdfa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.rootdev</groupId>
+            <artifactId>java-rdfa-htmlparser</artifactId>
+        </dependency> -->
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sshd</groupId>
+            <artifactId>sshd-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sshd</groupId>
+            <artifactId>sshd-pam</artifactId>
+        </dependency>
+        <!--
+            Clerezza Bundles
+        -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.logging.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.logging.initializer</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.logging.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.enrichment</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphnodeprovider</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager.webinterface</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils.customproperty</artifactId>
+            <scope>runtime</scope>
+            <version>0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.accountcontrolpanel.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.accountcontrolpanel.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.wink</groupId>
+            <artifactId>wink-osgi</artifactId>
+            <version>1.3.0</version>
+            <!-- this has to start early, because of the MediaType requiring RuntimeImpl in 
+            static initializer -->
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.enrichment</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.facade</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.commons</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.file.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.sparql</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.parser</artifactId>
+            <scope>runtime</scope>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.serializer</artifactId>
+            <scope>runtime</scope>
+            <version>0.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.rdfa</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.rdfjson</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.storage.web</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content</artifactId>
+            <scope>runtime</scope>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.default404</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.editor</artifactId>
+            <scope>runtime</scope>
+            <version>0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.fsadaptor</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.imagemetadata</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.representations.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.content.representations.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.webinterface</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.shellcustomizer</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>shell</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>shell.felixshellcommand</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>bundledevtool</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>sshshell</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <scope>runtime</scope>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.rdf.providers</artifactId>
+            <scope>runtime</scope>
+            <version>0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.stanbol.fragments</artifactId>
+            <scope>runtime</scope>
+            <version>0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.web.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.web.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <!--<dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security</artifactId>
+            <scope>runtime</scope>
+        </dependency> -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.conditions</artifactId>
+            <scope>runtime</scope>
+            <version>0.6</version>
+        </dependency>
+        <!-- <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.foafssl.core</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.foafssl.test</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+	-->
+        <dependency>
+          <groupId>org.apache.clerezza</groupId>
+          <artifactId>platform.security.foafssl.ontologies</artifactId>
+	  <version>0.2</version>
+          <scope>runtime</scope>
+        </dependency>
+        
+	<dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>ssl.keygen.base</artifactId>
+	       <version>0.6</version>
+            <scope>runtime</scope>
+        </dependency>
+        <!--<dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.auth.basic</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.auth.cookie</artifactId>
+            <scope>runtime</scope>
+        </dependency> --> 
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.resources</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.authentication.basic</artifactId>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.stanbol</groupId>
+        <artifactId>org.apache.stanbol.commons.security.fexilwebconsole</artifactId>
+    </dependency>
+    <!-- 0.12 version is incomaptible with 1.0.0 version of commons.security, so diabling till stanbol 1.0.0 is released
+    <dependency>
+        <groupId>org.apache.stanbol</groupId>
+        <artifactId>org.apache.stanbol.commons.security.usermanagement</artifactId>
+    </dependency>
+	-->
+    <dependency> <!-- LD Path -->
+      <groupId>at.newmedialab.ldpath</groupId>
+      <artifactId>ldpath-api</artifactId>
+      <version>0.9.5</version>
+    </dependency>
+    <dependency>
+      <groupId>at.newmedialab.ldpath</groupId>
+      <artifactId>ldpath-core-bundle</artifactId>
+      <version>0.9.5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.ldpath.clerezza</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.ldpathtemplate</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.viewable</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.rdfviewable.writer</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.web.base</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.freemarker</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.indexedgraph</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.stanbol</groupId>
+      <artifactId>org.apache.stanbol.commons.jsonld</artifactId>
+    </dependency>
+    <dependency> <!-- used also for all the other JSON parsing/writing in Stanbol -->
+      <groupId>org.codehaus.jettison</groupId>
+      <artifactId>jettison</artifactId>
+      <version>1.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.2.1</version>
+    </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typehandlerspace</artifactId>
+            <scope>runtime</scope>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typehandlerspace.wink</artifactId>
+            <scope>runtime</scope>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typepriority</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.mail</artifactId>
+            <scope>runtime</scope>
+            <version>0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>templating</artifactId>
+            <scope>runtime</scope>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>templating.seedsnipe</artifactId>
+            <scope>runtime</scope>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <scope>runtime</scope>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.extensions</artifactId>
+            <scope>runtime</scope>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>osgi.services</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.gui</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.seedsnipe</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.scripting</artifactId>
+            <scope>runtime</scope>
+            <version>0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.scripting.scriptmanager</artifactId>
+            <scope>runtime</scope>
+            <version>0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.xhtml2html</artifactId>
+            <scope>runtime</scope>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.resources.jquery</artifactId>
+            <scope>runtime</scope>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.resources.yui</artifactId>
+            <scope>runtime</scope>
+            <version>0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils.imageprocessing</artifactId>
+            <scope>runtime</scope>
+            <version>0.8</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.resources.scripts</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.style.default</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scala</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config.gui</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.documentation</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.documentation.viewer</artifactId>
+            <scope>runtime</scope>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.language.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.language.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.3</version>
+        </dependency>
+<!--
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.style.classic.webguiexamples</artifactId>
+            <scope>runtime</scope>
+        </dependency>wr
+-->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.concepts.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.concepts.ontologies</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.users.core</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.metadata</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <scope>runtime</scope>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk16</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.apache.maven.plugins
+                                        </groupId>
+                                        <artifactId>
+                                            maven-dependency-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [2.1,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                unpack-dependencies
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore/>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/DISCLAIMER
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/DISCLAIMER b/platform/launcher.tdb/DISCLAIMER
new file mode 100644
index 0000000..ab24be4
--- /dev/null
+++ b/platform/launcher.tdb/DISCLAIMER
@@ -0,0 +1,11 @@
+Apache Clerezza is an effort undergoing incubation at The Apache Software 
+Foundation (ASF), sponsored by the Apache Incubator. 
+
+Incubation is required of all newly accepted projects until a further 
+review indicates that the infrastructure, communications, and decision 
+making process have stabilized in a manner consistent with other 
+successful ASF projects. 
+
+While incubation status is not necessarily a reflection of the 
+completeness or stability of the code, it does indicate that the 
+project has yet to be fully endorsed by the ASF.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/LICENSE b/platform/launcher.tdb/LICENSE
new file mode 100644
index 0000000..e8d41e4
--- /dev/null
+++ b/platform/launcher.tdb/LICENSE
@@ -0,0 +1,471 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+APACHE CLEREZZA TDB LAUNCHER SUBCOMPONENTS: 
+
+The Apache Clerezza TDB Launcher includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses. 
+
+For the yui javascript library:
+
+Copyright (c) 2009, Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * 	Redistributions of source code must retain the above copyright notice, this list of conditions and the
+     	following disclaimer.
+    * 	Redistributions in binary form must reproduce the above copyright notice, this 	list of conditions and the following disclaimer in the documentation and/or other 	materials provided with the distribution.
+    * 	Neither the name of Yahoo! Inc. nor the names of its contributors may be used 	to endorse or promote products derived from this software without specific prior written permission of Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the jQuery javascript library:
+
+Copyright (c) 2011 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For Asm:
+
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+For Bouncycastle:
+
+Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+For the RDFa parsing library:
+
+© Copyright 2009 University of Bristol
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS’’ AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+- For the jSSLutils library:
+  
+Copyright (c) 2008-2010, The University of Manchester, United Kingdom.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the The University of Manchester nor the names of 
+      its contributors may be used to endorse or promote products derived 
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGE.
+
+
+For Jetty:
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+- For scala:
+
+Copyright (c) 2002-2012 EPFL, Lausanne, unless otherwise specified.
+All rights reserved.
+
+This software was developed by the Programming Methods Laboratory of the
+Swiss Federal Institute of Technology (EPFL), Lausanne, Switzerland.
+
+Permission to use, copy, modify, and distribute this software in source
+or binary form for any purpose with or without fee is hereby granted,
+provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+   3. Neither the name of the EPFL nor the names of its contributors
+      may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/README.txt
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/README.txt b/platform/launcher.tdb/README.txt
new file mode 100644
index 0000000..6698c91
--- /dev/null
+++ b/platform/launcher.tdb/README.txt
@@ -0,0 +1,11 @@
+Apache Clerezza TDB Launcher
+
+The provided launcher jar is executable, however on most platform you must
+provide additional arguments to java so that Clerezza has enough memory to run.
+
+Start clerezza with:
+
+java -XX:MaxPermSize=400m -Dfile.encoding=utf-8 -Xss512k -Xmx2g -jar platform.launcher.tdb-*.jar
+
+Add the --help at the end of the line above to see possible argument for
+Clerezza

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/nb-configuration.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/nb-configuration.xml b/platform/launcher.tdb/nb-configuration.xml
new file mode 100644
index 0000000..ec4540c
--- /dev/null
+++ b/platform/launcher.tdb/nb-configuration.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->
+        <netbeans.compile.on.save>none</netbeans.compile.on.save>
+    </properties>
+</project-shared-configuration>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/nbactions.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/nbactions.xml b/platform/launcher.tdb/nbactions.xml
new file mode 100644
index 0000000..3fc4ab5
--- /dev/null
+++ b/platform/launcher.tdb/nbactions.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+    <action>
+        <actionName>run</actionName>
+        <goals>
+            <goal>clean</goal>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+            <goal>-o</goal>
+        </goals>
+        <properties>
+            <vm.args>-Dclerezza.shell.disable=true</vm.args>
+        </properties>
+    </action>
+    <action>
+        <actionName>debug</actionName>
+        <goals>
+            <goal>clean</goal>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+            <goal>-o</goal>
+        </goals>
+        <properties>
+            <vm.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -Dclerezza.shell.disable=true</vm.args>
+            <jpda.listen>true</jpda.listen>
+        </properties>
+    </action>
+    <action>
+        <actionName>profile</actionName>
+        <goals>
+            <goal>clean</goal>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+            <goal>-o</goal>
+        </goals>
+        <properties>
+            <vm.args>${profiler.args}</vm.args>
+            <!-- XXX <java jvm="${profiler.java}" ...> -->
+            <profiler.action>profile</profiler.action>
+        </properties>
+    </action>
+    <action>
+        <actionName>CUSTOM-resume-debug</actionName>
+        <displayName>Resume Debug</displayName>
+        <goals>
+            <goal>antrun:run</goal>
+            <goal>-o</goal>
+        </goals>
+        <properties>
+            <vm.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</vm.args>
+            <jpda.listen>true</jpda.listen>
+        </properties>
+    </action>
+</actions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/pom.xml b/platform/launcher.tdb/pom.xml
new file mode 100644
index 0000000..911bc7e
--- /dev/null
+++ b/platform/launcher.tdb/pom.xml
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.tdb</artifactId>
+    <version>0.6-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Launcher with Jena TDB</name>
+    <description>TDB variant of standalone java application for launching the clerezza.org platform. It is also a bundle, but there is no OSGi container known to support this (we are working on it :-) ).</description>
+    <build>
+        <plugins>
+             <plugin>
+                    <groupId>org.codehaus.xsite</groupId>
+                    <artifactId>xsite-maven-plugin</artifactId>
+                    <configuration>
+                            <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                            <sitemapPath>content/sitemap.xml</sitemapPath>
+                            <skinPath>templates/skin.html</skinPath>
+                            <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                    </configuration>
+                    <executions>
+                            <execution>
+                                    <phase>pre-site</phase>
+                                    <goals>
+                                            <goal>run</goal>
+                                    </goals>
+                            </execution>
+                    </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
+                <executions>
+                    <execution>
+                        <id>inline-jars</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                platform.launcher.storageless
+                            </includeArtifactIds>
+                            <outputDirectory>target/extracted</outputDirectory>
+                            <includes>**</includes>
+                            <excludes>
+                                META-INF/**,**/org.apache.jena*
+                            </excludes>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-platform-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-3</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <excludeArtifactIds>slf4j-api</excludeArtifactIds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.clerezza.platform.launcher.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-Name>Clerezza - Platform Launcher</Bundle-Name>
+                            <Bundle-SymbolicName>org.apache.clerezza.platform.launcher.tdb</Bundle-SymbolicName>
+                            <Bundle-Activator>org.apache.clerezza.platform.launcher.Main</Bundle-Activator>
+                            <Import-Package>org.osgi.framework,org.osgi.service.startlevel</Import-Package>
+                            <Private-Package>*</Private-Package>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2.1</version>
+                <configuration>
+                    <finalName>clerezza-tdb</finalName>
+                    <descriptors>
+                        <descriptor>src/main/assembly/src.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
+                        <phase>package</phase> <!-- bind to the packaging phase -->
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.7</version>
+                <configuration>
+                    <target>
+                        <property name="vm.args" value=""/>
+                        <java fork="true" jar="${project.build.directory}/${project.build.finalName}.jar"
+                  dir="${project.build.directory}">
+                            <jvmarg line="-Xmx1024m -XX:MaxPermSize=256M -Dfile.encoding=utf-8 ${vm.args}"/>
+                        </java>
+                    </target>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>target/extracted/</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+            </resource>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <filtering>false</filtering>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>NOTICE.txt</include>
+                    <include>LICENSE.*</include>
+                </includes>
+            </resource>
+            <!-- the exclude rules are here because the maven-dependency-plugin
+            copies both -SNAPSHOT version as well as the one with the timestamp,
+            see http://jira.codehaus.org/browse/MDEP-209 -->
+            <resource>
+                <targetPath>bundles</targetPath>
+                <directory>target/bundles</directory>
+                <excludes>
+                    <exclude>**/*20*.*-*.jar</exclude>
+                </excludes>
+            </resource>
+        </resources>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.launcher.storageless</artifactId>
+            <scope>provided</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <!-- what makes this variant special -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.tdb.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-iri</artifactId>
+            <scope>runtime</scope>
+            <version>1.0.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xerces</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.0_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
+            <scope>runtime</scope>
+            <version>1.2_5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-core</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-arq</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-tdb</artifactId>
+            <scope>runtime</scope>
+            <version>1.0.1_1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>14.0</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/main/appended-resources/META-INF/NOTICE b/platform/launcher.tdb/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..7d1928c
--- /dev/null
+++ b/platform/launcher.tdb/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,18 @@
+
+- Mort Bay Jetty Project (http://www.mortbay.org/jetty/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- WYMIWYG (http://wymiwyg.org/)
+- HP Labs Semantic Web Research (http://www.hpl.hp.com/semweb/)
+- The OSGi Alliance (http://www.osgi.org/)
+- Yahoo! Inc. (http://yahoo.com/)
+- Eclipse Foundation (http://eclipse.org/)
+- INRIA, France Telecom (http://asm.ow2.org/)
+- The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+- University of Bristol (http://stars.ilrt.bris.ac.uk/)
+- The University of Manchester (http://www.manchester.ac.uk/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- EPFL, Lausanne (http://www.epfl.ch/)
+
+This product includes JQuery and other javascript 
+files Licensed under the MIT License, see the individual
+files for their copyright notice.


[10/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
deleted file mode 100644
index bb306aa..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.apache.clerezza.platform.accountcontrolpanel.html
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils._
-import org.apache.clerezza.rdf.ontologies.FOAF
-import org.apache.clerezza.rdf.ontologies.RDF
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import org.apache.clerezza.platform.typerendering.scala._
-
-
-
-/**
- * Metadata class for the person panel
- */
-class ContactConfirmRenderlet extends SRenderlet {
-  def getRdfType() = CONTROLPANEL.ContactConfirmPage
-
-
-  override def renderedPage(arguments: XmlResult.Arguments) = new XmlPerson(arguments)
-
-  /**
-   * Content class for the Person Panel
-   */
-  class XmlPerson(args: XmlResult.Arguments) extends XmlResult(args) {
-
-    import RenderingUtility._
-    
-    //
-    // the content itself.
-    // This is the piece that is closest to a pure ssp, though there is still too much code in it
-    //
-
-    override def content = {
-      val primarySubject = res/FOAF.primaryTopic
-      <div id="tx-content">
-        {
-        if (primarySubject.hasProperty(RDF.`type`, FOAF.Person)) {
-          <form action="addContact" method="post">
-            {render(primarySubject, "box-naked")}
-            <input type="hidden" name="webId" value={primarySubject*} />
-            <input type="submit" value="Add this contact" />
-          </form>
-        } else {
-          <div>
-          <span>The resource {primarySubject!} of type {primarySubject/RDF.`type`} is not known to be a Person</span>
-          {
-            import collection.JavaConversions._
-            val otherPersons = (for (t <- primarySubject.getNodeContext.filter(null, RDF.`type`, FOAF.Person))
-              yield t.getSubject).toList
-            val personsWithUri: List[UriRef] = for (otherPerson <- otherPersons;
-                if otherPerson.isInstanceOf[UriRef]) yield otherPerson.asInstanceOf[UriRef]
-            if (personsWithUri.isEmpty) {
-              <span>No person could be found</span>
-            } else {
-              <div>
-                Maybe you want to add {
-                  if (personsWithUri.size > 1) {
-                    "one of the following "+personsWithUri.size+" persons:"
-                  } else {
-                    "the person"
-                  }
-                }
-                {
-                  for (otherPerson <- personsWithUri) yield {
-                    <form action="addContact" method="post">
-                      <span>{otherPerson}</span>
-                      {render(otherPerson, "box-naked")}
-                      <input type="hidden" name="webId" value={otherPerson.getUnicodeString} />
-                      <input type="submit" value="Add this contact" />
-                    </form>
-                  }
-                }
-              </div>
-            }
-          }
-          {
-            <form action="addContact" method="post">
-            You can add {primarySubject} as contact even though it does not seem to be a person.
-            <input type="hidden" name="webId" value={primarySubject*} />
-            <input type="submit" value="Add anyway" />
-          </form>
-          } </div>
-        }
-      }
-      <a href="../profile" onclick="history.go(-1)">Cancel</a>
-      </div>
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
deleted file mode 100644
index 2b9913c..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.clerezza.platform.accountcontrolpanel.html
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils._
-import org.apache.clerezza.rdf.ontologies.FOAF
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import org.apache.clerezza.platform.typerendering.scala._
-import scala.xml.Text
-
-
-
-/**
- * Metadata class for the person panel
- */
-class PersonBox extends SRenderlet {
-  def getRdfType() = FOAF.Person
-
-  override def getModePattern = "box-naked"
-
-  override def renderedPage(arguments: XmlResult.Arguments) = new XmlPerson(arguments)
-
-  /**
-   * Content class for the Person Panel
-   */
-  class XmlPerson(args: XmlResult.Arguments) extends XmlResult(args) {
-
-    import RenderingUtility._
-    
-    //
-    // the content itself.
-    // This is the piece that is closest to a pure ssp, though there is still too much code in it
-    //
-
-    override def content = {
-      val pixml= getAgentPix(res)
-      <div class="personInABox">
-        <table><tr><td>{pixml}</td></tr>
-        <tr><td>{new Text(getName(res))}</td></tr>
-        </table>
-      </div>
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
deleted file mode 100644
index 7d65dff..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
+++ /dev/null
@@ -1,295 +0,0 @@
-package org.apache.clerezza.platform.accountcontrolpanel.html
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils._
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import org.apache.clerezza.foafssl.ontologies.CERT
-import org.apache.clerezza.foafssl.ontologies.RSA
-import org.apache.clerezza.platform.typerendering.scala._
-import java.math.BigInteger
-import java.util.Date
-import java.text._
-import org.apache.clerezza.rdf.core.UriRef
-import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
-import org.apache.clerezza.rdf.ontologies.{RDFS, DC, FOAF}
-
-class ProfilePanel extends SRenderlet {
-
-  override def getRdfType() = CONTROLPANEL.ProfilePage
-
-  override def renderedPage(arguments: XmlResult.Arguments) = new ProfilePanelXHTML(arguments)
-
-  class ProfilePanelXHTML(arguments: XmlResult.Arguments) extends XmlResult(arguments ) {
-
-    //set header properties
-
-    resultDocModifier.addStyleSheet("/account-control-panel/style/profile.css");
-    resultDocModifier.addScriptReference("/account-control-panel/scripts/profile.js");
-    resultDocModifier.addScriptReference("/account-control-panel/scripts/IEKeygen.js");
-    resultDocModifier.setTitle("Account Control Panel");
-    resultDocModifier.addNodes2Elem("tx-module", <h1>Account Control Panel</h1>);
-    resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Profile</a></li>);
-    resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li><a href="control-panel">Settings</a></li>);
-
-    //constants and variables
-
-    lazy val agent: RichGraphNode = res / FOAF.primaryTopic
-
-
-    // the content itself
-    // clearly in this case there is so much more in the the methods, that one could hesitate to call this an ssp
-
-    override def content = {
-      <div id="tx-content">
-        <h2>Personal Profile</h2>{agent ! match {
-          case _: BNode => createWebId()
-          case _: UriRef => existingWebId()
-         }}
-      </div>
-
-    }
-
-    //methods used to create content
-
-    def cp(s: Any) =  new UriRef("http://clerezza.org/2009/03/controlpanel#" + s)
-    def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#" + s)
-
-
-    def createWebId() = {
-      <h3>Associate Profile to WebID</h3>
-      <div id="newOrExistingSelection">
-      <p>Your profile is not currently associated to a WebID. A WebID allows you
-        to link your friends as well as to log-in to many sites (supporting foaf+ssl
-        or open-id).
-      </p>
-      <p>You may either create a new WebID or associate your account to an
-        existing WebID. Only creating a WebID here will allow you to manage your
-        profile here.
-      </p>
-      <form action="#" id="associateSelection">
-        <button type="button" id="newWebIdButton">Create a new Web-Id</button>
-        <button type="button" id="existingWebIdButton">I already have a Web-ID and want to use it</button>
-      </form>
-      </div>
-      <div id="createNewWebId">
-      <p>You have chosen to create a new Web-Id.</p>
-      <p>The Web-ID will be created as follows:
-        <br/>
-        <ol>
-        <li>Web-Id:
-          {var webId = res / cp("suggestedPPDUri") *;
-          webId += "#me";
-          webId}
-        </li>
-        <li>Personal-Profile Document: {res/cp("suggestedPPDUri")*}</li>
-        </ol>
-      </p>
-      <form method="post" action="profile/create-new-web-id">
-        <input value="Create it!" type="submit"/>
-      </form>
-      </div>
-      <div id="setExistingWebId">
-      <p>Please enter your Web-Id, if your Web-Id supports Foaf+SSL you will
-        be able to use it to log in to this site.</p>
-      <form method="post" action="profile/set-existing-webid">
-        <label for="webid">WebID</label> <input type="text" name="webid" size="80" title="Web-ID"/>
-        <br/>
-        <input value="Associate Profile to Web-Id" type="submit"/>
-        <p/>
-      </form>
-      </div>
-
-    }
-
-    def existingWebId() = {
-      if ((res / cp("isLocalProfile")).as[Boolean]) {
-      existingLocalWebId()
-      } else {
-      roamingUser()
-      }
-    }
-
-
-    def existingLocalWebId() = {
-      <h3>Manage your profile</h3>
-       <p>Here you can change your public profile.</p>
-
-      <form method="post" action="profile/modify">
-      <input type="hidden" name="webId" value={agent *}/>
-      <table>
-        <tr><td class="formlabel">Name:</td>
-        <td><input type="text" name="name" value={agent / FOAF.name *}/></td>
-        </tr>
-        <tr><td class="formlabel multiline">Description:</td>
-        <td><textarea name="description" rows="3" cols="80">{agent / DC.description *}</textarea></td>
-        </tr>
-        <tr><td class="formlabel"><input value="Modify" type="submit"/></td><td/></tr>
-      </table>
-
-      <p/>
-      </form>
-
-      <h3>Contacts</h3>
-      
-      <table>{ var i =0
-        val friends = for (friend <- agent/FOAF.knows) yield {
-          <td><form method="post" action="profile/deleteContact">
-            {
-              friend! match {
-                case webId: UriRef => render(webId, "box-naked")
-                case _ => render(friend, "box-naked")
-              }
-            }
-            <br/>
-            <input type="hidden" name="contactWebId" value={friend*}/>
-            <input type="submit" value="remove contact" />
-          </form></td>
-        /*render(friend!.asInstanceOf[UriRef])
-              import PersonPanel._
-        <td class="personInABox">{personInABox(friend)}</td>*/
-       }
-       for (row <- friends.grouped(5)) yield <tr>{row}</tr>
-      }</table>
-      <form id="addContact" method="get" action="profile/addContact">
-      <label for="contactWebId">Add contact bei WebId:<br/></label>
-      <input type="text" name="contactWebId" size="80"/><input type="submit" value="add contact" />
-      </form>
-
-      <h3>Key and Certificate Creation</h3>
-
-      <script type="text/javascript"> <![CDATA[$(document).ready(  function() { configurePage(); }   ); ]]> </script>
-
-      <div id="iehelptext" style="display: none;">
-      <p>Using Internet Explorer under Windows Vista or above or Windows
-        Server 2008, you need to configure the following for this to work:</p>
-      <ul>
-        <li>Add this site to the <i>Trusted Sites</i> list: in Internet
-        Options -&gt; Security -&gt; Trusted Sites -&gt; Sites -&gt; Add ...</li>
-        <li>You may need to configure the trust level (in this tab), using
-        <i>Custom Level...</i>: enable <i>Initialize and script ActiveX
-          controls not marked as safe for scripting</i>.</li>
-        <li>If you are using Windows Vista without SP1 or above, you will
-        probably need to install <a href="cacert.crt">this certificate</a> as a
-        Trusted Root Certification Authority Certificate for your own
-        certificate installation to succeed. You should probably remove that
-        trusted root CA certificate afterwards.</li>
-      </ul>
-      </div>
-      <form id="keygenform" method="post" action="profile/keygen">
-      <input name="webId" id="webId" type="hidden" value={agent*} />
-      <table>
-        <colgroup><col width="1*"/><col/></colgroup>
-        <tr>
-        <td class="formlabel">Certificate Name:</td>
-        <td>
-          <input alt="create a certificate name that will help you distinguish it from others you may have" name="cn"
-              size="35" id="cn" type="text" value={ ((agent/FOAF.name*)+"@clerezza")}/>
-        </td>
-        </tr>
-        <tr>
-        <td class="formlabel">Key strength:</td>
-        <td id="keystrenghtd">
-          <keygen id="spkac" name="spkac" challenge="TheChallenge1"/>
-        </td>
-        </tr>
-        <tr>
-        <td class="formlabel">Valid for:</td>
-        <td>
-          <input type="text" name="days" value="365" size="4"/>
-          days <input type="text" name="hours" value="0.0" size="4"/> hours</td>
-        </tr>
-        <tr>
-        <td class="formlabel">Comment:</td>
-        <td><input type="text" name="comment" value="" size="80"/></td>
-        </tr>
-        <tr><td class="formlabel"><input id="keygensubmit" type="submit" value="create certificate" /></td><td/></tr>
-      </table>
-      </form>
-      <h3>Existing Certificates</h3>
-      <form method="post" action="profile/deletekey">
-      <table>
-        <tr><th>Delete</th><th>Certificate Details</th></tr>
-        <input name="webId" id="webId" type="hidden" value={agent*} />
-        <tbody>{
-          for (key <- agent/-CERT.identity )
-          yield { val modulus = (key/RSA.modulus).as[BigInteger]
-              if (modulus == null)  <span/> //todo: broken public key, should delete it
-              else <tr><td><input type="checkbox" name="keyhash" value={modulus.hashCode().toString()}/></td>
-            <td><table>
-              <tr><td class="propvalue">Created:</td><td>{beautifyDate(key/DC.date )}</td></tr>
-              <tr><td class="propvalue">Comment:</td><td>{ key/RDFS.comment* }</td></tr>
-              <tr><td class="propvalue multiline">Modulus:</td><td><code>{ beautifyHex(key/RSA.modulus) }</code></td></tr>
-              <tr><td class="propvalue">Exponent:</td><td><code>{ beautifyInt(key/RSA.public_exponent) }</code></td></tr>
-              </table>
-            </td>
-                </tr>}
-        }</tbody>
-      </table>
-      <input type="submit" value="Disable Keys"/>
-      </form>
-      <p></p>
-
-    }
-
-    def roamingUser() = {
-      <h3>Using remote profile</h3>
-       <p>
-      {agent / FOAF.nick *}, you have accessed this site using your WebID
-        {"<" + (agent *) + ">"}
-        which has not been
-        created on this site.To edit your profile you should visit the site issuing the
-        profile.</p>
-    }
-
-
-
-
-    def beautifyDate(dtIt: CollectedIter[RichGraphNode]) {
-      if (0 == dtIt.size) return "_"
-      DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.FULL).format(dtIt.as[Date])
-    }
-
-
-    def beautifyHex(dtIt: CollectedIter[RichGraphNode]): String = {
-      if (0 == dtIt.size) return "warning! missing. Key invalid"
-      //this is a problem, it should always be here or it is invalid, and key should be removed
-      val bigint: BigInteger = dtIt.as[BigInteger]
-      val bstr = bigint.toString(16).toUpperCase;
-      val sbuf = new StringBuffer(bstr.size + (bstr.size/2)+10)
-      var cnt = 0
-      for (c <- bstr.toCharArray) {
-      if ((cnt % 2) == 0) sbuf.append(' ')
-      sbuf.append(c)
-      cnt += 1
-      }
-      sbuf.toString
-    }
-
-
-
-    def beautifyInt(dtIt: CollectedIter[RichGraphNode] ) :String = {
-      if (0 == dtIt.size) return "warning! missing. Key invalid"
-      else return dtIt.as[BigInteger].toString
-    }
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
deleted file mode 100644
index 735aee0..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.accountcontrolpanel.html
-
-
-import scala.xml.Node
-import scala.xml.NodeSeq
-import scala.xml.Text
-import java.net.URLEncoder
-import org.apache.clerezza._
-import org.apache.clerezza.rdf.core.UriRef
-import org.apache.clerezza.rdf.ontologies.FOAF
-import org.apache.clerezza.rdf.ontologies.RDFS
-import rdf.scala.utils.CollectedIter
-import rdf.scala.utils.RichGraphNode
-import rdf.scala.utils.Preamble._
-/**
- * Some utility methods for the renderlets
- */
-object RenderingUtility {
-  val emptyText = new Text("")
-
-  def ifE[T](arg:T)(template: T=>Node ):NodeSeq = {
-    def isEmpty(arg: Any): Boolean = {
-      arg match {
-        case prod: Product => prod.productIterator.forall(isEmpty(_))
-        case str: String => (str.size == 0)
-        case it: CollectedIter[RichGraphNode] => (it.size == 0)
-        case node: RichGraphNode => (null == node)
-        case other: AnyRef => (null == other)
-        case _ => false //literals can't be empty
-      }
-    }
-    if (isEmpty(arg)) return emptyText else template(arg)
-  }
-
-  def firstOf(node: RichGraphNode, uris: UriRef*):CollectedIter[RichGraphNode] = {
-    for (uri <- uris) {
-      val res : CollectedIter[RichGraphNode] = node/uri
-      if (res.size>0) return res
-    }
-    return new CollectedIter[RichGraphNode]()
-  }
-
-
-
-  /**
-   * Show a person: a picture, a link to their local profile and their name
-   * Different default icons should be shown if the agent is a person, company, group, robot...
-   *
-   * assumes the p is WebID node (can change later)
-   */
-  def getAgentPix(p: RichGraphNode) = {
-    val pix = firstOf(p, FOAF.depiction, FOAF.logo, FOAF.img).getNode match {
-      case uri: UriRef => uri.getUnicodeString
-      case _ => "http://upload.wikimedia.org/wikipedia/commons/0/0a/Gnome-stock_person.svg"
-    }
-    <a href={"/browse/person?uri="+encode(p*)}><img class="mugshot" src={pix}/></a>
-  }
-
-  private def encode(url: String): String =  URLEncoder.encode(url,"UTF8")
-
-  /**
-   * get a usable name from the properties available including nick
-   */
-  def getName(p: RichGraphNode): String =  {
-     val name = p/FOAF.name*;
-     if ("" != name ) { return name }
-     val firstNm: String = p/FOAF.firstName*;
-     val fmlyNm :String = firstOf(p, FOAF.family_name,FOAF.familyName)*;
-       if ("" != firstNm || "" != fmlyNm) { return firstNm+" "+fmlyNm }
-     return p*
-
-  }
-
-}
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
deleted file mode 100644
index a2a58e6..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.accountcontrolpanel.html
-
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
-import org.apache.clerezza.platform.typerendering.scala._
-
-
-class SettingsPanel extends SRenderlet {
-
-  val getRdfType = CONTROLPANEL.SettingsPage
-
-    override def renderedPage(arguments: XmlResult.Arguments) = new XmlResult(arguments ) {
-    override def content = {
-import org.apache.clerezza.rdf.core.UriRef
-import scala.xml.NodeBuffer
-import scala.collection.mutable.ListBuffer
-def cp(s: Any) = new UriRef("http://clerezza.org/2009/03/controlpanel#"+s)
-def osgi(s: Any) = new UriRef("http://clerezza.org/2008/11/osgi#"+s)
-def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#" + s)
-val nodeBuff = new ListBuffer[NodeBuffer]
-resultDocModifier.setTitle("Account Control Panel");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Account Control Panel</h1>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li><a href="profile">Profile</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Settings</a></li>);
-
-if ((res/cp("userBundlePermission")*) == "true") {
-  nodeBuff +=(<h2>Bundle Control Panel</h2>
-  <h3>Install Bundle</h3>
-
-  <form method="post" action="control-panel/install-bundle" enctype="multipart/form-data">
-    <input type="file" class="FieldText" name="bundle" size="30" title="bundle path"/><br/><br/>
-    <input style="width: 5em;" value="Install" type="submit"/><p />
-  </form>
-  <br/><br/>
-  <h3>User Bundles</h3>
-  <table border="1">
-  <tbody>
-    <tr>
-      <th>Location</th>
-      <th>Status</th>
-      <th colspan="4">Action</th>
-    </tr>
-
-    {for (renderlet <- (res/-osgi("owner")).sort((a,b) => ((a*)<(b*)))) yield
-    <tr>
-      <td>{renderlet*}</td>
-      <td>{renderlet/osgi("status")* match {
-        case "2" => "Installed"
-        case "4" => "Resolved"
-        case "8" => "Starting"
-        case "16" => "Stopping"
-        case "32" => "Active"
-        }}
-      </td>
-      {if (((renderlet/osgi("bundle_id")).length) > 0)
-      <td>
-      <form method="post" action="control-panel/start-bundle">
-      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
-      <input value="start" type="submit"/>
-      </form>
-      </td>
-      <td>
-      <form method="post" action="control-panel/stop-bundle">
-      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
-      <input value="stop" type="submit"/>
-      </form>
-      </td>
-      <td>
-      <form method="post" action="control-panel/uninstall-bundle">
-      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
-      <input value="uninstall" type="submit"/>
-      </form>
-      </td>
-      else
-      <td colspan="3">Not registered as bundle</td>}
-      </tr>
-      }
-    </tbody>
-  </table>
-  <br/>)
-}
-
-if((res/cp("changePasswordPermission")*) == "true") {
-  nodeBuff +=(<h2>Change Password</h2>
-
-
-  <form action="control-panel/change-password" method="post">
-    <fieldset>
-      <ol style="display: block;">
-        <li class="tx-line" style="background-image: none;">
-          <label>Current Password:</label>
-          <span class="tx-item">
-            <input type="password" name="oldPW"/>
-          </span>
-        </li>
-        <li class="tx-line" style="background-image: none;">
-          <label>New Password:</label>
-          <span class="tx-item">
-            <input type="password" name="newPW"/>
-          </span>
-        </li>
-        <li class="tx-line" style="background-image: none;">
-          <label>Confirm new Password:</label>
-          <span class="tx-item">
-            <input type="password" name="confirmNewPW"/>
-          </span>
-        </li>
-        <br />
-        <input style="width: 5em;" type="submit" name="submit" value="Submit"/>
-      </ol>
-      <br/>
-    </fieldset>
-  </form>)
-
-
-}
-
-if((res/cp("changedPassword")).length > 0) {
-  nodeBuff +=(<br /><span>Password has not changed, either wrong current password or the
-        new password and the confirmation didn't match!<br /><br /></span>)
-}
-
-
-nodeBuff +=(<h2>Change user's default language</h2>
-  <form method="post" action="control-panel/change-language">
-    {render(context/platform("instance")/platform("languages"), "naked")}
-    <br/><br/>
-    <script type="text/javascript">$("#availablelanguages").val({"'" + (context/platform("user")/platform("preferredLangInISOCode")*) + "'"})</script>
-    <input style="width: 5em;" type="submit" name="submit" value="Submit"/>
-    <br/><br/>
-  </form>)
-
-<div id="tx-content">
-  <div class="tx-edit" style="margin-left: 0.5em;">
-  {if(nodeBuff.isEmpty)
-    <span>There are no settings you can configure for this account!</span>
-  else
-    nodeBuff
-  }
-  </div>
-</div>
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
deleted file mode 100644
index ae7953f..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.accountcontrolpanel
-
-import java.security.Permission
-import org.slf4j.scala.Logging
-
-//note: file has lower class name, as it contains many classes
-
-
-/**
- * superclass for the permission classes, to avoid a lot of boilerplate code
- *
- * @author bblfish, reto
- */
-abstract
-class AbstractPermission(val accountName: String, val actions: String ="")
-  extends Permission(accountName) with Logging  {
-
-  if (actions != "") {
-    throw new RuntimeException(getClass.getName+": actions must be an empty String "+
-      "(second argument only in constructor for supporting building from canonical form")
-  }
-
-  def getActions: String = actions
-
-  /**
-   * A subclass implies another permission if and only if they are equals
-   */
-   override
-  def implies(permission: Permission): Boolean = {
-    logger.debug("checking for "+permission+" is implied by "+ this)
-    var result: Boolean = equals(permission)
-    return result
-  }
-
-  override
-  def equals(other: Any): Boolean =
-      other match {
-      case that:  AbstractPermission  =>  
-        (that eq this ) || ((this.getClass == that.getClass) && accountName == that.accountName )
-      case _ => false
-      }
-
-  /**
-   * For the hashCode the class and the accountName is considered
-   */
-  override
-  def hashCode: Int = {
-    return  getClass.hashCode + (if (accountName != null) accountName.hashCode else 0)
-  }
-}
-
-/**
- * Permission to change the password
- * @author ali
- *
- */
-class ChangePasswordPermission(accountName: String, actions: String ="")
-  extends AbstractPermission(accountName, actions) {
-
-}
-
-/**
- * Permission to access the account control panel
- *
- * @author ali
- *
- */
-class AccountControlPanelAppPermission(accountName: String, actions: String ="")
-  extends AbstractPermission(accountName)  {
-
-
-}
-
-/**
- * Permission for user to have own bundles
- *
- * @author mir
- *
- */
-class UserBundlePermission( accountName: String, actions: String ="")
-  extends AbstractPermission(accountName)  {
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
deleted file mode 100644
index ff49a4d..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/*---------------------------------------------------------------------------
- *  Two- and three-column layout
- */
-
-#banner {
-    top: 0px;
-    left: 0px;
-    right: 0px;
-    height: 116px;
-}
-
-#left {
-    position: absolute;
-    z-index: 2;
-    left: 8px;
-    width: 184px;
-    top: 125px;
-    bottom: 8px;
-    margin: 0px;
-    padding: 0px;
-}
-
-#right {
-    position: absolute;
-    z-index: 1;
-    right: 8px;
-    width: 184px;
-    top: 125px;
-    bottom: 8px;
-    margin: 0px;
-    padding: 0px;
-}
-
-.Content3Column {
-    position: absolute;
-    top: 125px;
-    bottom: 8px;
-    left: 208px;
-    right: 216px;
-}
-
-.Content2Column {
-    position: absolute;
-    top: 125px;
-    bottom: 8px;
-    left: 208px;
-    right: 16px;
-}
-
-#center {
-    z-index: 3;
-    margin: 0px;
-    border: none;
-    padding-bottom: 8px;
-}
-
-
-/*---------------------------------------------------------------------------
- *  Default element styles
- */
-
-body {
-    padding: 0px;
-    margin: 0px;
-    border: 0px;
-
-    font-family: helvetica, arial, sans-serif;
-    font-size: 12px;
-
-    background-color: white;
-    color: black;
-}
-
-h1, h2, h3, h4, h5, h6 {
-    margin: 0px;
-    border: 0px;
-    padding: 0px;
-    font-weight: normal;
-}
-
-a:link { color: #008DA8; }
-a:active { color: #FE5400; }
-a:hover { color: #FE5400; }
-a:visited { color: black; }
-
-iframe {
-    width:100%;
-    height: 800px;
-    border: 0px;
-}
-
-img {
-    border: 0px;
-    padding: 0px;
-    margin: 0px;
-}
-
-p {
-    border: 0px;
-    padding: 0px;
-    margin: 0px;
-    margin-bottom: 10px;
-}
-
-blockquote {
-    margin-bottom: 10px;
-}
-
-td {
-    font-size: 12px;
-    padding: 2px;
-}
-
-tr.a {
-    background-color:  #e0e0e0;
-}
-tr.b {
-    background-color: #ffffff;
-}
-
-th {
-    font-size: 12px;
-    font-weight: bold;
-    white-space: nowrap;
-    padding: 2px;
-}
-
-th.Row {
-    text-align: left;
-    vertical-align: top;
-}
-
-ul, ol {
-    border: 0px;
-    padding: 0px;
-    margin-top: 0px;
-    margin-bottom: 12px;
-    margin-left: 20px;
-}
-
-
-/*---------------------------------------------------------------------------
- *  Page banner
- */
-
-#banner {
-    margin: 0px;
-    border: 0px;
-    border-bottom: 1px solid #008DA8;
-    padding: 0px;
-    background-color: #e0e0e0;
-    color: #008DA8;
-    vertical-align: bottom;
-}
-
-#banner a { text-decoration: none; }
-#banner a:visited { color: #008DA8; }
-#banner a:hover { color: #FE5400; }
-#banner a:active { color: #FE5400; }
-
-#logo {
-    position: absolute;
-    top: 5px;
-    left: 8px;
-}
-
-#versions {
-    position: absolute;
-    width: auto;
-    right: 0px;
-    top: 0px;
-    margin: 8px;
-    font-weight: normal;
-}
-
-/*---------------------------------------------------------------------------
- *  Page content
- */
-
-#content {
-    margin: 0px;
-    background-color: white;
-    color: black;
-    height: 100%;
-}
-
-#content h1 {
-    width: 100%;
-    font-size: 18px;
-    background-color: #008DA8;
-    color: white;
-    padding: 2px;
-    padding-left: 6px;
-    margin-top: 24px;
-    margin-bottom: 12px;
-}
-
-#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
-    margin-top: 0px;
-}
-
-#content a { text-decoration: underline; }
-#content a:link { color: #008DA8; }
-#content a:visited { color: #008DA8; }
-#content a:active { color: #FE5400; }
-#content a:hover { color: #FE5400; }
-
-#content h2 {
-    margin-top: 24px;
-    border-top: 1px solid #008DA8;
-    margin-bottom: 16px;
-    font-size: 15px;
-    font-weight: bold;
-    background-color:  #e0e0e0;;
-    padding: 2px;
-}
-
-#content li {
-    margin-bottom: 6px;
-}
-
-#content th {
-    background-color:  #e0e0e0;
-}
-
-#content td {
-    
-}
-
-.Source pre {
-    padding: 4px;
-    font-family: courier new, monospace;
-    font-size: 11px;
-    border: 1px solid #008DA8;
-    background-color:  #e0e0e0;
-    color: black;
-}
-
-.Source:before {
-    margin: 0px;
-    padding: 0px;
-    border: 0px;
-    font-size: inherit;
-    line-spacing: 100%;
-}
-
-.highlight {
-    background-color:  #e0e0e0;
-    border: 1px dotted #008DA8;
-    padding: 5px;
-}
-
-/* The following are for images, but can also apply to div's containing images. */
-
-#content .Float {
-    float: right;
-    margin-left: 8px;
-    margin-right: 0px;
-    margin-top: 8px;
-    margin-bottom: 8px;
-}
-
-#content .Diagram {
-    display: block;
-    margin-left: auto;
-    margin-right: auto;
-    margin-top: 8px;
-    margin-bottom: 8px;
-}
-
-
-#content .Inline {
-    display: inline;
-}
-
-.RuleOfThumb {
-    font-weight: bold;
-}
-
-/*---------------------------------------------------------------------------
- *  Side panels
- */
-
-.SidePanel {
-    background-color: white;
-    padding: 0px;
-    font-size: 11px;
-}
-
-.SidePanel h1 {
-    margin: 0px;
-    border: 0px;
-    padding: 4px;
-
-    color: #008DA8;
-
-    font-size: 12px;
-    font-weight: bold;
-}
-
-
-.SidePanel a { text-decoration: none; }
-.SidePanel a:link { color: #000000; }
-.SidePanel a:visited { color: #000000; }
-.SidePanel a:active { color: #FE5400; }
-.SidePanel a:hover { color: #FE5400; }
-
-/*---------------------------------------------------------------------------
- *  Menus
- */
-
-.MenuGroup {
-    border-left: 1px solid #A3DAE6;
-    border-top: 1px solid #A3DAE6;
-    border-bottom: 1px solid white; /* IE work-around */
-
-    margin-bottom: 8px;
-    background-color: white;
-    color: #008DA8;
-}
-
-.MenuGroup ul {
-    margin: 0px;
-    padding-left: 4px;
-    list-style-type: none;
-}
-
-.MenuGroup li {
-    padding: 2px;
-}
-
-.MenuGroup .currentLink {
-/*    background-color: #060;*/
-    background-color:  #e0e0e0;
-    color: #008DA8;
-}
-
-
-/*---------------------------------------------------------------------------
- *  News panel
- */
-
-.NewsGroup {
-    border-left: 1px solid #A3DAE6;
-    border-top: 1px solid #A3DAE6;
-    border-bottom: 1px solid white; /* IE workaround */
-    margin-bottom: 8px;
-
-    color: #008DA8;
-}
-
-.NewsItem {
-    margin: 4px;
-}
-
-.NewsDate {
-    font-weight: bold;
-    margin: 0px;
-    padding: 0px;
-}
-
-.NewsText {
-    padding: 0px;
-    margin: 0px;
-    margin-bottom: 8px;
-}
-
-.NewsText a { text-decoration: underline; }
-.NewsText a:link { color: #008DA8; }
-.NewsText a:visited { color: #008DA8; }
-.NewsText a:active { color: #FE5400; }
-.NewsText a:hover { color: #FE5400; }
-
-.NewsMore {
-    font-size: smaller;
-    margin: 4px;
-    margin-top: 8px;
-    text-align: left;
-}
-
-.NewsGroup td {
-    font-size: 12px;
-}
-
-/*---------------------------------------------------------------------------
- *  Document meta-information
- */
-
-.Meta {
-    margin-top: 64px;
-    font-size: smaller;
-    color: #008DA8;
-    text-align: right;
-}
-
-.Meta a { text-decoration: underline; }
-.Meta a:link { color: #008DA8; }
-.Meta a:visited { color: #008DA8; }
-.Meta a:active { color: #FE5400; }
-.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png
deleted file mode 100644
index cb0efb0..0000000
Binary files a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
deleted file mode 100644
index 8d5a4cb..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
--->
-
-<project>
-    <body>
-        <menu name="Documentation">
-            <item name="Usage" href="documentation/usage.xhtml"/>
-        </menu>
-    </body>
-</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
deleted file mode 100644
index 38be885..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<sitemap>
-    <section>
-        <name>Documentation</name>
-        <page>usage.xhtml</page>
-    </section>
-</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
deleted file mode 100644
index 6c22c93..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
-	<head>
-		<title>Usage: How to use the Account Control Panel</title>
-	</head>
-	<body>
-		<h1>Usage: How to use the Account Control Panel</h1>
-		<p>Author: Tsuyoshi Ito - clerezza.org</p>
-		<p>Date: January 27, 2009</p>
-		<h2 id="list">1. List installed bundles</h2>
-		<p>
-			Each user can upload and install bundles into the platform. Users and permissions can be created via <a href="http://localhost:8282/admin/user-manager" target="_blank">http://localhost:8282/admin/user-manager</a> and <a href="http://localhost:8282/admin/role-manager" target="_blank">http://localhost:8282/admin/role-manager</a>. <br />
-			Enter the following URL: <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a> to list all bundles from the user "admin" (when asked to authenticate use username "admin" and password "admin). If you want to list installed bundles from another user, replace "admin" in the URL with the username of the other user.
-		</p>
-		<h2 id="install">2. Install a bundle</h2>
-		<p>
-            You can upload a bundle by clicking on the link <a href="http://localhost:8282/user/admin/control-panel/install-bundle-form">Install Bundle</a> on <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a>. Enter the URL of your bundle (e.g. Location: http://localhost/mybundle-1.0.jar) and click on the button "install". The uploaded and installed bundles have the same permission as you have. 
-        </p>
-		<h2 id="start">3. Start, Stop and Uninstall a bundle</h2>
-        <p>
-            A user can start, stop and  uninstall a bundle on <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a>, whereas "admin" can be replaced by another username. Click on the appropriate button for start , stop or uninstall a bundle.
-        </p>
-        <p>
-            That's all. Enjoy.
-        </p>
-    </body>
-</html>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
deleted file mode 100644
index 4b10edb..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>clerezza.org - ${title}</title>
-        <link rel="stylesheet" type="text/css" href="style/style.css"/>
-        ${head}
-    </head>
-    <body>
-
-        <div id="banner">
-            <a href="http://clerezza.org/">
-              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
-            </a><br />
-        </div>
-
-        <div id="center" class="${centerClass}">
-            <div id="content">
-                <!-- <h1 class="FirstChild">${title}</h1> -->
-                ${body}
-                <p>Copyright (c) 2008 trialox.org (trialox AG, Switzerland)</p>
-                <br /><br />
-            </div>
-        </div>
-
-        <div class="SidePanel" id="left">
-            <#list sitemap.sections as section>
-                <div class="MenuGroup">
-                    <h1>${section.name}</h1>
-                    <ul>
-                        <#list section.entries as entry>
-                            <#if entry = page>
-                                <li class="currentLink">${entry.title}</li>
-                            <#else>
-                                <li><a href="${entry.href}">${entry.title}</a></li>
-                            </#if>
-                        </#list>
-                    </ul>
-                </div>
-            </#list>
-            <div class="MenuGroup">
-                  <h1>Project Site</h1>
-                  <ul>
-
-                              <li><a href="../index.html">Back to project site</a></li>
-                  </ul>
-              </div>
-        </div>
-
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
deleted file mode 100644
index 023237b..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.accountcontrolpanel</artifactId>
-        <version>0.10</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.accountcontrolpanel.ontologies</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Account Contral Panel Ontologies</name>
-    <description>
-        Ontologies of the Account Control Panel
-    </description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.clerezza</groupId>
-                <artifactId>maven-ontologies-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <configuration>
-                            <resourcePath>${basedir}/src/main/resources</resourcePath>
-                            <sources>
-                                <source>${basedir}/target/generated-sources/main/java</source>
-                            </sources>
-                        </configuration>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>0.4</version>
-        </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
deleted file mode 100644
index e6c76a8..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-	xml:base="http://clerezza.org/2009/03/controlpanel#"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2009/03/controlpanel#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Clerezza Concept Manager
-	</dc:title>
-</owl:Ontology>
-
-<!-- Classes -->
-
-<rdfs:Class rdf:about="#SettingsPage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">account settings Page</rdfs:label>
-	<skos:definition xml:lang="en">A web page containing a list of bundles of a user. Over the page
-		bundles can be managed.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ProfilePage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">personal profile management page</rdfs:label>
-	<skos:definition xml:lang="en">A web page allowing users to change  
-	their profile.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ContactConfirmPage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ContactConfirmPage</rdfs:label>
-	<skos:definition xml:lang="en">page for confiming a new contact
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-</rdfs:Class>
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="#userBundlePermission">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">User Bundle Permission</rdfs:label>
-	<skos:definition xml:lang="en">Points to a boolean indicating if the user has
-		the permission to install bundles over his/her account control page, which is the subject.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-	<rdfs:domain rdf:resource="#SettingsPage" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#changePasswordPermission">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">Change Password Permission</rdfs:label>
-	<skos:definition xml:lang="en">Points to a boolean indicating if the user has
-		the permission to change the password over his/her account control page, which is the subject.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-	<rdfs:domain rdf:resource="#SettingsPage" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#changedPassword">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">change password</rdfs:label>
-	<skos:definition xml:lang="en">Points from a settings page over which an attempt was made to change the password of the user owning it
-		to a boolean indicating if an attempt succeeded.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-	<rdfs:domain rdf:resource="#SettingsPage" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#isLocalProfile">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">profile local</rdfs:label>
-	<skos:definition xml:lang="en">Points from a profile page to a boolean 
-indicating if the server considers itself as authoritative for that profile.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-	<rdfs:domain rdf:resource="#SettingsPage" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#suggestedPPDUri">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">Suggested PPD URI</rdfs:label>
-	<skos:definition xml:lang="en">Points to a uri suggested for a new local 
-	personal profile document of the subject.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
-	<rdfs:domain rdf:resource="#SettingsPage" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
-</rdf:Property>
-
-</rdf:RDF>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/pom.xml b/platform/platform.accountcontrolpanel/pom.xml
deleted file mode 100644
index a23edbd..0000000
--- a/platform/platform.accountcontrolpanel/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.accountcontrolpanel</artifactId>
-    <packaging>pom</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - Platform Account Control Panel</name>
-    <description>A web interface that provides functions to configure the account of a platform user.</description>
-    
-    <modules>
-        <module>platform.accountcontrolpanel.ontologies</module>
-        <module>platform.accountcontrolpanel.core</module>
-    </modules>
-</project>
\ No newline at end of file


[35/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/style.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/style.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/style.rng
new file mode 100755
index 0000000..484722d
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/style.rng
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Style Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="style">
+  <element name="style">
+    <ref name="style.attlist"/>
+    <text/>
+  </element>
+</define>
+
+<define name="style.attlist">
+  <ref name="title.attrib"/>
+  <ref name="I18n.attrib"/>
+  <attribute name="type">
+    <ref name="ContentType.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="media">
+      <ref name="MediaDesc.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="xml:space">
+      <value>preserve</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="head.content" combine="interleave">
+  <zeroOrMore>
+    <ref name="style"/>
+  </zeroOrMore>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/table.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/table.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/table.rng
new file mode 100755
index 0000000..7e10e4e
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/table.rng
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Tables Module -->
+<!-- This builds on the basic tables module, unlike with the DTD
+implementation. -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="basic-table.rng">
+
+  <define name="table">
+    <element name="table">
+      <ref name="table.attlist"/>
+      <optional>
+	<ref name="caption"/>
+      </optional>
+      <choice>
+	<zeroOrMore>
+	  <ref name="col"/>
+	</zeroOrMore>
+	<zeroOrMore>
+	  <ref name="colgroup"/>
+	</zeroOrMore>
+      </choice>
+      <choice>
+	<group>
+	  <optional>
+	    <ref name="thead"/>
+	  </optional>
+	  <optional>
+	    <ref name="tfoot"/>
+	  </optional>
+	  <oneOrMore>
+	    <ref name="tbody"/>
+	  </oneOrMore>
+	</group>
+	<oneOrMore>
+	  <ref name="tr"/>
+	</oneOrMore>
+      </choice>
+    </element>
+  </define>
+
+  <define name="th">
+    <element name="th">
+      <ref name="th.attlist"/>
+      <ref name="Flow.model"/>
+    </element>
+  </define>
+
+  <define name="td">
+    <element name="td">
+      <ref name="td.attlist"/>
+      <ref name="Flow.model"/>
+    </element>
+  </define>
+
+  <define name="CellHAlign.attrib">
+    <optional>
+      <attribute name="align">
+	<choice>
+	  <value>left</value>
+	  <value>center</value>
+	  <value>right</value>
+	  <value>justify</value>
+	  <value>char</value>
+	</choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="char">
+	<ref name="Character.datatype"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="charoff">
+	<ref name="Length.datatype"/>
+      </attribute>
+    </optional>
+  </define>
+
+  <define name="CellVAlign.attrib">
+    <optional>
+      <attribute name="valign">
+	<choice>
+	  <value>top</value>
+	  <value>middle</value>
+	  <value>bottom</value>
+	  <value>baseline</value>
+	</choice>
+      </attribute>
+    </optional>
+  </define>
+
+  <define name="scope.attrib">
+    <optional>
+      <attribute name="scope">
+	<choice>
+	  <value>row</value>
+	  <value>col</value>
+	  <value>rowgroup</value>
+	  <value>colgroup</value>
+	</choice>
+      </attribute>
+    </optional>
+  </define>
+
+</include>
+
+<define name="table.attlist" combine="interleave">
+  <optional>
+    <attribute name="width">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="border">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="frame.attrib"/>
+  <ref name="rules.attrib"/>
+  <optional>
+    <attribute name="cellspacing">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="cellpadding">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="col">
+  <element name="col">
+    <ref name="col.attlist"/>
+  </element>
+</define>
+
+<define name="col.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="span">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="MultiLength.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="colgroup">
+  <element name="colgroup">
+    <ref name="colgroup.attlist"/>
+    <zeroOrMore>
+      <ref name="col"/>
+    </zeroOrMore>
+  </element>
+</define>
+
+<define name="colgroup.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="span">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="MultiLength.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="tbody">
+  <element name="tbody">
+    <ref name="tbody.attlist"/>
+    <oneOrMore>
+      <ref name="tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="tbody.attlist">
+  <ref name="Common.attrib"/>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="thead">
+  <element name="thead">
+    <ref name="thead.attlist"/>
+    <oneOrMore>
+      <ref name="tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="thead.attlist">
+  <ref name="Common.attrib"/>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="tfoot">
+  <element name="tfoot">
+    <ref name="tfoot.attlist"/>
+    <oneOrMore>
+      <ref name="tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="tfoot.attlist">
+  <ref name="Common.attrib"/>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="frame.attrib">
+  <optional>
+    <attribute name="frame">
+      <choice>
+        <value>void</value>
+        <value>above</value>
+        <value>below</value>
+        <value>hsides</value>
+        <value>lhs</value>
+        <value>rhs</value>
+        <value>vsides</value>
+        <value>box</value>
+        <value>border</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="rules.attrib">
+  <optional>
+    <attribute name="rules">
+      <choice>
+        <value>none</value>
+        <value>groups</value>
+        <value>rows</value>
+        <value>cols</value>
+        <value>all</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/target.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/target.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/target.rng
new file mode 100755
index 0000000..b13f4ca
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/target.rng
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Target Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="a.attlist" combine="interleave">
+  <ref name="target.attrib"/>
+</define>
+
+<define name="area.attlist" combine="interleave">
+  <ref name="target.attrib"/>
+</define>
+
+<define name="base.attlist" combine="interleave">
+  <ref name="target.attrib"/>
+</define>
+
+<define name="link.attrib" combine="interleave">
+  <ref name="target.attrib"/>
+</define>
+
+<define name="form.attlist" combine="interleave">
+  <ref name="target.attrib"/>
+</define>
+
+<define name="target.attrib">
+  <optional>
+    <attribute name="target"/>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/text.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/text.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/text.rng
new file mode 100755
index 0000000..c380a7c
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/text.rng
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Text Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="br">
+  <element name="br">
+    <ref name="br.attlist"/>
+    <empty/>
+  </element>
+</define>
+
+<define name="br.attlist">
+  <ref name="Core.attrib"/>
+</define>
+
+<define name="span">
+  <element name="span">
+    <ref name="span.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="span.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="abbr">
+  <element name="abbr">
+    <ref name="abbr.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="abbr.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="acronym">
+  <element name="acronym">
+    <ref name="acronym.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="acronym.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="cite">
+  <element name="cite">
+    <ref name="cite.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="cite.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="code">
+  <element name="code">
+    <ref name="code.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="code.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="dfn">
+  <element name="dfn">
+    <ref name="dfn.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="dfn.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="em">
+  <element name="em">
+    <ref name="em.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="em.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="kbd">
+  <element name="kbd">
+    <ref name="kbd.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="kbd.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="q">
+  <element name="q">
+    <ref name="q.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="q.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="cite">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="samp">
+  <element name="samp">
+    <ref name="samp.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="samp.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="strong">
+  <element name="strong">
+    <ref name="strong.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="strong.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="var">
+  <element name="var">
+    <ref name="var.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="var.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="div">
+  <element name="div">
+    <ref name="div.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="div.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="p">
+  <element name="p">
+    <ref name="p.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="p.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="address">
+  <element name="address">
+    <ref name="address.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="address.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="blockquote">
+  <element name="blockquote">
+    <ref name="blockquote.attlist"/>
+    <ref name="Block.model"/>
+  </element>
+</define>
+
+<define name="blockquote.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="cite">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="pre">
+  <element name="pre">
+    <ref name="pre.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="pre.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="xml:space">
+      <value>preserve</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="h1">
+  <element name="h1">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+ 
+<define name="h2">
+  <element name="h2">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+ 
+<define name="h3">
+  <element name="h3">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+ 
+<define name="h4">
+  <element name="h4">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+ 
+<define name="h5">
+  <element name="h5">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+
+<define name="h6">
+  <element name="h6">
+    <ref name="Heading.attrib"/>
+    <ref name="Heading.content"/>
+  </element>
+</define>
+
+<define name="Heading.attrib">
+  <ref name="Common.attrib"/>
+</define>
+ 
+<define name="Heading.content">
+  <ref name="Inline.model"/>
+</define>
+
+<define name="Heading.class">
+  <choice>
+    <ref name="h1"/>
+    <ref name="h2"/>
+    <ref name="h3"/>
+    <ref name="h4"/>
+    <ref name="h5"/>
+    <ref name="h6"/>
+  </choice>
+</define>
+
+<define name="Block.class">
+  <choice>
+    <ref name="address"/>
+    <ref name="blockquote"/>
+    <ref name="div"/>
+    <ref name="p"/>
+    <ref name="pre"/>
+    <ref name="Heading.class"/>
+  </choice>
+</define>
+
+<define name="Inline.class">
+  <choice>
+    <ref name="abbr"/>
+    <ref name="acronym"/>
+    <ref name="br"/>
+    <ref name="cite"/>
+    <ref name="code"/>
+    <ref name="dfn"/>
+    <ref name="em"/>
+    <ref name="kbd"/>
+    <ref name="q"/>
+    <ref name="samp"/>
+    <ref name="span"/>
+    <ref name="strong"/>
+    <ref name="var"/>
+  </choice>
+</define>
+
+<define name="Inline.model">
+  <zeroOrMore>
+    <choice>
+      <text/>
+      <ref name="Inline.class"/>
+    </choice>
+  </zeroOrMore>
+</define>
+
+<!-- This is redefined by the legacy module to include inlines. -->
+<define name="Block.mix">
+  <ref name="Block.class"/>
+</define>
+
+<define name="Block.model">
+  <oneOrMore>
+    <ref name="Block.mix"/>
+  </oneOrMore>
+</define>
+
+<define name="Flow.model">
+  <zeroOrMore>
+    <choice>
+      <text/>
+      <ref name="Inline.class"/>
+      <ref name="Block.class"/>
+    </choice>
+  </zeroOrMore>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-basic.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-basic.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-basic.rng
new file mode 100755
index 0000000..8976916
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-basic.rng
@@ -0,0 +1,21 @@
+<!-- XHTML Basic -->
+
+<grammar ns="http://www.w3.org/1999/xhtml"
+         xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="modules/datatypes.rng"/>
+<include href="modules/attribs.rng"/>
+<include href="modules/struct.rng"/>
+<include href="modules/text.rng"/>
+<include href="modules/hypertext.rng"/>
+<include href="modules/list.rng"/>
+<include href="modules/basic-form.rng"/>
+<include href="modules/basic-table.rng"/>
+<include href="modules/image.rng"/>
+<include href="modules/param.rng"/>
+<include href="modules/object.rng"/>
+<include href="modules/meta.rng"/>
+<include href="modules/link.rng"/>
+<include href="modules/base.rng"/>
+
+</grammar>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-strict.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-strict.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-strict.rng
new file mode 100755
index 0000000..545d668
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml-strict.rng
@@ -0,0 +1,36 @@
+<!-- XHTML Strict -->
+
+<grammar ns="http://www.w3.org/1999/xhtml"
+         xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="modules/datatypes.rng"/>
+<include href="modules/attribs.rng"/>
+<include href="modules/struct.rng"/>
+<include href="modules/text.rng"/>
+<include href="modules/hypertext.rng"/>
+<include href="modules/list.rng"/>
+<include href="modules/image.rng"/>
+<include href="modules/ssismap.rng"/>
+<include href="modules/base.rng"/>
+<include href="modules/link.rng"/>
+<include href="modules/meta.rng"/>
+<include href="modules/param.rng"/>
+<include href="modules/object.rng"/>
+<include href="modules/bdo.rng"/>
+<include href="modules/pres.rng"/>
+<include href="modules/edit.rng"/>
+<include href="modules/applet.rng"/>
+<!-- <include href="modules/basic-form.rng"/> -->
+<include href="modules/form.rng"/>
+<include href="modules/style.rng"/>
+<include href="modules/script.rng"/>
+<!-- <include href="modules/basic-table.rng"/> -->
+<include href="modules/table.rng"/>
+<include href="modules/csismap.rng"/>
+<include href="modules/events.rng"/>
+<include href="modules/inlstyle.rng"/>
+<include href="modules/target.rng"/>
+<include href="modules/iframe.rng"/>
+<include href="modules/nameident.rng"/>
+
+</grammar>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml.rng
new file mode 100755
index 0000000..9acf062
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/xhtml.rng
@@ -0,0 +1,39 @@
+<!-- XHTML -->
+<!-- This corresponds to the union of transitional and frameset. -->
+
+<grammar ns="http://www.w3.org/1999/xhtml"
+         xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="modules/datatypes.rng"/>
+<include href="modules/attribs.rng"/>
+<!-- <include href="modules/struct.rng"/> -->
+<include href="modules/frames.rng"/>
+<include href="modules/text.rng"/>
+<include href="modules/hypertext.rng"/>
+<include href="modules/list.rng"/>
+<include href="modules/image.rng"/>
+<include href="modules/ssismap.rng"/>
+<include href="modules/base.rng"/>
+<include href="modules/link.rng"/>
+<include href="modules/meta.rng"/>
+<include href="modules/param.rng"/>
+<include href="modules/object.rng"/>
+<include href="modules/bdo.rng"/>
+<include href="modules/pres.rng"/>
+<include href="modules/edit.rng"/>
+<include href="modules/applet.rng"/>
+<!-- <include href="modules/basic-form.rng"/> -->
+<include href="modules/form.rng"/>
+<include href="modules/style.rng"/>
+<include href="modules/script.rng"/>
+<!-- <include href="modules/basic-table.rng"/> -->
+<include href="modules/table.rng"/>
+<include href="modules/csismap.rng"/>
+<include href="modules/events.rng"/>
+<include href="modules/inlstyle.rng"/>
+<include href="modules/target.rng"/>
+<include href="modules/iframe.rng"/>
+<include href="modules/nameident.rng"/>
+<include href="modules/legacy.rng"/>
+
+</grammar>


[72/87] [abbrv] clerezza git commit: CLEREZZA-982: using new package names for rdf-core

Posted by re...@apache.org.
CLEREZZA-982: using new package names for rdf-core


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

Branch: refs/heads/master
Commit: 1ad142ea48a82e0f37811cb2a7aad53d18440bca
Parents: 741e8df
Author: Reto Gmuer <re...@apache.org>
Authored: Thu Apr 9 17:39:14 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Thu Apr 9 17:39:14 2015 +0000

----------------------------------------------------------------------
 .../jaxrs/rdf/providers/GraphNodeWriter.java    | 10 ++++----
 .../jaxrs/rdf/providers/GraphReader.java        |  4 +--
 .../jaxrs/rdf/providers/GraphWriter.java        |  2 +-
 .../rdf/providers/ImmutableGraphReader.java     |  2 +-
 .../ResultSetCsvMessageBodyWriter.java          |  8 +++---
 .../ResultSetJsonMessageBodyWriter.java         | 10 ++++----
 .../ResultSetTsvMessageBodyWriter.java          |  8 +++---
 .../ResultSetXmlMessageBodyWriter.java          |  8 +++---
 .../platform/config/PlatformConfig.java         | 12 ++++-----
 .../clerezza/platform/config/SystemConfig.java  |  6 ++---
 .../PlatformGraphNodeProvider.scala             |  2 +-
 .../content/ContentGraphProvider.java           |  4 +--
 .../platform/logging/LoggingManager.java        |  6 ++---
 .../org/apache/clerezza/platform/Constants.java |  2 +-
 .../src/main/scala/GlobalMenuRenderlet.scala    |  2 +-
 .../src/main/scala/HeadedPageRenderlet.scala    |  2 +-
 .../jaxrs/TypeHandlerSpace.java                 |  4 +--
 .../typehandlerspace/TypeHandlerDiscovery.java  |  2 +-
 .../impl/TypeHandlerDiscoveryImpl.java          |  2 +-
 .../typehandlerspace/GraphWriterDummy.java      |  2 +-
 .../platform/typepriority/TypePrioritizer.java  |  6 ++---
 .../typepriority/TypePrioritizerTest.java       |  6 ++---
 .../src/main/scala/Activator.scala              |  4 +--
 .../src/main/scala/Ontology.scala               |  2 +-
 .../scala/RenderletDescriptionRenderlet.scala   |  2 +-
 .../typerendering/scala/AbstractRenderlet.scala |  2 +-
 .../typerendering/scala/PageRenderlet.scala     |  2 +-
 .../typerendering/scala/RenderedPage.scala      |  2 +-
 .../typerendering/scala/SRenderlet.scala        |  2 +-
 .../typerendering/scala/XmlResult.scala         |  2 +-
 .../ScalaServerPagesService.java                |  2 +-
 .../scalaserverpages/SspTypeRenderlet.java      |  2 +-
 .../seedsnipe/WebRenderingFunctions.java        | 12 ++++-----
 .../typerendering/seedsnipe/GenericTest.java    |  4 +--
 .../seedsnipe/WebRenderingFunctionsTest.java    |  4 +--
 .../typerendering/CallbackRenderer.java         |  4 +--
 .../typerendering/CallbackRendererImpl.java     |  2 +-
 .../typerendering/GenericGraphNodeMBW.java      |  4 +--
 .../platform/typerendering/RendererFactory.java |  4 +--
 .../typerendering/RenderingException.java       | 10 ++++----
 .../RenderingspecificationException.java        |  8 +++---
 .../typerendering/RenderletManager.java         |  2 +-
 .../typerendering/RenderletManagerImpl.java     |  2 +-
 .../typerendering/RenderletRendererImpl.java    |  2 +-
 .../TypeRenderingExceptionMapper.java           |  2 +-
 .../platform/typerendering/TypeRenderlet.java   |  2 +-
 .../platform/usermanager/UserComparator.java    |  2 +-
 .../platform/usermanager/UserManager.java       |  2 +-
 .../platform/usermanager/UserManagerImpl.java   | 20 +++++++--------
 .../UserGraphAcessPermissionProvider.scala      |  2 +-
 .../platform/users/WebIdGraphsService.scala     |  8 +++---
 .../clerezza/platform/users/WebIdInfo.scala     |  4 +--
 .../clerezza/rdf/core/test/GraphTest.java       | 22 ++++++++---------
 .../clerezza/rdf/core/test/GraphWrapper.java    | 12 ++++-----
 .../test/LockableMGraphWrapperForTesting.java   | 10 ++++----
 .../core/test/LockingIteratorForTesting.java    |  2 +-
 .../clerezza/rdf/core/test/RandomGraph.java     | 16 ++++++------
 .../clerezza/rdf/core/test/TcProviderTest.java  | 16 ++++++------
 .../rdf/core/InvalidLiteralTypeException.java   |  2 +-
 .../clerezza/rdf/core/LiteralFactory.java       |  2 +-
 .../access/EntityAlreadyExistsException.java    |  2 +-
 .../core/access/EntityUndeletableException.java |  2 +-
 .../access/ImmutableGraphServiceFactory.java    |  4 +--
 .../rdf/core/access/MGraphServiceFactory.java   |  2 +-
 .../rdf/core/access/NoSuchEntityException.java  |  2 +-
 .../rdf/core/access/QueryableTcProvider.java    |  4 +--
 .../clerezza/rdf/core/access/SecuredGraph.java  | 20 +++++++--------
 .../clerezza/rdf/core/access/TcManager.java     |  8 +++---
 .../clerezza/rdf/core/access/TcProvider.java    |  6 ++---
 .../rdf/core/access/TcProviderMultiplexer.java  |  8 +++---
 .../access/security/TcAccessController.java     | 16 ++++++------
 .../rdf/core/impl/WriteBlockedGraph.java        | 18 +++++++-------
 .../core/impl/util/PrivilegedGraphWrapper.java  | 18 +++++++-------
 .../util/PrivilegedImmuatbleGraphWrapper.java   |  2 +-
 .../core/impl/util/SimpleLiteralFactory.java    |  6 ++---
 .../rdf/core/serializedform/Parser.java         |  8 +++---
 .../core/serializedform/ParsingProvider.java    |  4 +--
 .../rdf/core/serializedform/Serializer.java     |  2 +-
 .../serializedform/SerializingProvider.java     |  2 +-
 .../clerezza/rdf/core/sparql/QueryEngine.java   |  2 +-
 .../rdf/core/sparql/SolutionMapping.java        |  2 +-
 .../rdf/core/sparql/SparqlPreParser.java        |  2 +-
 .../clerezza/rdf/core/sparql/query/DataSet.java |  2 +-
 .../rdf/core/sparql/query/FunctionCall.java     |  2 +-
 .../core/sparql/query/GroupGraphPattern.java    |  2 +-
 .../rdf/core/sparql/query/InlineData.java       |  2 +-
 .../core/sparql/query/LiteralExpression.java    |  2 +-
 .../rdf/core/sparql/query/PredicatePath.java    |  2 +-
 .../core/sparql/query/ResourceOrVariable.java   |  2 +-
 .../rdf/core/sparql/query/UriRefExpression.java |  2 +-
 .../rdf/core/sparql/query/UriRefOrVariable.java |  2 +-
 .../core/sparql/query/impl/SimpleDataSet.java   |  2 +-
 .../query/impl/SimpleGroupGraphPattern.java     |  2 +-
 .../sparql/query/impl/SimpleInlineData.java     |  2 +-
 .../query/impl/SimplePropertyPathPattern.java   |  4 +--
 .../rdf/core/sparql/query/impl/SimpleQuery.java |  2 +-
 .../query/impl/SimpleStringQuerySerializer.java |  6 ++---
 .../sparql/query/impl/SimpleTriplePattern.java  |  6 ++---
 .../clerezza/rdf/core/sparql/update/Update.java |  2 +-
 .../rdf/core/sparql/update/UpdateOperation.java |  2 +-
 .../sparql/update/impl/BaseUpdateOperation.java |  2 +-
 .../update/impl/ClearOrDropOperation.java       |  2 +-
 .../sparql/update/impl/CreateOperation.java     |  2 +-
 .../core/sparql/update/impl/LoadOperation.java  |  2 +-
 .../sparql/update/impl/ModifyOperation.java     |  2 +-
 .../core/sparql/update/impl/SimpleUpdate.java   |  2 +-
 .../update/impl/SimpleUpdateOperation.java      |  2 +-
 .../update/impl/UpdateOperationWithQuads.java   |  2 +-
 .../core/sparql/JavaCCGeneratedQueryParser.jj   | 14 +++++------
 .../sparql/JavaCCGeneratedSparqlPreParser.jj    | 14 +++++------
 .../apache/clerezza/rdf/core/LanguageTest.java  |  2 +-
 .../clerezza/rdf/core/LiteralFactoryTest.java   |  4 +--
 .../apache/clerezza/rdf/core/UriRefTest.java    |  2 +-
 .../clerezza/rdf/core/access/SecurityTest.java  | 12 ++++-----
 .../clerezza/rdf/core/access/TcManagerTest.java | 12 ++++-----
 .../rdf/core/access/providers/WeightedA.java    | 10 ++++----
 .../rdf/core/access/providers/WeightedA1.java   | 12 ++++-----
 .../core/access/providers/WeightedAHeavy.java   | 14 +++++------
 .../core/access/providers/WeightedBlight.java   | 12 ++++-----
 .../core/access/providers/WeightedDummy.java    | 12 ++++-----
 .../impl/util/SimpleLiteralFactoryTest.java     |  4 +--
 .../rdf/core/serializedform/ParserTest.java     |  4 +--
 .../rdf/core/serializedform/SerializerTest.java |  2 +-
 .../TestServiceManagedProvider.java             |  4 +--
 .../rdf/core/sparql/QueryParserTest.java        |  6 ++---
 .../rdf/core/sparql/QuerySerializerTest.java    |  2 +-
 .../rdf/core/sparql/SparqlPreParserTest.java    |  2 +-
 .../clerezza/rdf/file/storage/FileGraph.java    | 12 ++++-----
 .../rdf/file/storage/FileTcProvider.java        |  6 ++---
 .../rdf/file/storage/FileGraphTest.java         |  6 ++---
 .../rdf/file/storage/FileTcProviderTest.java    | 12 ++++-----
 .../rdf/jena/commons/Jena2TriaUtil.java         | 18 +++++++-------
 .../rdf/jena/commons/JenaBNodeWrapper.java      |  2 +-
 .../rdf/jena/commons/Tria2JenaUtil.java         | 12 ++++-----
 .../clerezza/rdf/jena/facade/JenaGraph.java     | 14 +++++------
 .../rdf/facade/blackbox/TestBasics.java         | 10 ++++----
 .../rdf/jena/parser/JenaParserProvider.java     |  4 +--
 .../rdf/jena/parser/JenaParserProviderTest.java |  8 +++---
 .../jena/serializer/JenaSerializerProvider.java |  2 +-
 .../serializer/TestJenaSerializerProvider.java  | 12 ++++-----
 .../rdf/jena/sparql/HashMapSolutionMapping.java |  4 +--
 .../rdf/jena/sparql/JenaSparqlEngine.java       |  4 +--
 .../rdf/jena/sparql/TcDatasetGraph.java         |  4 +--
 .../clerezza/rdf/jena/sparql/SimpleTest.java    | 12 ++++-----
 .../rdf/jena/storage/JenaGraphAdaptor.java      | 12 ++++-----
 .../rdf/jena/storage/RoundTripTest.java         | 10 ++++----
 .../clerezza/rdf/jena/tdb/internals/IriSet.java |  4 +--
 .../rdf/jena/tdb/internals/ModelGraph.java      | 10 ++++----
 .../rdf/jena/tdb/internals/Symbols.java         |  2 +-
 .../rdf/jena/tdb/storage/BaseTdbTcProvider.java |  4 +--
 .../tdb/storage/SingleTdbDatasetTcProvider.java | 26 ++++++++++----------
 .../rdf/jena/tdb/storage/TdbTcProvider.java     |  8 +++---
 .../MultiThreadedSingleTdbDatasetTest.java      | 14 +++++------
 .../rdf/jena/tdb/storage/MultiThreadedTest.java | 16 ++++++------
 .../tdb/storage/MultiThreadedTestSingleTdb.java | 16 ++++++------
 .../tdb/storage/SingleTdbDatasetGraphTest.java  |  4 +--
 .../storage/SingleTdbDatasetTcProviderTest.java | 16 ++++++------
 .../rdf/jena/tdb/storage/TdbGraphTest.java      | 12 ++++-----
 .../clerezza/rdf/rdfa/ClerezzaRDFaParser.java   |  4 +--
 .../rdf/rdfa/ClerezzaStatementSink.java         | 20 +++++++--------
 .../clerezza/rdf/scala/utils/EzLiteral.scala    | 12 ++++-----
 .../clerezza/rdf/scala/utils/EzMGraph.scala     | 16 ++++++------
 .../clerezza/rdf/scala/utils/NameSpace.scala    |  2 +-
 .../clerezza/rdf/scala/utils/Preamble.scala     | 14 +++++------
 .../rdf/scala/utils/RichGraphNode.scala         | 10 ++++----
 .../clerezza/rdf/scala/utils/EzMGraphTest.scala | 16 ++++++------
 .../rdf/scala/utils/RichGraphNodeTest.scala     | 18 +++++++-------
 .../rdf/scala/utils/TypeConversionTest.scala    | 10 ++++----
 .../clerezza/rdf/schemagen/SchemaGen.java       | 20 +++++++--------
 .../rdf/simple/storage/SimpleTcProvider.java    | 10 ++++----
 .../rdf/simple/storage/AccessViaTcManager.java  |  6 ++---
 .../simple/storage/SimpleGraphGenericTest.java  |  4 +--
 rdf/storage.web/src/main/scala/WebProxy.scala   |  8 +++---
 .../apache/clerezza/rdf/utils/GraphNode.java    |  6 ++---
 .../apache/clerezza/rdf/utils/GraphUtils.java   | 14 +++++------
 .../org/apache/clerezza/rdf/utils/RdfList.java  | 12 ++++-----
 .../clerezza/rdf/utils/SeeAlsoExpander.java     |  6 ++---
 .../org/apache/clerezza/rdf/utils/Smusher.java  |  2 +-
 .../apache/clerezza/rdf/utils/UnionGraph.java   | 12 ++++-----
 .../clerezza/rdf/utils/UnionWatchableGraph.java |  8 +++---
 .../clerezza/rdf/utils/UriMutatingGraph.java    | 18 +++++++-------
 .../graphnodeprovider/GraphNodeProvider.java    |  2 +-
 .../rdf/utils/smushing/BaseSmusher.java         | 16 ++++++------
 .../clerezza/rdf/utils/smushing/IfpSmusher.java | 10 ++++----
 .../rdf/utils/smushing/SameAsSmusher.java       |  8 +++---
 .../clerezza/rdf/utils/GraphUtilsTest.java      | 10 ++++----
 .../apache/clerezza/rdf/utils/IfpSmushTest.java | 12 ++++-----
 .../apache/clerezza/rdf/utils/RdfListTest.java  | 14 +++++------
 .../clerezza/rdf/utils/SameAsSmushTest.java     | 16 ++++++------
 .../clerezza/rdf/utils/TestGraphNode.java       | 18 +++++++-------
 .../clerezza/rdf/utils/UnionGraphTest.java      | 12 ++++-----
 .../rdf/utils/smushing/SameAsSmushTest.java     | 16 ++++++------
 .../apache/clerezza/rdf/web/core/Backup.java    |  6 ++---
 .../rdf/web/core/BackupMessageBodyWriter.java   | 10 ++++----
 .../apache/clerezza/rdf/web/core/Delete.java    | 10 ++++----
 .../clerezza/rdf/web/core/GraphManagement.java  | 12 ++++-----
 .../apache/clerezza/rdf/web/core/Restorer.java  | 12 ++++-----
 .../web/core/ResultSetMessageBodyWriter.java    | 10 ++++----
 .../org/apache/clerezza/rdf/web/core/Smush.java |  8 +++---
 .../clerezza/rdf/web/core/SparqlEndpoint.java   | 18 +++++++-------
 .../apache/clerezza/rdf/web/core/WebAccess.java | 10 ++++----
 .../rdf/web/core/BackupAndRestoreTest.java      | 16 ++++++------
 .../GraphNodeDataFieldResolver.java             |  8 +++---
 .../templating/seedsnipe/GraphNodeTest.java     | 20 +++++++--------
 204 files changed, 739 insertions(+), 739 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 bde5c83..256806d 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
@@ -38,11 +38,11 @@ import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 b1c4922..1475b7a 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
@@ -29,8 +29,8 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 9bcc33a..9437305 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
@@ -30,7 +30,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 c2af5a8..03884cf 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
@@ -30,7 +30,7 @@ import javax.ws.rs.ext.MessageBodyReader;
 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.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
 
 /**
  * @scr.component

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
index a9b549e..967b56f 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
@@ -32,12 +32,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
index f80f4a8..a78c9a0 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
@@ -32,14 +32,14 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
index 22ebc7c..5b5fefe 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
@@ -32,12 +32,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
index 8d2657a..f4abb17 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
@@ -40,13 +40,13 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
index 284acff..003df78 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
@@ -30,17 +30,17 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.ComponentContext;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 
 /**
  * This class provides a OSGi service for getting system properties from

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
index cb07d36..e5fc314 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
@@ -24,12 +24,12 @@ import java.net.URL;
 import java.util.Collections;
 import java.util.Set;
 import org.apache.clerezza.platform.Constants;
-import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.osgi.service.component.ComponentContext;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+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;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
index 8d12669..a06e971 100644
--- a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
+++ b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
@@ -20,7 +20,7 @@ package org.apache.clerezza.platform.graphnodeprovider
  */
 
 import java.net.{HttpURLConnection, URL}
-import org.apache.commons.rdf._
+import org.apache.clerezza.commons.rdf._
 import org.slf4j.scala._
 import org.apache.clerezza.rdf.core.access._
 import org.apache.clerezza.rdf.core._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
index 80d5862..9b79d85 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -25,8 +25,8 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.clerezza.platform.Constants;
 
 import org.osgi.service.component.ComponentContext;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+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.utils.UnionGraph;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
index 95158fd..85a41bc 100644
--- a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
+++ b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
@@ -44,9 +44,9 @@ import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.logging.ontologies.LOGGING;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
----------------------------------------------------------------------
diff --git a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
index 8d412f8..49c4a49 100644
--- a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
+++ b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
@@ -17,7 +17,7 @@
 
 package org.apache.clerezza.platform;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * This class gropus some constant values used by the clerezza.platform components

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
index 75cf1eb..85efc6f 100644
--- a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
+++ b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
@@ -23,7 +23,7 @@ package org.apache.clerezza.platform.style.default
 
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.rdf.core._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
index 2ef6189..a39c0c8 100644
--- a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
+++ b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
@@ -32,7 +32,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
 import org.apache.clerezza.rdf.ontologies.DC
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 
 /**
  * A Renderlet for the menu

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
index 84e3e85..80c2bed 100644
--- a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
+++ b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
@@ -31,8 +31,8 @@ import javax.ws.rs.core.UriInfo;
 
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
index 2db91ee..580f59c 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.platform.typehandlerspace;
 
 import java.util.Set;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Implementations of this interface map RDF-types to type handlers. A type

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
index 789cc4d..a3f9c35 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
@@ -35,7 +35,7 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typehandlerspace.SupportedTypes;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
index 31222a7..391ac88 100644
--- a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
+++ b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
@@ -31,7 +31,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 
 /**
  * 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
index 73c4003..487726d 100644
--- a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
+++ b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
@@ -33,11 +33,11 @@ import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.References;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.config.SystemConfig;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.RdfList;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
index fba8cc7..ccaa75d 100644
--- a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
+++ b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
@@ -21,9 +21,9 @@ package org.apache.clerezza.platform.typepriority;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.RdfList;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.gui/src/main/scala/Activator.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/src/main/scala/Activator.scala b/platform/typerendering.gui/src/main/scala/Activator.scala
index ef4dc2f..11938e9 100644
--- a/platform/typerendering.gui/src/main/scala/Activator.scala
+++ b/platform/typerendering.gui/src/main/scala/Activator.scala
@@ -21,8 +21,8 @@
 
 package org.apache.clerezza.platform.typerendering.gui
 
-import org.apache.commons.rdf.BlankNode
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.BlankNode
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.osgi.framework.{BundleActivator, BundleContext, ServiceRegistration}
 import scala.collection.JavaConversions._
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItem

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.gui/src/main/scala/Ontology.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/src/main/scala/Ontology.scala b/platform/typerendering.gui/src/main/scala/Ontology.scala
index bdbb4ac..fef2077 100644
--- a/platform/typerendering.gui/src/main/scala/Ontology.scala
+++ b/platform/typerendering.gui/src/main/scala/Ontology.scala
@@ -21,7 +21,7 @@
 
 package org.apache.clerezza.platform.typerendering.gui
 
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 
 object Ontology {
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala b/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
index 931ed45..b186d8b 100644
--- a/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
+++ b/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
@@ -23,7 +23,7 @@ package org.apache.clerezza.platform.typerendering.gui
 
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.rdf.core._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
index 6214a86..e1c4924 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
index ba4c556..4140b3f 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
index dc75f76..edbd5f5 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
@@ -32,7 +32,7 @@ import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.security.{PrivilegedAction, AccessController}
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
index 5ea0819..ab40c2e 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.TypeRenderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
index de29e51..f0b8935 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
@@ -34,7 +34,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.nio.charset.Charset
 import java.security.{PrivilegedAction, AccessController}
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
index a14f640..4e37f0d 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.platform.typerendering.scalaserverpages;
 
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
index 6a328e3..501fd9b 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering.scalaserverpages;
 import java.util.logging.Level;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
index 90e3cf4..eda3b7b 100644
--- a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
+++ b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
@@ -28,15 +28,15 @@ import java.util.HashMap;
 import java.util.Map;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.templating.RenderingFunction;
 import org.apache.clerezza.templating.RenderingFunctions;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.Graph;
 
 /**
  * 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
index 6c01a8d..a7f3858 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
@@ -23,8 +23,8 @@ import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.utils.GraphNode;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
index 3af878d..520e54d 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
@@ -26,8 +26,8 @@ import org.apache.clerezza.rdf.core.LiteralFactory;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.templating.RenderingFunction;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
index 1f8793e..5a0cb10 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -48,7 +48,7 @@ public interface CallbackRenderer {
 
     /**
      * Renders a specified named resource using the GraphNode returned by
-     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.commons.rdf.Iri)</code>.
+     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.clerezza.commons.rdf.Iri)</code>.
      *
      * Otherwise same as render(GraphNode, .GraphNode, String, OutputStream)
      *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
index 72df3c4..a0b31e8 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
index 391acf8..4ed89ef 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
@@ -59,8 +59,8 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
index 489b88d..91886fc 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
@@ -25,11 +25,11 @@ import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
 import org.apache.clerezza.platform.typerendering.utils.MediaTypeMap;
 import org.apache.clerezza.platform.typerendering.utils.RegexMap;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
index ae7ae42..cbe1469 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
@@ -22,13 +22,13 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * This exception is thrown when an exception occured while rendering a

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
index e9f470b..a186180 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
@@ -21,10 +21,10 @@ package org.apache.clerezza.platform.typerendering;
 import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
index 5da9436..29e3d6d 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
@@ -18,7 +18,7 @@
 package org.apache.clerezza.platform.typerendering;
 
 import javax.ws.rs.core.MediaType;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Over the RenderletManagerImpl renderlets can be registered.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
index a2ef2f0..201b670 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
@@ -33,7 +33,7 @@ import java.util.Set;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.ws.rs.core.MediaType;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
index b3b57ed..3bde164 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
@@ -28,7 +28,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
index 502b5ac..4dcee16 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
@@ -29,7 +29,7 @@ import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
index fcbf25f..ecbaae5 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
@@ -25,7 +25,7 @@ import java.security.PrivilegedAction;
 import java.util.Map;
 import javax.ws.rs.core.*;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
index 2a8350d..ae28771 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
@@ -22,7 +22,7 @@ import org.apache.clerezza.rdf.utils.GraphNode;
 import java.util.Comparator;
 import java.util.Iterator;
 
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 
 public class UserComparator implements Comparator<GraphNode> {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
index b2b514f..6cc9691 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
index a48362c..847de60 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
@@ -38,17 +38,17 @@ import org.apache.felix.scr.annotations.Service;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.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.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.SecuredGraph;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.DC;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.OSGI;
@@ -57,7 +57,7 @@ import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.SIOC;
 import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * @author hasan, tio

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
index 9758955..dd9a6f5 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
@@ -18,7 +18,7 @@
 /*package org.apache.clerezza.platform.users
 
 import org.apache.clerezza.platform.security.WebIdBasedPermissionProvider
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 
 class UserGraphAcessPermissionProvider extends WebIdBasedPermissionProvider {
   

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
index 37d5c33..dba0e7d 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
@@ -25,14 +25,14 @@ import java.security.PrivilegedAction
 import org.apache.clerezza.platform.Constants
 import org.apache.clerezza.platform.config.PlatformConfig
 import org.apache.clerezza.platform.config.SystemConfig
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Graph
+import org.apache.clerezza.commons.rdf.Graph
+import org.apache.clerezza.commons.rdf.Iri
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException
 import org.apache.clerezza.rdf.core.access.SecuredGraph
 import org.apache.clerezza.rdf.core.access.TcManager
 import org.apache.clerezza.rdf.core.access.security.TcPermission
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.rdf.ontologies.PLATFORM
 import org.apache.clerezza.rdf.storage.web.WebProxy
 import org.apache.clerezza.rdf.utils.UnionGraph

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
index 648e0ba..28eca05 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
@@ -27,8 +27,8 @@ package org.apache.clerezza.platform.users
  * many things are easier for user with URIs.
  *
  */
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Graph
+import org.apache.clerezza.commons.rdf.Iri
 
 trait WebIdInfo {
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
index 06feaac..f4966b2 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphTest.java
@@ -23,18 +23,18 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+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.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.junit.Test;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
 import org.junit.Assert;
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
index 57fd89a..e977eba 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/GraphWrapper.java
@@ -22,12 +22,12 @@ package org.apache.clerezza.rdf.core.test;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+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.RdfTerm;
+import org.apache.clerezza.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
index 3f009cc..3d49c2b 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockableMGraphWrapperForTesting.java
@@ -21,11 +21,11 @@ package org.apache.clerezza.rdf.core.test;
 import java.util.Iterator;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+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;
 
 /**
  * Wrappes an Graph as a LockableGraph. If a method is called that reads

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockingIteratorForTesting.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockingIteratorForTesting.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockingIteratorForTesting.java
index ae911d4..4c434ec 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockingIteratorForTesting.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/LockingIteratorForTesting.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.core.test;
 import java.util.Iterator;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-import org.apache.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.Triple;
 
 /**
  * Wrapps an iterator<Triple> reading all elements to a cache on construction

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
index b478b4e..a71e298 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
@@ -20,14 +20,14 @@ package org.apache.clerezza.rdf.core.test;
 
 import java.util.Iterator;
 import java.util.UUID;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.Triple;
+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.commons.lang.RandomStringUtils;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
index beb2b2d..bafd251 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
@@ -23,18 +23,18 @@ import java.util.Iterator;
 
 import java.util.Set;
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+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.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 
 import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import static org.junit.Assert.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
index 9a214a2..8238be6 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/InvalidLiteralTypeException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Thrown when a literal is of the wrong type for conversion to a java-type

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/core/src/main/java/org/apache/clerezza/rdf/core/LiteralFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/LiteralFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/LiteralFactory.java
index fafb854..2baa1c1 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/LiteralFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/LiteralFactory.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.rdf.core;
 
 import org.apache.clerezza.rdf.core.impl.util.SimpleLiteralFactory;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * This class provides methods to convert java objects to typed literals and


[86/87] [abbrv] clerezza git commit: CLEREZZA-985: using released version of rdf-core

Posted by re...@apache.org.
CLEREZZA-985: using released version of rdf-core

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

Branch: refs/heads/master
Commit: ae73d1f2809feb51d187cf0da3f170e773f43979
Parents: 878dd9b
Author: Reto Gmuer <re...@apache.org>
Authored: Tue Apr 14 10:24:02 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Tue Apr 14 10:24:02 2015 +0000

----------------------------------------------------------------------
 provisioning/rdf/pom.xml   | 4 ++--
 rdf/core/pom.xml           | 4 ++--
 rdf/jena/commons/pom.xml   | 4 ++--
 rdf/jena/facade/pom.xml    | 4 ++--
 rdf/ontologies/pom.xml     | 2 +-
 rdf/rdfa/pom.xml           | 4 ++--
 rdf/schemagen/main/pom.xml | 4 ++--
 rdf/utils/pom.xml          | 4 ++--
 8 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/provisioning/rdf/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf/pom.xml b/provisioning/rdf/pom.xml
index ce10945..525a773 100644
--- a/provisioning/rdf/pom.xml
+++ b/provisioning/rdf/pom.xml
@@ -88,12 +88,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/core/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/core/pom.xml b/rdf/core/pom.xml
index 9e134ea..594362e 100644
--- a/rdf/core/pom.xml
+++ b/rdf/core/pom.xml
@@ -35,12 +35,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/jena/commons/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/pom.xml b/rdf/jena/commons/pom.xml
index 8cb7a84..ff6b9f6 100644
--- a/rdf/jena/commons/pom.xml
+++ b/rdf/jena/commons/pom.xml
@@ -48,12 +48,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.jena</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/jena/facade/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/facade/pom.xml b/rdf/jena/facade/pom.xml
index ed31b8c..88ef033 100644
--- a/rdf/jena/facade/pom.xml
+++ b/rdf/jena/facade/pom.xml
@@ -49,12 +49,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/ontologies/pom.xml b/rdf/ontologies/pom.xml
index 9af7358..3327c56 100644
--- a/rdf/ontologies/pom.xml
+++ b/rdf/ontologies/pom.xml
@@ -39,7 +39,7 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
     </dependencies>
     <build>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/rdfa/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/rdfa/pom.xml b/rdf/rdfa/pom.xml
index 68525f9..3033ffd 100644
--- a/rdf/rdfa/pom.xml
+++ b/rdf/rdfa/pom.xml
@@ -51,12 +51,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>net.rootdev</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/schemagen/main/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/schemagen/main/pom.xml b/rdf/schemagen/main/pom.xml
index 46d09cb..128776e 100644
--- a/rdf/schemagen/main/pom.xml
+++ b/rdf/schemagen/main/pom.xml
@@ -45,12 +45,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/ae73d1f2/rdf/utils/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/utils/pom.xml b/rdf/utils/pom.xml
index 0f6b648..3c2b430 100644
--- a/rdf/utils/pom.xml
+++ b/rdf/utils/pom.xml
@@ -47,12 +47,12 @@
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-api</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.commons-rdf</groupId>
             <artifactId>commons-rdf-impl-utils</artifactId>
-            <version>0.1-SNAPSHOT</version>
+            <version>0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>


[45/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
new file mode 100644
index 0000000..745a2cf
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
@@ -0,0 +1,4040 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*
+ * $ URIs @VERSION
+ * 
+ * Copyright (c) 2008,2009 Jeni Tennison
+ * Licensed under the MIT (MIT-LICENSE.txt)
+ *
+ */
+/**
+ * @fileOverview $ URIs
+ * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
+ * @copyright (c) 2008,2009 Jeni Tennison
+ * @license MIT license (MIT-LICENSE.txt)
+ * @version 1.0
+ */
+/**
+ * @class
+ * @name jQuery
+ * @exports $ as jQuery
+ * @description rdfQuery is a <a href="http://jquery.com/">jQuery</a> plugin. The only fields and methods listed here are those that come as part of the rdfQuery library.
+ */
+(function ($) {
+
+  var
+    mem = {},
+    uriRegex = /^(([a-z][\-a-z0-9+\.]*):)?(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i,
+    docURI,
+
+    parseURI = function (u) {
+      var m = u.match(uriRegex);
+      if (m === null) {
+        throw "Malformed URI: " + u;
+      }
+      return {
+        scheme: m[1] ? m[2].toLowerCase() : undefined,
+        authority: m[3] ? m[4] : undefined,
+        path: m[5] || '',
+        query: m[6] ? m[7] : undefined,
+        fragment: m[8] ? m[9] : undefined
+      };
+    },
+
+    removeDotSegments = function (u) {
+      var r = '', m = [];
+      if (/\./.test(u)) {
+        while (u !== undefined && u !== '') {
+          if (u === '.' || u === '..') {
+            u = '';
+          } else if (/^\.\.\//.test(u)) { // starts with ../
+            u = u.substring(3);
+          } else if (/^\.\//.test(u)) { // starts with ./
+            u = u.substring(2);
+          } else if (/^\/\.(\/|$)/.test(u)) { // starts with /./ or consists of /.
+            u = '/' + u.substring(3);
+          } else if (/^\/\.\.(\/|$)/.test(u)) { // starts with /../ or consists of /..
+            u = '/' + u.substring(4);
+            r = r.replace(/\/?[^\/]+$/, '');
+          } else {
+            m = u.match(/^(\/?[^\/]*)(\/.*)?$/);
+            u = m[2];
+            r = r + m[1];
+          }
+        }
+        return r;
+      } else {
+        return u;
+      }
+    },
+
+    merge = function (b, r) {
+      if (b.authority !== '' && (b.path === undefined || b.path === '')) {
+        return '/' + r;
+      } else {
+        return b.path.replace(/[^\/]+$/, '') + r;
+      }
+    };
+
+  /**
+   * Creates a new jQuery.uri object. This should be invoked as a method rather than constructed using new.
+   * @class Represents a URI
+   * @param {String} [relative='']
+   * @param {String|jQuery.uri} [base] Defaults to the base URI of the page
+   * @returns {jQuery.uri} The new jQuery.uri object.
+   * @example uri = jQuery.uri('/my/file.html');
+   */
+  $.uri = function (relative, base) {
+    var uri;
+    relative = relative || '';
+    if (mem[relative]) {
+      return mem[relative];
+    }
+    base = base || $.uri.base();
+    if (typeof base === 'string') {
+      base = $.uri.absolute(base);
+    }
+    uri = new $.uri.fn.init(relative, base);
+    if (mem[uri]) {
+      return mem[uri];
+    } else {
+      mem[uri] = uri;
+      return uri;
+    }
+  };
+
+  $.uri.fn = $.uri.prototype = {
+    /**
+     * The scheme used in the URI
+     * @type String
+     */
+    scheme: undefined,
+    /**
+     * The authority used in the URI
+     * @type String
+     */
+    authority: undefined,
+    /**
+     * The path used in the URI
+     * @type String
+     */
+    path: undefined,
+    /**
+     * The query part of the URI
+     * @type String
+     */
+    query: undefined,
+    /**
+     * The fragment part of the URI
+     * @type String
+     */
+    fragment: undefined,
+    
+    init: function (relative, base) {
+      var r = {};
+      base = base || {};
+      $.extend(this, parseURI(relative));
+      if (this.scheme === undefined) {
+        this.scheme = base.scheme;
+        if (this.authority !== undefined) {
+          this.path = removeDotSegments(this.path);
+        } else {
+          this.authority = base.authority;
+          if (this.path === '') {
+            this.path = base.path;
+            if (this.query === undefined) {
+              this.query = base.query;
+            }
+          } else {
+            if (!/^\//.test(this.path)) {
+              this.path = merge(base, this.path);
+            }
+            this.path = removeDotSegments(this.path);
+          }
+        }
+      }
+      if (this.scheme === undefined) {
+        throw "Malformed URI: URI is not an absolute URI and no base supplied: " + relative;
+      }
+      return this;
+    },
+  
+    /**
+     * Resolves a relative URI relative to this URI
+     * @param {String} relative
+     * @returns jQuery.uri
+     */
+    resolve: function (relative) {
+      return $.uri(relative, this);
+    },
+    
+    /**
+     * Creates a relative URI giving the path from this URI to the absolute URI passed as a parameter
+     * @param {String|jQuery.uri} absolute
+     * @returns String
+     */
+    relative: function (absolute) {
+      var aPath, bPath, i = 0, j, resultPath = [], result = '';
+      if (typeof absolute === 'string') {
+        absolute = $.uri(absolute, {});
+      }
+      if (absolute.scheme !== this.scheme || 
+          absolute.authority !== this.authority) {
+        return absolute.toString();
+      }
+      if (absolute.path !== this.path) {
+        aPath = absolute.path.split('/');
+        bPath = this.path.split('/');
+        if (aPath[1] !== bPath[1]) {
+          result = absolute.path;
+        } else {
+          while (aPath[i] === bPath[i]) {
+            i += 1;
+          }
+          j = i;
+          for (; i < bPath.length - 1; i += 1) {
+            resultPath.push('..');
+          }
+          for (; j < aPath.length; j += 1) {
+            resultPath.push(aPath[j]);
+          }
+          result = resultPath.join('/');
+        }
+        result = absolute.query === undefined ? result : result + '?' + absolute.query;
+        result = absolute.fragment === undefined ? result : result + '#' + absolute.fragment;
+        return result;
+      }
+      if (absolute.query !== undefined && absolute.query !== this.query) {
+        return '?' + absolute.query + (absolute.fragment === undefined ? '' : '#' + absolute.fragment);
+      }
+      if (absolute.fragment !== undefined && absolute.fragment !== this.fragment) {
+        return '#' + absolute.fragment;
+      }
+      return '';
+    },
+  
+    /**
+     * Returns the URI as an absolute string
+     * @returns String
+     */
+    toString: function () {
+      var result = '';
+      if (this._string) {
+        return this._string;
+      } else {
+        result = this.scheme === undefined ? result : (result + this.scheme + ':');
+        result = this.authority === undefined ? result : (result + '//' + this.authority);
+        result = result + this.path;
+        result = this.query === undefined ? result : (result + '?' + this.query);
+        result = this.fragment === undefined ? result : (result + '#' + this.fragment);
+        this._string = result;
+        return result;
+      }
+    }
+  
+  };
+
+  $.uri.fn.init.prototype = $.uri.fn;
+
+  /**
+   * Creates a {@link jQuery.uri} from a known-to-be-absolute URI
+   * @param {String}
+   * @returns {jQuery.uri}
+   */
+  $.uri.absolute = function (uri) {
+    return $.uri(uri, {});
+  };
+
+  /**
+   * Creates a {@link jQuery.uri} from a relative URI and an optional base URI
+   * @returns {jQuery.uri}
+   * @see jQuery.uri
+   */
+  $.uri.resolve = function (relative, base) {
+    return $.uri(relative, base);
+  };
+  
+  /**
+   * Creates a string giving the relative path from a base URI to an absolute URI
+   * @param {String} absolute
+   * @param {String} base
+   * @returns {String}
+   */
+  $.uri.relative = function (absolute, base) {
+    return $.uri(base, {}).relative(absolute);
+  };
+  
+  /**
+   * Returns the base URI of the page
+   * @returns {jQuery.uri}
+   */
+  $.uri.base = function () {
+    return $(document).base();
+  };
+  
+  /**
+   * Returns the base URI in scope for the first selected element
+   * @methodOf jQuery#
+   * @name jQuery#base
+   * @returns {jQuery.uri}
+   * @example baseURI = $('img').base();
+   */
+  $.fn.base = function () {
+    var base = $(this).parents().andSelf().find('base').attr('href'),
+      doc = $(this)[0].ownerDocument || document,
+      docURI = $.uri.absolute(doc.location === null ? document.location.href : doc.location.href);
+    return base === undefined ? docURI : $.uri(base, docURI);
+  };
+
+})(jQuery);
+/*
+ * jQuery CURIE @VERSION
+ * 
+ * Copyright (c) 2008,2009 Jeni Tennison
+ * Licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * Depends:
+ *  jquery.uri.js
+ */
+/**
+ * @fileOverview XML Namespace processing
+ * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
+ * @copyright (c) 2008,2009 Jeni Tennison
+ * @license MIT license (MIT-LICENSE.txt)
+ * @version 1.0
+ * @requires jquery.uri.js
+ */
+
+/*global jQuery */
+(function ($) {
+
+  var 
+    xmlNs = 'http://www.w3.org/XML/1998/namespace',
+    xmlnsNs = 'http://www.w3.org/2000/xmlns/',
+    
+    xmlnsRegex = /\sxmlns(?::([^ =]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g,
+    
+    ncNameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]',
+    ncNameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B10\u0B1
 3-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F
 18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]',
+    ncNameRegex = new RegExp('^' + ncNameStartChar + ncNameChar + '*$');
+    
+
+/**
+ * Returns the namespaces declared in the scope of the first selected element, or
+ * adds a namespace declaration to all selected elements. Pass in no parameters
+ * to return all namespaces bindings on the first selected element. If only 
+ * the prefix parameter is specified, this method will return the namespace
+ * URI that is bound to the specified prefix on the first element in the selection
+ * If the prefix and uri parameters are both specified, this method will
+ * add the binding of the specified prefix and namespace URI to all elements
+ * in the selection.
+ * @methodOf jQuery#
+ * @name jQuery#xmlns
+ * @param {String} [prefix] Restricts the namespaces returned to only the namespace with the specified namespace prefix.
+ * @param {String|jQuery.uri} [uri] Adds a namespace declaration to the selected elements that maps the specified prefix to the specified namespace.
+ * @param {Object} [inherited] A map of inherited namespace bindings.
+ * @returns {Object|jQuery.uri|jQuery}
+ * @example 
+ * // Retrieve all of the namespace bindings on the HTML document element
+ * var nsMap = $('html').xmlns();
+ * @example
+ * // Retrieve the namespace URI mapped to the 'dc' prefix on the HTML document element
+ * var dcNamespace = $('html').xmlns('dc');
+ * @example
+ * // Create a namespace declaration that binds the 'dc' prefix to the URI 'http://purl.org/dc/elements/1.1/'
+ * $('html').xmlns('dc', 'http://purl.org/dc/elements/1.1/');
+ */
+  $.fn.xmlns = function (prefix, uri, inherited) {
+    var 
+      elem = this.eq(0),
+      ns = elem.data('xmlns'),
+      e = elem[0], a, p, i,
+      decl = prefix ? 'xmlns:' + prefix : 'xmlns',
+      value,
+      tag, found = false;
+    if (uri === undefined) {
+      if (prefix === undefined) { // get the in-scope declarations on the first element
+        if (ns === undefined) {
+          ns = {
+//            xml: $.uri(xmlNs)
+          };
+          if (e.attributes && e.attributes.getNamedItemNS) {
+            for (i = 0; i < e.attributes.length; i += 1) {
+              a = e.attributes[i];
+              if (/^xmlns(:(.+))?$/.test(a.nodeName)) {
+                prefix = /^xmlns(:(.+))?$/.exec(a.nodeName)[2] || '';
+                value = a.nodeValue;
+                if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) {
+                  ns[prefix] = $.uri(a.nodeValue);
+                  found = true;
+                }
+              }
+            }
+          } else {
+            tag = /<[^>]+>/.exec(e.outerHTML);
+            a = xmlnsRegex.exec(tag);
+            while (a !== null) {
+              prefix = a[1] || '';
+              value = a[2] || a[3];
+              if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) {
+                ns[prefix] = $.uri(a[2] || a[3]);
+                found = true;
+              }
+              a = xmlnsRegex.exec(tag);
+            }
+            xmlnsRegex.lastIndex = 0;
+          }
+          inherited = inherited || (e.parentNode.nodeType === 1 ? elem.parent().xmlns() : {});
+          ns = found ? $.extend({}, inherited, ns) : inherited;
+          elem.data('xmlns', ns);
+        }
+        return ns;
+      } else if (typeof prefix === 'object') { // set the prefix mappings defined in the object
+        for (p in prefix) {
+          if (typeof prefix[p] === 'string' && ncNameRegex.test(p)) {
+            this.xmlns(p, prefix[p]);
+          }
+        }
+        this.find('*').andSelf().removeData('xmlns');
+        return this;
+      } else { // get the in-scope declaration associated with this prefix on the first element
+        if (ns === undefined) {
+          ns = elem.xmlns();
+        }
+        return ns[prefix];
+      }
+    } else { // set
+      this.find('*').andSelf().removeData('xmlns');
+      return this.attr(decl, uri);
+    }
+  };
+
+/**
+ * Removes one or more XML namespace bindings from the selected elements.
+ * @methodOf jQuery#
+ * @name jQuery#removeXmlns
+ * @param {String|Object|String[]} prefix The prefix(es) of the XML namespace bindings that are to be removed from the selected elements.
+ * @returns {jQuery} The original jQuery object.
+ * @example
+ * // Remove the foaf namespace declaration from the body element:
+ * $('body').removeXmlns('foaf');
+ * @example
+ * // Remove the foo and bar namespace declarations from all h2 elements
+ * $('h2').removeXmlns(['foo', 'bar']);
+ * @example
+ * // Remove the foo and bar namespace declarations from all h2 elements
+ * var namespaces = { foo : 'http://www.example.org/foo', bar : 'http://www.example.org/bar' };
+ * $('h2').removeXmlns(namespaces);
+ */
+  $.fn.removeXmlns = function (prefix) {
+    var decl, p, i;
+    if (typeof prefix === 'object') {
+      if (prefix.length === undefined) { // assume an object representing namespaces
+        for (p in prefix) {
+          if (typeof prefix[p] === 'string') {
+            this.removeXmlns(p);
+          }
+        }
+      } else { // it's an array
+        for (i = 0; i < prefix.length; i += 1) {
+          this.removeXmlns(prefix[i]);
+        }
+      }
+    } else {
+      decl = prefix ? 'xmlns:' + prefix : 'xmlns';
+      this.removeAttr(decl);
+    }
+    this.find('*').andSelf().removeData('xmlns');
+    return this;
+  };
+
+  $.fn.qname = function (name) {
+    var m, prefix, namespace;
+    if (name === undefined) {
+      if (this[0].outerHTML === undefined) {
+        name = this[0].nodeName.toLowerCase();
+      } else {
+        name = /<([^ >]+)/.exec(this[0].outerHTML)[1].toLowerCase();
+      }
+    }
+    if (name === '?xml:namespace') {
+      // there's a prefix on the name, but we can't get at it
+      throw "XMLinHTML: Unable to get the prefix to resolve the name of this element";
+    }
+    m = /^(([^:]+):)?([^:]+)$/.exec(name);
+    prefix = m[2] || '';
+    namespace = this.xmlns(prefix);
+    if (namespace === undefined && prefix !== '') {
+      throw "MalformedQName: The prefix " + prefix + " is not declared";
+    }
+    return {
+      namespace: namespace,
+      localPart: m[3],
+      prefix: prefix,
+      name: name
+    };
+  };
+
+})(jQuery);
+/*
+ * jQuery CURIE @VERSION
+ *
+ * Copyright (c) 2008,2009 Jeni Tennison
+ * Licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * Depends:
+ *  jquery.uri.js
+ */
+/**
+ * @fileOverview XML Schema datatype handling
+ * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
+ * @copyright (c) 2008,2009 Jeni Tennison
+ * @license MIT license (MIT-LICENSE.txt)
+ * @version 1.0
+ * @requires jquery.uri.js
+ */
+
+(function ($) {
+
+  var strip = function (value) {
+    return value.replace(/[ \t\n\r]+/, ' ').replace(/^ +/, '').replace(/ +$/, '');
+  };
+
+  /**
+   * Creates a new jQuery.typedValue object. This should be invoked as a method
+   * rather than constructed using new.
+   * @class Represents a value with an XML Schema datatype
+   * @param {String} value The string representation of the value
+   * @param {String} datatype The XML Schema datatype URI
+   * @returns {jQuery.typedValue}
+   * @example intValue = jQuery.typedValue('42', 'http://www.w3.org/2001/XMLSchema#integer');
+   */
+  $.typedValue = function (value, datatype) {
+    return $.typedValue.fn.init(value, datatype);
+  };
+
+  $.typedValue.fn = $.typedValue.prototype = {
+    /**
+     * The string representation of the value
+     * @memberOf jQuery.typedValue#
+     */
+    representation: undefined,
+    /**
+     * The value as an object. The type of the object will
+     * depend on the XML Schema datatype URI specified
+     * in the constructor. The following table lists the mappings
+     * currently supported:
+     * <table>
+     *   <tr>
+     *   <th>XML Schema Datatype</th>
+     *   <th>Value type</th>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#string</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#token</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#NCName</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#boolean</td>
+     *     <td>bool</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#decimal</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#integer</td>
+     *     <td>int</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#int</td>
+     *     <td>int</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#float</td>
+     *     <td>float</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#double</td>
+     *     <td>float</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#dateTime</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#date</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#gYear</td>
+     *     <td>int</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#gMonthDay</td>
+     *     <td>string</td>
+     *   </tr>
+     *   <tr>
+     *     <td>http://www.w3.org/2001/XMLSchema#anyURI</td>
+     *     <td>{@link jQuery.uri}</td>
+     *   </tr>
+     * </table>
+     * @memberOf jQuery.typedValue#
+     */
+    value: undefined,
+    /**
+     * The XML Schema datatype URI for the value's datatype
+     * @memberOf jQuery.typedValue#
+     */
+    datatype: undefined,
+
+    init: function (value, datatype) {
+      var d = $.typedValue.types[datatype];
+      if ($.typedValue.valid(value, datatype)) {
+        this.representation = value;
+        this.datatype = datatype;
+        this.value = d === undefined ? strip(value) : d.value(d.strip ? strip(value) : value);
+        return this;
+      } else {
+        throw {
+          name: 'InvalidValue',
+          message: value + ' is not a valid ' + datatype + ' value'
+        };
+      }
+    }
+  };
+
+  $.typedValue.fn.init.prototype = $.typedValue.fn;
+
+  /**
+   * An object that holds the datatypes supported by the script. The properties of this object are the URIs of the datatypes, and each datatype has four properties:
+   * <dl>
+   *   <dt>strip</dt>
+   *   <dd>A boolean value that indicates whether whitespace should be stripped from the value prior to testing against the regular expression or passing to the value function.</dd>
+   *   <dt>regex</dt>
+   *   <dd>A regular expression that valid values of the type must match.</dd>
+   *   <dt>validate</dt>
+   *   <dd>Optional. A function that performs further testing on the value.</dd>
+   *   <dt>value</dt>
+   *   <dd>A function that returns a Javascript object equivalent for the value.</dd>
+   * </dl>
+   * You can add to this object as necessary for your own datatypes, and {@link jQuery.typedValue} and {@link jQuery.typedValue.valid} will work with them.
+   * @see jQuery.typedValue
+   * @see jQuery.typedValue.valid
+   */
+  $.typedValue.types = {};
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#string'] = {
+    regex: /^.*$/,
+    strip: false,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#token'] = {
+    regex: /^.*$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return strip(v);
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#NCName'] = {
+    regex: /^[a-z_][-\.a-z0-9]+$/i,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return strip(v);
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#boolean'] = {
+    regex: /^(?:true|false|1|0)$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v === 'true' || v === '1';
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#decimal'] = {
+    regex: /^[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#integer'] = {
+    regex: /^[\-\+]?[0-9]+$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return parseInt(v, 10);
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#int'] = {
+    regex: /^[\-\+]?[0-9]+$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return parseInt(v, 10);
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'] = {
+    regex: /^(?:[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)(?:[eE][\-\+]?[0-9]+)?|[\-\+]?INF|NaN)$/,
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      if (v === '-INF') {
+        return -1 / 0;
+      } else if (v === 'INF' || v === '+INF') {
+        return 1 / 0;
+      } else {
+        return parseFloat(v);
+      }
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#double'] = {
+    regex: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].regex,
+    strip: true,
+    value: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].value
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#duration'] = {
+    regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+))?S)?)$/,
+    /** @ignore */
+    validate: function (v) {
+      var m = this.regex.exec(v);
+      return m[2] || m[3] || m[4] || m[5] || m[6] || m[7];
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#yearMonthDuration'] = {
+    regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?$/,
+    /** @ignore */
+    validate: function (v) {
+      var m = this.regex.exec(v);
+      return m[2] || m[3];
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      var m = this.regex.exec(v),
+        years = m[2] || 0,
+        months = m[3] || 0;
+      months += years * 12;
+      return m[1] === '-' ? -1 * months : months;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#dateTime'] = {
+    regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):(([0-9]{2})(\.([0-9]+))?)((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
+    /** @ignore */
+    validate: function (v) {
+      var
+        m = this.regex.exec(v),
+        year = parseInt(m[1], 10),
+        tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, ''),
+        date;
+      if (year === 0 ||
+          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
+        return false;
+      }
+      try {
+        year = year < 100 ? Math.abs(year) + 1000 : year;
+        month = parseInt(m[2], 10);
+        day = parseInt(m[3], 10);
+        if (day > 31) {
+          return false;
+        } else if (day > 30 && !(month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12)) {
+          return false;
+        } else if (month === 2) {
+          if (day > 29) {
+            return false;
+          } else if (day === 29 && (year % 4 !== 0 || (year % 100 === 0 && year % 400 !== 0))) {
+            return false;
+          }
+        }
+        date = '' + year + '/' + m[2] + '/' + m[3] + ' ' + m[4] + ':' + m[5] + ':' + m[7] + ' ' + tz;
+        date = new Date(date);
+        return true;
+      } catch (e) {
+        return false;
+      }
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#date'] = {
+    regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
+    /** @ignore */
+    validate: function (v) {
+      var
+        m = this.regex.exec(v),
+        year = parseInt(m[1], 10),
+        month = parseInt(m[2], 10),
+        day = parseInt(m[3], 10),
+        tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, '');
+      if (year === 0 ||
+          month > 12 ||
+          day > 31 ||
+          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#gYear'] = {
+    regex: /^-?([0-9]{4,})$/,
+    /** @ignore */
+    validate: function (v) {
+      var i = parseInt(v, 10);
+      return i !== 0;
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return parseInt(v, 10);
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#gMonthDay'] = {
+    regex: /^--([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
+    /** @ignore */
+    validate: function (v) {
+      var
+        m = this.regex.exec(v),
+        month = parseInt(m[1], 10),
+        day = parseInt(m[2], 10),
+        tz = m[3] === undefined || m[3] === 'Z' ? '+0000' : m[3].replace(/:/, '');
+      if (month > 12 ||
+          day > 31 ||
+          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
+        return false;
+      } else if (month === 2 && day > 29) {
+        return false;
+      } else if ((month === 4 || month === 6 || month === 9 || month === 11) && day > 30) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    strip: true,
+    /** @ignore */
+    value: function (v) {
+      return v;
+    }
+  };
+
+  $.typedValue.types['http://www.w3.org/2001/XMLSchema#anyURI'] = {
+    regex: /^.*$/,
+    strip: true,
+    /** @ignore */
+    value: function (v, options) {
+      var opts = $.extend({}, $.typedValue.defaults, options);
+      return $.uri.resolve(v, opts.base);
+    }
+  };
+
+  $.typedValue.defaults = {
+    base: $.uri.base(),
+    namespaces: {}
+  };
+
+  /**
+   * Checks whether a value is valid according to a given datatype. The datatype must be held in the {@link jQuery.typedValue.types} object.
+   * @param {String} value The value to validate.
+   * @param {String} datatype The URI for the datatype against which the value will be validated.
+   * @returns {boolean} True if the value is valid or the datatype is not recognised.
+   * @example validDate = $.typedValue.valid(date, 'http://www.w3.org/2001/XMLSchema#date');
+   */
+  $.typedValue.valid = function (value, datatype) {
+    var d = $.typedValue.types[datatype];
+    if (d === undefined) {
+      return true;
+    } else {
+      value = d.strip ? strip(value) : value;
+      if (d.regex.test(value)) {
+        return d.validate === undefined ? true : d.validate(value);
+      } else {
+        return false;
+      }
+    }
+  };
+
+})(jQuery);
+/*
+ * jQuery CURIE @VERSION
+ *
+ * Copyright (c) 2008,2009 Jeni Tennison
+ * Licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * Depends:
+ *  jquery.uri.js
+ *  jquery.xmlns.js
+ */
+
+/**
+ * @fileOverview jQuery CURIE handling
+ * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
+ * @copyright (c) 2008,2009 Jeni Tennison
+ * @license MIT license (MIT-LICENSE.txt)
+ * @version 1.0
+ * @requires jquery.uri.js
+ * @requires jquery.xmlns.js
+ */
+(function ($) {
+
+   /**
+    * Creates a {@link jQuery.uri} object by parsing a CURIE.
+    * @methodOf jQuery
+    * @param {String} curie The CURIE to be parsed
+    * @param {String} uri The URI string to be converted to a CURIE.
+    * @param {Object} [options] CURIE parsing options
+    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names
+    * @param {string} [options.defaultNamespace]  The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above.
+    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
+    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']] A list of local names that will always be mapped to the URI specified by reservedNamespace.
+    * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are:
+    * <dl>
+    * <dt>lower</dt><dd>Force the CURIE string to lower case.</dd>
+    * <dt>upper</dt><dd>Force the CURIE string to upper case.</dd>
+    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
+    * </dl>
+    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
+    */
+  $.curie = function (curie, options) {
+    var
+      opts = $.extend({}, $.curie.defaults, options || {}),
+      m = /^(([^:]*):)?(.+)$/.exec(curie),
+      prefix = m[2],
+      local = m[3],
+      ns = opts.namespaces[prefix];
+    if (/^:.+/.test(curie)) { // This is the case of a CURIE like ":test"
+      if (opts.reservedNamespace === undefined || opts.reservedNamespace === null) {
+        throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie;
+      } else {
+        ns = opts.reservedNamespace;
+      }
+    } else if (prefix) {
+      if (ns === undefined) {
+        throw "Malformed CURIE: No namespace binding for " + prefix + " in CURIE " + curie;
+      }
+    } else {
+      if (opts.charcase === 'lower') {
+        curie = curie.toLowerCase();
+      } else if (opts.charcase === 'upper') {
+        curie = curie.toUpperCase();
+      }
+      if (opts.reserved.length && $.inArray(curie, opts.reserved) >= 0) {
+        ns = opts.reservedNamespace;
+        local = curie;
+      } else if (opts.defaultNamespace === undefined || opts.defaultNamespace === null) {
+        // the default namespace is provided by the application; it's not clear whether
+        // the default XML namespace should be used if there's a colon but no prefix
+        throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie;
+      } else {
+        ns = opts.defaultNamespace;
+      }
+    }
+    return $.uri(ns + local);
+  };
+
+  $.curie.defaults = {
+    namespaces: {},
+    reserved: [],
+    reservedNamespace: undefined,
+    defaultNamespace: undefined,
+    charcase: 'preserve'
+  };
+
+   /**
+    * Creates a {@link jQuery.uri} object by parsing a safe CURIE string (a CURIE
+    * contained within square brackets). If the input safeCurie string does not
+    * start with '[' and end with ']', the entire string content will be interpreted
+    * as a URI string.
+    * @methodOf jQuery
+    * @param {String} safeCurie The safe CURIE string to be parsed.
+    * @param {Object} [options] CURIE parsing options
+    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names
+    * @param {string} [options.defaultNamespace]  The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above.
+    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
+    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
+      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
+      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']]
+                        A list of local names that will always be mapped to the URI specified by reservedNamespace.
+    * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are:
+    * <dl>
+    * <dt>lower</dt><dd>Force the CURIE string to lower case.</dd>
+    * <dt>upper</dt><dd>Force the CURIE string to upper case.</dd>
+    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
+    * </dl>
+    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
+    */
+  $.safeCurie = function (safeCurie, options) {
+    var m = /^\[([^\]]+)\]$/.exec(safeCurie);
+    return m ? $.curie(m[1], options) : $.uri(safeCurie);
+  };
+
+   /**
+    * Creates a CURIE string from a URI string.
+    * @methodOf jQuery
+    * @param {String} uri The URI string to be converted to a CURIE.
+    * @param {Object} [options] CURIE parsing options
+    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#']
+    *        If the input URI starts with this value, the generated CURIE will
+    *        have no namespace prefix and will start with a colon character (:),
+    *        unless the local part of the CURIE is one of the reserved names specified
+    *        by the reservedNames option (see below), in which case the generated
+    *        CURIE will have no namespace prefix and will not start with a colon
+    *        character.
+    * @param {string} [options.defaultNamespace]  If the input URI starts with this value, the generated CURIE will have no namespace prefix and will not start with a colon.
+    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
+    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
+      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
+      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']]
+                        A list of local names that will always be mapped to the URI specified by reservedNamespace.
+    * @param {string} [options.charcase='lower'] Specifies the case normalisation done to the CURIE. Acceptable values are:
+    * <dl>
+    * <dt>lower</dt><dd>Normalise the CURIE to lower case.</dd>
+    * <dt>upper</dt><dd>Normalise the CURIE to upper case.</dd>
+    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
+    * </dl>
+    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
+    */
+  $.createCurie = function (uri, options) {
+    var opts = $.extend({}, $.curie.defaults, options || {}),
+      ns = opts.namespaces,
+      curie;
+    uri = $.uri(uri).toString();
+    if (opts.reservedNamespace !== undefined && 
+        uri.substring(0, opts.reservedNamespace.toString().length) === opts.reservedNamespace.toString()) {
+      curie = uri.substring(opts.reservedNamespace.toString().length);
+      if ($.inArray(curie, opts.reserved) === -1) {
+        curie = ':' + curie;
+      }
+    } else {
+      $.each(ns, function (prefix, namespace) {
+        if (uri.substring(0, namespace.toString().length) === namespace.toString()) {
+          curie = prefix + ':' + uri.substring(namespace.toString().length);
+          return null;
+        }
+      });
+    }
+    if (curie === undefined) {
+      throw "No Namespace Binding: There's no appropriate namespace binding for generating a CURIE from " + uri;
+    } else {
+      return curie;
+    }
+  };
+
+   /**
+    * Creates a {@link jQuery.uri} object by parsing the specified
+    * CURIE string in the context of the namespaces defined by the
+    * jQuery selection.
+    * @methodOf jQuery#
+    * @name jQuery#curie
+    * @param {String} curie The CURIE string to be parsed
+    * @param {Object} options The CURIE parsing options.
+    *        See {@link jQuery.curie} for details of the supported options.
+    *        The namespace declarations declared on the current jQuery
+    *        selection (and inherited from any ancestor elements) will automatically
+    *        be included in the options.namespaces property.
+    * @returns {jQuery.uri}
+    * @see jQuery.curie
+    */
+  $.fn.curie = function (curie, options) {
+    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
+    return $.curie(curie, opts);
+  };
+
+   /**
+    * Creates a {@link jQuery.uri} object by parsing the specified
+    * safe CURIE string in the context of the namespaces defined by
+    * the jQuery selection.
+    *
+    * @methodOf jQuery#
+    * @name jQuery#safeCurie
+    * @param {String} safeCurie The safe CURIE string to be parsed. See {@link jQuery.safeCurie} for details on how safe CURIE strings are processed.
+    * @param {Object} options   The CURIE parsing options.
+    *        See {@link jQuery.safeCurie} for details of the supported options.
+    *        The namespace declarations declared on the current jQuery
+    *        selection (and inherited from any ancestor elements) will automatically
+    *        be included in the options.namespaces property.
+    * @returns {jQuery.uri}
+    * @see jQuery.safeCurie
+    */
+  $.fn.safeCurie = function (safeCurie, options) {
+    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
+    return $.safeCurie(safeCurie, opts);
+  };
+
+   /**
+    * Creates a CURIE string from a URI string using the namespace
+    * bindings in the context of the current jQuery selection.
+    *
+    * @methodOf jQuery#
+    * @name jQuery#createCurie
+    * @param {String|jQuery.uri} uri The URI string to be converted to a CURIE
+    * @param {Object} options the CURIE parsing options.
+    *        See {@link jQuery.createCurie} for details of the supported options.
+    *        The namespace declarations declared on the current jQuery
+    *        selection (and inherited from any ancestor elements) will automatically
+    *        be included in the options.namespaces property.
+    * @returns {String}
+    * @see jQuery.createCurie
+    */
+  $.fn.createCurie = function (uri, options) {
+    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
+    return $.createCurie(uri, opts);
+  };
+
+  $.fn.curie.defaults = {
+    reserved: [
+      'alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
+      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
+      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up'
+    ],
+    reservedNamespace: 'http://www.w3.org/1999/xhtml/vocab#',
+    defaultNamespace: undefined,
+    charcase: 'lower'
+  };
+
+})(jQuery);
+/*
+ * jQuery RDF @VERSION
+ *
+ * Copyright (c) 2008,2009 Jeni Tennison
+ * Licensed under the MIT (MIT-LICENSE.txt)
+ *
+ * Depends:
+ *  jquery.uri.js
+ *  jquery.xmlns.js
+ *  jquery.datatype.js
+ *  jquery.curie.js
+ *  jquery.json.js
+ */
+/**
+ * @fileOverview jQuery RDF
+ * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
+ * @copyright (c) 2008,2009 Jeni Tennison
+ * @license MIT license (MIT-LICENSE.txt)
+ * @version 1.0
+ */
+/**
+ * @exports $ as jQuery
+ */
+/**
+ * @ignore
+ */
+(function ($) {
+  var
+    memResource = {},
+    memBlank = {},
+    memLiteral = {},
+    memTriple = {},
+    memPattern = {},
+    
+    xsdNs = "http://www.w3.org/2001/XMLSchema#",
+    rdfNs = "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    rdfsNs = "http://www.w3.org/2000/01/rdf-schema#",
+    
+    uriRegex = /^<(([^>]|\\>)*)>$/,
+    literalRegex = /^("""((\\"|[^"])*)"""|"((\\"|[^"])*)")(@([a-z]+(-[a-z0-9]+)*)|\^\^(.+))?$/,
+    tripleRegex = /(("""((\\"|[^"])*)""")|("(\\"|[^"]|)*")|(<(\\>|[^>])*>)|\S)+/g,
+
+    blankNodeSeed = databankSeed = new Date().getTime() % 1000,
+    blankNodeID = function () {
+      blankNodeSeed += 1;
+      return 'b' + blankNodeSeed.toString(16);
+    },
+
+    databankID = function () {
+      databankSeed += 1;
+      return 'data' + databankSeed.toString(16);
+    },
+    databanks = {},
+
+    documentQueue = {},
+
+    subject = function (subject, opts) {
+      if (typeof subject === 'string') {
+        try {
+          return $.rdf.resource(subject, opts);
+        } catch (e) {
+          try {
+            return $.rdf.blank(subject, opts);
+          } catch (f) {
+            throw "Bad Triple: Subject " + subject + " is not a resource: " + f;
+          }
+        }
+      } else {
+        return subject;
+      }
+    },
+
+    property = function (property, opts) {
+      if (property === 'a') {
+        return $.rdf.type;
+      } else if (typeof property === 'string') {
+        try {
+          return $.rdf.resource(property, opts);
+        } catch (e) {
+          throw "Bad Triple: Property " + property + " is not a resource: " + e;
+        }
+      } else {
+        return property;
+      }
+    },
+
+    object = function (object, opts) {
+      if (typeof object === 'string') {
+        try {
+          return $.rdf.resource(object, opts);
+        } catch (e) {
+          try {
+            return $.rdf.blank(object, opts);
+          } catch (f) {
+            try {
+              return $.rdf.literal(object, opts);
+            } catch (g) {
+              throw "Bad Triple: Object " + object + " is not a resource or a literal " + g;
+            }
+          }
+        }
+      } else {
+        return object;
+      }
+    },
+
+    testResource = function (resource, filter, existing) {
+      var variable;
+      if (typeof filter === 'string') {
+        variable = filter.substring(1);
+        if (existing[variable] && existing[variable] !== resource) {
+          return null;
+        } else {
+          existing[variable] = resource;
+          return existing;
+        }
+      } else if (filter === resource) {
+        return existing;
+      } else {
+        return null;
+      }
+    },
+
+    findMatches = function (databank, pattern) {
+      if (databank.union === undefined) {
+        if (pattern.subject.type !== undefined) {
+          if (databank.subjectIndex[pattern.subject] === undefined) {
+            return [];
+          }
+          return $.map(databank.subjectIndex[pattern.subject], function (triple) {
+            var bindings = pattern.exec(triple);
+            return bindings === null ? null : { bindings: bindings, triples: [triple] };
+          });
+        } else if (pattern.object.type === 'uri' || pattern.object.type === 'bnode') {
+          if (databank.objectIndex[pattern.object] === undefined) {
+            return [];
+          }
+          return $.map(databank.objectIndex[pattern.object], function (triple) {
+            var bindings = pattern.exec(triple);
+            return bindings === null ? null : { bindings: bindings, triples: [triple] };
+          });
+        } else if (pattern.property.type !== undefined) {
+          if (databank.propertyIndex[pattern.property] === undefined) {
+            return [];
+          }
+          return $.map(databank.propertyIndex[pattern.property], function (triple) {
+            var bindings = pattern.exec(triple);
+            return bindings === null ? null : { bindings: bindings, triples: [triple] };
+          });
+        }
+      }
+      return $.map(databank.triples(), function (triple) {
+        var bindings = pattern.exec(triple);
+        return bindings === null ? null : { bindings: bindings, triples: [triple] };
+      });
+    },
+
+    mergeMatches = function (existingMs, newMs, optional) {
+      return $.map(existingMs, function (existingM, i) {
+        var compatibleMs = $.map(newMs, function (newM) {
+          // For newM to be compatible with existingM, all the bindings
+          // in newM must either be the same as in existingM, or not
+          // exist in existingM
+          var k, b, isCompatible = true;
+          for (k in newM.bindings) {
+            b = newM.bindings[k];
+            if (!(existingM.bindings[k] === undefined ||
+                  existingM.bindings[k] === b)) {
+              isCompatible = false;
+              break;
+            }
+          }
+          return isCompatible ? newM : null;
+        });
+        if (compatibleMs.length > 0) {
+          return $.map(compatibleMs, function (compatibleM) {
+            return {
+              bindings: $.extend({}, existingM.bindings, compatibleM.bindings),
+              triples: $.unique(existingM.triples.concat(compatibleM.triples))
+            };
+          });
+        } else {
+          return optional ? existingM : null;
+        }
+      });
+    },
+
+    registerQuery = function (databank, query) {
+      var s, p, o;
+      if (query.filterExp !== undefined && !$.isFunction(query.filterExp)) {
+        if (databank.union === undefined) {
+          s = typeof query.filterExp.subject === 'string' ? '' : query.filterExp.subject;
+          p = typeof query.filterExp.property === 'string' ? '' : query.filterExp.property;
+          o = typeof query.filterExp.object === 'string' ? '' : query.filterExp.object;
+          if (databank.queries[s] === undefined) {
+            databank.queries[s] = {};
+          }
+          if (databank.queries[s][p] === undefined) {
+            databank.queries[s][p] = {};
+          }
+          if (databank.queries[s][p][o] === undefined) {
+            databank.queries[s][p][o] = [];
+          }
+          databank.queries[s][p][o].push(query);
+        } else {
+          $.each(databank.union, function (i, databank) {
+            registerQuery(databank, query);
+          });
+        }
+      }
+    },
+
+    resetQuery = function (query) {
+      query.length = 0;
+      query.matches = [];
+      $.each(query.children, function (i, child) {
+        resetQuery(child);
+      });
+      $.each(query.partOf, function (i, union) {
+        resetQuery(union);
+      });
+    },
+
+    updateQuery = function (query, matches) {
+      if (matches.length > 0) {
+        $.each(query.children, function (i, child) {
+          leftActivate(child, matches);
+        });
+        $.each(query.partOf, function (i, union) {
+          updateQuery(union, matches);
+        });
+        $.each(matches, function (i, match) {
+          query.matches.push(match);
+          Array.prototype.push.call(query, match.bindings);
+        });
+      }
+    },
+
+    leftActivate = function (query, matches) {
+      var newMatches;
+      if (query.union === undefined) {
+        if (query.top || query.parent.top) {
+          newMatches = query.alphaMemory;
+        } else {
+          matches = matches || query.parent.matches;
+          if ($.isFunction(query.filterExp)) {
+            newMatches = $.map(matches, function (match, i) {
+              return query.filterExp.call(match.bindings, i, match.bindings, match.triples) ? match : null;
+            });
+          } else {
+            newMatches = mergeMatches(matches, query.alphaMemory, query.filterExp.optional);
+          }
+        }
+      } else {
+        newMatches = $.map(query.union, function (q) {
+          return q.matches;
+        });
+      }
+      updateQuery(query, newMatches);
+    },
+
+    rightActivate = function (query, match) {
+      var newMatches;
+      if (query.filterExp.optional) {
+        resetQuery(query);
+        leftActivate(query);
+      } else {
+        if (query.top || query.parent.top) {
+          newMatches = [match];
+        } else {
+          newMatches = mergeMatches(query.parent.matches, [match], false);
+        }
+        updateQuery(query, newMatches);
+      }
+    },
+
+    addToQuery = function (query, triple) {
+      var match,
+        bindings = query.filterExp.exec(triple);
+      if (bindings !== null) {
+        match = { triples: [triple], bindings: bindings };
+        query.alphaMemory.push(match);
+        rightActivate(query, match);
+      }
+    },
+
+    removeFromQuery = function (query, triple) {
+      query.alphaMemory.splice($.inArray(triple, query.alphaMemory), 1);
+      resetQuery(query);
+      leftActivate(query);
+    },
+
+    addToQueries = function (queries, triple) {
+      $.each(queries, function (i, query) {
+        addToQuery(query, triple);
+      });
+    },
+
+    removeFromQueries = function (queries, triple) {
+      $.each(queries, function (i, query) {
+        removeFromQuery(query, triple);
+      });
+    },
+
+    addToDatabankQueries = function (databank, triple) {
+      var s = triple.subject,
+        p = triple.property,
+        o = triple.object;
+      if (databank.union === undefined) {
+        if (databank.queries[s] !== undefined) {
+          if (databank.queries[s][p] !== undefined) {
+            if (databank.queries[s][p][o] !== undefined) {
+              addToQueries(databank.queries[s][p][o], triple);
+            }
+            if (databank.queries[s][p][''] !== undefined) {
+              addToQueries(databank.queries[s][p][''], triple);
+            }
+          }
+          if (databank.queries[s][''] !== undefined) {
+            if (databank.queries[s][''][o] !== undefined) {
+              addToQueries(databank.queries[s][''][o], triple);
+            }
+            if (databank.queries[s][''][''] !== undefined) {
+              addToQueries(databank.queries[s][''][''], triple);
+            }
+          }
+        }
+        if (databank.queries[''] !== undefined) {
+          if (databank.queries[''][p] !== undefined) {
+            if (databank.queries[''][p][o] !== undefined) {
+              addToQueries(databank.queries[''][p][o], triple);
+            }
+            if (databank.queries[''][p][''] !== undefined) {
+              addToQueries(databank.queries[''][p][''], triple);
+            }
+          }
+          if (databank.queries[''][''] !== undefined) {
+            if (databank.queries[''][''][o] !== undefined) {
+              addToQueries(databank.queries[''][''][o], triple);
+            }
+            if (databank.queries[''][''][''] !== undefined) {
+              addToQueries(databank.queries[''][''][''], triple);
+            }
+          }
+        }
+      } else {
+        $.each(databank.union, function (i, databank) {
+          addToDatabankQueries(databank, triple);
+        });
+      }
+    },
+
+    removeFromDatabankQueries = function (databank, triple) {
+      var s = triple.subject,
+        p = triple.property,
+        o = triple.object;
+      if (databank.union === undefined) {
+        if (databank.queries[s] !== undefined) {
+          if (databank.queries[s][p] !== undefined) {
+            if (databank.queries[s][p][o] !== undefined) {
+              removeFromQueries(databank.queries[s][p][o], triple);
+            }
+            if (databank.queries[s][p][''] !== undefined) {
+              removeFromQueries(databank.queries[s][p][''], triple);
+            }
+          }
+          if (databank.queries[s][''] !== undefined) {
+            if (databank.queries[s][''][o] !== undefined) {
+              removeFromQueries(databank.queries[s][''][o], triple);
+            }
+            if (databank.queries[s][''][''] !== undefined) {
+              removeFromQueries(databank.queries[s][''][''], triple);
+            }
+          }
+        }
+        if (databank.queries[''] !== undefined) {
+          if (databank.queries[''][p] !== undefined) {
+            if (databank.queries[''][p][o] !== undefined) {
+              removeFromQueries(databank.queries[''][p][o], triple);
+            }
+            if (databank.queries[''][p][''] !== undefined) {
+              removeFromQueries(databank.queries[''][p][''], triple);
+            }
+          }
+          if (databank.queries[''][''] !== undefined) {
+            if (databank.queries[''][''][o] !== undefined) {
+              removeFromQueries(databank.queries[''][''][o], triple);
+            }
+            if (databank.queries[''][''][''] !== undefined) {
+              removeFromQueries(databank.queries[''][''][''], triple);
+            }
+          }
+        }
+      } else {
+        $.each(databank.union, function (i, databank) {
+          removeFromDatabankQueries(databank, triple);
+        });
+      }
+    },
+
+    createJson = function (triples) {
+      var e = {},
+        i, t, s, p;
+      for (i = 0; i < triples.length; i += 1) {
+        t = triples[i];
+        s = t.subject.value.toString();
+        p = t.property.value.toString();
+        if (e[s] === undefined) {
+          e[s] = {};
+        }
+        if (e[s][p] === undefined) {
+          e[s][p] = [];
+        }
+        e[s][p].push(t.object.dump());
+      }
+      return e;
+    },
+
+    parseJson = function (data) {
+      var s, subject, p, property, o, object, i, opts, triples = [];
+      for (s in data) {
+        subject = (s.substring(0, 2) === '_:') ? $.rdf.blank(s) : $.rdf.resource('<' + s + '>');
+        for (p in data[s]) {
+          property = $.rdf.resource('<' + p + '>');
+          for (i = 0; i < data[s][p].length; i += 1) {
+            o = data[s][p][i];
+            if (o.type === 'uri') {
+              object = $.rdf.resource('<' + o.value + '>');
+            } else if (o.type === 'bnode') {
+              object = $.rdf.blank(o.value);
+            } else {
+              // o.type === 'literal'
+              if (o.datatype !== undefined) {
+                object = $.rdf.literal(o.value, { datatype: o.datatype });
+              } else {
+                opts = {};
+                if (o.lang !== undefined) {
+                  opts.lang = o.lang;
+                }
+                object = $.rdf.literal('"' + o.value + '"', opts);
+              }
+            }
+            triples.push($.rdf.triple(subject, property, object));
+          }
+        }
+      }
+      return triples;
+    },
+
+    addAttribute = function (parent, namespace, name, value) {
+      var doc = parent.ownerDocument,
+        a;
+      if (namespace !== undefined && namespace !== null) {
+        if (doc.createAttributeNS) {
+          a = doc.createAttributeNS(namespace, name);
+          a.nodeValue = value;
+          parent.attributes.setNamedItemNS(a);
+        } else {
+          a = doc.createNode(2, name, namespace);
+          a.nodeValue = value;
+          parent.attributes.setNamedItem(a);
+        }
+      } else {
+        a = doc.createAttribute(name);
+        a.nodeValue = value;
+        parent.attributes.setNamedItem(a);
+      }
+      return parent;
+    },
+
+    createXmlnsAtt = function (parent, namespace, prefix) {
+      if (prefix) {
+        addAttribute(parent, 'http://www.w3.org/2000/xmlns/', 'xmlns:' + prefix, namespace);
+      } else {
+        addAttribute(parent, undefined, 'xmlns', namespace);
+      }
+      return parent;
+    },
+
+    createDocument = function (namespace, name) {
+      var doc, xmlns = '', prefix, addAttribute = false;
+      if (namespace !== undefined && namespace !== null) {
+        if (/:/.test(name)) {
+          prefix = /([^:]+):/.exec(name)[1];
+        }
+        addAttribute = true;
+      }
+      if (document.implementation &&
+          document.implementation.createDocument) {
+        doc = document.implementation.createDocument(namespace, name, null);
+        if (addAttribute) {
+          createXmlnsAtt(doc.documentElement, namespace, prefix);
+        }
+        return doc;
+      } else {
+        doc = new ActiveXObject("Microsoft.XMLDOM");
+        doc.async = "false";
+        if (prefix === undefined) {
+          xmlns = ' xmlns="' + namespace + '"';
+        } else {
+          xmlns = ' xmlns:' + prefix + '="' + namespace + '"';
+        }
+        doc.loadXML('<' + name + xmlns + '/>');
+        return doc;
+      }
+    },
+
+    appendElement = function (parent, namespace, name) {
+      var doc = parent.ownerDocument,
+        e;
+      if (namespace !== undefined && namespace !== null) {
+        e = doc.createElementNS ? doc.createElementNS(namespace, name) : doc.createNode(1, name, namespace);
+      } else {
+        e = doc.createElement(name);
+      }
+      parent.appendChild(e);
+      return e;
+    },
+
+    appendText = function (parent, text) {
+      var doc = parent.ownerDocument,
+        t;
+      t = doc.createTextNode(text);
+      parent.appendChild(t);
+      return parent;
+    },
+
+    appendXML = function (parent, xml) {
+      var parser, doc, i, child;
+      try {
+        doc = new ActiveXObject('Microsoft.XMLDOM');
+        doc.async = "false";
+        doc.loadXML('<temp>' + xml + '</temp>');
+      } catch(e) {
+        parser = new DOMParser();
+        doc = parser.parseFromString('<temp>' + xml + '</temp>', 'text/xml');
+      }
+      for (i = 0; i < doc.documentElement.childNodes.length; i += 1) {
+        parent.appendChild(doc.documentElement.childNodes[i].cloneNode(true));
+      }
+      return parent;
+    },
+
+    createRdfXml = function (triples, options) {
+      var doc = createDocument(rdfNs, 'rdf:RDF'),
+        dump = createJson(triples),
+        namespaces = options.namespaces || {},
+        n, s, se, p, pe, i, v,
+        m, local, ns, prefix;
+      for (n in namespaces) {
+        createXmlnsAtt(doc.documentElement, namespaces[n], n);
+      }
+      for (s in dump) {
+        if (dump[s][$.rdf.type.value] !== undefined) {
+          m = /(.+[#\/])([^#\/]+)/.exec(dump[s][$.rdf.type.value][0].value);
+          ns = m[1];
+          local = m[2];
+          for (n in namespaces) {
+            if (namespaces[n].toString() === ns) {
+              prefix = n;
+              break;
+            }
+          }
+          se = appendElement(doc.documentElement, ns, prefix + ':' + local);
+        } else {
+          se = appendElement(doc.documentElement, rdfNs, 'rdf:Description');
+        }
+        if (/^_:/.test(s)) {
+          addAttribute(se, rdfNs, 'rdf:nodeID', s.substring(2));
+        } else {
+          addAttribute(se, rdfNs, 'rdf:about', s);
+        }
+        for (p in dump[s]) {
+          if (p !== $.rdf.type.value.toString() || dump[s][p].length > 1) {
+            m = /(.+[#\/])([^#\/]+)/.exec(p);
+            ns = m[1];
+            local = m[2];
+            for (n in namespaces) {
+              if (namespaces[n].toString() === ns) {
+                prefix = n;
+                break;
+              }
+            }
+            for (i = (p === $.rdf.type.value.toString() ? 1 : 0); i < dump[s][p].length; i += 1) {
+              v = dump[s][p][i];
+              pe = appendElement(se, ns, prefix + ':' + local);
+              if (v.type === 'uri') {
+                addAttribute(pe, rdfNs, 'rdf:resource', v.value);
+              } else if (v.type === 'literal') {
+                if (v.datatype !== undefined) {
+                  if (v.datatype === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') {
+                    addAttribute(pe, rdfNs, 'rdf:parseType', 'Literal');
+                    appendXML(pe, v.value);
+                  } else {
+                    addAttribute(pe, rdfNs, 'rdf:datatype', v.datatype);
+                    appendText(pe, v.value);
+                  }
+                } else if (v.lang !== undefined) {
+                  addAttribute(pe, 'http://www.w3.org/XML/1998/namespace', 'xml:lang', v.lang);
+                  appendText(pe, v.value);
+                } else {
+                  appendText(pe, v.value);
+                }
+              } else {
+                // blank node
+                addAttribute(pe, rdfNs, 'rdf:nodeID', v.value.substring(2));
+              }
+            }
+          }
+        }
+      }
+      return doc;
+    },
+
+    getDefaultNamespacePrefix = function (namespaceUri) {
+      switch (namespaceUri) {
+        case 'http://www.w3.org/1999/02/22-rdf-syntax-ns':
+          return 'rdf';
+        case 'http://www.w3.org/XML/1998/namespace':
+          return 'xml';
+        case 'http://www.w3.org/2000/xmlns/':
+          return 'xmlns';
+        default:
+          throw ('No default prefix mapped for namespace ' + namespaceUri);
+      }
+    },
+
+    hasAttributeNS  = function(elem, namespace, name){
+      var basename;
+      if (elem.hasAttributeNS) {
+        return elem.hasAttributeNS(namespace, name);
+      } else {
+        try {
+          basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name;
+          return elem.attributes.getQualifiedItem(basename, namespace) !== null;
+        } catch (e) {
+          return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name) !== null;
+        }
+      }
+    },
+
+    getAttributeNS = function(elem, namespace, name){
+      var basename;
+      if (elem.getAttributeNS) {
+        return elem.getAttributeNS(namespace, name);
+      } else {
+        try {
+          basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name;
+          return elem.attributes.getQualifiedItem(basename, namespace).nodeValue;
+        } catch (e) {
+          return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name);
+        }
+      }
+    },
+
+    getLocalName = function(elem){
+      return elem.localName || elem.baseName;
+    },
+
+    parseRdfXmlSubject = function (elem, base) {
+      var s, subject;
+      if (hasAttributeNS(elem, rdfNs, 'about')) {
+        s = getAttributeNS(elem, rdfNs, 'about');
+        subject = $.rdf.resource('<' + s + '>', { base: base });
+      } else if (hasAttributeNS(elem, rdfNs, 'ID')) {
+        s = getAttributeNS(elem, rdfNs, 'ID');
+        subject = $.rdf.resource('<#' + s + '>', { base: base });
+      } else if (hasAttributeNS(elem, rdfNs, 'nodeID')) {
+        s = getAttributeNS(elem, rdfNs, 'nodeID');
+        subject = $.rdf.blank('_:' + s);
+      } else {
+        subject = $.rdf.blank('[]');
+      }
+      return subject;
+    },
+
+    parseRdfXmlDescription = function (elem, isDescription, base, lang) {
+      var subject, p, property, o, object, reified, lang, i, j, li = 1,
+        collection1, collection2, collectionItem, collectionItems = [],
+        parseType, serializer, literalOpts = {}, oTriples, triples = [];
+      lang = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'lang') || lang;
+      base = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'base') || base;
+      if (lang !== null && lang !== undefined && lang !== '') {
+        literalOpts = { lang: lang };
+      }
+      subject = parseRdfXmlSubject(elem, base);
+      if (isDescription && (elem.namespaceURI !== rdfNs || getLocalName(elem) !== 'Description')) {
+        property = $.rdf.type;
+        object = $.rdf.resource('<' + elem.namespaceURI + getLocalName(elem) + '>');
+        triples.push($.rdf.triple(subject, property, object));
+      }
+      for (i = 0; i < elem.attributes.length; i += 1) {
+        p = elem.attributes.item(i);
+        if (p.namespaceURI !== undefined &&
+            p.namespaceURI !== 'http://www.w3.org/2000/xmlns/' &&
+            p.namespaceURI !== 'http://www.w3.org/XML/1998/namespace' &&
+            p.prefix !== 'xmlns' &&
+            p.prefix !== 'xml') {
+          if (p.namespaceURI !== rdfNs) {
+            property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>');
+            object = $.rdf.literal(literalOpts.lang ? p.nodeValue : '"' + p.nodeValue + '"', literalOpts);
+            triples.push($.rdf.triple(subject, property, object));
+          } else if (getLocalName(p) === 'type') {
+            property = $.rdf.type;
+            object = $.rdf.resource('<' + p.nodeValue + '>', { base: base });
+            triples.push($.rdf.triple(subject, property, object));
+          }
+        }
+      }
+      for (i = 0; i < elem.childNodes.length; i += 1) {
+        p = elem.childNodes[i];
+        if (p.nodeType === 1) {
+          if (p.namespaceURI === rdfNs && getLocalName(p) === 'li') {
+            property = $.rdf.resource('<' + rdfNs + '_' + li + '>');
+            li += 1;
+          } else {
+            property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>');
+          }
+          lang = getAttributeNS(p, 'http://www.w3.org/XML/1998/namespace', 'lang') || lang;
+          if (lang !== null && lang !== undefined && lang !== '') {
+            literalOpts = { lang: lang };
+          }
+          if (hasAttributeNS(p, rdfNs, 'resource')) {
+            o = getAttributeNS(p, rdfNs, 'resource');
+            object = $.rdf.resource('<' + o + '>', { base: base });
+          } else if (hasAttributeNS(p, rdfNs, 'nodeID')) {
+            o = getAttributeNS(p, rdfNs, 'nodeID');
+            object = $.rdf.blank('_:' + o);
+          } else if (hasAttributeNS(p, rdfNs, 'parseType')) {
+            parseType = getAttributeNS(p, rdfNs, 'parseType');
+            if (parseType === 'Literal') {
+              try {
+                serializer = new XMLSerializer();
+                o = serializer.serializeToString(p.getElementsByTagName('*')[0]);
+              } catch (e) {
+                o = "";
+                for (j = 0; j < p.childNodes.length; j += 1) {
+                  o += p.childNodes[j].xml;
+                }
+              }
+              object = $.rdf.literal(o, { datatype: rdfNs + 'XMLLiteral' });
+            } else if (parseType === 'Resource') {
+              oTriples = parseRdfXmlDescription(p, false, base, lang);
+              if (oTriples.length > 0) {
+                object = oTriples[oTriples.length - 1].subject;
+                triples = triples.concat(oTriples);
+              } else {
+                object = $.rdf.blank('[]');
+              }
+            } else if (parseType === 'Collection') {
+              if (p.getElementsByTagName('*').length > 0) {
+                for (j = 0; j < p.childNodes.length; j += 1) {
+                  o = p.childNodes[j];
+                  if (o.nodeType === 1) {
+                    collectionItems.push(o);
+                  }
+                }
+                collection1 = $.rdf.blank('[]');
+                object = collection1;
+                for (j = 0; j < collectionItems.length; j += 1) {
+                  o = collectionItems[j];
+                  oTriples = parseRdfXmlDescription(o, true, base, lang);
+                  if (oTriples.length > 0) {
+                    collectionItem = oTriples[oTriples.length - 1].subject;
+                    triples = triples.concat(oTriples);
+                  } else {
+                    collectionItem = parseRdfXmlSubject(o);
+                  }
+                  triples.push($.rdf.triple(collection1, $.rdf.first, collectionItem));
+                  if (j === collectionItems.length - 1) {
+                    triples.push($.rdf.triple(collection1, $.rdf.rest, $.rdf.nil));
+                  } else {
+                    collection2 = $.rdf.blank('[]');
+                    triples.push($.rdf.triple(collection1, $.rdf.rest, collection2));
+                    collection1 = collection2;
+                  }
+                }
+              } else {
+                object = $.rdf.nil;
+              }
+            }
+          } else if (hasAttributeNS(p, rdfNs, 'datatype')) {
+            o = p.childNodes[0].nodeValue;
+            object = $.rdf.literal(o, { datatype: getAttributeNS(p, rdfNs, 'datatype') });
+          } else if (p.getElementsByTagName('*').length > 0) {
+            for (j = 0; j < p.childNodes.length; j += 1) {
+              o = p.childNodes[j];
+              if (o.nodeType === 1) {
+                oTriples = parseRdfXmlDescription(o, true, base, lang);
+                if (oTriples.length > 0) {
+                  object = oTriples[oTriples.length - 1].subject;
+                  triples = triples.concat(oTriples);
+                } else {
+                  object = parseRdfXmlSubject(o);
+                }
+              }
+            }
+          } else if (p.childNodes.length > 0) {
+            o = p.childNodes[0].nodeValue;
+            object = $.rdf.literal(literalOpts.lang ? o : '"' + o + '"', literalOpts);
+          } else {
+            oTriples = parseRdfXmlDescription(p, false, base, lang);
+            if (oTriples.length > 0) {
+              object = oTriples[oTriples.length - 1].subject;
+              triples = triples.concat(oTriples);
+            } else {
+              object = $.rdf.blank('[]');
+            }
+          }
+          triples.push($.rdf.triple(subject, property, object));
+          if (hasAttributeNS(p, rdfNs, 'ID')) {
+            reified = $.rdf.resource('<#' + getAttributeNS(p, rdfNs, 'ID') + '>', { base: base });
+            triples.push($.rdf.triple(reified, $.rdf.subject, subject));
+            triples.push($.rdf.triple(reified, $.rdf.property, property));
+            triples.push($.rdf.triple(reified, $.rdf.object, object));
+          }
+        }
+      }
+      return triples;
+    },
+
+    parseRdfXml = function (doc) {
+      var i, lang, d, triples = [];
+      if (doc.documentElement.namespaceURI === rdfNs && getLocalName(doc.documentElement) === 'RDF') {
+        lang = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'lang');
+        base = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'base') || $.uri.base();
+        triples = $.map(doc.documentElement.childNodes, function (d) {
+          if (d.nodeType === 1) {
+            return parseRdfXmlDescription(d, true, base, lang);
+          } else {
+            return null;
+          }
+        });
+        /*
+        for (i = 0; i < doc.documentElement.childNodes.length; i += 1) {
+          d = doc.documentElement.childNodes[i];
+          if (d.nodeType === 1) {
+            triples = triples.concat(parseRdfXmlDescription(d, true, base, lang));
+          }
+        }
+        */
+      } else {
+        triples = parseRdfXmlDescription(doc.documentElement, true);
+      }
+      return triples;
+    },
+    
+    group = function (bindings, variables, base) {
+      var variable = variables[0], grouped = {}, results = [], i, newbase;
+      base = base || {};
+      if (variables.length === 0) {
+        for (i = 0; i < bindings.length; i += 1) {
+          for (v in bindings[i]) {
+            if (base[v] === undefined) {
+              base[v] = [];
+            }
+            if ($.isArray(base[v])) {
+              base[v].push(bindings[i][v]);
+            }
+          }
+        }
+        return [base];
+      }
+      // collect together the grouped results
+      for (i = 0; i < bindings.length; i += 1) {
+        key = bindings[i][variable];
+        if (grouped[key] === undefined) {
+          grouped[key] = [];
+        }
+        grouped[key].push(bindings[i]);
+      }
+      // call recursively on each group
+      variables = variables.splice(1, 1);
+      for (v in grouped) {
+        newbase = $.extend({}, base);
+        newbase[variable] = grouped[v][0][variable];
+        results = results.concat(group(grouped[v], variables, newbase));
+      }
+      return results;
+    },
+    
+    queue = function (databank, url, callbacks) {
+      if (documentQueue[databank.id] === undefined) {
+        documentQueue[databank.id] = {};
+      }
+      if (documentQueue[databank.id][url] === undefined) {
+        documentQueue[databank.id][url] = callbacks;
+        return false;
+      }
+      return true;
+    }
+    
+    dequeue = function (databank, url, result, args) {
+      var callbacks = documentQueue[databank.id][url];
+      if ($.isFunction(callbacks[result])) {
+        callbacks[result].call(databank, args);
+      }
+      documentQueue[databank.id][url] = undefined;
+    };
+
+  $.typedValue.types['http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'] = {
+    regex: /^.*$/m,
+    strip: false,
+    value: function (v) {
+      return v;
+    }
+  };
+
+  /**
+   * <p>Creates a new jQuery.rdf object. This should be invoked as a method rather than constructed using new; indeed you will usually want to generate these objects using a method such as {@link jQuery#rdf} or {@link jQuery.rdf#where}.</p>
+   * @class <p>A jQuery.rdf object represents the results of a query over its {@link jQuery.rdf#databank}. The results of a query are a sequence of objects which represent the bindings of values to the variables used in filter expressions specified using {@link jQuery.rdf#where} or {@link jQuery.rdf#optional}. Each of the objects in this sequence has associated with it a set of triples that are the sources for the variable bindings, which you can get at using {@link jQuery.rdf#sources}.</p>
+    * <p>The {@link jQuery.rdf} object itself is a lot like a {@link jQuery} object. It has a {@link jQuery.rdf#length} and the individual matches can be accessed using <code>[<var>n</var>]</code>, but you can also iterate through the matches using {@link jQuery.rdf#map} or {@link jQuery.rdf#each}.</p>
+    * <p>{@link jQuery.rdf} is designed to mirror the functionality of <a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL</a> while providing an interface that's familiar and easy to use for jQuery programmers.</p>
+   * @param {Object} [options]
+   * @param {jQuery.rdf.databank} [options.databank] The databank that this query should operate over.
+   * @param {jQuery.rdf.triple[]} [options.triples] A set of triples over which the query operates; this is only used if options.databank isn't specified, in which case a new databank with these triples is generated.
+   * @param {Object} [options.namespaces] An object representing a set of namespace bindings. Rather than passing this in when you construct the {@link jQuery.rdf} instance, you will usually want to use the {@link jQuery.rdf#prefix} method.
+   * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the query.
+   * @returns {jQuery.rdf}
+   * @example rdf = jQuery.rdf();
+   * @see jQuery#rdf
+   */
+  $.rdf = function (options) {
+    return new $.rdf.fn.init(options);
+  };
+
+  $.rdf.fn = $.rdf.prototype = {
+    /**
+     * The version of rdfQuery.
+     * @type String
+     */
+    rdfquery: '1.1',
+
+    init: function (options) {
+      var databanks;
+      options = options || {};
+      /* must specify either a parent or a union, otherwise it's the top */
+      this.parent = options.parent;
+      this.union = options.union;
+      this.top = this.parent === undefined && this.union === undefined;
+      if (this.union === undefined) {
+        if (options.databank === undefined) {
+          /**
+           * The databank over which this query operates.
+           * @type jQuery.rdf.databank
+           */
+          this.databank = this.parent === undefined ? $.rdf.databank(options.triples, options) : this.parent.databank;
+        } else {
+          this.databank = options.databank;
+        }
+      } else {
+        databanks = $.map(this.union, function (query) {
+          return query.databank;
+        });
+        databanks = $.unique(databanks);
+        if (databanks[1] !== undefined) {
+          this.databank = $.rdf.databank(undefined, { union: databanks });
+        } else {
+          this.databank = databanks[0];
+        }
+      }
+      this.children = [];
+      this.partOf = [];
+      this.filterExp = options.filter;
+      this.alphaMemory = [];
+      this.matches = [];
+      /**
+       * The number of matches represented by the {@link jQuery.rdf} object.
+       * @type Integer
+       */
+      this.length = 0;
+      if (this.filterExp !== undefined) {
+        if (!$.isFunction(this.filterExp)) {
+          registerQuery(this.databank, this);
+          this.alphaMemory = findMatches(this.databank, this.filterExp);
+        }
+      }
+      leftActivate(this);
+      return this;
+    },
+
+    /**
+     * Sets or returns the base URI of the {@link jQuery.rdf#databank}.
+     * @param {String|jQuery.uri} [base]
+     * @returns A {@link jQuery.uri} if no base URI is specified, otherwise returns this {@link jQuery.rdf} object.
+     * @example baseURI = jQuery('html').rdf().base();
+     * @example jQuery('html').rdf().base('http://www.example.org/');
+     * @see jQuery.rdf.databank#base
+     */
+    base: function (base) {
+      if (base === undefined) {
+        return this.databank.base();
+      } else {
+        this.databank.base(base);
+        return this;
+      }
+    },
+
+    /**
+     * Sets or returns a namespace binding on the {@link jQuery.rdf#databank}.
+     * @param {String} [prefix]
+     * @param {String} [namespace]
+     * @returns {Object|jQuery.uri|jQuery.rdf} If no prefix or namespace is specified, returns an object providing all namespace bindings on the {@link jQuery.rdf.databank}. If a prefix is specified without a namespace, returns the {@link jQuery.uri} associated with that prefix. Otherwise returns this {@link jQuery.rdf} object after setting the namespace binding.
+     * @example namespace = jQuery('html').rdf().prefix('foaf');
+     * @example jQuery('html').rdf().prefix('foaf', 'http://xmlns.com/foaf/0.1/');
+     * @see jQuery.rdf.databank#prefix
+     */
+    prefix: function (prefix, namespace) {
+      if (namespace === undefined) {
+        return this.databank.prefix(prefix);
+      } else {
+        this.databank.prefix(prefix, namespace);
+        return this;
+      }
+    },
+
+    /**
+     * Adds a triple to the {@link jQuery.rdf#databank} or another {@link jQuery.rdf} object to create a union.
+     * @param {String|jQuery.rdf.triple|jQuery.rdf.pattern|jQuery.rdf} triple The triple, {@link jQuery.rdf.pattern} or {@link jQuery.rdf} object to be added to this one. If the triple is a {@link jQuery.rdf} object, the two queries are unioned together. If the triple is a string, it's parsed as a {@link jQuery.rdf.pattern}. The pattern will be completed using the current matches on the {@link jQuery.rdf} object to create multiple triples, one for each set of bindings.
+     * @param {Object} [options]
+     * @param {Object} [options.namespaces] An object representing a set of namespace bindings used to interpret CURIEs within the triple. Defaults to the namespace bindings defined on the {@link jQuery.rdf#databank}.
+     * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the triple. Defaults to the base URI defined on the {@link jQuery.rdf#databank}.
+     * @returns {jQuery.rdf} This {@link jQuery.rdf} object.
+     * @example
+     * var rdf = $.rdf()
+     *   .prefix('dc', ns.dc)
+     *   .prefix('foaf', ns.foaf)
+     *   .add('&lt;photo1.jpg> dc:creator &lt;http://www.blogger.com/profile/1109404> .')
+     *   .add('&lt;http://www.blogger.com/profile/1109404> foaf:img &lt;photo1.jpg> .');
+     * @example
+     * var rdfA = $.rdf()
+     *   .prefix('dc', ns.dc)
+     *   .add('&lt;photo1.jpg> dc:creator "Jane"');
+     * var rdfB = $.rdf()
+     *   .prefix('foaf', ns.foaf)
+     *   .add('&lt;photo1.jpg> foaf:depicts "Jane"');
+     * var rdf = rdfA.add(rdfB);
+     * @see jQuery.rdf.databank#add
+     */
+    add: function (triple, options) {
+      var query, databank;
+      if (triple.rdfquery !== undefined) {
+        if (triple.top) {
+          databank = this.databank.add(triple.databank);
+          query = $.rdf({ parent: this.parent, databank: databank });
+          return query;
+        } else if (this.top) {
+          databank = triple.databank.add(this.databank);
+          query = $.rdf({ parent: triple.parent, databank: databank });
+          return query;
+        } else if (this.union === undefined) {
+          query = $.rdf({ union: [this, triple] });
+          this.partOf.push(query);
+          triple.partOf.push(query);
+          return query;
+        } else {
+          this.union.push(triple);
+          triple.partOf.push(this);
+        }
+      } else {
+        if (typeof triple === 'string') {
+          options = $.extend({}, { base: this.base(), namespaces: this.prefix(), source: triple }, options);
+          triple = $.rdf.pattern(triple, options);
+        }
+        if (triple.isFixed()) {
+          this.databank.add(triple.triple(), options);
+        } else {
+          query = this;
+          this.each(function (i, data) {
+            var t = triple.triple(data);
+            if (t !== null) {
+              query.databank.add(t, options);
+            }
+          });
+        }
+      }
+      return this;
+    },
+
+    /**
+     * Removes a triple or several triples from the {@link jQuery.rdf#databank}.
+     * @param {String|jQuery.rdf.triple|jQuery.rdf.pattern} triple The triple to be removed, or a {@link jQuery.rdf.pattern} that matches the triples that should be removed.
+     * @param {Object} [options]
+     * @param {Object} [options.namespaces] An object representing a set of namespace bindings used to interpret any CURIEs within the triple or pattern. Defaults to the namespace bindings defined on the {@link jQuery.rdf#databank}.
+     * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the triple or pattern. Defaults to the base URI defined on the {@link jQuery.rdf#databank}.
+     * @returns {jQuery.rdf} The {@link jQuery.rdf} object itself.
+     * @example
+     * var rdf = $('html').rdf()
+     *   .prefix('foaf', ns.foaf)
+     *   .where('?person foaf:givenname ?gname')
+     *   .where('?person foaf:family_name ?fname')
+     *   .remove('?person foaf:family_name ?fname');
+     * @see jQuery.rdf.databank#remove
+     */
+    remove: function (triple, options) {
+      if (typeof triple === 'string') {
+        options = $.extend({}, { base: this.base(), namespaces: this.prefix() }, options);
+        triple = $.rdf.pattern(triple, options);
+      }
+      if (triple.isFixed()) {
+        this.databank.remove(triple.triple(), options);
+      } else {
+        query = this;
+        this.each(function (i, data) {
+          var t = triple.triple(data);
+          if (t !== null) {
+            query.databank.remove(t, options);
+          }
+        });
+      }
+      return this;
+    },
+
+    /**
+     * Loads some data into the {@link jQuery.rdf#databank}
+     * @param data
+     * @param {Object} [options]
+     * @see jQuery.rdf.databank#load
+     */
+    load: function (data, options) {
+      var rdf = this, success = options.success;
+      if (success !== undefined) {
+        options.success = function () {
+          success.call(rdf);
+        }
+      }
+      this.databank.load(data, options);
+      return this;
+    },
+
+    /**
+     * Creates a new {@link jQuery.rdf} object whose databank contains all the triples in this object's

<TRUNCATED>

[67/87] [abbrv] clerezza git commit: CLEREZZA-960: ported the odules used by linked-data-launcher

Posted by re...@apache.org.
CLEREZZA-960: ported the odules used by linked-data-launcher

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

Branch: refs/heads/master
Commit: f221ae688268b2bca529eb747a198235cc461e39
Parents: d0f43e9
Author: Reto Gmuer <re...@apache.org>
Authored: Sun Mar 29 20:23:19 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Sun Mar 29 20:23:19 2015 +0000

----------------------------------------------------------------------
 .../content/ContentGraphProvider.java           |  9 ++++--
 platform/logging/core/pom.xml                   | 32 +++++++++++---------
 .../platform/logging/LoggingManager.java        | 12 ++++----
 platform/logging/initializer/pom.xml            |  5 +--
 platform/logging/ontologies/pom.xml             | 13 ++++----
 platform/logging/pom.xml                        |  6 ++--
 platform/typehandlerspace.jaxrs2/pom.xml        |  8 +++++
 .../ScalaServerPagesRenderlet.java              |  6 +++-
 .../scalaserverpages/implicit-header.txt        |  1 +
 .../typerendering/GenericGraphNodeMBW.java      |  5 ++-
 .../typerendering/exception-template.ssp        |  2 +-
 provisioning/typerendering/pom.xml              |  2 +-
 .../clerezza/rdf/web/core/graph-management.ssp  |  6 ++--
 scala-scripting/pom.xml                         |  8 ++---
 .../BundleContextScalaInterpreter.scala         |  4 ++-
 .../scala/scripting/ScriptEngineFactory.scala   |  2 +-
 .../util/GenericFileWrapperTrait.scala          |  3 --
 .../scripting/util/SplittingDirectory.scala     |  3 --
 .../util/VirtualDirectoryWrapper.scala          |  6 ++--
 scala-scripting/tests/pom.xml                   | 26 ++++++++++++----
 20 files changed, 96 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
index 8d6ace8..80d5862 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -31,6 +31,8 @@ import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.utils.UnionGraph;
 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;
 
 /**
@@ -58,11 +60,12 @@ public class ContentGraphProvider {
      *               additional Graphs that are added to the content
      *               graph for reading"
      */
+    @Property(name = "additions", description = "Contains "
+     +               "additional Graphs that are added to the content "
+     +               "graph for reading", value = {"",""})
     public static final String CONTENT_ADDITIONS = "additions";
 
-    /**
-     * @scr.reference
-     */
+    @Reference
     private TcManager tcManager;
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/logging/core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/core/pom.xml b/platform/logging/core/pom.xml
index 68bcf42..2e059bd 100644
--- a/platform/logging/core/pom.xml
+++ b/platform/logging/core/pom.xml
@@ -23,8 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.logging.parent</artifactId>
-        <version>0.2</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.logging.core</artifactId>
@@ -34,12 +35,19 @@
     <description>
         Configure logging for the Clerezza Platform Core
     </description>
-
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.logging.ontologies</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -49,32 +57,32 @@
         <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</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.globalmenu.api</artifactId>
-            <version>0.3</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.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </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>
@@ -82,10 +90,6 @@
             <version>0.10</version>
         </dependency>
         <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
index ec342d3..95158fd 100644
--- a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
+++ b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
@@ -44,9 +44,9 @@ import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.logging.ontologies.LOGGING;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -78,7 +78,7 @@ public class LoggingManager implements GlobalMenuItemsProvider {
     public void activate(ComponentContext context)
             throws URISyntaxException, IOException {
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(getClass().getResource(
+                new Iri(getClass().getResource(
                 "config-page-naked.ssp").toURI().toString()),
                 LOGGING.LoggingConfigPage, "naked",
                 MediaType.APPLICATION_XHTML_XML_TYPE, true);
@@ -112,8 +112,8 @@ public class LoggingManager implements GlobalMenuItemsProvider {
             throws IOException {
         AccessController.checkPermission(new LoggingManagerAccessPermission());
         TrailingSlash.enforcePresent(uriInfo);
-        SimpleMGraph resultMGraph = new SimpleMGraph();
-        GraphNode result = new GraphNode(new BNode(), resultMGraph);
+        SimpleGraph resultGraph = new SimpleGraph();
+        GraphNode result = new GraphNode(new BlankNode(), resultGraph);
         result.addPropertyValue(LOGGING.loggingConfig, getPropertiesAsString());
         result.addProperty(RDF.type, PLATFORM.HeadedPage);
         result.addProperty(RDF.type, LOGGING.LoggingConfigPage);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/logging/initializer/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/initializer/pom.xml b/platform/logging/initializer/pom.xml
index 99e8299..92a798d 100644
--- a/platform/logging/initializer/pom.xml
+++ b/platform/logging/initializer/pom.xml
@@ -21,8 +21,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.logging.parent</artifactId>
-        <version>0.2</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.logging.initializer</artifactId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/logging/ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/ontologies/pom.xml b/platform/logging/ontologies/pom.xml
index cfb8f09..2815e28 100644
--- a/platform/logging/ontologies/pom.xml
+++ b/platform/logging/ontologies/pom.xml
@@ -18,13 +18,14 @@
  specific language governing permissions and limitations
  under the License.
 
--->
+    -->
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.logging.parent</artifactId>
-        <version>0.2</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.logging.ontologies</artifactId>
@@ -38,7 +39,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
     <build>
@@ -60,8 +61,8 @@
                         </goals>
                     </execution>
                 </executions>
-                <version>0.4</version>
-        </plugin>
+                <version>1.0.0-SNAPSHOT</version>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/logging/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/pom.xml b/platform/logging/pom.xml
index 11ac529..e21b6d2 100644
--- a/platform/logging/pom.xml
+++ b/platform/logging/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.logging.parent</artifactId>
@@ -42,7 +42,7 @@
             <dependency>
                 <groupId>org.apache.clerezza.platform.logging</groupId>
                 <artifactId>ontologies</artifactId>
-                <version>0.1-SNAPSHOT</version>
+                <version>1.0.0-SNAPSHOT</version>
             </dependency>
         </dependencies>
     </dependencyManagement>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/typehandlerspace.jaxrs2/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/pom.xml b/platform/typehandlerspace.jaxrs2/pom.xml
index b82c6de..67e5f81 100644
--- a/platform/typehandlerspace.jaxrs2/pom.xml
+++ b/platform/typehandlerspace.jaxrs2/pom.xml
@@ -32,6 +32,14 @@
     <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>Clerezza - Platform Type Handler Space Jaxrs 2.0 Based Implementation</name>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>javax.ws.rs</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesRenderlet.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesRenderlet.java
index 481993c..0e1e3c8 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesRenderlet.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesRenderlet.java
@@ -121,7 +121,8 @@ public class ScalaServerPagesRenderlet implements Renderlet {
         } catch (MalformedURLException ex) {
             throw new WebApplicationException(ex);
         } catch (CompileErrorsException ex) {
-            logger.debug("ScriptException rendering ScalaServerPage: ", ex);
+            //logger.debug("ScriptException rendering ScalaServerPage: ", ex);
+            logger.error("Error compiling "+renderingSpecification+": "+ex.getMessage());
             Exception cause = (Exception) ex.getCause();
             if (cause != null) {
                 if (cause instanceof TypeRenderingException) {
@@ -177,6 +178,9 @@ public class ScalaServerPagesRenderlet implements Renderlet {
                 if (cause instanceof RuntimeException) {
                     throw (RuntimeException) cause;
                 }
+                if (cause instanceof CompileErrorsException) {
+                    throw (CompileErrorsException) cause;
+                }
                 throw new RuntimeException(e);
             }
             try {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
index 070985e..236786c 100644
--- a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
+++ b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
@@ -4,6 +4,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.commons.rdf._
 import javax.ws.rs.core.UriInfo
 
  class CompiledScalaServerPage extends AbstractRenderlet {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
index 957ff18..391acf8 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
@@ -73,7 +73,7 @@ import org.xml.sax.SAXException;
  * 
  * @author daniel, mir, rbn
  */
-@Component
+@Component(immediate = true)
 @Service(Object.class)
 @Property(name = "javax.ws.rs", boolValue = true)
 @Reference(name = "contextProvider", referenceInterface = UserContextProvider.class,
@@ -187,6 +187,9 @@ public class GenericGraphNodeMBW implements MessageBodyWriter<GraphNode> {
                 } catch (TransformerException ex) {
                     throw new RuntimeException(ex);
                 }
+            } catch (RuntimeException ex) {
+                logger.error("error rendering GraphNode", ex);
+                throw ex;
             } finally {
                 ResultDocModifier.dispose();
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp b/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
index 384ec60..a450e08 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
+++ b/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
@@ -19,7 +19,7 @@
  *
 */
 
-def typerendering(s: Any) = new UriRef("http://clerezza.org/2009/04/typerendering#"+s)
+def typerendering(s: Any) = new Iri("http://clerezza.org/2009/04/typerendering#"+s)
 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/provisioning/typerendering/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/typerendering/pom.xml b/provisioning/typerendering/pom.xml
index 48a290d..b362b29 100644
--- a/provisioning/typerendering/pom.xml
+++ b/provisioning/typerendering/pom.xml
@@ -178,7 +178,7 @@
         <dependency>
             <groupId>org.apache.clerezza.scala</groupId>
             <artifactId>script-engine</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
     </dependencies>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
index 0b71676..85f32ee 100644
--- a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
@@ -19,9 +19,9 @@
  *
 */
 
-def gm(s: Any) = new UriRef("http://clerezza.org/2010/03/graph-management#"+s)
-def rdf(s: Any) = new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
-def tcp(s: Any) = new UriRef("http://clerezza.org/2009/06/tcprovider#"+s)
+def gm(s: Any) = new Iri("http://clerezza.org/2010/03/graph-management#"+s)
+def rdf(s: Any) = new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
+def tcp(s: Any) = new Iri("http://clerezza.org/2009/06/tcprovider#"+s)
 
 resultDocModifier.setTitle("Manage Triple Collections");
 resultDocModifier.addNodes2Elem("tx-module", <h1>Manage Triple Collections</h1>);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/pom.xml
----------------------------------------------------------------------
diff --git a/scala-scripting/pom.xml b/scala-scripting/pom.xml
index 3109f07..9e10aeb 100644
--- a/scala-scripting/pom.xml
+++ b/scala-scripting/pom.xml
@@ -41,22 +41,22 @@
             <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-library</artifactId>
-                <version>2.10.3</version>
+                <version>2.11.6</version>
             </dependency>
             <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-compiler</artifactId>
-                <version>2.10.3</version>
+                <version>2.11.6</version>
             </dependency>
             <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-actors</artifactId>
-                <version>2.10.3</version>
+                <version>2.11.6</version>
             </dependency>
             <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-reflect</artifactId>
-                <version>2.10.3</version>
+                <version>2.11.6</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.felix</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleContextScalaInterpreter.scala
----------------------------------------------------------------------
diff --git a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleContextScalaInterpreter.scala b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleContextScalaInterpreter.scala
index 0f174ba..a1590d6 100644
--- a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleContextScalaInterpreter.scala
+++ b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/BundleContextScalaInterpreter.scala
@@ -20,10 +20,12 @@ package org.apache.clerezza.scala.scripting;
 
 import org.osgi.framework.BundleContext
 import scala.tools.nsc._;
-import scala.tools.nsc.interpreter._;
+//import scala.tools.nsc.interpreter._;
 import scala.tools.nsc.util._
 import java.io.PrintWriter
 import java.net._
+import scala.tools.nsc.interpreter.AbstractFileClassLoader
+import scala.tools.nsc.interpreter.IMain
 import scala.tools.nsc.reporters.Reporter
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
----------------------------------------------------------------------
diff --git a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
index 5f66c77..496bf8f 100644
--- a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
+++ b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/ScriptEngineFactory.scala
@@ -163,7 +163,7 @@ class ScriptEngineFactory() extends  JavaxEngineFactory with BundleListener  {
                 println("visible stuff:")
                 System.out.println("stuff stuff stuff");
                 println("interpreter.valueOfTerm(\"zzScriptResult\"): "+interpreter.valueOfTerm("zzScriptResult"))
-                interpreter.visibleTermNames.foreach(println)
+                interpreter.allDefinedNames.foreach(println)
                 if (interpreter.reporter.hasErrors) {
                   throw new ScriptException("some error","script-file",1)
                 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/GenericFileWrapperTrait.scala
----------------------------------------------------------------------
diff --git a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/GenericFileWrapperTrait.scala b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/GenericFileWrapperTrait.scala
index d443eaa..aa228f7 100644
--- a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/GenericFileWrapperTrait.scala
+++ b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/GenericFileWrapperTrait.scala
@@ -75,9 +75,6 @@ trait GenericFileWrapperTrait extends AbstractFile with Wrapper[AbstractFile] {
     wrapped.sizeOption
   }
 
-  override def lookupPath(path: String, directory: Boolean): AbstractFile = {
-    childWrapper(wrapped.lookupPath(path, directory))
-  }
   override def lookupPathUnchecked(path: String, directory: Boolean): AbstractFile = {
     childWrapper(wrapped.lookupPathUnchecked(path, directory))
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/SplittingDirectory.scala
----------------------------------------------------------------------
diff --git a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/SplittingDirectory.scala b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/SplittingDirectory.scala
index 2d318c0..b99f55d 100644
--- a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/SplittingDirectory.scala
+++ b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/SplittingDirectory.scala
@@ -70,9 +70,6 @@ class SplittingDirectory()
   }
   override val name = "(splitting)"
   
-  override def lookupPath(path: String, directory: Boolean): AbstractFile = {
-    childWrapper(wrapped.lookupPath(path, directory))
-  }
   override def lookupPathUnchecked(path: String, directory: Boolean): AbstractFile = {
     childWrapper(wrapped.lookupPathUnchecked(path, directory))
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
----------------------------------------------------------------------
diff --git a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
index b56de63..dedd702 100644
--- a/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
+++ b/scala-scripting/script-engine/src/main/scala/org/apache/clerezza/scala/scripting/util/VirtualDirectoryWrapper.scala
@@ -32,7 +32,7 @@ import scala.reflect.io.VirtualDirectory
 class VirtualDirectoryWrapper(val wrapped: AbstractFile,
                 val childWrapper: (AbstractFile) => AbstractFile) extends VirtualDirectory(null, None)
                                            with GenericFileWrapperTrait {
-  lastModified =wrapped.lastModified
+  override val lastModified =wrapped.lastModified
 
   override def output = {
     wrapped.asInstanceOf[VirtualDirectory].output
@@ -52,9 +52,7 @@ class VirtualDirectoryWrapper(val wrapped: AbstractFile,
   override val name = {
     wrapped.name
   }
-  override def lookupPath(path: String, directory: Boolean): AbstractFile = {
-    childWrapper(wrapped.lookupPath(path, directory))
-  }
+
   override def lookupPathUnchecked(path: String, directory: Boolean): AbstractFile = {
     childWrapper(wrapped.lookupPathUnchecked(path, directory))
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f221ae68/scala-scripting/tests/pom.xml
----------------------------------------------------------------------
diff --git a/scala-scripting/tests/pom.xml b/scala-scripting/tests/pom.xml
index df59e35..ba222da 100644
--- a/scala-scripting/tests/pom.xml
+++ b/scala-scripting/tests/pom.xml
@@ -29,6 +29,20 @@
     <packaging>jar</packaging>
     <name>Scala OSGi Services - Tests</name>
     <description>Tests for Scala OSGi Services.</description>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.ops4j.pax.runner</groupId>
+                <artifactId>pax-runner</artifactId>
+                <version>1.8.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.runner</groupId>
+                <artifactId>pax-runner-no-jcl</artifactId>
+                <version>1.8.6</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -42,7 +56,7 @@
             <version>4.8.2</version>
         </dependency>
         
-<!-- pax exam related stuff -->
+        <!-- pax exam related stuff -->
         <dependency>
             <groupId>org.ops4j.pax.exam</groupId>
             <artifactId>pax-exam</artifactId>
@@ -85,13 +99,13 @@
             <groupId>org.apache.clerezza.scala</groupId>
             <artifactId>script-engine</artifactId>
             <scope>provided</scope>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
-          <groupId>org.apache.clerezza.ext</groupId>
-          <artifactId>slf4j-scala-api</artifactId>
-          <version>1.6.3</version>
-          <scope>provided</scope>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>


[66/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
CLEREZZA-966: moved ported rdf.* modules to hierarchy

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

Branch: refs/heads/master
Commit: d0f43e94efa7f9d58dc6e153705f796e9c00e54b
Parents: c8c3494
Author: Reto Gmuer <re...@apache.org>
Authored: Tue Mar 24 10:50:51 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Tue Mar 24 10:50:51 2015 +0000

----------------------------------------------------------------------
 pom.xml                                         |   3 -
 provisioning/security/pom.xml                   |   2 +-
 rdf.file.storage/LICENSE                        | 201 ---------
 rdf.file.storage/pom.xml                        |  70 ----
 .../clerezza/rdf/file/storage/FileGraph.java    | 205 ---------
 .../rdf/file/storage/FileTcProvider.java        | 240 -----------
 ....clerezza.rdf.core.access.WeightedTcProvider |   1 -
 .../rdf/file/storage/FileGraphTest.java         | 132 ------
 .../rdf/file/storage/FileTcProviderTest.java    | 233 -----------
 .../clerezza/rdf/file/storage/FileUtil.java     |  65 ---
 .../apache/clerezza/rdf/file/storage/test-04.nt |   2 -
 .../clerezza/rdf/file/storage/test-04.rdf       |  32 --
 .../clerezza/rdf/file/storage/test-04.ttl       |   4 -
 rdf.rdfa/LICENSE                                | 201 ---------
 rdf.storage.web/LICENSE                         | 201 ---------
 rdf.storage.web/pom.xml                         | 120 ------
 .../resources/OSGI-INF/metatype/metatype.xml    |  32 --
 .../resources/OSGI-INF/serviceComponents.xml    |  39 --
 rdf.storage.web/src/main/scala/WebProxy.scala   | 271 ------------
 rdf.web/LICENSE                                 | 201 ---------
 rdf.web/pom.xml                                 |  40 --
 rdf.web/rdf.web.core/LICENSE                    | 201 ---------
 rdf.web/rdf.web.core/nbactions.xml              |  11 -
 rdf.web/rdf.web.core/pom.xml                    | 117 ------
 .../apache/clerezza/rdf/web/core/Backup.java    | 161 --------
 .../rdf/web/core/BackupMessageBodyWriter.java   | 180 --------
 .../clerezza/rdf/web/core/BackupPermission.java |  67 ---
 .../apache/clerezza/rdf/web/core/Delete.java    |  67 ---
 .../clerezza/rdf/web/core/GraphManagement.java  | 120 ------
 .../web/core/GraphManagementAppPermission.java  |  67 ---
 .../clerezza/rdf/web/core/PlatformRestorer.java |  95 -----
 .../rdf/web/core/RestorePermission.java         |  69 ----
 .../apache/clerezza/rdf/web/core/Restorer.java  | 178 --------
 .../web/core/ResultSetMessageBodyWriter.java    | 208 ----------
 .../org/apache/clerezza/rdf/web/core/Smush.java |  88 ----
 .../clerezza/rdf/web/core/SparqlEndpoint.java   | 411 -------------------
 .../core/SparqlEndpointAccessPermission.java    |  66 ---
 .../apache/clerezza/rdf/web/core/WebAccess.java | 252 ------------
 .../rdf/web/core/WebAccessPermission.java       |  66 ---
 .../rdf/web/core/utils/ResultSetsWrapper.java   |  77 ----
 .../main/resources/META-INF/documentation.nt    |  52 ---
 .../clerezza/rdf/web/core/backup-management.ssp |  37 --
 .../clerezza/rdf/web/core/graph-management.ssp  |  62 ---
 .../clerezza/rdf/web/core/sparql-endpoint.ssp   |  79 ----
 .../clerezza/rdf/web/core/upload-form.xhtml     |  45 --
 .../rdf/web/core/BackupAndRestoreTest.java      | 250 -----------
 rdf.web/rdf.web.ontologies/LICENSE              | 201 ---------
 rdf.web/rdf.web.ontologies/pom.xml              |  66 ---
 .../clerezza/rdf/web/ontologies/backup.rdf      |  73 ----
 .../rdf/web/ontologies/graphmanagement.rdf      |  70 ----
 .../rdf/web/ontologies/sparqlendpoint.rdf       |  62 ---
 rdf/file.storage/LICENSE                        | 201 +++++++++
 rdf/file.storage/pom.xml                        |  70 ++++
 .../clerezza/rdf/file/storage/FileGraph.java    | 205 +++++++++
 .../rdf/file/storage/FileTcProvider.java        | 240 +++++++++++
 ....clerezza.rdf.core.access.WeightedTcProvider |   1 +
 .../rdf/file/storage/FileGraphTest.java         | 132 ++++++
 .../rdf/file/storage/FileTcProviderTest.java    | 233 +++++++++++
 .../clerezza/rdf/file/storage/FileUtil.java     |  65 +++
 .../apache/clerezza/rdf/file/storage/test-04.nt |   2 +
 .../clerezza/rdf/file/storage/test-04.rdf       |  32 ++
 .../clerezza/rdf/file/storage/test-04.ttl       |   4 +
 rdf/pom.xml                                     |   3 +
 rdf/storage.web/LICENSE                         | 201 +++++++++
 rdf/storage.web/pom.xml                         | 120 ++++++
 .../resources/OSGI-INF/metatype/metatype.xml    |  32 ++
 .../resources/OSGI-INF/serviceComponents.xml    |  39 ++
 rdf/storage.web/src/main/scala/WebProxy.scala   | 271 ++++++++++++
 rdf/web/LICENSE                                 | 201 +++++++++
 rdf/web/pom.xml                                 |  40 ++
 rdf/web/rdf.web.core/LICENSE                    | 201 +++++++++
 rdf/web/rdf.web.core/nbactions.xml              |  11 +
 rdf/web/rdf.web.core/pom.xml                    | 117 ++++++
 .../apache/clerezza/rdf/web/core/Backup.java    | 161 ++++++++
 .../rdf/web/core/BackupMessageBodyWriter.java   | 180 ++++++++
 .../clerezza/rdf/web/core/BackupPermission.java |  67 +++
 .../apache/clerezza/rdf/web/core/Delete.java    |  67 +++
 .../clerezza/rdf/web/core/GraphManagement.java  | 120 ++++++
 .../web/core/GraphManagementAppPermission.java  |  67 +++
 .../clerezza/rdf/web/core/PlatformRestorer.java |  95 +++++
 .../rdf/web/core/RestorePermission.java         |  69 ++++
 .../apache/clerezza/rdf/web/core/Restorer.java  | 178 ++++++++
 .../web/core/ResultSetMessageBodyWriter.java    | 208 ++++++++++
 .../org/apache/clerezza/rdf/web/core/Smush.java |  88 ++++
 .../clerezza/rdf/web/core/SparqlEndpoint.java   | 411 +++++++++++++++++++
 .../core/SparqlEndpointAccessPermission.java    |  66 +++
 .../apache/clerezza/rdf/web/core/WebAccess.java | 252 ++++++++++++
 .../rdf/web/core/WebAccessPermission.java       |  66 +++
 .../rdf/web/core/utils/ResultSetsWrapper.java   |  77 ++++
 .../main/resources/META-INF/documentation.nt    |  52 +++
 .../clerezza/rdf/web/core/backup-management.ssp |  37 ++
 .../clerezza/rdf/web/core/graph-management.ssp  |  62 +++
 .../clerezza/rdf/web/core/sparql-endpoint.ssp   |  79 ++++
 .../clerezza/rdf/web/core/upload-form.xhtml     |  45 ++
 .../rdf/web/core/BackupAndRestoreTest.java      | 250 +++++++++++
 rdf/web/rdf.web.ontologies/LICENSE              | 201 +++++++++
 rdf/web/rdf.web.ontologies/pom.xml              |  66 +++
 .../clerezza/rdf/web/ontologies/backup.rdf      |  73 ++++
 .../rdf/web/ontologies/graphmanagement.rdf      |  70 ++++
 .../rdf/web/ontologies/sparqlendpoint.rdf       |  62 +++
 100 files changed, 5591 insertions(+), 5792 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c67c0f0..eb7bcc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,11 +72,9 @@
                 <module>rdf</module>
                 <module>rdf.cris</module>
                 <module>rdf.enrichment</module>
-                <module>rdf.file.storage</module>
                 <module>rdf.locking</module>
                 <module>rdf.rdfjson</module>
                 <module>rdf.stable.serializer</module>
-                <module>rdf.web</module>
                 <module>shell</module>
                 <module>shell.felixshellcommand</module>
                 <module>bundledevtool</module>
@@ -93,7 +91,6 @@
                 <module>web.resources.scripts</module>
                 <module>web.resources.yui</module>
                 <module>rdf.storage.externalizer</module>
-                <module>rdf.storage.web</module>
 
                 <module>ext.virtuoso.jdbc</module>
                 <module>rdf.virtuoso.storage</module>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/provisioning/security/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/security/pom.xml b/provisioning/security/pom.xml
index f8202c0..b5cf21f 100644
--- a/provisioning/security/pom.xml
+++ b/provisioning/security/pom.xml
@@ -1,4 +1,4 @@
-?<xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.file.storage/LICENSE b/rdf.file.storage/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.file.storage/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.file.storage/pom.xml b/rdf.file.storage/pom.xml
deleted file mode 100644
index 4932a7c..0000000
--- a/rdf.file.storage/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-     <parent>
-        <artifactId>clerezza</artifactId>
-        <groupId>org.apache.clerezza</groupId>
-        <version>7-SNAPSHOT</version>
-        <relativePath />
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>rdf.file.storage</artifactId>
-    <packaging>bundle</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - RDF File Storage Provider</name>
-    <description>A file base storage provider</description>
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core.test</artifactId>
-            <scope>test</scope>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.jena.parser</artifactId>
-            <scope>test</scope>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.jena.serializer</artifactId>
-            <scope>test</scope>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
deleted file mode 100644
index e9143f9..0000000
--- a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Collection;
-
-import java.util.Iterator;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-
-/**
- *
- * @author mir
- */
-public class FileGraph extends SimpleGraph {
-
-    private Serializer serializer;
-    private File file;
-    private String fileType;
-
-    FileGraph(Iri uri, Parser parser,
-            Serializer serializer) {
-        this(new File(URI.create(uri.getUnicodeString())), parser, serializer);    
-    }
-
-    public FileGraph(File file, Parser parser, Serializer serializer) {
-        this.file = file;
-        String fileEnding = extractFileEnding(file.getPath());
-        fileType = getMediaTypeForFileEnding(fileEnding);
-        this.serializer = serializer;
-        try {
-            if (file.exists() && file.length() != 0) {
-                InputStream fio = new FileInputStream(file);
-                ImmutableGraph graph = parser.parse(fio, fileType);
-                addAllNoFileAccess(graph);
-            } else {
-                file.createNewFile();
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    @Override
-    public boolean add(Triple e) {
-        boolean result = super.add(e);
-        writeToFile();
-        return result;
-    }
-    
-    @Override
-    public boolean addAll(Collection<? extends Triple> c) {
-        boolean modified = addAllNoFileAccess(c);
-        writeToFile();
-        return modified;
-    }
-
-    @Override
-    public boolean remove(Object o) {
-        Iterator<Triple> e = super.filter(null, null, null);
-        while (e.hasNext()) {
-            if (o.equals(e.next())) {
-                e.remove();
-                writeToFile();
-                return true;
-            }
-        }        
-        return false;
-    }
-
-    @Override
-    public boolean removeAll(Collection<?> c) {
-        boolean modified = false;
-        Iterator<Triple> e = super.filter(null, null, null);
-        while (e.hasNext()) {
-            if (c.contains(e.next())) {
-                e.remove();
-                modified = true;
-            }            
-        }
-        writeToFile();
-        return modified;
-    }
-
-    @Override
-    public boolean retainAll(Collection<?> c) {
-        boolean result = super.retainAll(c);
-        writeToFile();
-        return result;
-    }
-    
-    @Override
-    public Iterator<Triple> filter(final BlankNodeOrIri subject,
-            final Iri predicate,
-            final RdfTerm object) {
-        final Iterator<Triple> baseIter = super.filter(subject, predicate, object);
-        Iterator<Triple> iterator = new Iterator<Triple>() {
-
-            @Override
-            public boolean hasNext() {
-                return baseIter.hasNext();
-            }
-
-            @Override
-            public Triple next() {
-                return baseIter.next();
-            }
-
-            @Override
-            public void remove() {
-                baseIter.remove();
-                writeToFile();
-            }
-
-        };
-        return iterator;
-    }
-
-    private boolean addAllNoFileAccess(Collection<? extends Triple> c) {
-        boolean modified = false;
-        Iterator<? extends Triple> e = c.iterator();
-        while (e.hasNext()) {
-            if (super.add(e.next())) {
-                modified = true;
-            }
-        }
-        return modified;
-    }
-
-    private String extractFileEnding(String uriString) {
-        String fileEnding = uriString.substring(uriString.lastIndexOf(".") + 1, uriString.length());
-        return fileEnding;
-    }
-
-    private String getMediaTypeForFileEnding(String fileEnding) {
-        if (fileEnding.equals("rdf")) {
-            return SupportedFormat.RDF_XML;
-        }
-        if (fileEnding.equals("nt")) {
-            return SupportedFormat.N_TRIPLE;
-        }
-        if (fileEnding.equals("ttl")) {
-            return SupportedFormat.TURTLE;
-        }
-        if (fileEnding.equals("n3")) {
-            return SupportedFormat.N3;
-        }
-        return null;
-    }
-
-    private void writeToFile() {
-        synchronized(this) {
-            OutputStream out;
-            try {
-                out = new FileOutputStream(file);
-            } catch (FileNotFoundException ex) {
-                throw new RuntimeException(ex);
-            }
-            try {
-                serializer.serialize(out, this, fileType);
-            } finally {
-                try {
-                    out.close();
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-        }
-    }
-
-    public void delete() {
-        file.delete();
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
deleted file mode 100644
index 0b4fd33..0000000
--- a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.osgi.service.component.ComponentContext;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
-import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-
-/**
- * The <code>FileTcProvider</code> is a <code>WeightedTcProvider</code> that
- * stores <code>Graph</code>S in the file system. <code>ImmutableGraph</code>S are not
- * supported.
- * The <code>Iri</code> of a Graph is location of the file in the file system
- * (e.g. "file:///home/user/myGraph.rdf"). The format of the rdf data in the file
- * depends on the file ending, for example ".rdf" or ".ttl".
- * <code>FileTcProvider</code> uses
- * <code>org.apache.clerezza.rdf.core.serializedform.Parser</code> and
- * <code>org.apache.clerezza.rdf.core.serializedform.Serializer</code> for
- * parsing and serialization, therefore the supported formats depend on the
- * availability of these services.
- * The default weight of the provider is 300.
- *
- * @scr.component
- * @scr.service interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"
- * @scr.property name="weight" type="Integer" value="300"
- * 
- * @author mir
- */
-public class FileTcProvider implements WeightedTcProvider {
-
-    /**
-     * @scr.reference
-     */
-    private Parser parser;
-    /**
-     * @scr.reference
-     */
-    private Serializer serializer;
-    
-    private Map<Iri, FileGraph> uriRef2GraphMap =
-            new HashMap<Iri, FileGraph>();
-
-    protected static File dataFile = new File("data");
-
-    boolean initialized = false;
-
-    private int weight = 300;
-
-
-    public FileTcProvider() {
-        this.parser = Parser.getInstance();
-        this.serializer = Serializer.getInstance();
-    }
-
-    protected void activate(final ComponentContext componentContext) {
-        weight = (Integer) componentContext.getProperties().get("weight");
-        dataFile = componentContext.getBundleContext().
-                        getDataFile("data");
-    }
-
-    @Override
-    public int getWeight() {
-        return weight;
-    }
-
-    @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
-        throw new NoSuchEntityException(name);
-    }
-
-    /**
-     * Get an <code>Graph</code> by its name. If the file at the specified
-     * location already exists, then a Graph is returned even though it was not
-     * created with createGraph().
-     *
-     * @param the name of the <code>Graph</code>
-     * @return name the <code>Graph</code> with the specified name
-     * @throws NoSuchEntityException if there is no <code>Graph</code>
-     *         with the specified name or the file didn't exist.
-     */
-    @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
-        initialize();
-        Graph mGraph = uriRef2GraphMap.get(name);
-        if (mGraph == null) {
-            final String uriString = name.getUnicodeString();
-            if (!uriString.startsWith("file:")) {
-                throw new NoSuchEntityException(name);
-            }
-            File file = new File(URI.create(uriString));
-            if (file.exists()) {
-                return createGraph(name);
-            } else {
-                throw new NoSuchEntityException(name);
-            }            
-        }
-        return mGraph;
-    }
-
-    @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
-        return getMGraph(name);
-    }
-
-    @Override
-    public Set<Iri> listImmutableGraphs() {
-        throw new UnsupportedOperationException("Not supported.");
-    }
-
-    @Override
-    public Set<Iri> listMGraphs() {
-        initialize();
-        return uriRef2GraphMap.keySet();
-    }
-
-    @Override
-    public Set<Iri> listGraphs() {
-        return listMGraphs();
-    }
-
-
-    @Override
-    public Graph createGraph(Iri name) throws 
-            UnsupportedOperationException, EntityAlreadyExistsException {
-        initialize();
-        if (uriRef2GraphMap.containsKey(name)) {
-            throw new EntityAlreadyExistsException(name);
-        }
-        FileGraph mGraph = new FileGraph(name, parser, serializer);
-        uriRef2GraphMap.put(name, mGraph);
-        writeDataFile();
-        return mGraph;
-    }
-
-    @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws
-            UnsupportedOperationException, EntityAlreadyExistsException {
-        throw new UnsupportedOperationException("Not supported.");
-    }
-
-    @Override
-    public void deleteGraph(Iri name) throws 
-            UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
-        initialize();
-        FileGraph mGraph = (FileGraph)getGraph(name);
-        mGraph.delete();
-        uriRef2GraphMap.remove(name);
-        writeDataFile();
-    }
-
-    @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    private void initialize() throws RuntimeException {
-        if (!initialized) {
-            readDataFile();
-            initialized = true;
-        }
-    }
-
-    private void readDataFile() throws RuntimeException {
-        try {
-            if (dataFile.exists()) {
-                FileInputStream fstream = new FileInputStream(dataFile);
-                DataInputStream in = new DataInputStream(fstream);
-                BufferedReader br = new BufferedReader(new InputStreamReader(in));
-                String strLine;
-                while ((strLine = br.readLine()) != null) {
-                    Iri uriRef = new Iri(strLine);
-                    uriRef2GraphMap.put(uriRef, new FileGraph(uriRef, parser, serializer));
-                }
-                in.close();
-            } else {
-                dataFile.createNewFile();
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    private void writeDataFile() {
-        FileOutputStream fout = null;
-        try {
-            fout = new FileOutputStream(dataFile);
-            for (Iri uri : uriRef2GraphMap.keySet()) {
-                fout.write((uri.getUnicodeString() + "\n").getBytes());
-            }
-        } catch (FileNotFoundException ex) {
-            throw new RuntimeException(ex);
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-        finally {
-            try {
-                fout.close();
-            } catch (IOException ex) {
-                Logger.getLogger(FileTcProvider.class.getName()).log(Level.SEVERE, null, ex);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider b/rdf.file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
deleted file mode 100644
index cd429a2..0000000
--- a/rdf.file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.clerezza.rdf.file.storage.FileTcProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
deleted file mode 100644
index e24edb9..0000000
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Iterator;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author mir
- */
-public class FileGraphTest {
-
-    private static String tempDir = System.getProperty("java.io.tmpdir");
-    private static final String FILE_PROTOCOL = "file://";
-
-    protected static final String NT_FILE_NAME = "test-04.nt";
-    protected static final String RDF_FILE_NAME = "test-04.rdf";
-    protected static final String TURTLE_FILE_NAME = "test-04.ttl";
-
-    private static final Iri uriA = new Iri("http://example.com/a");
-    private static final Iri uriB = new Iri("http://example.com/b");
-    private static final Iri uriC = new Iri("http://example.com/c");
-
-
-    @BeforeClass
-    public static void setup() throws Exception {
-        createTempFileFromRdfTerm(NT_FILE_NAME);
-        createTempFileFromRdfTerm(RDF_FILE_NAME);
-        createTempFileFromRdfTerm(TURTLE_FILE_NAME);
-    }
-
-    @AfterClass
-    public static void cleanUp() throws Exception {
-        deleteTempFile(NT_FILE_NAME);
-        deleteTempFile(RDF_FILE_NAME);
-        deleteTempFile(TURTLE_FILE_NAME);
-    }
-
-    private static void createTempFileFromRdfTerm(String resourceName) 
-            throws FileNotFoundException, IOException {
-        InputStream in = FileTcProviderTest.class.getResourceAsStream(resourceName);
-        File file = new File(URI.create(getTempFileUri(resourceName)));
-        FileOutputStream fout = new FileOutputStream(file);
-        int inByte;
-        while ((inByte = in.read()) != -1) {
-            fout.write(inByte);
-        }
-    }
-    
-    protected static String getTempFileUri(String name) {
-                String prefix = tempDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
-        return prefix + tempDir.replace(File.separatorChar, '/') + "/" + name;
-    }
-
-    private static void deleteTempFile(String name)
-            throws FileNotFoundException, IOException {
-        File file = new File(tempDir + "/" + name);
-        file.delete();
-    }
-    
-    @Test
-    public void testReadingFromFile() {
-        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(RDF_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-
-        mGraph = new FileGraph(new Iri(getTempFileUri(TURTLE_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-
-        mGraph = new FileGraph(new Iri(getTempFileUri(NT_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-    }
-    
-    @Test
-    public void testFilter() throws IOException {
-        String fileName = "filter.rdf";
-        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-
-        mGraph.add(new TripleImpl(uriA, uriB, uriC));
-        mGraph.add(new TripleImpl(uriC, uriB, uriA));
-
-        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-        
-        
-        assertEquals(2, mGraph.size());
-        Iterator<Triple> iterator = mGraph.filter(null, null, null);
-
-        iterator.next();
-        iterator.remove();
-        assertEquals(1, mGraph.size());
-
-        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(1, mGraph.size());
-        deleteTempFile(fileName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
deleted file mode 100644
index aeff78d..0000000
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import java.util.Set;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-
-import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.core.test.TcProviderTest;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author mir
- */
-public class FileTcProviderTest extends TcProviderTest {
-    private static final String FILE_PROTOCOL = "file://";
-    private static String tempDir = System.getProperty("java.io.tmpdir");
-    private static String testDir = tempDir + "/FileTcProviderTest";
-    
-    
-    @Override
-    protected Iri generateUri(String name) {
-            String prefix = testDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
-        String path =  prefix + testDir.replace('\\', '/') + "/";
-        return new Iri(path + name + ".rdf");
-    }
-
-    @Before
-    public void setupDirectory() {
-        FileUtil.setUpEmptyDirectory(testDir);
-    }
-
-    @After
-    public void deleteDataFile() {
-        FileUtil.delete(FileTcProvider.dataFile);
-    }
-    
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testCreateImmutableGraph() {
-        super.testCreateImmutableGraph();
-    }
-    
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testCreateImmutableGraphExtended() throws Exception {
-        super.testCreateImmutableGraphExtended();
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testGetImmutableGraph() {
-        super.testGetImmutableGraph();
-    }
-
-    
-    @Test
-    @Override
-    public void testGetTriples() {
-        TcProvider fileTcProvider = getInstance();
-        // add Graphs
-        Graph mGraph = new SimpleGraph();
-        // add Graphs
-        mGraph = fileTcProvider.createGraph(uriRefA1);
-        mGraph.add(new TripleImpl(uriRefA1, uriRefA1, uriRefA1));
-        mGraph = fileTcProvider.createGraph(uriRefB1);
-        mGraph.add(new TripleImpl(uriRefB1, uriRefB1, uriRefB1));
-
-        // get a Graph
-        Graph tripleCollection2 = fileTcProvider.getGraph(uriRefB1);
-
-        Iterator<Triple> iterator = tripleCollection2.iterator();
-        assertEquals(new TripleImpl(uriRefB1, uriRefB1, uriRefB1), iterator.next());
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    @Override
-    public void testDeleteEntity() {
-        TcProvider fileTcProvider = getInstance();
-        Graph mGraph = fileTcProvider.createGraph(uriRefA);
-        mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
-        fileTcProvider.deleteGraph(uriRefA);
-        try {
-            fileTcProvider.getGraph(uriRefA);
-            assertTrue(false);
-        } catch (NoSuchEntityException e) {
-            assertTrue(true);
-        }
-        fileTcProvider = getInstance();
-        try {
-            fileTcProvider.getGraph(uriRefA);
-            assertTrue(false);
-        } catch (NoSuchEntityException e) {
-            assertTrue(true);
-        }
-    }
-
-    @Override
-    protected TcProvider getInstance() {
-        FileTcProvider fileTcProvider = new FileTcProvider();
-        return fileTcProvider;
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    public void testGetNames() {
-        //super.testGetNames();
-        getInstance().getNames(new SimpleGraph().getImmutableGraph());
-    }
-
-    
-    /*@Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testCreateGraphExtended() throws Exception {
-        super.testCreateGraphExtended();
-    }*/
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testCreateGraphNoDuplicateNames() throws Exception {
-        super.testCreateGraphNoDuplicateNames();
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testCreateGraphWithInitialCollection() throws Exception {
-        super.testCreateGraphWithInitialCollection();
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testGraphIsNotMutable() throws Exception {
-        super.testGraphIsNotMutable();
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testGraphDeletion() throws Exception {
-        super.testGraphDeletion();
-    }
-
-    @Test(expected=UnsupportedOperationException.class)
-    @Override
-    public void testGetTriplesGraph() throws Exception {
-        super.testGetTriples();
-    }
-
-    @Test
-    public void testDataFile() {
-        TcProvider provider = getInstance();
-        provider.createGraph(uriRefA);
-        File dataFile = new File("data");
-        assertTrue(dataFile.exists());
-
-        Set<String> expected = new HashSet<String>();
-        expected.add(uriRefA.getUnicodeString());
-        assertTrue(expected.equals(getLinesFromFile(dataFile)));
-
-        provider.createGraph(uriRefB);
-        expected.add(uriRefB.getUnicodeString());
-        assertTrue(expected.equals(getLinesFromFile(dataFile)));
-    
-        provider.deleteGraph(uriRefA);
-        expected.remove(uriRefA.getUnicodeString());
-        assertTrue(expected.equals(getLinesFromFile(dataFile)));
-        
-        provider.deleteGraph(uriRefB);
-        expected.remove(uriRefB.getUnicodeString());
-        assertTrue(expected.equals(getLinesFromFile(dataFile)));
-    }
-
-    @Test
-    public void testAutoGraphCreationFromExistingFile() throws Exception{
-        FileGraphTest.setup();
-        TcProvider provider = getInstance();
-        Graph mGraph = provider.getGraph(new Iri(
-                FileGraphTest.getTempFileUri(FileGraphTest.RDF_FILE_NAME)));
-        assertEquals(2 ,mGraph.size());
-        FileGraphTest.cleanUp();
-    }
-    
-    private Set<String> getLinesFromFile(File file) throws RuntimeException {
-        try {
-            FileInputStream fstream = new FileInputStream(file);
-            DataInputStream in = new DataInputStream(fstream);
-            BufferedReader br = new BufferedReader(new InputStreamReader(in));
-            String strLine;
-            Set<String> lines = new HashSet<String>();
-            while ((strLine = br.readLine()) != null) {
-                lines.add(strLine);
-            }
-            in.close();
-            return lines;
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
deleted file mode 100644
index e163f8a..0000000
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.File;
-
-/**
- *
- * @author mir
- */
-public class FileUtil {
-
-     /**
-     * Sets up a new <code>SesameGraph</code>.
-     * @param testName  Name of the test to support.
-     * @throws RepositoryException  If it failed to activate the graph.
-     */
-    public static void setUpEmptyDirectory(String directory) {
-        final File dataDir= new File(directory);
-        dataDir.mkdirs();
-        cleanDirectory(dataDir);
-    }
-
-
-    /**
-     * Cleans the content of the specified directory recursively.
-     * @param dir  Abstract path denoting the directory to clean.
-     */
-    public static void cleanDirectory(File dir) {
-        File[] files= dir.listFiles();
-        if (files!=null && files.length>0) {
-            for (File file: files) {
-                delete(file);
-            }
-        }
-    }
-
-    /**
-     * Deletes the specified file or directory.
-     * @param file  Abstract path denoting the file or directory to clean.
-     */
-    public static void delete(File file) {
-        if (file.isDirectory()) {
-            cleanDirectory(file);
-        }
-        file.delete();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt b/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
deleted file mode 100644
index 414e4b8..0000000
--- a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
+++ /dev/null
@@ -1,2 +0,0 @@
-_:genid1 <http://example.org/base#a> <http://example.org/base#b> .
-<http://example.org/base#c> <http://example.org/base#d> _:genid2 .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf b/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
deleted file mode 100644
index d046a1b..0000000
--- a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-    xmlns:j.0="http://example.org/base#" > 
-  <rdf:Description rdf:about="http://example.org/base#c">
-    <j.0:d rdf:nodeID="A0"/>
-  </rdf:Description>
-  <rdf:Description rdf:nodeID="A1">
-    <j.0:a rdf:resource="http://example.org/base#b"/>
-  </rdf:Description>
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl b/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
deleted file mode 100644
index c518147..0000000
--- a/rdf.file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
+++ /dev/null
@@ -1,4 +0,0 @@
-# Test empty [] operator; not allowed as predicate
-@prefix : <http://example.org/base#> .
-[] :a :b .
-:c :d [] .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.rdfa/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.rdfa/LICENSE b/rdf.rdfa/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.rdfa/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.storage.web/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.storage.web/LICENSE b/rdf.storage.web/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.storage.web/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.storage.web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.storage.web/pom.xml b/rdf.storage.web/pom.xml
deleted file mode 100644
index 4315683..0000000
--- a/rdf.storage.web/pom.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>clerezza</artifactId>
-        <version>7-SNAPSHOT</version>
-        <relativePath />
-    </parent>
-    <artifactId>rdf.storage.web</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - RDF Storage Web (Caching Web Storage Provider)</name>
-    <description>A (currently read-only) storage provider retrieving graphs from the web. It
-        implements a caching proxy, relying on another provider for storing triples.</description>
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.scala.utils</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>osgi.services</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-          <groupId>org.scala-lang</groupId>
-          <artifactId>scala-library</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.clerezza.ext</groupId>
-          <artifactId>slf4j-scala-api</artifactId>
-            <version>1.6.3</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <sourceDirectory>src/main/scala</sourceDirectory>
-        <testSourceDirectory>src/test/scala</testSourceDirectory>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
-                        <Export-Package>${project.groupId}.${project.artifactId}</Export-Package>
-                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-eclipse-plugin</artifactId>
-                <configuration>
-                    <downloadSources>true</downloadSources>
-                    <downloadJavadocs>true</downloadJavadocs>
-                    <buildcommands>
-                        <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
-                    </buildcommands>
-                    <additionalProjectnatures>
-                        <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
-                    </additionalProjectnatures>
-                    <classpathContainers>
-                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
-                        </classpathContainer>
-                        <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER
-                        </classpathContainer>
-                    </classpathContainers>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file


[63/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/LICENSE b/rdf.web/rdf.web.ontologies/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.web/rdf.web.ontologies/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/pom.xml b/rdf.web/rdf.web.ontologies/pom.xml
deleted file mode 100644
index 1713a43..0000000
--- a/rdf.web/rdf.web.ontologies/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>clerezza</artifactId>
-        <version>7-SNAPSHOT</version>
-        <relativePath />
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>rdf.web.ontologies</artifactId>
-    <packaging>bundle</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - SCB Web Access Ontologies</name>
-    <description>Ontologies defined for local use in SCB Web Access</description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.clerezza</groupId>
-                <artifactId>maven-ontologies-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <configuration>
-                            <resourcePath>${basedir}/src/main/resources</resourcePath>
-                            <sources>
-                                <source>${basedir}/target/generated-sources/main/java</source>
-                            </sources>
-                        </configuration>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>1.0.0-SNAPSHOT</version>
-        </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf b/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
deleted file mode 100644
index 17d70ee..0000000
--- a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF xmlns="http://clerezza.org/2009/11/backup#"
-	xml:base="http://clerezza.org/2009/11/backup"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
-	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2009/11/backup#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Clerezza Backup
-	</dc:title>
-</owl:Ontology>
-
-<!-- Classes -->
-<rdfs:Class rdf:about="#Graph">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Graph</rdfs:label>
-	<skos:definition xml:lang="en">An RDF graph.</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#MGraph">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">MGraph</rdfs:label>
-	<skos:definition xml:lang="en">A mutable RDF graph.</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#BackupAdminPage">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">BackupAdminPage</rdfs:label>
-	<skos:definition xml:lang="en">The administrative page to get backups and restore from backups.</skos:definition>
-</rdfs:Class>
-
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="#file">
-	<rdf:type rdf:resource="owl:DatatypeProperty" />
-	<rdfs:label xml:lang="en">file</rdfs:label>
-	<skos:definition xml:lang="en">Points to the backup filename of the subject.
-	</skos:definition>
-	<rdfs:domain rdf:resource="#Graph"/>
-	<rdfs:range rdf:resource="xsd:string"/>
-</rdf:Property>
-
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf b/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
deleted file mode 100644
index 3368915..0000000
--- a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF xmlns="http://clerezza.org/2010/03/graph-management#"
-	xml:base="http://clerezza.org/2010/03/graph-management"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
-	xmlns:tcp="http://clerezza.org/2009/06/tcprovider#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2010/03/graph-management#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Ontology for Graph Management Page related concepts
-	</dc:title>
-</owl:Ontology>
-
-<!-- Classes -->
-<rdfs:Class rdf:about="#GraphManagementPage">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">GraphManagementPage</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page fro managing triple collections
-	</skos:definition>
-</rdfs:Class>
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="#tripleCollection">
-	<rdf:type rdf:resource="owl:ObjectProperty" />
-	<rdfs:label xml:lang="en">tripleCollection</rdfs:label>
-	<skos:definition xml:lang="en">Points to a Triple Collection.
-	</skos:definition>
-	<rdfs:range rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#size">
-	<rdf:type rdf:resource="owl:DatatypeProperty" />
-	<rdfs:label xml:lang="en">size</rdfs:label>
-	<skos:definition xml:lang="en">The size (in triples) of a Triple Collection
-	</skos:definition>
-	<rdfs:domain rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
-</rdf:Property>
-
-</rdf:RDF>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf b/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
deleted file mode 100644
index 60dc58d..0000000
--- a/rdf.web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF xmlns="http://clerezza.org/2009/11/sparql-endpoint#"
-	xml:base="http://clerezza.org/2009/11/sparql-endpoint"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
-	xmlns:tcp="http://clerezza.org/2009/06/tcprovider#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2009/11/sparql-endpoint#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Clerezza Sparql-Endpoint
-	</dc:title>
-</owl:Ontology>
-
-<!-- Classes -->
-<rdfs:Class rdf:about="#SparqlEndpoint">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">SparqlEndpoint</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page containing a form for entering a SPARQL query.
-	</skos:definition>
-</rdfs:Class>
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="#tripleCollection">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
-	<rdfs:label xml:lang="en">tripleCollection</rdfs:label>
-	<skos:definition xml:lang="en">Points to a Triple Collection.
-	</skos:definition>
-	<rdfs:range rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
-</rdf:Property>
-
-</rdf:RDF>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/LICENSE
----------------------------------------------------------------------
diff --git a/rdf/file.storage/LICENSE b/rdf/file.storage/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rdf/file.storage/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/file.storage/pom.xml b/rdf/file.storage/pom.xml
new file mode 100644
index 0000000..4932a7c
--- /dev/null
+++ b/rdf/file.storage/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+     <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>rdf.file.storage</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - RDF File Storage Provider</name>
+    <description>A file base storage provider</description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core.test</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.parser</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.serializer</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
new file mode 100644
index 0000000..e9143f9
--- /dev/null
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Collection;
+
+import java.util.Iterator;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+
+/**
+ *
+ * @author mir
+ */
+public class FileGraph extends SimpleGraph {
+
+    private Serializer serializer;
+    private File file;
+    private String fileType;
+
+    FileGraph(Iri uri, Parser parser,
+            Serializer serializer) {
+        this(new File(URI.create(uri.getUnicodeString())), parser, serializer);    
+    }
+
+    public FileGraph(File file, Parser parser, Serializer serializer) {
+        this.file = file;
+        String fileEnding = extractFileEnding(file.getPath());
+        fileType = getMediaTypeForFileEnding(fileEnding);
+        this.serializer = serializer;
+        try {
+            if (file.exists() && file.length() != 0) {
+                InputStream fio = new FileInputStream(file);
+                ImmutableGraph graph = parser.parse(fio, fileType);
+                addAllNoFileAccess(graph);
+            } else {
+                file.createNewFile();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    @Override
+    public boolean add(Triple e) {
+        boolean result = super.add(e);
+        writeToFile();
+        return result;
+    }
+    
+    @Override
+    public boolean addAll(Collection<? extends Triple> c) {
+        boolean modified = addAllNoFileAccess(c);
+        writeToFile();
+        return modified;
+    }
+
+    @Override
+    public boolean remove(Object o) {
+        Iterator<Triple> e = super.filter(null, null, null);
+        while (e.hasNext()) {
+            if (o.equals(e.next())) {
+                e.remove();
+                writeToFile();
+                return true;
+            }
+        }        
+        return false;
+    }
+
+    @Override
+    public boolean removeAll(Collection<?> c) {
+        boolean modified = false;
+        Iterator<Triple> e = super.filter(null, null, null);
+        while (e.hasNext()) {
+            if (c.contains(e.next())) {
+                e.remove();
+                modified = true;
+            }            
+        }
+        writeToFile();
+        return modified;
+    }
+
+    @Override
+    public boolean retainAll(Collection<?> c) {
+        boolean result = super.retainAll(c);
+        writeToFile();
+        return result;
+    }
+    
+    @Override
+    public Iterator<Triple> filter(final BlankNodeOrIri subject,
+            final Iri predicate,
+            final RdfTerm object) {
+        final Iterator<Triple> baseIter = super.filter(subject, predicate, object);
+        Iterator<Triple> iterator = new Iterator<Triple>() {
+
+            @Override
+            public boolean hasNext() {
+                return baseIter.hasNext();
+            }
+
+            @Override
+            public Triple next() {
+                return baseIter.next();
+            }
+
+            @Override
+            public void remove() {
+                baseIter.remove();
+                writeToFile();
+            }
+
+        };
+        return iterator;
+    }
+
+    private boolean addAllNoFileAccess(Collection<? extends Triple> c) {
+        boolean modified = false;
+        Iterator<? extends Triple> e = c.iterator();
+        while (e.hasNext()) {
+            if (super.add(e.next())) {
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+    private String extractFileEnding(String uriString) {
+        String fileEnding = uriString.substring(uriString.lastIndexOf(".") + 1, uriString.length());
+        return fileEnding;
+    }
+
+    private String getMediaTypeForFileEnding(String fileEnding) {
+        if (fileEnding.equals("rdf")) {
+            return SupportedFormat.RDF_XML;
+        }
+        if (fileEnding.equals("nt")) {
+            return SupportedFormat.N_TRIPLE;
+        }
+        if (fileEnding.equals("ttl")) {
+            return SupportedFormat.TURTLE;
+        }
+        if (fileEnding.equals("n3")) {
+            return SupportedFormat.N3;
+        }
+        return null;
+    }
+
+    private void writeToFile() {
+        synchronized(this) {
+            OutputStream out;
+            try {
+                out = new FileOutputStream(file);
+            } catch (FileNotFoundException ex) {
+                throw new RuntimeException(ex);
+            }
+            try {
+                serializer.serialize(out, this, fileType);
+            } finally {
+                try {
+                    out.close();
+                } catch (IOException ex) {
+                    throw new RuntimeException(ex);
+                }
+            }
+        }
+    }
+
+    public void delete() {
+        file.delete();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
new file mode 100644
index 0000000..0b4fd33
--- /dev/null
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.osgi.service.component.ComponentContext;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
+import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+
+/**
+ * The <code>FileTcProvider</code> is a <code>WeightedTcProvider</code> that
+ * stores <code>Graph</code>S in the file system. <code>ImmutableGraph</code>S are not
+ * supported.
+ * The <code>Iri</code> of a Graph is location of the file in the file system
+ * (e.g. "file:///home/user/myGraph.rdf"). The format of the rdf data in the file
+ * depends on the file ending, for example ".rdf" or ".ttl".
+ * <code>FileTcProvider</code> uses
+ * <code>org.apache.clerezza.rdf.core.serializedform.Parser</code> and
+ * <code>org.apache.clerezza.rdf.core.serializedform.Serializer</code> for
+ * parsing and serialization, therefore the supported formats depend on the
+ * availability of these services.
+ * The default weight of the provider is 300.
+ *
+ * @scr.component
+ * @scr.service interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"
+ * @scr.property name="weight" type="Integer" value="300"
+ * 
+ * @author mir
+ */
+public class FileTcProvider implements WeightedTcProvider {
+
+    /**
+     * @scr.reference
+     */
+    private Parser parser;
+    /**
+     * @scr.reference
+     */
+    private Serializer serializer;
+    
+    private Map<Iri, FileGraph> uriRef2GraphMap =
+            new HashMap<Iri, FileGraph>();
+
+    protected static File dataFile = new File("data");
+
+    boolean initialized = false;
+
+    private int weight = 300;
+
+
+    public FileTcProvider() {
+        this.parser = Parser.getInstance();
+        this.serializer = Serializer.getInstance();
+    }
+
+    protected void activate(final ComponentContext componentContext) {
+        weight = (Integer) componentContext.getProperties().get("weight");
+        dataFile = componentContext.getBundleContext().
+                        getDataFile("data");
+    }
+
+    @Override
+    public int getWeight() {
+        return weight;
+    }
+
+    @Override
+    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+        throw new NoSuchEntityException(name);
+    }
+
+    /**
+     * Get an <code>Graph</code> by its name. If the file at the specified
+     * location already exists, then a Graph is returned even though it was not
+     * created with createGraph().
+     *
+     * @param the name of the <code>Graph</code>
+     * @return name the <code>Graph</code> with the specified name
+     * @throws NoSuchEntityException if there is no <code>Graph</code>
+     *         with the specified name or the file didn't exist.
+     */
+    @Override
+    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+        initialize();
+        Graph mGraph = uriRef2GraphMap.get(name);
+        if (mGraph == null) {
+            final String uriString = name.getUnicodeString();
+            if (!uriString.startsWith("file:")) {
+                throw new NoSuchEntityException(name);
+            }
+            File file = new File(URI.create(uriString));
+            if (file.exists()) {
+                return createGraph(name);
+            } else {
+                throw new NoSuchEntityException(name);
+            }            
+        }
+        return mGraph;
+    }
+
+    @Override
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
+        return getMGraph(name);
+    }
+
+    @Override
+    public Set<Iri> listImmutableGraphs() {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    @Override
+    public Set<Iri> listMGraphs() {
+        initialize();
+        return uriRef2GraphMap.keySet();
+    }
+
+    @Override
+    public Set<Iri> listGraphs() {
+        return listMGraphs();
+    }
+
+
+    @Override
+    public Graph createGraph(Iri name) throws 
+            UnsupportedOperationException, EntityAlreadyExistsException {
+        initialize();
+        if (uriRef2GraphMap.containsKey(name)) {
+            throw new EntityAlreadyExistsException(name);
+        }
+        FileGraph mGraph = new FileGraph(name, parser, serializer);
+        uriRef2GraphMap.put(name, mGraph);
+        writeDataFile();
+        return mGraph;
+    }
+
+    @Override
+    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws
+            UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    @Override
+    public void deleteGraph(Iri name) throws 
+            UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
+        initialize();
+        FileGraph mGraph = (FileGraph)getGraph(name);
+        mGraph.delete();
+        uriRef2GraphMap.remove(name);
+        writeDataFile();
+    }
+
+    @Override
+    public Set<Iri> getNames(ImmutableGraph graph) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    private void initialize() throws RuntimeException {
+        if (!initialized) {
+            readDataFile();
+            initialized = true;
+        }
+    }
+
+    private void readDataFile() throws RuntimeException {
+        try {
+            if (dataFile.exists()) {
+                FileInputStream fstream = new FileInputStream(dataFile);
+                DataInputStream in = new DataInputStream(fstream);
+                BufferedReader br = new BufferedReader(new InputStreamReader(in));
+                String strLine;
+                while ((strLine = br.readLine()) != null) {
+                    Iri uriRef = new Iri(strLine);
+                    uriRef2GraphMap.put(uriRef, new FileGraph(uriRef, parser, serializer));
+                }
+                in.close();
+            } else {
+                dataFile.createNewFile();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    private void writeDataFile() {
+        FileOutputStream fout = null;
+        try {
+            fout = new FileOutputStream(dataFile);
+            for (Iri uri : uriRef2GraphMap.keySet()) {
+                fout.write((uri.getUnicodeString() + "\n").getBytes());
+            }
+        } catch (FileNotFoundException ex) {
+            throw new RuntimeException(ex);
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+        finally {
+            try {
+                fout.close();
+            } catch (IOException ex) {
+                Logger.getLogger(FileTcProvider.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider b/rdf/file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
new file mode 100644
index 0000000..cd429a2
--- /dev/null
+++ b/rdf/file.storage/src/main/resources/META-INF/services/org.apache.clerezza.rdf.core.access.WeightedTcProvider
@@ -0,0 +1 @@
+org.apache.clerezza.rdf.file.storage.FileTcProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
new file mode 100644
index 0000000..e24edb9
--- /dev/null
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Iterator;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author mir
+ */
+public class FileGraphTest {
+
+    private static String tempDir = System.getProperty("java.io.tmpdir");
+    private static final String FILE_PROTOCOL = "file://";
+
+    protected static final String NT_FILE_NAME = "test-04.nt";
+    protected static final String RDF_FILE_NAME = "test-04.rdf";
+    protected static final String TURTLE_FILE_NAME = "test-04.ttl";
+
+    private static final Iri uriA = new Iri("http://example.com/a");
+    private static final Iri uriB = new Iri("http://example.com/b");
+    private static final Iri uriC = new Iri("http://example.com/c");
+
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        createTempFileFromRdfTerm(NT_FILE_NAME);
+        createTempFileFromRdfTerm(RDF_FILE_NAME);
+        createTempFileFromRdfTerm(TURTLE_FILE_NAME);
+    }
+
+    @AfterClass
+    public static void cleanUp() throws Exception {
+        deleteTempFile(NT_FILE_NAME);
+        deleteTempFile(RDF_FILE_NAME);
+        deleteTempFile(TURTLE_FILE_NAME);
+    }
+
+    private static void createTempFileFromRdfTerm(String resourceName) 
+            throws FileNotFoundException, IOException {
+        InputStream in = FileTcProviderTest.class.getResourceAsStream(resourceName);
+        File file = new File(URI.create(getTempFileUri(resourceName)));
+        FileOutputStream fout = new FileOutputStream(file);
+        int inByte;
+        while ((inByte = in.read()) != -1) {
+            fout.write(inByte);
+        }
+    }
+    
+    protected static String getTempFileUri(String name) {
+                String prefix = tempDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
+        return prefix + tempDir.replace(File.separatorChar, '/') + "/" + name;
+    }
+
+    private static void deleteTempFile(String name)
+            throws FileNotFoundException, IOException {
+        File file = new File(tempDir + "/" + name);
+        file.delete();
+    }
+    
+    @Test
+    public void testReadingFromFile() {
+        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(RDF_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(TURTLE_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(NT_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+    }
+    
+    @Test
+    public void testFilter() throws IOException {
+        String fileName = "filter.rdf";
+        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+
+        mGraph.add(new TripleImpl(uriA, uriB, uriC));
+        mGraph.add(new TripleImpl(uriC, uriB, uriA));
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+        
+        
+        assertEquals(2, mGraph.size());
+        Iterator<Triple> iterator = mGraph.filter(null, null, null);
+
+        iterator.next();
+        iterator.remove();
+        assertEquals(1, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(1, mGraph.size());
+        deleteTempFile(fileName);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
new file mode 100644
index 0000000..aeff78d
--- /dev/null
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
@@ -0,0 +1,233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import java.util.Set;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+
+import org.apache.clerezza.rdf.core.access.TcProvider;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.core.test.TcProviderTest;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author mir
+ */
+public class FileTcProviderTest extends TcProviderTest {
+    private static final String FILE_PROTOCOL = "file://";
+    private static String tempDir = System.getProperty("java.io.tmpdir");
+    private static String testDir = tempDir + "/FileTcProviderTest";
+    
+    
+    @Override
+    protected Iri generateUri(String name) {
+            String prefix = testDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
+        String path =  prefix + testDir.replace('\\', '/') + "/";
+        return new Iri(path + name + ".rdf");
+    }
+
+    @Before
+    public void setupDirectory() {
+        FileUtil.setUpEmptyDirectory(testDir);
+    }
+
+    @After
+    public void deleteDataFile() {
+        FileUtil.delete(FileTcProvider.dataFile);
+    }
+    
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateImmutableGraph() {
+        super.testCreateImmutableGraph();
+    }
+    
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateImmutableGraphExtended() throws Exception {
+        super.testCreateImmutableGraphExtended();
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testGetImmutableGraph() {
+        super.testGetImmutableGraph();
+    }
+
+    
+    @Test
+    @Override
+    public void testGetTriples() {
+        TcProvider fileTcProvider = getInstance();
+        // add Graphs
+        Graph mGraph = new SimpleGraph();
+        // add Graphs
+        mGraph = fileTcProvider.createGraph(uriRefA1);
+        mGraph.add(new TripleImpl(uriRefA1, uriRefA1, uriRefA1));
+        mGraph = fileTcProvider.createGraph(uriRefB1);
+        mGraph.add(new TripleImpl(uriRefB1, uriRefB1, uriRefB1));
+
+        // get a Graph
+        Graph tripleCollection2 = fileTcProvider.getGraph(uriRefB1);
+
+        Iterator<Triple> iterator = tripleCollection2.iterator();
+        assertEquals(new TripleImpl(uriRefB1, uriRefB1, uriRefB1), iterator.next());
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    @Override
+    public void testDeleteEntity() {
+        TcProvider fileTcProvider = getInstance();
+        Graph mGraph = fileTcProvider.createGraph(uriRefA);
+        mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
+        fileTcProvider.deleteGraph(uriRefA);
+        try {
+            fileTcProvider.getGraph(uriRefA);
+            assertTrue(false);
+        } catch (NoSuchEntityException e) {
+            assertTrue(true);
+        }
+        fileTcProvider = getInstance();
+        try {
+            fileTcProvider.getGraph(uriRefA);
+            assertTrue(false);
+        } catch (NoSuchEntityException e) {
+            assertTrue(true);
+        }
+    }
+
+    @Override
+    protected TcProvider getInstance() {
+        FileTcProvider fileTcProvider = new FileTcProvider();
+        return fileTcProvider;
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    public void testGetNames() {
+        //super.testGetNames();
+        getInstance().getNames(new SimpleGraph().getImmutableGraph());
+    }
+
+    
+    /*@Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateGraphExtended() throws Exception {
+        super.testCreateGraphExtended();
+    }*/
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateGraphNoDuplicateNames() throws Exception {
+        super.testCreateGraphNoDuplicateNames();
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateGraphWithInitialCollection() throws Exception {
+        super.testCreateGraphWithInitialCollection();
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testGraphIsNotMutable() throws Exception {
+        super.testGraphIsNotMutable();
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testGraphDeletion() throws Exception {
+        super.testGraphDeletion();
+    }
+
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testGetTriplesGraph() throws Exception {
+        super.testGetTriples();
+    }
+
+    @Test
+    public void testDataFile() {
+        TcProvider provider = getInstance();
+        provider.createGraph(uriRefA);
+        File dataFile = new File("data");
+        assertTrue(dataFile.exists());
+
+        Set<String> expected = new HashSet<String>();
+        expected.add(uriRefA.getUnicodeString());
+        assertTrue(expected.equals(getLinesFromFile(dataFile)));
+
+        provider.createGraph(uriRefB);
+        expected.add(uriRefB.getUnicodeString());
+        assertTrue(expected.equals(getLinesFromFile(dataFile)));
+    
+        provider.deleteGraph(uriRefA);
+        expected.remove(uriRefA.getUnicodeString());
+        assertTrue(expected.equals(getLinesFromFile(dataFile)));
+        
+        provider.deleteGraph(uriRefB);
+        expected.remove(uriRefB.getUnicodeString());
+        assertTrue(expected.equals(getLinesFromFile(dataFile)));
+    }
+
+    @Test
+    public void testAutoGraphCreationFromExistingFile() throws Exception{
+        FileGraphTest.setup();
+        TcProvider provider = getInstance();
+        Graph mGraph = provider.getGraph(new Iri(
+                FileGraphTest.getTempFileUri(FileGraphTest.RDF_FILE_NAME)));
+        assertEquals(2 ,mGraph.size());
+        FileGraphTest.cleanUp();
+    }
+    
+    private Set<String> getLinesFromFile(File file) throws RuntimeException {
+        try {
+            FileInputStream fstream = new FileInputStream(file);
+            DataInputStream in = new DataInputStream(fstream);
+            BufferedReader br = new BufferedReader(new InputStreamReader(in));
+            String strLine;
+            Set<String> lines = new HashSet<String>();
+            while ((strLine = br.readLine()) != null) {
+                lines.add(strLine);
+            }
+            in.close();
+            return lines;
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
new file mode 100644
index 0000000..e163f8a
--- /dev/null
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.File;
+
+/**
+ *
+ * @author mir
+ */
+public class FileUtil {
+
+     /**
+     * Sets up a new <code>SesameGraph</code>.
+     * @param testName  Name of the test to support.
+     * @throws RepositoryException  If it failed to activate the graph.
+     */
+    public static void setUpEmptyDirectory(String directory) {
+        final File dataDir= new File(directory);
+        dataDir.mkdirs();
+        cleanDirectory(dataDir);
+    }
+
+
+    /**
+     * Cleans the content of the specified directory recursively.
+     * @param dir  Abstract path denoting the directory to clean.
+     */
+    public static void cleanDirectory(File dir) {
+        File[] files= dir.listFiles();
+        if (files!=null && files.length>0) {
+            for (File file: files) {
+                delete(file);
+            }
+        }
+    }
+
+    /**
+     * Deletes the specified file or directory.
+     * @param file  Abstract path denoting the file or directory to clean.
+     */
+    public static void delete(File file) {
+        if (file.isDirectory()) {
+            cleanDirectory(file);
+        }
+        file.delete();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
new file mode 100644
index 0000000..414e4b8
--- /dev/null
+++ b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.nt
@@ -0,0 +1,2 @@
+_:genid1 <http://example.org/base#a> <http://example.org/base#b> .
+<http://example.org/base#c> <http://example.org/base#d> _:genid2 .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
new file mode 100644
index 0000000..d046a1b
--- /dev/null
+++ b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.rdf
@@ -0,0 +1,32 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:j.0="http://example.org/base#" > 
+  <rdf:Description rdf:about="http://example.org/base#c">
+    <j.0:d rdf:nodeID="A0"/>
+  </rdf:Description>
+  <rdf:Description rdf:nodeID="A1">
+    <j.0:a rdf:resource="http://example.org/base#b"/>
+  </rdf:Description>
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
new file mode 100644
index 0000000..c518147
--- /dev/null
+++ b/rdf/file.storage/src/test/resources/org/apache/clerezza/rdf/file/storage/test-04.ttl
@@ -0,0 +1,4 @@
+# Test empty [] operator; not allowed as predicate
+@prefix : <http://example.org/base#> .
+[] :a :b .
+:c :d [] .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/pom.xml b/rdf/pom.xml
index ba6f7e4..de62088 100644
--- a/rdf/pom.xml
+++ b/rdf/pom.xml
@@ -53,7 +53,10 @@
         <module>ontologies</module>
         <module>rdfa</module>
         <module>simple.storage</module>
+        <module>storage.web</module>
+        <module>file.storage</module>
         <module>utils</module>
+        <module>web</module>
     </modules>
 
 </project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/storage.web/LICENSE
----------------------------------------------------------------------
diff --git a/rdf/storage.web/LICENSE b/rdf/storage.web/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rdf/storage.web/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


[34/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/mozile.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/mozile.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/mozile.js
new file mode 100644
index 0000000..fa5bf1c
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/mozile.js
@@ -0,0 +1,1368 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ * Full Terms at http://mozile.mozdev.org/0.8/LICENSE
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is James A. Overton's code (james@overton.ca).
+ *
+ * The Initial Developer of the Original Code is James A. Overton.
+ * Portions created by the Initial Developer are Copyright (C) 2005-2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *	James A. Overton <ja...@overton.ca>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * Comments and white space have been removed from this file to reduce its size.
+ * For full source code see http://mozile.mozdev.org
+ */
+
+/*
+ * This file includes the following Mozile modules: 
+ * core.js, dom.js, xml.js, xpath.js, util.js, dom/TreeWalker.js, dom/InternetExplorerRange.js, dom/InternetExplorerSelection.js, rng.js, edit.js, edit/InsertionPoint.js, edit/rich.js, event.js, save.js, save/tidy.js, save/extract.js, gui.js, gui/htmlToolbar.js
+ */
+
+var mozile={window:window,document:document,filesep:"/",linesep:"\n",root:""}
+mozile.version={major:"0",minor:"8",micro:"0",flag:"a1",toString:function(){return this.major+"."+this.minor+"."+this.micro+this.flag;}}
+mozile.about="Mozile is a WYSIWYG inline edtior for XHTML and XML+CSS files.";mozile.copyright="Copyright 2006, The Mozile Team";mozile.license="MPL 1.1/GPL 2.0/LGPL 2.1, http://mozile.mozdev.org/0.8/LICENSE";mozile.homepage="http://mozile.mozdev.org";mozile.credits="James A. Overton, Conor Dowling, Max d'Ayala, Christian Stocker, Paul Everitt, David Palm, Richard Prescott, Lars Kiilerich, Kingsley Kerse, Tobias Minich, Andreas Schamberger, and others...";mozile.acknowledgements="Icons created by Mark James <http://www.famfamfam.com/lab/icons/silk/>";mozile.precompiled=true;mozile.deferRequirements=true;mozile.help=["doc","html","index.html"].join(mozile.filesep);mozile.useDesignMode=false;mozile.defaultNS=null;mozile.emptyToken="\u00A0";mozile.alternateSpace=null;mozile.updateInterval=500;mozile.load=function(uri){var XHR;try{if(window.XMLHttpRequest){XHR=new XMLHttpRequest();XHR.open("GET",uri,false);XHR.send(null);}
+else if(window.ActiveXObject){XHR=new ActiveXObject('Microsoft.XMLHTTP');XHR.open("GET",uri,false);XHR.send();}}catch(e){if(mozile.debug)mozile.debug.inform("mozile.load","File load failed loading '"+uri+"' with error message:\n"+e);return null;}
+if(XHR){if(XHR.status==0||XHR.status==200)return XHR.responseText;else{if(mozile.debug)mozile.debug.inform("mozile.load","File load failed with status '"+XHR.status+"' and message:\n"+XHR.responseText);return null;}}
+if(mozile.debug)mozile.debug.inform("mozile.load","No XMLHttpRequest available when trying to load '"+uri+"'.");return null;}
+mozile.findRoot=function(){var scripts=document.getElementsByTagName("script");var matches=["mozile.js","mozile-src.js"];var src,index,i,j;for(i=0;i<scripts.length;i++){src=scripts[i].getAttribute("src");if(!src)continue;for(j=0;j<matches.length;j++){index=src.indexOf(matches[j]);if(index>-1)return src.substring(0,index);}}
+return"";}
+mozile.root=mozile.findRoot();mozile.findModule=function(moduleName){var levels=moduleName.split(".");var current=mozile.window;for(var i=0;i<levels.length;i++){if(!current[levels[i]])return null;current=current[levels[i]];}
+return current;}
+mozile.loadModule=function(moduleName){if(!moduleName)return false;var filename=mozile.root+mozile.filesep;var levels=moduleName.split(".");for(var i=0;i<levels.length;i++){if(levels[i]=="*")levels=levels.splice(i,1);}
+if(levels[0]&&levels[0]=="mozile"){levels.shift();if(levels[0]&&levels[0]=="test"){levels.shift();filename+="tests"+mozile.filesep;}
+else filename+="src"+mozile.filesep;}
+else return false;if(levels.length==0)return false;while(levels.length>1){filename+=levels.shift()+mozile.filesep;}
+filename+=levels.pop()+".js";var file=mozile.load(filename);if(!file&&mozile.test&&mozile.test.root){filename=filename.replace(mozile.root,mozile.test.root);file=mozile.load(filename);}
+if(!file){var parent=moduleName.substring(0,moduleName.lastIndexOf("."));return mozile.loadModule(parent);}
+try{eval(file);return true;}catch(e){mozile.debug.inform("mozile.loadModule","Error evaluating module '"+moduleName+"' in file '"+filename+"'.\n"+mozile.dumpError(e));return false;}}
+mozile.deferrals=new Array();mozile.require=function(moduleName){if(!mozile.findModule(moduleName)){if(mozile.deferRequirements){mozile.deferrals.push(moduleName);return false;}
+return mozile.loadModule(moduleName);}
+else return false;}
+mozile.loadDeferred=function(){while(mozile.deferrals.length){mozile.require(mozile.deferrals.shift());}}
+mozile.provide=function(){}
+mozile.Module=function(){};mozile.isPathAbsolute=function(path){if(!path)return false;path=path.toString();if(path.indexOf(":")==-1)return false;var protocol=path.substring(0,path.indexOf(":"));switch(protocol){case"http":case"https":case"file":return true;}
+return false;}
+mozile.getPath=function(url){if(!url)return"";url=url.toString();if(url.indexOf("?")>-1)url=url.substring(0,url.indexOf("?"));return url;}
+mozile.getDirectory=function(path){if(!path)return"";path=path.toString();path=mozile.getPath(path);var partial;if(path.indexOf(mozile.filesep)>-1){if(path.indexOf(":///")>-1){partial=path.substring(path.indexOf(":///")+4);if(partial.indexOf(mozile.filesep)==-1)return path;}
+else if(path.indexOf("://")>-1){partial=path.substring(path.indexOf("://")+3);if(partial.indexOf(mozile.filesep)==-1)return path;}
+return path.substring(0,path.lastIndexOf(mozile.filesep)+1);}
+return path;}
+mozile.getAbsolutePath=function(path,root){if(!path)return"";path=path.toString();if(mozile.isPathAbsolute(path))return path;if(!root)root=location;root=mozile.getDirectory(root);root=mozile.getAbsolutePath(root);return mozile.joinPaths(root,path);}
+mozile.joinPaths=function(){var path="";var part;for(var i=0;i<arguments.length;i++){part=arguments[i];if(typeof(part)!="string")continue;if(path){if(path.charAt(path.length-1)==mozile.filesep){if(part.charAt(0)==mozile.filesep)
+part=part.substring(1);}
+else{if(part.charAt(0)!=mozile.filesep)
+part=mozile.filesep+part;}}
+path+=part;}
+return path;}
+mozile.debug=new Object();mozile.debug.prototype=new mozile.Module;mozile.debug.alertLevel="suppress";mozile.debug.logLevel="inform";mozile.debug.messages=new Array();mozile.debug.window=null;mozile.debug.isSelected=function(type,level){if(typeof(type)!="string")return false;type=type.toLowerCase();var checkLevel;if(type=="alert")checkLevel=mozile.debug.alertLevel;else if(type=="log")checkLevel=mozile.debug.logLevel;else return false;checkLevel=checkLevel.toLowerCase();if(typeof(level)!="string")return false;level=level.toLowerCase();if(checkLevel=="suppress")return false;if(checkLevel=="warn"){if(level=="warn")return true;else return false;}
+if(checkLevel=="inform"){if(level=="warn"||level=="inform")return true;else return false;}
+if(checkLevel=="debug")return true;return false;}
+mozile.debug.warn=function(caller,message){var level="warn";var msg="Mozile Warning ["+caller+"] "+message;if(mozile.debug.isSelected("alert",level)){if(window.warn)warn(msg);else mozile.alert(msg);}
+if(mozile.debug.isSelected("log",level)){mozile.debug.log(caller,level,message);}}
+mozile.debug.inform=function(caller,message){var level="inform";var msg="Mozile Information ["+caller+"] "+message;if(mozile.debug.isSelected("alert",level)){if(window.inform)inform(msg);else mozile.alert(msg);}
+if(mozile.debug.isSelected("log",level)){mozile.debug.log(caller,level,message);}}
+mozile.debug.debug=function(caller,message){var level="debug";var msg="Mozile Debugging ["+caller+"] "+message;if(mozile.debug.isSelected("alert",level)){if(window.debug)debug(msg);else mozile.alert(msg);}
+if(mozile.debug.isSelected("log",level)){mozile.debug.log(caller,level,message);}}
+mozile.debug.log=function(caller,level,message){var date=new Date();var msg={caller:caller,level:level,message:message,date:date.toLocaleString(),toString:function(){return this.level.toUpperCase()+" ("+this.date+") ["+this.caller+"] "+this.message;}};mozile.debug.messages.push(msg);if(mozile.debug.window&&mozile.debug.window.document){mozile.debug.window.document.write(msg+"<br/>\n");mozile.debug.window.scroll(0,document.body.clientHeight);}}
+mozile.debug.show=function(){if(!mozile.debug.window||!mozile.debug.window.document){mozile.debug.window=window.open("","MozileDebugging","");mozile.debug.window.document.write("<h3>Mozile Debugging Messages</h3>");mozile.debug.window.document.write(mozile.debug.messages.join("<br/>\n")+"<br/>\n");}
+else mozile.debug.window=window.open("","MozileDebugging","");}
+mozile.alert=function(message){alert(message);}
+mozile.dumpError=function(object){if(typeof(object)=="string")return object;if(!mozile.browser.isIE)return object.toString();var fields;if(object&&object.description){fields=["Name: "+object.name,"Number: "+object.number,"Message: "+object.message,"Description: "+object.description,];return fields.join("\n");}
+if(!object)object=document;if(!object.parseError)object=document;if(!object.parseError)object=window;if(!object.parseError)return"[No error to parse]";fields=["Error Code: "+object.parseError.errorCode,"File Position: "+object.parseError.filepos,"Line: "+object.parseError.line,"Line Position: "+object.parseError.linepos,"Reason: "+object.parseError.reason,"Source Text: "+object.parseError.srcText,"Url: "+object.parseError.url];return fields.join("\n");}
+mozile.editElement=function(elementOrId){var element;if(typeof(elementOrId)=="string"){if(document.documentElement.nodeName.toLowerCase()=="html"){element=document.getElementById(elementOrId);}
+else{mozile.require("mozile.dom");var results=mozile.dom.getElements("id",elementOrId,null,true);if(results.length)element=results[0];else return false;}}
+else if(elementOrId.nodeType&&elementOrId.nodeType==mozile.dom.ELEMENT_NODE){element=elementOrId;}
+if(element)return mozile._markEditable(element,true);return false;}
+mozile.editElements=function(listOrValue,name){var list;if(typeof(listOrValue)=="string"){mozile.require("mozile.dom");list=mozile.dom.getElements(name,listOrValue);}
+else if(listOrValue.length){list=listOrValue;}
+if(list.length){for(var i=0;i<list.length;i++){if(list[i]&&list[i].nodeType&&list[i].nodeType==mozile.dom.ELEMENT_NODE){mozile.editElement(list[i]);}}}
+return undefined;}
+mozile.editDocument=function(doc){if(!doc)doc=document;mozile.editElement(doc.documentElement);}
+mozile.protectElement=function(elementOrId){var element;if(typeof(elementOrId)=="string"){if(document.documentElement.nodeName.toLowerCase()=="html"){element=document.getElementById(elementOrId);}
+else{mozile.require("mozile.dom");var results=mozile.dom.getElements("id",elementOrId,null,true);if(results.length)element=results[0];else return false;}}
+else if(elementOrId.nodeType&&elementOrId.nodeType==mozile.dom.ELEMENT_NODE){element=elementOrId;}
+if(element)return mozile._markEditable(element,false);return false;}
+mozile.protectElements=function(listOrValue,name){var list;if(typeof(listOrValue)=="string"){mozile.require("mozile.dom");list=mozile.dom.getElements(name,listOrValue);}
+else if(listOrValue.length){list=listOrValue;}
+if(list.length){for(var i=0;i<list.length;i++){if(list[i]&&list[i].nodeType&&list[i].nodeType==mozile.dom.ELEMENT_NODE){mozile.protectElement(list[i]);}}}
+return undefined;}
+mozile._markEditable=function(element,value){if(!element)return null;mozile.require("mozile.edit");if(value===true&&mozile.edit.setMark(element,"editable")===false&&mozile.edit.getContainer(element.parentNode)){mozile.edit.setMark(element,"editable",undefined);if(mozile.edit.getMark(element,"contentEditable")==undefined){element.removeAttribute("contentEditable");}
+return value;}
+mozile.edit.setMark(element,"editable",value);if(mozile.edit.getMark(element,"contentEditable")==undefined){switch(element.getAttribute("contentEditable")){case"true":mozile.edit.setMark(element,"contentEditable",true);break;case"false":mozile.edit.setMark(element,"contentEditable",false);break;}}
+element.setAttribute("contentEditable",String(value));return value;}
+mozile.enableEditing=function(rich){mozile.require("mozile.edit");mozile.edit.defaults.addCommand(mozile.edit.navigateLeftRight);mozile.edit.defaults.addCommand(mozile.edit.insertText);mozile.edit.defaults.addCommand(mozile.edit.removeText);if(rich){mozile.require("mozile.edit.rich");mozile.edit.defaults.addCommand(mozile.edit.remove);var splitBlocks=new mozile.edit.Split("splitBlocks");splitBlocks.accel="Return Enter";mozile.edit.defaults.addCommand(splitBlocks);}}
+mozile.useSchema=function(target){try{mozile.require("mozile.rng");mozile.require("mozile.edit");mozile.require("mozile.edit.rich");mozile.edit.extendRNG();mozile.schema=new mozile.rng.Schema();var validation=mozile.schema.parse(target);if(validation.isValid){mozile.edit.generateCommands(mozile.schema);return true;}
+else{mozile.debug.inform("mozile.useSchema","Schema validation failed.\n"+validation.report(true));return false;}}catch(e){mozile.debug.inform("mozile.useSchema","Could not create schema for target '"+target+"' because of an error:\n"+mozile.dumpError(e));return false;}}
+mozile.os=new Object();mozile.os.prototype=new mozile.Module;mozile.os.isMac=false;if(navigator.userAgent.match(/Macintosh/))mozile.os.isMac=true;mozile.browser=new Object();mozile.browser.prototype=new mozile.Module;mozile.browser.isMozilla=false;mozile.browser.mozillaVersion=0;mozile.browser.mozillaVersion=navigator.userAgent.match(/rv\:(\d+\.\d+)/);if(mozile.browser.mozillaVersion&&Number(mozile.browser.mozillaVersion[1])){mozile.browser.isMozilla=true;mozile.browser.mozillaVersion=Number(mozile.browser.mozillaVersion[1]);}
+mozile.browser.isIE=false;if(navigator.userAgent.match(/MSIE/))mozile.browser.isIE=true;mozile.browser.isSafari=false;if(navigator.userAgent.match(/Safari/))mozile.browser.isSafari=true;mozile.browser.safariVersion=0;mozile.browser.safariVersion=navigator.userAgent.match(/AppleWebKit\/(\d+)/);if(mozile.browser.safariVersion&&Number(mozile.browser.safariVersion[1])){mozile.browser.safariVersion=Number(mozile.browser.safariVersion[1]);}
+mozile.browser.isOpera=false;if(navigator.userAgent.match(/Opera/))mozile.browser.isOpera=true;if(mozile.browser.isMozilla){if(document.contentType&&document.contentType=="text/html"){mozile.defaultNS=null;}
+else{mozile.defaultNS="http://www.w3.org/1999/xhtml";}}
+mozile.dom=new Object();mozile.dom.prototype=new mozile.Module;mozile.dom.ELEMENT_NODE=1;mozile.dom.ATTRIBUTE_NODE=2;mozile.dom.TEXT_NODE=3;mozile.dom.CDATA_SECTION_NODE=4;mozile.dom.ENTITY_REFERENCE_NODE=5;mozile.dom.ENTITY_NODE=6;mozile.dom.PROCESSING_INSTRUCTION_NODE=7;mozile.dom.COMMENT_NODE=8;mozile.dom.DOCUMENT_NODE=9;mozile.dom.DOCUMENT_TYPE_NODE=10;mozile.dom.DOCUMENT_FRAGMENT_NODE=11;mozile.dom.NOTATION_NODE=12;mozile.dom.links=new Array();mozile.dom.getBody=function(node){var doc=document;if(node)doc=node.ownerDocument;var elements=doc.getElementsByTagName("body");if(elements&&elements[0])return elements[0];else return doc.documentElement;}
+mozile.dom.getHead=function(node){var doc=document;if(node)doc=node.ownerDocument;var elements=doc.getElementsByTagName("head");if(elements&&elements[0])return elements[0];else return doc.documentElement;}
+mozile.dom.getFirstChildElement=function(parent){for(var i=0;i<parent.childNodes.length;i++){if(parent.childNodes[i].nodeType==mozile.dom.ELEMENT_NODE)
+return parent.childNodes[i];}
+return null;}
+mozile.dom.getChildElements=function(parent){var children=new Array();for(var i=0;i<parent.childNodes.length;i++){if(parent.childNodes[i].nodeType==mozile.dom.ELEMENT_NODE)
+children.push(parent.childNodes[i]);}
+return children;}
+mozile.dom.getNextSiblingElement=function(node){var sibling=node.nextSibling;while(sibling){if(sibling.nodeType==mozile.dom.ELEMENT_NODE)return sibling;sibling=sibling.nextSibling;}
+return null;}
+mozile.dom.getElements=function(attr,value,root,single){var list=new Array();if(!attr)attr="class";if(!root)root=document.documentElement;if(document.createTreeWalker){var treeWalker=document.createTreeWalker(root,mozile.dom.NodeFilter.SHOW_ELEMENT,null,false);var node=treeWalker.currentNode;while(node){if(attr=="class"&&mozile.dom.hasClass(node,value))
+list.push(node);else if(attr!="local name"&&node.getAttribute(attr)){if(!value)list.push(node);else if(node.getAttribute(attr)==value)list.push(node);}
+else if(attr=="local name"&&mozile.dom&&mozile.dom.getLocalName(node).toLowerCase()==value){list.push(node);}
+if(single&&list.length>0)break;node=treeWalker.nextNode();}}
+return list;}
+mozile.dom.getText=function(node){if(!node)return"";if(node.nodeType==mozile.dom.TEXT_NODE&&!mozile.dom.isWhitespace(node)){return node.data;}
+else if(node.nodeType==mozile.dom.ATTRIBUTE_NODE){return node.nodeValue;}
+else if(node.nodeType==mozile.dom.ELEMENT_NODE){var text="";for(var i=0;i<node.childNodes.length;i++){text+=mozile.dom.getText(node.childNodes[i]);}
+return text;}
+return"";}
+mozile.dom.insertAfter=function(newNode,refNode){if(!newNode)throw("Error [mozile.dom.insertAfter]: No newNode. newNode: "+newNode+" refNode: "+refNode);if(!refNode)throw("Error [mozile.dom.insertAfter]: No refNode. newNode: "+newNode+" refNode: "+refNode);var parentNode=refNode.parentNode;if(!parentNode)return null;if(refNode.nextSibling)return parentNode.insertBefore(newNode,refNode.nextSibling);else return parentNode.appendChild(newNode);}
+mozile.dom.prependChild=function(newNode,parentNode){if(parentNode.firstChild)return parentNode.insertBefore(newNode,parentNode.firstChild);else return parentNode.appendChild(newNode);}
+mozile.dom.isAncestorOf=function(ancestorNode,descendantNode,limitNode){var checkNode=descendantNode;while(checkNode){if(checkNode==ancestorNode)return true;else if(checkNode==limitNode)return false;else checkNode=checkNode.parentNode;}
+return false;}
+mozile.dom.getCommonAncestor=function(firstNode,secondNode){var ancestor=firstNode;while(ancestor){if(mozile.dom.isAncestorOf(ancestor,secondNode))return ancestor;else ancestor=ancestor.parentNode;}
+return null;}
+mozile.dom._matchNonWhitespace=/\S/m;mozile.dom.isWhitespace=function(node){if(!node||!node.nodeValue)return false;if(node.nodeValue.match(mozile.dom._matchNonWhitespace))return false;return true;}
+mozile.dom.isVisible=function(node){var visibility;while(node){if(node==document)return true;if(node.nodeType==mozile.dom.ELEMENT_NODE){if(mozile.dom.getStyle(node,"display")=="none")return false;visibility=mozile.dom.getStyle(node,"visibility");if(visibility=="hidden"||visibility=="collapse")return false;}
+node=node.parentNode;}
+return false;}
+mozile.dom.isHTML=function(node){if(!node)node=document;var doc=node;if(node.ownerDocument)doc=node.ownerDocument;if(!doc.documentElement)return false;var name=doc.documentElement.nodeName;if(doc.documentElement.nodeName)name=doc.documentElement.nodeName;if(name.toLowerCase()=="html")return true;else return false;}
+mozile.dom.isIgnored=function(node){if(node.nodeType==mozile.dom.ATTRIBUTE_NODE){if(node.nodeName.indexOf("xmlns")==0)return true;if(mozile.browser.isOpera&&node.nodeName.toLowerCase()=="shape")return true;}
+return false;}
+mozile.dom.getLocalName=function(node){if(!node)return null;if(node.localName)return node.localName;else if(node.nodeName&&node.nodeName.indexOf(":")>-1)
+return node.nodeName.substring(node.nodeName.indexOf(":")+1);else return node.nodeName;}
+mozile.dom.getPrefix=function(node){if(!node)return null;if(node.prefix)return node.prefix;else if(node.nodeName.indexOf(":")>-1)
+return node.nodeName.substring(0,node.nodeName.indexOf(":"));else return null;}
+mozile.dom.getIndex=function(node){if(!node.parentNode)return null;for(var c=0;c<node.parentNode.childNodes.length;c++){if(node.parentNode.childNodes[c]==node)return c;}
+return c;}
+mozile.dom.getPosition=function(node){if(!node.parentNode)return null;var s=1;for(var c=0;c<node.parentNode.childNodes.length;c++){if(node.parentNode.childNodes[c]==node)break;else if(node.nodeType==mozile.dom.ELEMENT_NODE){if(node.parentNode.childNodes[c].nodeName==node.nodeName)s++;}
+else if(node.parentNode.childNodes[c].nodeType==node.nodeType)s++;}
+return s;}
+mozile.dom.removeChildNodes=function(node){if(node.childNodes.length==0)return;while(node.firstChild){node.removeChild(node.firstChild);}}
+mozile.dom.getNamespaceURI=function(node){if(!node)return null;if(node.namespaceURI)return node.namespaceURI;else if(node.nodeName.indexOf(":")>-1){var prefix=node.nodeName.substring(0,node.nodeName.indexOf(":"));return mozile.dom.lookupNamespaceURI(node,prefix);}
+return mozile.dom.getDefaultNamespaceURI(node);}
+mozile.dom.getDefaultNamespaceURI=function(node){var namespaceURI=null;while(node){if(node.nodeType==mozile.dom.ELEMENT_NODE&&node.getAttribute("xmlns"))
+return node.getAttribute("xmlns");node=node.parentNode;}
+return namespaceURI;}
+mozile.dom.lookupNamespaceURI=function(node,prefix){if(!prefix)prefix=mozile.dom.getPrefix(node);var attr="xmlns";if(prefix&&node.lookupNamespaceURI){while(node){var ns=node.lookupNamespaceURI(prefix);if(ns)return ns;else node=node.parentNode;}
+return null;}
+if(prefix&&mozile.browser.isSafari){while(node&&node.getAttributeNS){if(node.getAttributeNS(attr,prefix))return node.getAttributeNS(attr,prefix);else node=node.parentNode;}
+return null;}
+if(prefix)attr="xmlns:"+prefix;while(node){if(node.getAttribute(attr))return node.getAttribute(attr);else node=node.parentNode;}
+return null;}
+mozile.dom.lookupPrefix=function(node,namespaceURI){if(!namespaceURI)namespaceURI=node.namespaceURI;if(!namespaceURI)return null;while(node&&node.attributes){for(var i=0;i<node.attributes.length;i++){if(node.attributes[i].nodeName.indexOf("xmlns:")==0&&node.attributes[i].nodeValue==namespaceURI){return node.attributes[i].nodeName.substring(6);}}
+node=node.parentNode;}
+return null;}
+mozile.dom.convertStyleName=function(styleName){if(!styleName||typeof(styleName)!="string")return null;return styleName.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase();});}
+mozile.dom.getStyle=function(node,cssRule){var value="";if(!node)return value;if(node.nodeType!=mozile.dom.ELEMENT_NODE)node=node.parentNode;if(!node||node.nodeType!=mozile.dom.ELEMENT_NODE)return value;if(document.defaultView&&document.defaultView.getComputedStyle){value=document.defaultView.getComputedStyle(node,"").getPropertyValue(cssRule);}
+else if(node.currentStyle){cssRule=mozile.dom.convertStyleName(cssRule);value=node.currentStyle[cssRule];}
+return value;}
+mozile.dom.setStyle=function(element,rule,value){if(!element)return;if(!rule||typeof(rule)!="string")return;rule=mozile.dom.convertStyleName(rule);if(element.style)element.style[rule]=value;else mozile.debug.debug("mozile.dom.setStyle","Element does not have a 'style' attribute.");}
+mozile.dom.addStyleSheet=function(href,type){var link;if(mozile.defaultNS!=null){mozile.require("mozile.xml");link=mozile.dom.createElementNS(mozile.xml.ns.xhtml,"link");}
+else link=mozile.dom.createElement("link");link.setAttribute("class","mozileLink");link.setAttribute("href",href);link.setAttribute("rel","stylesheet");if(!type)type="text/css";link.setAttribute("type",type);mozile.dom.getHead().appendChild(link);mozile.dom.links.push(link);return link;}
+mozile.dom.getStyleSheet=function(element){if(!element)return null;if(element.styleSheet!=undefined)return element.styleSheet;else if(element.sheet!=undefined)return element.sheet;return null;}
+mozile.dom.getClass=function(element){if(!element||element.nodeType!=mozile.dom.ELEMENT_NODE)return"";var value;if(element.className!=undefined)value=element.className;else value=element.getAttribute("class");if(value)return value;else return"";}
+mozile.dom.setClass=function(element,value){if(!element||element.nodeType!=mozile.dom.ELEMENT_NODE)return null;if(!value||typeof(value)!="string")return null;if(element.className!=undefined)element.className=value;else element.setAttribute("class",value);return value;}
+mozile.dom.hasClass=function(element,className){if(!element)return false;var attr=mozile.dom.getClass(element);if(!attr)return false;if(!className)return true;attr=attr.split(/\s+/);for(var i=0;i<attr.length;i++){if(attr[i]==className)return true;}
+return false;}
+mozile.dom.getX=function(node,container){if(!node)return 0;if(node.nodeType!=mozile.dom.ELEMENT_NODE)node=node.parentNode;if(!node)return 0;var x=0;if(node.offsetParent){while(node.offsetParent){x+=node.offsetLeft;node=node.offsetParent;if(node==container)break;}}
+else if(node.x)x+=node.x;return x;}
+mozile.dom.getY=function(node,container){if(!node)return 0;if(node.nodeType!=mozile.dom.ELEMENT_NODE)node=node.parentNode;if(!node)return 0;var y=0;if(node.offsetParent){while(node.offsetParent){y+=node.offsetTop;node=node.offsetParent;if(node==container)break;}}
+else if(node.y)y+=node.y;return y;}
+mozile.dom.getAttributeNS=function(element,namespaceURI,name){if(!element)return null;if(element.getAttributeNS)return element.getAttributeNS(namespaceURI,name);else{prefix=mozile.dom.lookupPrefix(element,namespaceURI);if(prefix)return element.getAttribute(prefix+":"+name);}
+return null;}
+mozile.dom.createElement=function(name){if(mozile.defaultNS){return mozile.dom.createElementNS(mozile.defaultNS,name);}else{return document.createElement(name);}}
+mozile.dom.createElementNS=function(namespaceURI,name){if(document.createElementNS&&!mozile.browser.isSafari)return document.createElementNS(namespaceURI,name);else{mozile.require("mozile.xml");return mozile.xml.parseElement('<'+name+' xmlns="'+namespaceURI+'"/>');}
+return null;}
+mozile.dom.importNode=function(node,deep){if(!node||!node.nodeType)return null;var clone;var i=0;switch(node.nodeType){case mozile.dom.ELEMENT_NODE:clone=mozile.dom.createElement(node.nodeName);for(i=node.attributes.length-1;i>=0;i--){clone.setAttribute(node.attributes[i].nodeName,node.attributes[i].nodeValue);}
+break;case mozile.dom.TEXT_NODE:clone=document.createTextNode(node.data);break;case mozile.dom.COMMENT_NODE:clone=document.createComment(node.data);break;default:return null;}
+if(deep){var child;for(i=0;i<node.childNodes.length;i++){child=mozile.dom.importNode(node.childNodes[i],true);if(child)clone.appendChild(child);}}
+return clone;}
+mozile.dom.Range=function(selectRange){var range;if(document.createRange){if(selectRange)range=selectRange.cloneRange();else range=document.createRange();for(var field in mozile.dom.Range.prototype)
+range[field]=mozile.dom.Range.prototype[field];return range;}else{if(selectRange&&selectRange._range){range=new mozile.dom.InternetExplorerRange(selectRange._range.duplicate());range._init();return range;}
+else return new mozile.dom.InternetExplorerRange();}}
+mozile.dom.Range.prototype.store=function(){var state=new Object();if(false&&this._range){state.format="IE";state.bookmark=this._range.getBookmark();}
+else{mozile.require("mozile.xpath");state.type="Range";state.format="W3C";state.startContainer=mozile.xpath.getXPath(this.startContainer);state.startOffset=this.startOffset;if(this.startContainer==this.endContainer)
+state.endContainer=state.startContainer;else state.endContainer=mozile.xpath.getXPath(this.endContainer);state.endContainer=mozile.xpath.getXPath(this.endContainer);state.endOffset=this.endOffset;}
+return state;}
+mozile.dom.Range.prototype.restore=function(state){try{if(false&&this._range){this._range.moveToBookmark(state.bookmark);this._init();}
+else{mozile.require("mozile.xpath");var startContainer,endContainer;startContainer=mozile.xpath.getNode(state.startContainer);this.setStart(startContainer,state.startOffset);if(state.endContainer==state.startContainer)
+endContainer=startContainer;else endContainer=mozile.xpath.getNode(state.endContainer);this.setEnd(endContainer,state.endOffset);}}catch(e){alert("Error [mozile.dom.Range.restore]:\n"+mozile.dumpError(e))}}
+mozile.dom.selection=new Object();mozile.dom.selection.prototype=new mozile.Module;mozile.dom.selection.xPadding=50;mozile.dom.selection.yPadding=100;mozile.dom.selection.get=function(){if(!mozile.dom._selection)mozile.dom._selection=new mozile.dom.Selection();else if(mozile.browser.isIE)mozile.dom._selection._init();return mozile.dom._selection;}
+mozile.dom.Selection=function(){if(window.getSelection){var selection=window.getSelection();for(var field in mozile.dom.Selection.prototype)
+selection[field]=mozile.dom.Selection.prototype[field];return selection;}else{return new mozile.dom.InternetExplorerSelection();}}
+mozile.dom.Selection.prototype.store=function(oldState,newOffset){var state=new Object();if(oldState){for(var i in oldState)state[i]=oldState[i];state.anchorOffset=newOffset;state.focusOffset=newOffset;return state;}
+else if(this.rangeCount>0){mozile.require("mozile.xpath");state.type="Selection";state.format="W3C";state.anchorNode=mozile.xpath.getXPath(this.anchorNode);state.anchorOffset=this.anchorOffset;if(this.focusNode==this.anchorNode)state.focusNode=state.anchorNode;else state.focusNode=mozile.xpath.getXPath(this.focusNode);state.focusOffset=this.focusOffset;state.isCollapsed=this.isCollapsed;return state;}
+return null;}
+mozile.dom.Selection.prototype.restore=function(state){if(state){if(state.type=="Selection"){mozile.require("mozile.xpath");var anchorNode,focusNode;anchorNode=mozile.xpath.getNode(state.anchorNode);this.collapse(anchorNode,state.anchorOffset);if(state.focusNode!=state.anchorNode||state.focusOffset!=state.anchorOffset){if(state.focusNode==state.anchorNode)focusNode=anchorNode;else focusNode=mozile.xpath.getNode(state.focusNode);try{this.extend(focusNode,state.focusOffset);}catch(e){mozile.debug.debug("mozile.dom.Selection.restore","Error extending selection to '"+state.focusNode+" "+state.focusOffset+"'.\n"+mozile.dumpError(e));}}}
+else if(state.type=="Range"){var range=new mozile.dom.Range();range.restore(state);this.removeAllRanges();this.addRange(range);}}
+else if(mozile.dom.selection.last){this.collapse(mozile.dom.selection.last.anchorNode,mozile.dom.selection.last.anchorOffset);if(!mozile.dom.selection.last.isCollapsed){this.extend(mozile.dom.selection.last.focusNode,mozile.dom.selection.last.focusOffset);}}}
+mozile.dom.Selection.prototype.scroll=function(){if(!this.focusNode);var x=mozile.dom.getX(this.focusNode);var y=mozile.dom.getY(this.focusNode);var pX=window.pageXOffset;var pY=window.pageYOffset;if(x<pX||x>(pX+window.innerWidth)||y<pY||y>(pY+window.innerHeight)){window.scroll(x-mozile.dom.selection.xPadding,y-mozile.dom.selection.yPadding);}}
+mozile.dom.Selection.getSelection=function(){if(window.getSelection){return window.getSelection();}else if(document.getSelection){return document.getSelection();}else if(document.selection){return new mozile.dom.Selection();}
+return null;}
+if(mozile.browser.isIE){mozile.require("mozile.dom.TreeWalker");mozile.require("mozile.dom.InternetExplorerRange");mozile.require("mozile.dom.InternetExplorerSelection");}
+else{mozile.dom.NodeFilter=NodeFilter;mozile.dom.TreeWalker=TreeWalker;}
+mozile.xml=new Object();mozile.xml.prototype=new mozile.Module;mozile.xml.ns={AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/",atom:"http://www.w3.org/2005/Atom",cml:"http://www.xml-cml.org",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0",dt:"http://www.w3.org/2001/XMLSchema-datatypes",fo:"http://www.w3.org/1999/XSL/Format",mes:"http://mozile.mozdev.org/ns/mes/1.0",mml:"http://www.w3.org/1998/Math/MathML",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rng:"http://relaxng.org/ns/structure/1.0",saxon:"http://icl.com/saxon","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",smil:"http://www.w3.org/2001/SMIL20/",svg:"http://www.w3.org/2000/svg",wsdl:"http://schemas.xmlsoap.org/wsdl/",xalan:"http://xml.apache.org/xslt",xbl:"http://www.mozilla.org/xbl",xforms:"http://www.w3.org/2002/01/xforms",xhtml:"http://www.w3.org/1999/xhtml",xi:"http://www.w3.org/2001/XInclude",xlink:"http://www.w3.or
 g/1999/xlink",xsd:"http://www.w3.org/2001/XMLSchema",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"};mozile.xml._IE_DOM=null;mozile.xml._IE_THREADEDDOM=null;mozile.xml._IE_XSLTEMPLATE=null;mozile.xml._IE_XMLWRITER=null;mozile.xml.lookupPrefix=function(namespaceURI){for(var prefix in mozile.xml.ns){if(mozile.xml.ns[prefix]==namespaceURI)return prefix;}
+return null;}
+mozile.xml.load=function(filepath){if(typeof(filepath)!="string")return null;var uri;if(filepath.indexOf(":")>0)uri=filepath;else{var loc=location.toString();loc=loc.substring(0,loc.lastIndexOf("?"));loc=loc.substring(0,loc.lastIndexOf("/")+1);uri=loc+filepath;}
+if(mozile.browser.isSafari)uri=uri.replace("file://","file:///");try{var XHR=new XMLHttpRequest();XHR.overrideMimeType("text/xml");XHR.open("GET",uri,false);try{XHR.send(null);return XHR.responseXML;}catch(e){mozile.debug.inform("mozile.xml.load","Error loading document: "+e);return null;}}
+catch(e){try{mozile.xml._getDomProgID();var xmlDoc=new ActiveXObject(mozile.xml._IE_DOM);xmlDoc.async=false;try{var loaded=xmlDoc.load(uri);if(loaded)return xmlDoc;else{mozile.debug.inform("mozile.xml.load","Failed to load document.");}}catch(e){mozile.debug.inform("mozile.xml.load","Error loading document: "+mozile.dumpError(e));}}
+catch(e){mozile.debug.inform("mozile.xml.load","No XML loading technique avaliable in this browser.");}}
+return null;}
+mozile.xml.parse=function(string){if(window.ActiveXObject){mozile.xml._getDomProgID();var xmlDoc=new ActiveXObject(mozile.xml._IE_DOM);xmlDoc.async="false";xmlDoc.loadXML(string);return xmlDoc;}
+else if(window.DOMParser){var parser=new DOMParser();return parser.parseFromString(string,"text/xml");}
+else{mozile.debug.inform("mozile.xml.serialize","No XML parsing technique avaliable in this browser.");return null;}}
+mozile.xml.parseElement=function(string){var doc=mozile.xml.parse(string);if(doc&&doc.documentElement)return doc.documentElement;else return null;}
+mozile.xml.serialize=function(node){if(!node)return null;if(node.xml)return node.xml;else if(window.XMLSerializer){var serializer=new XMLSerializer()
+return serializer.serializeToString(node);}
+else if(node.outerHTML)return node.outerHTML;else if(node.innerHTML){var container=document.createElement("container");container.appendChild(node.cloneNode(true));return container.innerHTML;}
+else{mozile.debug.inform("mozile.xml.serialize","No XML serialization technique avaliable in this browser.");return null;}}
+mozile.xml.transformToDocument=function(target,stylesheet,parameters){if(!target)return null;if(!stylesheet||stylesheet.nodeType!=9)return null;if(window.ActiveXObject){var method=mozile.xml._getMethod(stylesheet);var result=mozile.xml._IETransform(target,stylesheet,parameters);if(method=="text")result="<result>"+result+"</result>";return mozile.xml.parse(result);}
+if(window.XSLTProcessor!=undefined){var processor=new XSLTProcessor();processor.importStylesheet(stylesheet);mozile.xml._setParameters(processor,parameters);return processor.transformToDocument(target);}
+else{mozile.debug.inform("mozile.xml.transformToDocument","No XSLT technique avaliable in this browser.");return null;}}
+mozile.xml.transformToFragment=function(target,stylesheet,parameters,ownerDoc){if(!target)return null;if(!stylesheet||stylesheet.nodeType!=9)return null;if(!ownerDoc)ownerDoc=document;if(window.ActiveXObject){var method=mozile.xml._getMethod(stylesheet);var result=mozile.xml._IETransform(target,stylesheet,parameters);var fragment=ownerDoc.createDocumentFragment();if(method=="text")fragment.appendChild(ownerDoc.createTextNode(result));else if(method=="html"&&ownerDoc.body&&ownerDoc.body.innerHTML){var container=ownerDoc.createElement("div");container.innerHTML=result;while(container.childNodes.length)
+fragment.appendChild(container.firstChild);}
+else{fragment.appendChild(mozile.xml.parseElement(result));}
+return fragment;}
+if(window.XSLTProcessor!=undefined){var processor=new XSLTProcessor();processor.importStylesheet(stylesheet);mozile.xml._setParameters(processor,parameters);return processor.transformToFragment(target,ownerDoc);}
+else{mozile.debug.inform("mozile.xml.transformToFragment","No XSLT technique avaliable in this browser.");return null;}}
+mozile.xml.transformToString=function(target,stylesheet,parameters){if(!target)return null;if(!stylesheet||stylesheet.nodeType!=9)return null;if(window.ActiveXObject){return mozile.xml._IETransform(target,stylesheet,parameters);}
+if(window.XSLTProcessor!=undefined){var processor=new XSLTProcessor();processor.importStylesheet(stylesheet);mozile.xml._setParameters(processor,parameters);var result=processor.transformToDocument(target);var source=mozile.xml.serialize(result.documentElement);if(result.documentElement.nodeName=="transformiix:result")
+source=source.substring(78,source.length-22);return source;}
+else{mozile.debug.inform("mozile.xml.transformToString","No XSLT technique avaliable in this browser.");return null;}}
+mozile.xml._getMethod=function(stylesheet){var method="html";if(!stylesheet)return method;var result;if(window.ActiveXObject){stylesheet.setProperty("SelectionNamespaces","xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");result=stylesheet.selectSingleNode("//xsl:output");}
+else if(window.XSLTProcessor!=undefined){mozile.require("mozile.xpath");var results=mozile.xpath.evaluate("//xsl:output",stylesheet);if(results[0])result=results[0];}
+else return method;if(result)method=result.getAttribute("method");return method;}
+mozile.xml._setParameters=function(processor,parameters){if(!processor)return;if(!parameters)return;var param;for(var i=0;i<parameters.length;i++){param=parameters[i];if(!param.name||!param.value)continue;if(processor.setParameter){processor.setParameter(param.namespace,param.name,param.value);}
+else{if(param.namespace)
+processor.addParameter(param.name,param.value,param.namespace);else processor.addParameter(param.name,param.value);}}}
+mozile.xml._nodeToDocument=function(node){if(target.nodeType==mozile.dom.DOCUMENT_NODE)return node;var doc;if(window.ActiveXObject){var source=mozile.xml.serialize(node);return mozile.xml.parse(source);}
+else if(document.implementation){doc=document.implementation.createDocument("","",null);var clone=doc.importNode(target,true);doc.appendChild(clone);return doc;}
+else return null;}
+mozile.xml._IETransform=function(target,stylesheet,parameters){if(!target)return null;if(!stylesheet||stylesheet.nodeType!=9)return null;var method,processor,result;try{mozile.xml._getDomProgID();mozile.xml._getXMLProgIDs();var newStyle=new ActiveXObject(mozile.xml._IE_THREADEDDOM);newStyle.loadXML(stylesheet.xml);var xslt=new ActiveXObject(mozile.xml._IE_XSLTEMPLATE);xslt.stylesheet=newStyle;processor=xslt.createProcessor();processor.input=target;mozile.xml._setParameters(processor,parameters);processor.transform();return processor.output;}catch(e){return"XSLT ERROR "+mozile.dumpError(e);}}
+mozile.xml._pickRecentProgID=function(idList){var bFound=false;for(var i=0;i<idList.length&&!bFound;i++){try{var oDoc=new ActiveXObject(idList[i]);o2Store=idList[i];bFound=true;}catch(objException){};};if(!bFound){throw"Could not retreive a valid progID of Class: "+idList[idList.length-1]+". (original exception: "+e+")";};idList=null;return o2Store;}
+mozile.xml._getDomProgID=function(){if(!mozile.xml._IE_DOM){mozile.xml._IE_DOM=mozile.xml._pickRecentProgID(["Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"]);}}
+mozile.xml._getXMLProgIDs=function(){if(!mozile.xml._IE_XSLTEMPLATE){mozile.xml._IE_XSLTEMPLATE=mozile.xml._pickRecentProgID(["Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"]);mozile.xml._IE_THREADEDDOM=mozile.xml._pickRecentProgID(["Msxml2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"]);mozile.xml._IE_XMLWRITER=mozile.xml._pickRecentProgID(["Msxml2.MXXMLWriter.5.0","Msxml2.MXXMLWriter.4.0","Msxml2.MXXMLWriter.3.0","MSXML2.MXXMLWriter","MSXML.MXXMLWriter","Microsoft.XMLDOM"]);}}
+mozile.xpath=new Object();mozile.xpath.prototype=new mozile.Module;mozile.xpath.getXPath=function(node,root){if(!node||node.nodeType==undefined||!node.nodeType)return"";if(node==root)return"";var parent=node.parentNode;switch(node.nodeType){case mozile.dom.ELEMENT_NODE:var nodeName;if(node.prefix)nodeName=node.nodeName;else nodeName=node.nodeName;if(!nodeName)nodeName=node.nodeName;if(mozile.dom.isHTML(node))nodeName=nodeName.toLowerCase();if(node.ownerDocument&&node.ownerDocument.documentElement==node)
+return"/"+nodeName+"[1]";else return mozile.xpath.getXPath(parent,root)
++"/"+nodeName+"["+mozile.dom.getPosition(node)+"]";case mozile.dom.ATTRIBUTE_NODE:if(!parent)parent=node.ownerElement;return mozile.xpath.getXPath(parent,root)+"/@"+node.nodeName;case mozile.dom.TEXT_NODE:if(node==this._lastNode&&root==this._lastRoot)
+return this._lastXPath;var xpath=mozile.xpath.getXPath(parent,root)
++"/text()["+mozile.dom.getPosition(node)+"]";this._lastNode=node;this._lastRoot=root;this._lastXPath=xpath;return xpath;case mozile.dom.COMMENT_NODE:return mozile.xpath.getXPath(parent,root)
++"/comment()["+mozile.dom.getPosition(node)+"]";default:if(parent)return mozile.xpath.getXPath(parent,root);else return"";}}
+mozile.xpath.getComponents=function(expression){if(typeof(expression)!="string")return[];var components=expression.split("/");for(var c=0;c<components.length;c++){if(!components[c])components.splice(c,1);}
+return components;}
+mozile.xpath.getComponent=function(expression){var result=new Object();var components=mozile.xpath.getComponents(expression);if(components.length==0)return result;var component=components[components.length-1];var match=component.match(/(\S+:)?(\S+)\[(\d+)\]|(\S+:)?(\S+)/);if(match){if(match[1]&&match[2]){result.name=match[1]+match[2];result.localName=match[2];}
+else if(match[2]){result.name=match[2];result.localName=match[2];}
+else if(match[4]&&match[5]){result.name=match[4]+match[5];result.localName=match[5];}
+else if(match[5]){result.name=match[5];result.localName=match[5];}
+if(match[3])result.position=match[3];else result.position=null;}
+return result;}
+mozile.xpath.getNode=function(expression,root){if(!root)root=document;if(!expression)return root;if(expression==this._lastXPath&&root==this._lastRoot)return this._lastNode;var node;if(!node){var components=mozile.xpath.getComponents(expression);node=root;for(var i=0;i<components.length;i++){var component=mozile.xpath.getComponent(components[i]);node=mozile.xpath._getNthChild(node,component.name,component.position);if(!node)return null;}}
+if(node){this._lastNode=node;this._lastRoot=root;this._lastXPath=expression;return node;}
+else return null;}
+mozile.xpath._getNthChild=function(parent,name,position){var c=0;var p=1;if(parent.nodeType==mozile.dom.DOCUMENT_NODE)
+return parent.documentElement;if(name=="text()"){for(c=0;c<parent.childNodes.length;c++){if(parent.childNodes[c].nodeType==mozile.dom.TEXT_NODE){if(p==position)return parent.childNodes[c];p++;}}}
+else if(name=="comment()"){for(c=0;c<parent.childNodes.length;c++){if(parent.childNodes[c].nodeType==mozile.dom.COMMENT_NODE){if(p==position)return parent.childNodes[c];p++;}}}
+if(name.indexOf("@")==0){name=name.substring(1);return parent.getAttributeNode(name);}
+else{if(name.indexOf("xmlns:")>-1)name=name.substring(6);for(c=0;c<parent.childNodes.length;c++){var childName=parent.childNodes[c].nodeName;if(childName==name||childName==name.toUpperCase()){if(p==position)return parent.childNodes[c];p++;}}}
+return null;}
+mozile.xpath.evaluate=function(expression,root){if(!root)root=document;var doc;if(root.ownerDocument)doc=root.ownerDocument;else{doc=root;root=root.documentElement;}
+var nodes=new Array();var results,result;if(window.XPathEvaluator){var XPE=new XPathEvaluator;var NSR=function(prefix){var namespaceURI=mozile.dom.lookupNamespaceURI(root,prefix);if(namespaceURI)return namespaceURI;else if(mozile.xml.ns[prefix])return mozile.xml.ns[prefix];return mozile.defaultNS;}
+try{results=XPE.evaluate(expression,root,NSR,0,null);if(results){result=results.iterateNext();while(result){nodes.push(result);result=results.iterateNext();}}}catch(e){alert(doc.documentElement.getAttribute("xmlns")+"\n"+e);}}
+else if(root.selectNodes){results=root.selectNodes(expression);result=results.nextNode();while(result){nodes.push(result);result=results.nextNode();}}
+return nodes;}
+mozile.util=new Object();mozile.util.prototype=new mozile.Module;mozile.util.dumpKeys=function(obj){var keys=new Array();for(var key in obj)keys.push(key);keys.sort();return keys.join(", ");}
+mozile.util.dumpValues=function(obj){var result=new Array();for(var key in obj){result.push(key+" = "+obj[key]);}
+result.sort();return result.join("\n");}
+mozile.util.capitalize=function(string){if(!string)return string;return string.replace(/\w+/g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();});}
+mozile.util.pad=function(string,length,left){if(!string)string=" ";else string=String(string);if(!this._memory)this._memory=new Object();var id=string+":"+length+":"+left;if(this._memory[id])return this._memory[id];var space="";if(string.length<length){for(var s=0;s<length-string.length;s++)space+=" ";}
+var result;if(left)result=space+string;else result=string+space;this._memory[id]=result;return result;}
+mozile.util.debug=function(details,level,message){if(level>=mozile.getDebugLevel()||details["Status Message"]){var date=new Date();mozile.util.messages.push([date.toLocaleString(),details,level,message]);}
+return true;}
+mozile.util.messages=new Array();mozile.dom.NodeFilter={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:-1,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTIONS:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048}
+mozile.dom.TreeWalker=function(root,whatToShow,filter,expandEntityReferences){this.root=root;this.whatToShow=whatToShow;this.filter=filter;this.expandEntityReferences=expandEntityReferences;this.currentNode=root;}
+mozile.dom.TreeWalker.prototype.parentNode=function(){var testNode=this.currentNode;do{if(testNode!=this.root&&testNode.parentNode!=this.root&&testNode.parentNode!=null){testNode=testNode.parentNode;}
+else return null;}while(this._getFilteredStatus(testNode)!=mozile.dom.NodeFilter.FILTER_ACCEPT);if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.firstChild=function(){var testNode=this.currentNode.firstChild;while(testNode!=null){if(this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}
+testNode=testNode.nextSibling;}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.lastChild=function(){var testNode=this.currentNode.lastChild;while(testNode!=null){if(this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}
+testNode=testNode.previousSibling;}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.nextNode=function(){var testNode=this.currentNode;while(testNode!=null){if(testNode.childNodes.length!=0)testNode=testNode.firstChild;else if(testNode.nextSibling!=null)testNode=testNode.nextSibling;else{while(testNode!=null){if(testNode.parentNode!=this.root&&testNode.parentNode!=null){if(testNode.parentNode.nextSibling!=null){testNode=testNode.parentNode.nextSibling;break;}
+else testNode=testNode.parentNode;}
+else return null;}}
+if(testNode!=null&&this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.previousNode=function(){var testNode=this.currentNode;while(testNode!=null){if(testNode.previousSibling!=null){testNode=testNode.previousSibling;while(testNode.lastChild!=null){testNode=testNode.lastChild;}}
+else{if(testNode.parentNode!=this.root&&testNode.parentNode!=null){testNode=testNode.parentNode;}
+else testNode=null;}
+if(testNode!=null&&this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.nextSibling=function(){var testNode=this.currentNode;while(testNode!=null){if(testNode.nextSibling!=null)testNode=testNode.nextSibling;if(this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype.previousSibling=function(){var testNode=this.currentNode;while(testNode!=null){if(testNode.previousSibling!=null)testNode=testNode.previousSibling;if(this._getFilteredStatus(testNode)==mozile.dom.NodeFilter.FILTER_ACCEPT){break;}}
+if(testNode!=null)this.currentNode=testNode;return testNode;}
+mozile.dom.TreeWalker.prototype._getFilteredStatus=function(node){var mask=null;switch(node.nodeType){case mozile.dom.ELEMENT_NODE:mask=mozile.dom.NodeFilter.SHOW_ELEMENT;break;case mozile.dom.ATTRIBUTE_NODE:mask=mozile.dom.NodeFilter.SHOW_ATTRIBUTE;break;case mozile.dom.TEXT_NODE:mask=mozile.dom.NodeFilter.SHOW_TEXT;break;case mozile.dom.CDATA_SECTION_NODE:mask=mozile.dom.NodeFilter.SHOW_CDATA_SECTION;break;case mozile.dom.ENTITY_REFERENCE_NODE:mask=mozile.dom.NodeFilter.SHOW_ENTITY_REFERENCE;break;case mozile.dom.ENTITY_NODE:mask=mozile.dom.NodeFilter.SHOW_PROCESSING_INSTRUCTION;break;case mozile.dom.PROCESSING_INSTRUCTION_NODE:mask=mozile.dom.NodeFilter.SHOW_PROCESSING_INSTRUCTION;break;case mozile.dom.COMMENT_NODE:mask=mozile.dom.NodeFilter.SHOW_COMMENT;break;case mozile.dom.DOCUMENT_NODE:mask=mozile.dom.NodeFilter.SHOW_DOCUMENT;break;case mozile.dom.DOCUMENT_TYPE_NODE:mask=mozile.dom.NodeFilter.SHOW_DOCUMENT_TYPE;break;case mozile.dom.DOCUMENT_FRAGMENT_NODE:mask=mozile.dom.Node
 Filter.SHOW_DOCUMENT_FRAGMENT;break;case mozile.dom.NOTATION_NODE:mask=mozile.dom.NodeFilter.SHOW_NOTATION;break;}
+if(mask!=null&&(this.whatToShow&mask)==0){return mozile.dom.NodeFilter.FILTER_REJECT;}
+if(this.filter!=null&&this.filter.acceptNode!=null){return this.filter.acceptNode(node);}
+return mozile.dom.NodeFilter.FILTER_ACCEPT;}
+if(mozile.browser.isIE){document.createTreeWalker=function(root,whatToShow,filter,expandEntityReferences){return new mozile.dom.TreeWalker(root,whatToShow,filter,expandEntityReferences);};mozile.dom.NodeFilter=mozile.dom.NodeFilter;mozile.dom.TreeWalker=mozile.dom.TreeWalker;}
+else{mozile.dom.NodeFilter=NodeFilter;mozile.dom.TreeWalker=TreeWalker;}
+mozile.dom.InternetExplorerRange=function(range){this._range=null;if(range)
+this._range=range;else{this._range=document.body.createTextRange();}
+this.collapsed=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;}
+mozile.dom.InternetExplorerRange.prototype._init=function(){var beginRange=this._range.duplicate();beginRange.collapse(true);var position=this._getPosition(beginRange);this.startContainer=position.node;this.startOffset=position.offset;var endRange=this._range.duplicate();endRange.collapse(false);position=this._getPosition(endRange);this.endContainer=position.node;this.endOffset=position.offset;this._commonAncestorContainer();this._collapsed();}
+mozile.dom.InternetExplorerRange.prototype._getPosition=function(textRange){var element=textRange.parentElement();var range=document.body.createTextRange();range.moveToElementText(element);range.setEndPoint("EndToStart",textRange);var rangeLength=range.text.length;if(rangeLength<element.innerText.length/2){var direction=1;var node=element.firstChild;}
+else{direction=-1;node=element.lastChild;range.moveToElementText(element);range.setEndPoint("StartToStart",textRange);rangeLength=range.text.length;}
+while(node){switch(node.nodeType){case mozile.dom.TEXT_NODE:nodeLength=node.data.length;if(nodeLength<rangeLength){var difference=rangeLength-nodeLength;if(direction==1)range.moveStart("character",difference);else range.moveEnd("character",-difference);rangeLength=difference;}
+else{if(direction==1)return{node:node,offset:rangeLength};else return{node:node,offset:nodeLength-rangeLength};}
+break;case mozile.dom.ELEMENT_NODE:nodeLength=node.innerText.length;if(direction==1)range.moveStart("character",nodeLength);else range.moveEnd("character",-nodeLength);rangeLength=rangeLength-nodeLength;break;}
+if(direction==1)node=node.nextSibling;else node=node.previousSibling;}
+return{node:element,offset:0};}
+mozile.dom.InternetExplorerRange.prototype._getOffset=function(startNode,startOffset){var node,moveCharacters;if(startNode.nodeType==mozile.dom.TEXT_NODE){moveCharacters=startOffset;node=startNode.previousSibling;}
+else if(startNode.nodeType==mozile.dom.ELEMENT_NODE){moveCharacters=0;if(startOffset>0)node=startNode.childNodes[startOffset-1];else return 0;}
+else{mozile.debug.inform("mozile.dom.InternetExplorerRange.prototype._getOffset","Bad node given: "+mozile.xpath.getXPath(startNode));return 0;}
+while(node){var nodeLength=0;if(node.nodeType==mozile.dom.ELEMENT_NODE){nodeLength=node.innerText.length;if(this._isChildless(node))nodeLength=1;if(this._isBlock(node))nodeLength++;}
+else if(node.nodeType==mozile.dom.TEXT_NODE){nodeLength=node.data.length;}
+moveCharacters+=nodeLength;node=node.previousSibling;}
+return moveCharacters;}
+mozile.dom.InternetExplorerRange.prototype._isBlock=function(node){switch(node.nodeName.toLowerCase()){case'p':case'div':case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':case'pre':return true;}
+return false;}
+mozile.dom.InternetExplorerRange.prototype._isChildless=function(node){switch(node.nodeName.toLowerCase()){case'img':case'br':case'hr':return true;}
+return false;}
+mozile.dom.InternetExplorerRange.prototype.setStart=function(startNode,startOffset){var container=startNode;if(startNode.nodeType==mozile.dom.TEXT_NODE||startNode.nodeType==mozile.dom.COMMENT_NODE||startNode.nodeType==mozile.dom.CDATA_SECTION_NODE){container=container.parentNode;}
+var copyRange=this._range.duplicate();copyRange.moveToElementText(container);copyRange.collapse(true);copyRange.move('Character',this._getOffset(startNode,startOffset));this._range.setEndPoint('StartToStart',copyRange);this.startContainer=startNode;this.startOffset=startOffset;if(this.endContainer==null&&this.endOffset==null){this.endContainer=startNode;this.endOffset=startOffset;}
+this._commonAncestorContainer();this._collapsed();}
+mozile.dom.InternetExplorerRange.prototype.setEnd=function(endNode,endOffset){var copyRange=this._range.duplicate();copyRange.collapse(true);var container=endNode;if(endNode.nodeType==mozile.dom.TEXT_NODE||endNode.nodeType==mozile.dom.COMMENT_NODE||endNode.nodeType==mozile.dom.CDATA_SECTION_NODE){container=container.parentNode;}
+copyRange=this._range.duplicate();copyRange.moveToElementText(container);copyRange.collapse(true);copyRange.move('Character',this._getOffset(endNode,endOffset));this._range.setEndPoint('EndToEnd',copyRange);this.endContainer=endNode;this.endOffset=endOffset;if(this.startContainer==null&&this.startOffset==null){this.startContainer=endNode;this.startOffset=endOffset;}
+this._commonAncestorContainer();this._collapsed();}
+mozile.dom.InternetExplorerRange.prototype.setStartBefore=function(referenceNode){this.setStart(referenceNode.parentNode,mozile.dom.getIndex(referenceNode));};mozile.dom.InternetExplorerRange.prototype.setStartAfter=function(referenceNode){this.setStart(referenceNode.parentNode,mozile.dom.getIndex(referenceNode)+1);};mozile.dom.InternetExplorerRange.prototype.setEndBefore=function(referenceNode){this.setEnd(referenceNode.parentNode,mozile.dom.getIndex(referenceNode));};mozile.dom.InternetExplorerRange.prototype.setEndAfter=function(referenceNode){this.setEnd(referenceNode.parentNode,mozile.dom.getIndex(referenceNode)+1);};mozile.dom.InternetExplorerRange.prototype.selectNode=function(referenceNode){this.setStartBefore(referenceNode);this.setEndAfter(referenceNode);};mozile.dom.InternetExplorerRange.prototype.selectNodeContents=function(referenceNode){this.setStart(referenceNode,0);if(referenceNode.nodeType==mozile.dom.TEXT_NODE)
+this.setEnd(referenceNode,referenceNode.data.length);else
+this.setEnd(referenceNode,referenceNode.childNodes.length);};mozile.dom.InternetExplorerRange.prototype.collapse=function(toStart){this._range.collapse(toStart);if(toStart){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;}
+this._commonAncestorContainer();this._collapsed();};mozile.dom.InternetExplorerRange.prototype.cloneContents=function(){var df=document.createDocumentFragment();var container=this.commonAncestorContainer;if(container.nodeType==mozile.dom.TEXT_NODE){df.appendChild(document.createTextNode(this._range.text));return df;}
+var startNode=this.startContainer;if(this.startContainer.nodeType!=mozile.dom.TEXT_NODE)
+startNode=this.startContainer.childNodes[this.startOffset];var endNode=this.endContainer;if(this.endContainer.nodeType!=mozile.dom.TEXT_NODE)
+endNode=this.endContainer.childNodes[this.endOffset-1];if(startNode==endNode){df.appendChild(startNode.cloneNode(true));return df;}
+var current=container.firstChild;var parent=null;var clone;while(current){if(!parent){if(mozile.dom.isAncestorOf(current,startNode,container)){parent=df;}
+else{current=current.nextSibling;continue;}}
+if(current==startNode&&this.startContainer.nodeType==mozile.dom.TEXT_NODE){content=this.startContainer.data.substring(this.startOffset);parent.appendChild(document.createTextNode(content));}
+else if(current==endNode){if(this.endContainer.nodeType==mozile.dom.TEXT_NODE){content=this.endContainer.data.substring(0,this.endOffset);parent.appendChild(document.createTextNode(content));}
+else parent.appendChild(endNode.cloneNode(false));break;}
+else{clone=current.cloneNode(false);parent.appendChild(clone);}
+if(current.firstChild){parent=clone;current=current.firstChild;}
+else if(current.nextSibling){current=current.nextSibling;}
+else while(current){if(current.parentNode){parent=parent.parentNode;current=current.parentNode;if(current.nextSibling){current=current.nextSibling;break;}}
+else current=null;}}
+return df;};mozile.dom.InternetExplorerRange.prototype.deleteContents=function(){this._range.pasteHTML('');this.endContainer=this.startContainer;this.endOffset=this.startOffset;this._commonAncestorContainer();this._collapsed();};mozile.dom.InternetExplorerRange.prototype.extractContents=function(){var fragment=this.cloneContents();this.deleteContents();return fragment;};mozile.dom.InternetExplorerRange.prototype.insertNode=function(newNode){if(this.startContainer.nodeType==mozile.dom.TEXT_NODE){this.startContainer.splitText(this.startOffset);this.startContainer.parentNode.insertBefore(newNode,this.startContainer.nextSibling);this.setStart(this.startContainer,this.startOffset);return;}else{var parentNode=this.startContainer.parentNode;if(this.startContainer.childNodes.length==this.startOffset){parentNode.appendChild(newNode);}else{this.startContainer.insertBefore(newNode,this.startContainer.childNodes.item(this.startOffset));this.setStart(this.startContainer,this.startOffset+1);retur
 n;}}};mozile.dom.InternetExplorerRange.prototype.surroundContents=function(newNode){newNode.appendChild(this.extractContents());this.insertNode(newNode);};mozile.dom.InternetExplorerRange.prototype.compareBoundaryPoints=function(how,sourceRange){alert('mozile.dom.InternetExplorerRange.compareBoundaryPoints() is not implemented yet');};mozile.dom.InternetExplorerRange.prototype.cloneRange=function(){var r=new mozile.dom.InternetExplorerRange(this._range.duplicate());var properties=["startContainer","startOffset","endContainer","endOffset","commonAncestorContainer","collapsed"];for(var i=0;i<properties.length;i++){r[properties[i]]=this[properties[i]];}
+return r;};mozile.dom.InternetExplorerRange.prototype.detach=function(){};mozile.dom.InternetExplorerRange.prototype.toString=function(){return this._range.text;};mozile.dom.InternetExplorerRange.prototype._commonAncestorContainer=function(){if(this.startContainer==null||this.endContainer==null){this.commonAncestorContainer=null;return;}
+if(this.startContainer==this.endContainer){this.commonAncestorContainer=this.startContainer;}
+else{this.commonAncestorContainer=mozile.dom.getCommonAncestor(this.startContainer,this.endContainer);}}
+mozile.dom.InternetExplorerRange.prototype._collapsed=function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);}
+mozile.dom.InternetExplorerRange.prototype.store=mozile.dom.Range.prototype.store;mozile.dom.InternetExplorerRange.prototype.restore=mozile.dom.Range.prototype.restore;mozile.dom.InternetExplorerSelection=function(){this._selection=document.selection;this.anchorNode=null;this.anchorOffset=null;this.focusNode=null;this.focusOffset=null;this.isCollapsed=null;this.rangeCount=0;this._direction=this._LTR;this._init();}
+mozile.dom.InternetExplorerSelection.prototype._LTR=1;mozile.dom.InternetExplorerSelection.prototype._RTL=-1;mozile.dom.InternetExplorerSelection.prototype._init=function(range){if(!range)range=this.getRangeAt(0);if(!this._direction)this._direction=this._LTR;if(range&&range.startContainer){if(this._direction==this._LTR){this.anchorNode=range.startContainer;this.anchorOffset=range.startOffset;this.focusNode=range.endContainer;this.focusOffset=range.endOffset;}
+else{this.anchorNode=range.endContainer;this.anchorOffset=range.endOffset;this.focusNode=range.startContainer;this.focusOffset=range.startOffset;}
+this.isCollapsed=range.collapsed;}
+else{this.anchorNode=null;this.anchorOffset=null;this.focusNode=null;this.focusOffset=null;this.isCollapsed=true;}
+this.rangeCount=this._selection.createRangeCollection().length;}
+mozile.dom.InternetExplorerSelection.prototype.getRangeAt=function(index){var textRange=this._selection.createRangeCollection().item(index).duplicate();var range;if(this._lastTextRange&&this._lastTextRange.isEqual(textRange)){range=this._lastRange;}
+else{range=new mozile.dom.InternetExplorerRange(textRange);range._init();this._lastTextRange=textRange.duplicate();this._lastRange=range;this._direction=this._LTR;}
+return range.cloneRange();}
+mozile.dom.InternetExplorerSelection.prototype.collapse=function(parentNode,offset){try{var range=this.getRangeAt(0);range.setStart(parentNode,offset);range.setEnd(parentNode,offset);range.collapse(false);this._direction=this._LTR;this._init(range);this._lastTextRange=range._range.duplicate();this._lastRange=range;range._range.select();}catch(e){mozile.debug.debug("mozile.dom.InternetExplorerSelection.collapse","Error: "+mozile.dumpError(e));}}
+mozile.dom.InternetExplorerSelection.prototype.extend=function(parentNode,offset){var range=this.getRangeAt(0);var direction;if(parentNode==range.startContainer&&range.startOffset<=offset){direction=this._LTR;}
+else if(parentNode==range.endContainer&&range.endOffset>=offset){direction=this._RTL;}
+else if(parentNode==range.startContainer.parentNode&&range.startContainer.nodeType==mozile.dom.TEXT_NODE&&mozile.dom.getIndex(range.startContainer)<=offset){direction=this._LTR;}
+else if(parentNode==range.endContainer.parentNode&&range.endContainer.nodeType==mozile.dom.TEXT_NODE&&mozile.dom.getIndex(range.endContainer)>=offset){direction=this._RTL;}
+else{var ancestor=mozile.dom.getCommonAncestor(parentNode,range.commonAncestorContainer)
+var treeWalker=document.createTreeWalker(ancestor,mozile.dom.NodeFilter.SHOW_ALL,null,false);treeWalker.currentNode=this.anchorNode;while(treeWalker.previousNode()){if(treeWalker.currentNode==parentNode){direction=this._RTL;break;}}
+if(!direction)direction=this._LTR;}
+if(direction==this._LTR)range.setEnd(parentNode,offset);else if(direction==this._RTL)range.setStart(parentNode,offset);else return;this._direction=direction;this._init(range);this._lastTextRange=range._range.duplicate();this._lastRange=range;range._range.select();}
+mozile.dom.InternetExplorerSelection.prototype.collapseToStart=function(){var range=this.getRangeAt(0);range.collapse(true);this._init(range);range._range.select();}
+mozile.dom.InternetExplorerSelection.prototype.collapseToEnd=function(){var range=this.getRangeAt(0);range.collapse();this._init(range);range._range.select();}
+mozile.dom.InternetExplorerSelection.prototype.selectAllChildren=function(parentNode){var range=this.getRangeAt(0);range.selectNodeContents(parentNode);this._init(range);range._range.select();}
+mozile.dom.InternetExplorerSelection.prototype.addRange=function(range){this._direction=this._LTR;this._init(range);range._range.select();}
+mozile.dom.InternetExplorerSelection.prototype.removeRange=function(range){range.collapse();this._init(range);}
+mozile.dom.InternetExplorerSelection.prototype.removeAllRanges=function(){this._selection.empty();this._init();}
+mozile.dom.InternetExplorerSelection.prototype.deleteFromDocument=function(){this._selection.clear();this._init();}
+mozile.dom.InternetExplorerSelection.prototype.selectionLanguageChange=function(){}
+mozile.dom.InternetExplorerSelection.prototype.toString=function(){var range=this.getRangeAt(0);return range.toString();}
+mozile.dom.InternetExplorerSelection.prototype.containsNode=function(aNode,aPartlyContained){alert('mozile.dom.InternetExplorerSelection.containsNode() is not implemented yet');}
+mozile.dom.InternetExplorerSelection.prototype.store=mozile.dom.Selection.prototype.store;mozile.dom.InternetExplorerSelection.prototype.restore=mozile.dom.Selection.prototype.restore;mozile.dom.InternetExplorerSelection.prototype.scroll=mozile.dom.Selection.prototype.scroll;mozile.dom.Selection.restoreSelection=function(r){var range=new mozile.Range();try{range.setStart(r.startContainer,r.startOffset);range.setEnd(r.endContainer,r.endOffset);}catch(e){}
+var s=new mozile.dom.Selection();s.removeAllRanges();s.addRange(range);}
+mozile.rng=new Object();mozile.rng.prototype=new mozile.Module;mozile.rng.debug=false;mozile.rng.getName=function(){if(this._name)return this._name;if(this._element.getAttribute("name")){var match=this._element.getAttribute("name").match(/^\s*(.+?)\s*$/);if(match&&match.length==2){this._name=match[1];return this._name;}}
+throw Error("This RNG '"+this.getType()+"' element must have a 'name' attribute.");}
+mozile.rng.getLocalName=function(){if(this._localName)return this._localName;var name=this.getName();if(name.indexOf(":"))this._localName=name.substring(name.indexOf(":")+1,name.length);else this._localName=name;return this._localName;}
+mozile.rng.getPrefix=function(){if(this._prefix)return this._prefix;var name=this.getName();if(name.indexOf(":"))this._prefix=name.substring(0,name.indexOf(":"));else this._prefix=null;return this._prefix;}
+mozile.rng.checkType=function(types,type){if(typeof(types)=="string"&&types==type)return true;if(types.length){for(var i=0;i<types.length;i++){if(types[i]==type)return true;}}
+return false;}
+mozile.rng.validateSequence=function(node,validation){if(!node)throw Error("mozile.rng.validateSequence() requires a node.");if(!validation)throw Error("mozile.rng.validateSequence() requires an mozile.rng.Validation object.");var RNGChildren=this.getChildNodes();if(RNGChildren.length==0)return validation;for(var r=0;r<RNGChildren.length;r++){if(!validation.isValid)break;validation=RNGChildren[r].validate(node,validation);if(node.nodeType==mozile.dom.ELEMENT_NODE&&validation.isEmpty)
+validation.logError(this,node,"The parent element should be empty, but it contains child elements.");if(validation.getCurrentElement()){node=validation.getCurrentElement();if(mozile.dom.getNextSiblingElement(node))node=mozile.dom.getNextSiblingElement(node);}}
+return validation;}
+mozile.rng.validateMany=function(node,validation){if(!node)throw Error("mozile.rng.validateMany() requires a node.");if(!validation)throw Error("mozile.rng.validateMany() requires an mozile.rng.Validation object.");var result;validation.count=0;while(true){result=validation.branch();result=this._validateSequence(node,result);if(result.isValid){validation.count++;validation.merge(result);if(result.getCurrentElement()&&mozile.dom.getNextSiblingElement(result.getCurrentElement())){node=mozile.dom.getNextSiblingElement(result.getCurrentElement());continue;}}
+if(mozile.rng.debug)validation.append(result,true);break;}
+return validation;}
+mozile.rng.validateInterleave=function(node,validation){if(!node)throw Error("mozile.rng.validateInterleave() requires a node.");if(!validation)throw Error("mozile.rng.validateInterleave() requires an mozile.rng.Validation object.");validation.logMessage(this,node,"Validating interleave...");var RNGChildren=new Array();for(var c=0;c<this.getChildNodes().length;c++){RNGChildren.push(this.getChildNodes()[c]);}
+var type;var length=RNGChildren.length;for(var i=0;i<length;i++){for(var r=0;r<RNGChildren.length;r++){var result=validation.branch();result=RNGChildren[r].validate(node,result);if(result.isValid){type=RNGChildren[r].getType();if((RNGChildren[r].getType()=="optional"||RNGChildren[r].getType()=="zeroOrMore")&&!result.count)
+continue;validation.merge(result);if(result.getCurrentElement()&&mozile.dom.getNextSiblingElement(result.getCurrentElement())){node=mozile.dom.getNextSiblingElement(result.getCurrentElement());}
+RNGChildren.splice(r,1);break;}}}
+if(RNGChildren.length>0){for(r=0;r<RNGChildren.length;r++){if(!validation.isValid)break;type=RNGChildren[r].getType();if(type!="optional"&&type!="zeroOrMore")
+validation.logError(this,node,"There were non-optional RNG children which did not match any elements.");}}
+if(validation.isValid)validation.logMessage(this,node,"Interleave is valid.");return validation;}
+mozile.rng.combine=function(target){var combineType;var combineA=this._element.getAttribute("combine");var combineB=target._element.getAttribute("combine");if(combineA&&combineB){if(combineA==combineB)combineType=combineA;else throw Error("In order to combine RNG elements, their 'combine' attributes muct match. '"+combineA+"' != '"+combineB+"'");}
+else{if(combineA)combineType=combineA;else if(combineB)combineType=combineB;else throw Error("In order to combine RNG elements, at least one must have a 'combine' attribute.");}
+if(combineType!="choice"&&combineType!="interleave")
+throw Error("RNG 'define' or 'start' elements can only have 'combine' attribute values of 'choice' or 'interleave', not '"+combineType+"'.");this._element.setAttribute("combine",combineType);var combineObject;if(this.getChildNodes().length==1&&this.getChildNode(0).getType()==combineType){combineObject=this.getChildNode(0);}
+else{var validation=new mozile.rng.Validation();combineObject=this.getSchema().parseElement(mozile.dom.createElementNS(mozile.xml.ns.rng,combineType),validation,true);this.appendChild(combineObject);while(this.getChildNodes().length>1){combineObject.appendChild(this.removeChild(this.getChildNode(0)));}}
+var targetObject=target;if(target.getChildNodes().length==1&&target.getChildNode(0).getType()==combineType){targetObject=target.getChildNode(0);}
+while(targetObject.getChildNodes().length){combineObject.appendChild(targetObject.removeChild(targetObject.getChildNode(0)));}
+return this;}
+mozile.rng.Schema=function(target){this._documents=new Object();this._types=new Object();this._names=new Object();this._root=null;if(target)this.parse(target);}
+mozile.rng.Schema.prototype.constructor=mozile.rng.Schema;mozile.rng.Schema.prototype.toString=function(){return"[object mozile.rng.Schema]"};mozile.rng.Schema.prototype.getType=function(){return"schema";}
+mozile.rng.Schema.prototype.parse=function(target){var element;var filepath;if(typeof(target)=="string"){if(target.indexOf("<")>-1){element=mozile.xml.parse(target).documentElement;filepath=location.toString();}
+else{var doc=this.load(target);if(!doc)throw Error("Could not load schema '"+target+"'.");element=doc.documentElement;filepath=target;}}
+else if(target.nodeType){element=target;filepath=location.toString();}
+else throw Error("Unknown target given in mozile.rng.Schema.parse().");if(!this.filepath)this.filepath=filepath;var validation=new mozile.rng.Validation();validation.logMessage(this,null,"Starting to parse schema");var result=this.parseElement(element,validation);if(!result){validation.logError(this,null,"An invalid result was returned from the parsing operation: "+result);return validation;}
+var root=result;if(root.getType()=="element"||root.getType()=="grammar"){this._root=root;}
+else{validation.logError(this,null,"Schema has no root element.");return validation;}
+var includes=this.getNodes("include");if(!includes)return validation;for(var i=0;i<includes.length;i++){validation=includes[i].include(validation);}
+return validation;}
+mozile.rng.Schema.prototype.parseElement=function(element,validation,omitValidation){var rngNode=this._createRNGNode(element,validation);if(!rngNode){return null;}
+else validation.logMessage(rngNode,element,"Adding RNG '"+rngNode.getType()+"' node.");if(omitValidation!=true){validation=rngNode.selfValidate(validation);if(!validation.isValid)return{node:null,validation:validation};}
+if(element.hasChildNodes()){var child;for(var c=0;c<element.childNodes.length;c++){child=this.parseElement(element.childNodes[c],validation);if(child)rngNode.appendChild(child);}}
+return rngNode;}
+mozile.rng.Schema.prototype._createRNGNode=function(element,validation){if(!element.nodeType||element.nodeType!=mozile.dom.ELEMENT_NODE)return null;if(element.namespaceURI!=mozile.xml.ns.rng)return null;var result;var type=mozile.dom.getLocalName(element);switch(type){case"grammar":result=new mozile.rng.Grammar(element,this);break;case"start":result=new mozile.rng.Start(element,this);break;case"element":result=new mozile.rng.Element(element,this);break;case"attribute":result=new mozile.rng.Attribute(element,this);break;case"empty":result=new mozile.rng.Empty(element,this);break;case"text":result=new mozile.rng.Text(element,this);break;case"group":result=new mozile.rng.Group(element,this);break;case"optional":result=new mozile.rng.Optional(element,this);break;case"oneOrMore":result=new mozile.rng.OneOrMore(element,this);break;case"zeroOrMore":result=new mozile.rng.ZeroOrMore(element,this);break;case"choice":result=new mozile.rng.Choice(element,this);break;case"define":result=new mozi
 le.rng.Define(element,this);break;case"ref":result=new mozile.rng.Ref(element,this);break;case"include":result=new mozile.rng.Include(element,this);break;case"data":result=new mozile.rng.Data(element,this);break;case"param":result=new mozile.rng.Param(element,this);break;case"value":result=new mozile.rng.Value(element,this);break;case"interleave":result=new mozile.rng.Interleave(element,this);break;case"div":result=new mozile.rng.Div(element,this);break;default:validation.logError(this,null,"Method mozile.rng.Schema._createRNGNode() found an unknown element '"+element.nodeName+"' with the RNG namespace.");return null;}
+if(result){this._indexNode(result);return result;}
+else return null;}
+mozile.rng.Schema.prototype._indexNode=function(node){var type=node.getType();if(!this._types[type])this._types[type]=new Array();this._types[type].push(node);if(node.getName){var name=node.getName();if(!this._names[type])this._names[type]=new Object();if(!this._names[type][name])this._names[type][name]=new Array();this._names[type][name].push(node);}}
+mozile.rng.Schema.prototype.getNodes=function(type,name){if(name){if(this._names[type]&&this._names[type][name])
+return this._names[type][name];else return new Array();}
+else{if(this._types[type])return this._types[type];else return new Array();}}
+mozile.rng.Schema.prototype.load=function(filepath,forceLoad){if(!forceLoad&&this._documents[filepath])return this._documents[filepath];var uri=mozile.getPath(filepath);uri=mozile.getAbsolutePath(uri,mozile.root);var xmlDoc=mozile.xml.load(uri);if(xmlDoc)this._documents[filepath]=xmlDoc;return xmlDoc;}
+mozile.rng.Schema.prototype.validate=function(element){if(!element)element=document.documentElement;if(!this._root)return false;var validation=new mozile.rng.Validation();this._root.resetAll();this._root.validate(element,validation);return validation;}
+mozile.rng.Validation=function(){this.isValid=true;this.isEmpty=false;this.allowText=false;this._currentElement=null;this._currentParent=null;this._lastValidElement=null;this._validAttributes=new Array();this._messages=new Array();}
+mozile.rng.Validation.prototype.toString=function(){return"[object mozile.rng.Validation]"};mozile.rng.Validation.prototype.getType=function(){return"validation";}
+mozile.rng.Validation.prototype.getCurrentElement=function(){return this._currentElement;}
+mozile.rng.Validation.prototype.setCurrentElement=function(element){if(element.nodeType==mozile.dom.ELEMENT_NODE){if(element==this._lastValidElement){this.logError(this,element,"An element has been marked as valid twice, which indicated an error");}
+else{this._lastValidElement=this._currentElement;this._currentElement=element;}}
+return element;}
+mozile.rng.Validation.prototype.getCurrentParent=function(){return this._currentParent;}
+mozile.rng.Validation.prototype.setCurrentParent=function(element){this._currentParent=element;return element;}
+mozile.rng.Validation.prototype.addAttribute=function(attr){this._validAttributes.push(attr);return attr;}
+mozile.rng.Validation.prototype.isAttributeValid=function(attr){for(var a=0;a<this._validAttributes.length;a++){if(mozile.browser.isMozilla&&mozile.browser.mozillaVersion<1.8){if(this._validAttributes[a].nodeName==attr.nodeName)return true;}
+if(this._validAttributes[a]==attr)return true;}
+return false;}
+mozile.rng.Validation.prototype.logMessage=function(rngNode,node,message,type){if(!type)type="Message";this._messages.push({"type":type,"rngNode":rngNode,"node":node,"message":message});}
+mozile.rng.Validation.prototype.logError=function(rngNode,node,message){this.logMessage(rngNode,node,message,"Error");this.isValid=false;}
+mozile.rng.Validation.prototype.getFirstError=function(){for(var m=0;m<this._messages.length;m++){if(this._messages[m].type!="Message")return this._messages[m];}
+return null;}
+mozile.rng.Validation.prototype.branch=function(){var validation=new mozile.rng.Validation();validation._currentParent=this._currentParent;return validation;}
+mozile.rng.Validation.prototype.append=function(validation,status){this._messages=this._messages.concat(validation._messages);if(status)this.isValid=status;else if(!validation.isValid)this.isValid=false;}
+mozile.rng.Validation.prototype.merge=function(validation){this.append(validation);this._validAttributes=this._validAttributes.concat(validation._validAttributes);if(validation.isEmpty)this.isEmpty=true;if(validation.allowText)this.allowText=true;if(validation._currentElement)this._currentElement=validation._currentElement;if(validation._lastValidElement)this._lastValidElement=validation._lastValidElement;}
+mozile.rng.Validation.prototype.report=function(errorsOnly){mozile.require("mozile.util");mozile.require("mozile.xpath");var messages=new Array();var maxType=8;var maxName=0;var maxLocation=0;var msg;var location;var rngName
+var lastNode;var lastLocation;for(var m=0;m<this._messages.length;m++){msg=this._messages[m];if(errorsOnly&&msg.type=="Message")continue;rngName="validation";if(msg.rngNode){if(msg.rngNode.getType())rngName=mozile.util.pad(msg.rngNode.getType(),11,true);if(msg.rngNode.getName)rngName=rngName+" "+msg.rngNode.getName();}
+location="";if(msg.node){if(msg.node==lastNode)location=lastLocation;else{location=mozile.xpath.getXPath(msg.node);location=location.replace(/xmlns:/g,"");lastNode=msg.node;lastLocation=location;if(location.length>maxLocation)maxLocation=location.length;}}
+if(rngName.length>maxName)maxName=rngName.length;messages.push([msg.type,rngName,location,msg.message]);}
+var output=new Array();var maxNum=Math.ceil(Math.log(messages.length+1)/Math.log(10))+1;for(m=0;m<messages.length;m++){msg=messages[m];output.push(mozile.util.pad((m+1)+".",maxNum)+" "+mozile.util.pad(msg[0],maxType)+" "+mozile.util.pad(msg[1],maxName)+"  "+mozile.util.pad(msg[2],maxLocation)+"  "+msg[3]);}
+return output.join(mozile.linesep);}
+mozile.rng.Node=function(element,schema){this._element=element;this._schema=schema;}
+mozile.rng.Node.prototype._cached=[this._mustHaveCache,this._mayHaveCache,this._descendantElementsCache,this._type];mozile.rng.Node.prototype.toString=function(){var type=this.getType();type=type.charAt(0).toUpperCase()+type.substring(1);var name="";if(this.getName)name=" '"+this.getName()+"'";return"[object mozile.rng."+type+name+"]";}
+mozile.rng.Node.prototype.getType=function(){if(!this._type)this._type=mozile.dom.getLocalName(this._element);return this._type;}
+mozile.rng.Node.prototype.getSchema=function(){return this._schema;}
+mozile.rng.Node.prototype.getGrammar=function(){var node=this;while(node){if(node.getType()=="grammar")return node;node=node.getParentNode();}
+return null;}
+mozile.rng.Node.prototype.getParentNode=function(){if(this._parentNode)return this._parentNode;return null;}
+mozile.rng.Node.prototype.getParentElement=function(){var parent=this.getParentNode();while(parent){if(parent.getType()=="element")return parent;parent=parent.getParentNode();}
+return null;}
+mozile.rng.Node.prototype.getNextSibling=function(){var parent=this.getParentNode();if(!parent)return null;var siblings=parent.getChildNodes();for(var r=0;r<siblings.length;r++){if(siblings[r]==this){if(siblings[r+1])return siblings[r+1];}}
+return null;}
+mozile.rng.Node.prototype.getChildNodes=function(){if(!this._childNodes)this._childNodes=new Array();return this._childNodes;}
+mozile.rng.Node.prototype.getChildNode=function(index){var children=this.getChildNodes();if(children&&children.length&&children.length>0&&index<children.length)
+return children[index];else return null;}
+mozile.rng.Node.prototype.appendChild=function(child){if(child){this.getChildNodes().push(child);child._parentNode=this;}
+return child;}
+mozile.rng.Node.prototype.removeChild=function(child){var children=new Array();for(var c=0;c<this.getChildNodes().length;c++){if(this.getChildNodes()[c]==child)continue;children.push(this.getChildNodes()[c]);}
+if(children.length==this.getChildNodes().length)
+throw Error("mozile.rng.Node.removeChild(): The given node is not child of this node.");else this._childNodes=children;child._parentNode=null;return child;}
+mozile.rng.Node.prototype.getDescendants=function(types,deep){if(deep!==false)deep=true;var descendants=new Array();if(!deep&&mozile.rng.checkType(types,this.getType())){descendants.push(this);}
+else{var result;for(var c=0;c<this.getChildNodes().length;c++){result=this.getChildNode(c).getDescendants(types,false);descendants=descendants.concat(result);}}
+return descendants;}
+mozile.rng.Node.prototype.mustContain=function(type){if(!this._mustHaveCache)this._mustHaveCache=new Object();if(this._mustHaveCache[type])return this._mustHaveCache[type];var result=false;for(var c=0;c<this.getChildNodes().length;c++){if(this.getChildNodes()[c].mustHave(type)){result=true;break;}}
+this._mustHaveCache[type]=result;return result;}
+mozile.rng.Node.prototype.mayContain=function(type){if(!this._mayHaveCache)this._mayHaveCache=new Object();if(this._mayHaveCache[type])return this._mayHaveCache[type];var result=false;for(var c=0;c<this.getChildNodes().length;c++){if(this.getChildNodes()[c].mayHave(type)){result=true;break;}}
+this._mayHaveCache[type]=result;return result;}
+mozile.rng.Node.prototype.mustHave=function(type){if(this.getType()==type)return true;else return this.mustContain(type);}
+mozile.rng.Node.prototype.mayHave=function(type){if(this.getType()==type)return true;else return this.mayContain(type);}
+mozile.rng.Node.prototype.reset=function(){for(var i=0;i<this._cached.length;i++){this._cached[i]=undefined;}}
+mozile.rng.Node.prototype.resetAll=function(){this.reset();for(var c=0;c<this.getChildNodes().length;c++){this.getChildNodes()[c].reset;}}
+mozile.rng.Node.prototype.selfValidate=function(validation){if(!mozile.dom.getFirstChildElement(this._element))
+validation.logError(this,this._element,"This RNG element must have at least one child element.");return validation;}
+mozile.rng.Node.prototype.selfValidateAll=function(validation){validation=this.selfValidate(validation);validation.logMessage(this,null,"Self validated.");for(var r=0;r<this.getChildNodes().length;r++){if(!validation.isValid)break;validation=this.getChildNodes()[r].selfValidateAll(validation);}
+return validation;}
+mozile.rng.Node.prototype.validate=function(node,validation){validation.logError(this,node,"The validate() method is not defined yet for "+this+".");return validation;}
+mozile.rng.Grammar=function(element,schema){this._element=element;this._schema=schema;this._start=null;this._definitions=new Object;}
+mozile.rng.Grammar.prototype=new mozile.rng.Node;mozile.rng.Grammar.prototype.constructor=mozile.rng.Grammar;mozile.rng.Grammar.prototype.getParentGrammar=function(){var parent=this.getParentNode();while(parent){if(parent.getType()=="grammar")return parent;parent=parent.getParentNode();}
+return null;}
+mozile.rng.Grammar.prototype.appendChild=function(child){if(child&&child.getType){switch(child.getType()){case"start":return this.setStart(child);break;case"define":return this.addDefinition(child);break;case"include":case"div":break;default:throw Error("RNG grammar element cannot have a child of type '"+child.getType()+"'.");break;}
+this.getChildNodes().push(child);child._parentNode=this;}
+return child;}
+mozile.rng.Grammar.prototype.getStart=function(){if(this._start)return this._start;else return null;}
+mozile.rng.Grammar.prototype.setStart=function(start){if(start.getType&&start.getType()=="start"){if(this._start)this._start.combine(start);else{this._start=start;this.getChildNodes().push(start);start._parentNode=this;}
+return start;}
+else return null;}
+mozile.rng.Grammar.prototype.getDefinition=function(name){if(this._definitions[name])return this._definitions[name];else return null;}
+mozile.rng.Grammar.prototype.addDefinition=function(definition){if(this._definitions[definition.getName()]){definition=this._definitions[definition.getName()].combine(definition);}
+else{this._definitions[definition.getName()]=definition;this.getChildNodes().push(definition);definition._parentNode=this;}
+return definition;}
+mozile.rng.Grammar.prototype.mustHave=function(type){if(this.getType()==type)return true;var result=false;var start=this.getStart();if(start)result=start.mustHave(type);else throw Error("mozile.rng.Grammar.mustHave() requires getStart() to return a mozile.rng.Start object.");return result;}
+mozile.rng.Grammar.prototype.mayHave=function(type){if(this.getType()==type)return true;var result=false;var start=this.getStart();if(start)result=start.mayHave(type);else throw Error("mozile.rng.Grammar.mayHave() requires getStart() to return a mozile.rng.Start object.");return result;}
+mozile.rng.Grammar.prototype.validate=function(node,validation){var start=this.getStart();if(start)validation=start.validate(node,validation);else validation.logError(this,node,"RNG grammar element must have a start element in order to validate a node, but it does not.");return validation;}
+mozile.rng.Start=func

<TRUNCATED>

[61/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
new file mode 100644
index 0000000..d0ceed7
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcProvider;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.web.ontologies.BACKUP;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A service to restore the triple collection
+ *
+ * @author reto
+ */
+@Component
+@Service(Restorer.class)
+public class Restorer {
+
+    private final static Logger log = LoggerFactory.getLogger(Restorer.class);
+
+    @Reference
+    Parser parser;
+
+    /**
+     * Restores triple-collections from a backup to a specified TcProvider
+     *
+     * @param backupData the bytes of a backup zip
+     * @param target the TcProvider into which to restore the data
+     */
+    public void restore(InputStream backupData, TcProvider target) throws IOException {
+        ZipInputStream compressedTcs = new ZipInputStream(backupData);
+
+        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
+        String folder = "";
+        ZipEntry entry;
+        ImmutableGraph metaGraph = null;
+        while ((entry = compressedTcs.getNextEntry()) != null) {
+            String entryName = entry.getName();
+            if (entry.isDirectory()) {
+                folder = entryName;
+            } else {
+                File tempFile = File.createTempFile("graph", "data");
+                OutputStream fos = new FileOutputStream(tempFile);
+                
+                int count;
+                byte buffer[] = new byte[2048];
+                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
+                    fos.write(buffer, 0, count);
+                }
+                fos.close();
+                InputStream serializedGraph = new FileInputStream(tempFile);
+                /*
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                int count;
+                byte buffer[] = new byte[2048];
+                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
+                    baos.write(buffer, 0, count);
+                }
+                baos.close();
+                ByteArrayInputStream serializedGraph = new ByteArrayInputStream(
+                        baos.toByteArray());
+                */
+                if (entryName.equals("triplecollections.nt")) {
+                    metaGraph = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                } else {
+                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                    extractedTc.put(entryName, deserializedGraph);
+                }
+                serializedGraph.close();
+            }
+        }
+        if (metaGraph == null) {
+            throw new RuntimeException("No metadata graph found in backup.");
+        }
+        compressedTcs.close();
+        {
+            final Iterator<Triple> mGraphIterator = metaGraph.filter(null, RDF.type, BACKUP.Graph);
+            while (mGraphIterator.hasNext()) {
+                GraphNode graphGN = new GraphNode(mGraphIterator.next().getSubject(), metaGraph);
+                String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
+                Graph extracted = extractedTc.get(fileName);
+                
+                Graph mGraph;
+                boolean created = false;
+                try {
+                    mGraph = target.getGraph((Iri)graphGN.getNode());
+                    try {
+                        mGraph.clear();
+                    } catch (UnsupportedOperationException ex) {
+                        log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
+                                + "collection could not be cleared");
+                        continue;
+                    }
+                } catch (NoSuchEntityException ex) {
+                    mGraph = target.createGraph((Iri)graphGN.getNode());
+                    created = true;
+                }
+                try {
+                    mGraph.addAll(extracted);
+                } catch (Exception ex) {
+                    String actionDone = created ? "created" : "cleared";
+                    log.error("after the mgraph "+graphGN.getNode()+" could successfully be "+actionDone
+                            + ", an exception occured adding the data", ex);
+                }
+            }
+        }
+        {
+            final Iterator<Triple> graphIterator = metaGraph.filter(null, RDF.type, BACKUP.Graph);
+            while (graphIterator.hasNext()) {
+                GraphNode graphGN = new GraphNode(graphIterator.next().getSubject(), metaGraph);
+                String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
+                Graph extracted = extractedTc.get(fileName);
+                try {
+                    target.deleteGraph((Iri)graphGN.getNode());
+                } catch (UnsupportedOperationException ex) {
+                    log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
+                            + "collection could not be deleted");
+                    continue;
+                } catch (NoSuchEntityException ex) {
+                    log.debug("could not remove "+graphGN.getNode()+", no such entity");
+                }
+                target.createImmutableGraph((Iri)graphGN.getNode(), extracted);
+            }
+        }
+        for (Map.Entry<String, Graph> pathTcPair : extractedTc.entrySet()) {
+            Literal fileNameLit = LiteralFactory.getInstance().createTypedLiteral(
+                        pathTcPair.getKey());
+            Iterator<Triple> graphResIterator = metaGraph.filter(null, BACKUP.file, fileNameLit);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
new file mode 100644
index 0000000..f3678a7
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.ext.Providers;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+
+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;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.sparql.ResultSet;
+import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
+import org.apache.clerezza.rdf.core.sparql.query.Variable;
+import org.apache.commons.rdf.Literal;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * MessageBodyWirter for <code>ResultSet</code>.
+ * 
+ * @author mir, reto
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Produces({"application/xml", "text/xml", "application/sparql-results+xml"})
+@Provider
+public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet> {
+
+    @Reference
+    TcManager tcManager;
+
+
+    private Providers providers;
+
+    final Logger logger = LoggerFactory.getLogger(ResultSetMessageBodyWriter.class);
+
+    @Override
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
+            MediaType mediaType) {
+        return ResultSet.class.isAssignableFrom(type);
+    }
+
+    @Override
+    public long getSize(ResultSet t, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return -1;
+    }
+
+    @Override
+    public void writeTo(ResultSet resultSet, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,
+            Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException {
+
+        Source source = toXmlSource(resultSet);
+        MessageBodyWriter<Source> sourceMessageBodyWriter = 
+                providers.getMessageBodyWriter(Source.class, null, null, mediaType);
+        sourceMessageBodyWriter.writeTo(source, Source.class, null, null, mediaType,
+                httpHeaders, entityStream);
+    }
+
+    @Context
+    public void setProviders(Providers providers) {
+        this.providers = providers;
+    }
+
+    /**
+     * Helper: transforms a {@link ResultSet} or a {@link Boolean} to a
+     * {@link DOMSource}
+     *
+     * @param queryResult
+     * @param query
+     * @param applyStyle
+     */
+    private Source toXmlSource(ResultSet queryResult) {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        try {
+            Document doc = dbf.newDocumentBuilder().newDocument();
+            // adding root element
+            Element root = doc.createElement("sparql");
+            root.setAttribute("xmlns", "http://www.w3.org/2005/sparql-results#");
+            doc.appendChild(root);
+            Element head = doc.createElement("head");
+            root.appendChild(head);
+            Set<Object> variables = new HashSet<Object>();
+            Element results = doc.createElement("results");
+            SolutionMapping solutionMapping = null;
+            while (queryResult.hasNext()) {
+                solutionMapping = queryResult.next();                
+                createResultElement(solutionMapping, results, doc);                
+            }
+            createVariable(solutionMapping, head, doc);
+            root.appendChild(results);
+
+            DOMSource source = new DOMSource(doc);
+            return source;
+
+        } catch (ParserConfigurationException e) {
+            throw createWebApplicationException(e);
+        }
+    }
+
+    /**
+     * Creates a WebApplicationexception and prints a logger entry
+     */
+    private WebApplicationException createWebApplicationException(Exception e) {
+        return new WebApplicationException(Response.status(Status.BAD_REQUEST)
+                .entity(e.getMessage().replace("<", "&lt;").replace("\n",
+                        "<br/>")).build());
+    }
+
+
+    /**
+     * Helper: creates value element from {@link RdfTerm} depending on its
+     * class
+     *
+     */
+    private Element createValueElement(RdfTerm resource, Document doc) {
+        Element value = null;
+        if (resource instanceof Iri) {
+            value = doc.createElement("uri");
+            value.appendChild(doc.createTextNode(((Iri) resource)
+                    .getUnicodeString()));
+        } else if (resource instanceof Literal) {
+            value = doc.createElement("literal");
+            value.appendChild(doc.createTextNode(((Literal) resource)
+                    .getLexicalForm()));
+            value.setAttribute("datatype", (((Literal) resource)
+                    .getDataType().getUnicodeString()));
+            Language lang = ((Literal) resource).getLanguage();
+            if (lang != null) {
+                value.setAttribute("xml:lang", (lang.toString()));
+            }
+        } else {
+            value = doc.createElement("bnode");
+            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
+        }
+        return value;
+    }
+
+    /**
+     * Helper: creates results element from ResultSet
+     *
+     */
+    private void createResultElement(SolutionMapping solutionMap, Element results, Document doc) {
+        Set<Variable> keys = solutionMap.keySet();
+        Element result = doc.createElement("result");
+        results.appendChild(result);
+        for (Variable key : keys) {
+            Element bindingElement = doc.createElement("binding");
+            bindingElement.setAttribute("name", key.getName());
+            bindingElement.appendChild(createValueElement(
+                    (RdfTerm) solutionMap.get(key), doc));
+            result.appendChild(bindingElement);
+        }
+    }
+
+    private void createVariable(SolutionMapping solutionMap, Element head, Document doc) {
+        Set<Variable> keys = solutionMap.keySet();
+        for (Variable key : keys) {
+            Element varElement = doc.createElement("variable");
+            varElement.setAttribute("name", key.getName());
+            head.appendChild(varElement);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
new file mode 100644
index 0000000..fa29fde
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.commons.rdf.Graph;
+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;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.FOAF;
+import org.apache.clerezza.rdf.ontologies.OWL;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.Smusher;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
+ * 
+ * @author reto
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/admin/graphs/smush")
+public class Smush {
+    private final Iri tBoxName = new Iri("urn:x-localinstance:/tbox.graph");
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    private Graph tBox;
+
+    protected void activate(ComponentContext componentContext) {
+        try {
+            //getting the tBox here means no read right on Tbox is necessary
+            //when smushing
+            tBox = tcManager.getGraph(tBoxName);
+        } catch (NoSuchEntityException e) {
+            tBox = new SimpleGraph();
+            tBox.add(new TripleImpl(FOAF.mbox, RDF.type, OWL.InverseFunctionalProperty));
+            tBox.add(new TripleImpl(FOAF.mbox_sha1sum, RDF.type, OWL.InverseFunctionalProperty));
+            tBox.add(new TripleImpl(PLATFORM.userName, RDF.type, OWL.InverseFunctionalProperty));
+            tBox = tcManager.createImmutableGraph(tBoxName, tBox);
+        }
+    }
+
+
+    
+    @POST
+    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+        Graph mGraph = tcManager.getGraph(graphName);
+        Smusher.smush(mGraph, tBox);
+        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
new file mode 100644
index 0000000..69f318f
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
@@ -0,0 +1,411 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+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;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.rdf.core.sparql.ParseException;
+import org.apache.clerezza.rdf.core.sparql.QueryParser;
+import org.apache.clerezza.rdf.core.sparql.ResultSet;
+import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
+import org.apache.clerezza.rdf.core.sparql.query.Query;
+import org.apache.clerezza.rdf.core.sparql.query.SelectQuery;
+import org.apache.clerezza.rdf.core.sparql.query.Variable;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.web.ontologies.SPARQLENDPOINT;
+import org.apache.commons.rdf.Literal;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.ProcessingInstruction;
+
+/**
+ * Provides methods to query a graph over the web.
+ * 
+ * @author ali, hasan
+ * 
+ */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/sparql")
+public class SparqlEndpoint {
+
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+    
+    
+    @Reference
+    TcManager tcManager;
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    /**
+     * The activate method is called when SCR activates the component configuration.
+     * @param componentContext
+     */
+    protected void activate(ComponentContext componentContext) {
+        URL templateURL = getClass().getResource("sparql-endpoint.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new Iri(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
+                null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
+    }
+
+    @GET
+    @Path("form")
+    public GraphNode getAvailableGraphUris(@Context UriInfo uriInfo) {
+        AccessController.checkPermission(new SparqlEndpointAccessPermission());
+        TrailingSlash.enforceNotPresent(uriInfo);
+        GraphNode graphNode = new GraphNode(new BlankNode(), new SimpleGraph());
+        Set<Iri> tripleCollections = tcManager.listGraphs();
+        for (Iri uriRef : tripleCollections) {
+            graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
+        }
+        graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
+        return graphNode;
+    }
+
+    /**
+     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
+     * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
+     * successfully carried out. A {@link DOMSource} is returned if an ASK or a
+     * SELECT sparql query was submitted and successfully carried out. The query
+     * is performed against a specified graph with the URI
+     * <code>defaultGrapfUri</code>
+     * 
+     * @param queryString
+     *            URL encoded sparql query
+     * @param defaultGraphUri
+     *            URI of the default graph, an {@link Iri} is expected
+     * @param applyStyleSheet
+     * @param serverSide
+     * @param styleSheetUri 
+     * @return either a {@link ImmutableGraph} or a {@link DOMSource}
+     */
+    @POST
+    public Object runFormQuery(@FormParam("query") String queryString,
+            @FormParam("default-graph-uri") Iri defaultGraphUri,
+            @FormParam("apply-style-sheet") String applyStyleSheet,
+            @FormParam("server-side") String serverSide,
+            @FormParam("style-sheet-uri") String styleSheetUri) {
+        AccessController.checkPermission(new SparqlEndpointAccessPermission());
+        logger.info("Executing SPARQL Query: " + queryString);
+        boolean applyStyle;
+        if (applyStyleSheet != null && applyStyleSheet.equals("on")) {
+            applyStyle = true;
+        } else {
+            applyStyle = false;
+        }
+        boolean applyServerSide;
+        if (serverSide != null && serverSide.equals("on")){
+            applyServerSide = true;
+        } else {
+            applyServerSide = false;
+        }
+        //Graph defaultGraph = null;
+        Object result = null;
+        try {
+            if (defaultGraphUri == null
+                    || defaultGraphUri.getUnicodeString().equals("")) {
+                defaultGraphUri = new Iri(Constants.CONTENT_GRAPH_URI_STRING);
+                //defaultGraph = contentGraph;
+            } else {
+                //defaultGraph = tcManager.getTriples(defaultGraphUri);
+            }
+            //this is now only used to get the variable names
+            //TODO use ResultSet.getResultVars instead
+            Query query = QueryParser.getInstance().parse(queryString);
+            result = tcManager.executeSparqlQuery(queryString, defaultGraphUri);
+            if (result instanceof ImmutableGraph) {
+                return (ImmutableGraph) result;
+            } else if ((result instanceof ResultSet)
+                    || (result instanceof Boolean)) {
+                Source source = toXmlSource(result, query, applyStyle,
+                        applyServerSide, styleSheetUri);
+                if (applyStyle && applyServerSide) {
+                    Response.ResponseBuilder rb = Response.ok(source).type(
+                            MediaType.APPLICATION_XHTML_XML_TYPE);
+                    return rb.build();
+                }
+                return source;
+            } else {
+                throw new WebApplicationException(
+                        Response.status(Status.BAD_REQUEST).entity("Only " +
+                        "queries yielding to a ImmutableGraph, a ResultSet or " +
+                        "Boolean are supported").build());
+            }
+        } catch (ParseException e) {
+            throw createWebApplicationException(e);
+        } catch (NoSuchEntityException e) {
+            throw createWebApplicationException(e);
+        }
+    }
+
+    /**
+     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
+     * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
+     * successfully carried out. A {@link DOMSource} is returned if an ASK or a
+     * SELECT sparql query was submitted and successfully carried out. The query
+     * is performed against a specified graph with the URI
+     * <code>defaultGrapfUri</code>
+     * 
+     * @param queryString
+     * @param defaultGraphUri
+     * @param styleSheetUri
+     * @param serverSide
+     * @return
+     */
+    @GET
+    public Object runGetQuery(@QueryParam("query") String queryString,
+            @QueryParam("default-graph-uri") Iri defaultGraphUri,
+            @QueryParam("style-sheet-uri") String styleSheetUri,
+            @QueryParam("server-side") String serverSide) {
+        AccessController.checkPermission(new SparqlEndpointAccessPermission());
+        String applyStyleSheet = null;
+        if(styleSheetUri != null){
+            applyStyleSheet = "on";
+        }
+        if(serverSide != null && serverSide.equals("true")){
+            serverSide = "on";
+        }
+        return runFormQuery(queryString, defaultGraphUri, applyStyleSheet,
+                serverSide,    styleSheetUri);
+    }
+
+    /**
+     * Helper: returns the variables of a sparql {@link SelectQuery}
+     * 
+     * @param queryString
+     * @return
+     */
+    private List<Variable> getVariables(Query query) {
+        if (query instanceof SelectQuery) {
+            return ((SelectQuery) query).getSelection();
+        } else {
+            return new ArrayList<Variable>();
+        }
+    }
+
+    /**
+     * Helper: transforms a {@link ResultSet} or a {@link Boolean} to a
+     * {@link DOMSource}
+     * 
+     * @param queryResult
+     * @param query
+     * @param applyStyle 
+     */
+    private Source toXmlSource(Object queryResult, Query query,
+            boolean applyStyle, boolean applyServerSide, String styleSheetUri) {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        try {
+            Document doc = dbf.newDocumentBuilder().newDocument();
+            // adding root element
+            Element root = doc.createElement("sparql");
+            root.setAttribute("xmlns", "http://www.w3.org/2005/sparql-results#");
+            doc.appendChild(root);
+            Element head = doc.createElement("head");
+            root.appendChild(head);
+            if (queryResult instanceof Boolean) {
+                Element booleanElement = doc.createElement("boolean");
+                booleanElement.appendChild(doc.createTextNode(queryResult
+                        .toString()));
+                root.appendChild(booleanElement);
+            } else {
+                List<Variable> variables = getVariables(query);
+                for (Variable var : variables) {
+                    Element varElement = doc.createElement("variable");
+                    varElement.setAttribute("name", var.getName());
+                    head.appendChild(varElement);
+                }
+                root.appendChild(createResultsElement((ResultSet) queryResult,
+                        doc));
+            }
+            DOMSource source = new DOMSource(doc);
+            if (applyStyle) {
+                ProcessingInstruction instruction = doc
+                        .createProcessingInstruction("xml-stylesheet",
+                                "type=\"text/xsl\" href=\"" + styleSheetUri + "\"");
+                doc.insertBefore(instruction, root);
+                if (applyServerSide) {
+                    return applyStyleServerSide(source, styleSheetUri);
+                }
+            }
+            return source;
+
+        } catch (ParserConfigurationException e) {
+            throw createWebApplicationException(e);
+        }
+    }
+
+    /**
+     * Applies a style sheet to a XML on server side
+     * @param source
+     *            XML result
+     * @param styleSheetUri
+     *            URI of the style sheet
+     * @return
+     * @throws TransformerException
+     * @throws IOException
+     */
+    private Source applyStyleServerSide(final DOMSource source,
+            final String styleSheetUri) {
+        return AccessController.doPrivileged(new PrivilegedAction<DOMSource>() {
+            @Override
+            public DOMSource run() {
+                try {
+                    StreamResult streamResult = new StreamResult(
+                            new ByteArrayOutputStream());
+                    final TransformerFactory tf = TransformerFactory
+                            .newInstance();
+                    Transformer transformer = tf.newTransformer();
+                    transformer.transform(source, streamResult);
+                    final URL stylesheet = new URL(styleSheetUri);
+                    Source streamSource = new StreamSource(
+                            new ByteArrayInputStream(
+                            ((ByteArrayOutputStream) streamResult
+                                    .getOutputStream()).toByteArray()));
+                    DOMResult domResult = new DOMResult();
+                    StreamSource xslFileSource = new StreamSource(stylesheet
+                            .openStream());
+                    Transformer xslTransformer = tf.newTransformer(xslFileSource);
+                    xslTransformer.transform(streamSource, domResult);
+                    return new DOMSource(domResult.getNode());
+                } catch (TransformerConfigurationException ex) {
+                    throw createWebApplicationException(ex);
+                } catch (TransformerException ex) {
+                    throw createWebApplicationException(ex);
+                } catch (IOException ex) {
+                    throw createWebApplicationException(ex);
+                }
+            }
+        });
+    }
+
+    /**
+     * Creates a WebApplicationexception and prints a logger entry
+     */
+    private WebApplicationException createWebApplicationException(Exception e) {
+        logger.info(e.getClass().getSimpleName() + ": {}", e.getMessage());
+        return new WebApplicationException(Response.status(Status.BAD_REQUEST)
+                .entity(e.getMessage().replace("<", "&lt;").replace("\n",
+                        "<br/>")).build());
+    }
+
+    /**
+     * Helper: creates results element from ResultSet
+     * 
+     */
+    private Element createResultsElement(ResultSet resultSet, Document doc) {
+        Element results = doc.createElement("results");
+        while (resultSet.hasNext()) {
+            SolutionMapping solutionMap = resultSet.next();
+            Set<Variable> keys = solutionMap.keySet();
+            Element result = doc.createElement("result");
+            results.appendChild(result);
+
+            for (Variable key : keys) {
+                Element bindingElement = doc.createElement("binding");
+                bindingElement.setAttribute("name", key.getName());
+                bindingElement.appendChild(createValueElement(
+                        (RdfTerm) solutionMap.get(key), doc));
+                result.appendChild(bindingElement);
+            }
+        }
+        return results;
+    }
+
+    /**
+     * Helper: creates value element from {@link RdfTerm} depending on its
+     * class
+     * 
+     */
+    private Element createValueElement(RdfTerm resource, Document doc) {
+        Element value = null;
+        if (resource instanceof Iri) {
+            value = doc.createElement("uri");
+            value.appendChild(doc.createTextNode(((Iri) resource)
+                    .getUnicodeString()));
+        } else if (resource instanceof Literal) {
+            value = doc.createElement("literal");
+            value.appendChild(doc.createTextNode(((Literal) resource)
+                    .getLexicalForm()));
+            value.setAttribute("datatype", (((Literal) resource)
+                    .getDataType().getUnicodeString()));
+            Language lang = ((Literal) resource).getLanguage();
+            if (lang != null) {
+                value.setAttribute("xml:lang", (lang.toString()));
+            }
+        } else {
+            value = doc.createElement("bnode");
+            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
+        }
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
new file mode 100644
index 0000000..4dd93a3
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.rdf.web.core;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Permission to use the Sparql Endpoint GUI. Note that the user
+ * additionally needs permission to read a graph.
+ *
+ * @author tio
+ */
+@PermissionInfo(value="Sparql Endpoint Access Permission", description="Grants access " +
+    "to the Sparql Endpoint")
+public class SparqlEndpointAccessPermission extends Permission{
+
+    public SparqlEndpointAccessPermission() {
+        super("Sparql Endpoint Access permission");
+    }
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public SparqlEndpointAccessPermission(String target, String actions) {
+        super("Sparql Endpoint Access permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 577987;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
new file mode 100644
index 0000000..6a71c01
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
@@ -0,0 +1,252 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.core.UriInfo;
+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;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.jaxrs.utils.form.FormFile;
+import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.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.serializedform.Parser;
+import org.apache.clerezza.web.fileserver.util.MediaTypeGuesser;
+
+/**
+ * Provides methods to GET, PUT, and POST an SCB graph over the web.
+ * To be deployed in a JAX-RS runtime.
+ * 
+ * @author hasan
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/graph")
+public class WebAccess {
+
+    @Reference
+    TcManager tcManager;
+
+    @Reference
+    private Parser parser;
+
+    final Logger logger = LoggerFactory.getLogger(WebAccess.class);
+
+    /**
+     * Gets the Graph with specified name
+     *
+     * @param name
+     * @return
+     */
+    @GET
+    public Graph getTriples(@QueryParam("name") Iri name) {
+        AccessController.checkPermission(new WebAccessPermission());
+        if (name == null) {
+            Response r = Response.status(Response.Status.BAD_REQUEST)
+                    .entity("must specify a graph name")
+                    .type(MediaType.TEXT_PLAIN_TYPE).build();
+            throw new WebApplicationException(r);
+        }
+        Graph result = tcManager.getGraph(name);
+        logger.debug("Got graph of size {} ", result.size());
+        int i = 1;
+        if (logger.isDebugEnabled()) {
+            for (Triple triple : result) {
+                logger.debug("({}) with triples {}", i++, triple.toString());
+            }
+            logger.debug("returning");
+        }
+        return result;
+    }
+
+    /**
+     * Puts the triples replacing the triples of the existing Graph with the
+     * specified name. If the graph doesn't exist creates a new <code>Graph</code> 
+     * with the specified name and puts the triples
+     * 
+     *
+     * @param name
+     * @param triples
+     */
+    @PUT
+    public void putTriples(@QueryParam("name") Iri name, Graph triples) {
+        AccessController.checkPermission(new WebAccessPermission());
+        Graph mGraph;
+        try {
+            mGraph = tcManager.getGraph(name);
+        } catch (NoSuchEntityException e) {
+            mGraph = tcManager.createGraph(name);
+        }
+        Lock writeLock = mGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            mGraph.clear();
+            mGraph.addAll(triples);
+        } finally {
+            writeLock.unlock();
+        }
+    }
+
+    /**
+     * Posts triples to be placed into an {@link Graph} of the specified name.
+     * If an {@link Graph} with this name doesn't already exist, a new one
+     * is created and filled with the triples posted.
+     * @param form
+     *        a multipart/form-data consisting of:
+     *        - a {@link FormFile} labeled "graph" containing the triples and
+     *            the mime-type.
+     *        - a text field labeled "name" specifying the name of the Graph.
+     *        - an optional text field labeled "mode" specifying the mode.
+     *            If the mode is "replace", existing triples of the Graph will be
+     *            deleted before new triples are added. If the mode is not
+     *            specified or is "append", posted triples are added to the Graph.
+     *        - an optional text field labeled "redirection" specifying an URI
+     *            which the client should be redirected to in case of success.
+     * @return
+     *        {@link Response}. A response with status code BAD REQUEST (400) is
+     *        returned if the required data are missing. If the request can be
+     *        satisfied, one of the following responses is returned:
+     *        - SEE OTHER (303), if redirection is specified.
+     *        - CREATED (201), if redirection is not specified and a new
+     *            {@link Graph} is created.
+     *        - NO CONTENT (204), if redirection is not specified and no new
+     *            {@link Graph} is created.
+     */
+    @POST
+    @Consumes("multipart/form-data")
+    public Response postTriples(MultiPartBody form, @Context UriInfo uriInfo) {
+
+        AccessController.checkPermission(new WebAccessPermission());
+        FormFile[] formFiles = form.getFormFileParameterValues("graph");
+        if (formFiles.length == 0) {
+            responseWithBadRequest("form file parameter 'graph' is missing");
+        }
+        FormFile formFile = formFiles[0];
+        byte[] graph = formFile.getContent();
+        if (graph == null || (graph.length == 0)) {
+            responseWithBadRequest("no triples uploaded");
+        }
+        MediaType mediaType = formFile.getMediaType();
+        if (mediaType == null) {
+            responseWithBadRequest("mime-type not specified");
+        }
+        if (mediaType.equals(MediaType.APPLICATION_OCTET_STREAM_TYPE)) {
+            MediaType guessedType = MediaTypeGuesser.getInstance().guessTypeForName(formFile.getFileName());
+            if (guessedType != null) {
+                mediaType = guessedType;
+            }
+        }
+        String graphName = getFirstTextParameterValue(form, "name", true);
+        if (graphName == null) {
+            responseWithBadRequest("graph name not specified");
+        }
+        String mode = getFirstTextParameterValue(form, "mode", false);
+        if (mode != null) {
+            if (!(mode.equals("replace") || mode.equals("append"))) {
+                responseWithBadRequest("unknown mode");
+            }
+        } else {
+            mode = "append";
+        }
+        InputStream is = new ByteArrayInputStream(graph);
+        ImmutableGraph parsedGraph = parser.parse(is, mediaType.toString());
+        Iri graphUri = new Iri(graphName);
+        Graph mGraph;
+        boolean newGraph = false;
+        try {
+            mGraph = tcManager.getGraph(graphUri);
+        } catch (NoSuchEntityException e) {
+            mGraph = tcManager.createGraph(graphUri);
+            newGraph = true;
+        }
+        Lock writeLock = mGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            if (!newGraph && mode.equals("replace")) {
+                mGraph.clear();
+            }
+            mGraph.addAll(parsedGraph);
+        } finally {
+            writeLock.unlock();
+        }
+        String redirection = getFirstTextParameterValue(form, "redirection", false);
+        if (redirection == null) {
+            if (newGraph) {
+                return Response.status(Status.CREATED).build();
+            } else {
+                return Response.status(Status.NO_CONTENT).build();
+            }
+        }
+        return RedirectUtil.createSeeOtherResponse(redirection, uriInfo);
+    }
+
+    @GET
+    @Path("upload-form")
+    @Produces("application/xhtml+xml")
+    public InputStream getUploadForm() {
+        AccessController.checkPermission(new WebAccessPermission());
+        return getClass().getResourceAsStream("upload-form.xhtml");
+    }
+
+    private void responseWithBadRequest(String message) {
+        logger.warn(message);
+        throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
+                .entity(message).build());
+    }
+
+    private String getFirstTextParameterValue(MultiPartBody form,
+            String parameterName, boolean mandatory) {
+        String[] paramValues = form.getTextParameterValues(parameterName);
+        if (paramValues.length == 0) {
+            if (mandatory) {
+                responseWithBadRequest("text parameter '" + parameterName +
+                        "' is missing");
+            }
+            return null;
+        }
+        return paramValues[0];
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
new file mode 100644
index 0000000..8964eda
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.rdf.web.core;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Permission to use the ImmutableGraph via Web. Note that the user
+ * additionally needs permission to read a graph.
+ *
+ * @author mir
+ */
+@PermissionInfo(value="ImmutableGraph via Web Access Permission", description="Grants access " +
+    "to the ImmutableGraph via Web")
+public class WebAccessPermission extends Permission{
+
+    public WebAccessPermission() {
+        super("ImmutableGraph via Web access permission");
+    }
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public WebAccessPermission(String target, String actions) {
+        super("ImmutableGraph via Web access permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 477987;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
new file mode 100644
index 0000000..3187d42
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
@@ -0,0 +1,77 @@
+/*
+ *  Copyright 2010 mir.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package org.apache.clerezza.rdf.web.core.utils;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import org.apache.clerezza.rdf.core.sparql.ResultSet;
+import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
+
+/**
+ * Wrapps a set of <code>ResultSet</code>s so it acts like a single ResultSet.
+ *
+ * @author mir
+ */
+public class ResultSetsWrapper implements ResultSet {
+
+    private Iterator<ResultSet> resultSetsIter;
+    private ResultSet currentResultSet;
+    private List<String> varNames;
+
+    public ResultSetsWrapper(Set<ResultSet> resultSets) {
+        this.resultSetsIter = resultSets.iterator();
+        this.currentResultSet = resultSetsIter.next();
+
+        Set<String> uniqueVarNames = new HashSet<String>();
+        for (ResultSet resultSet : resultSets) {
+			uniqueVarNames.addAll(resultSet.getResultVars());
+		}
+    	this.varNames = new ArrayList<String>(uniqueVarNames);
+    }
+
+    @Override
+    public boolean hasNext() {
+        if (currentResultSet.hasNext()) {
+            return true;
+        } else {
+            if (resultSetsIter.hasNext()) {
+                currentResultSet = resultSetsIter.next();
+                return hasNext();
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public SolutionMapping next() {
+        hasNext();
+        return currentResultSet.next();
+    }
+
+    @Override
+    public void remove() {
+        currentResultSet.remove();
+    }
+    
+    @Override
+    public List<String> getResultVars() {
+    	return varNames;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/META-INF/documentation.nt b/rdf/web/rdf.web.core/src/main/resources/META-INF/documentation.nt
new file mode 100644
index 0000000..daf3e2e
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/resources/META-INF/documentation.nt
@@ -0,0 +1,52 @@
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://discobits.org/ontology#pos> "1" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://discobits.org/ontology#holds> <bundle:///scb-web-content> .
+<bundle:///scb-web-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-title> <http://discobits.org/ontology#infoBit> "SCB Web"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 .
+<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 .
+<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 .
+<bundle:///scb-web-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://discobits.org/ontology#pos> "2" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2> .
+<bundle:///scb-web-content-el/0-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-content-el/0-title> <http://discobits.org/ontology#infoBit> "Upload Triples with a POST Request"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///scb-web-content-el/2> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 .
+<bundle:///scb-web-content-el/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///scb-web-content-el/2> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 .
+<bundle:///scb-web-content-el/1> <http://discobits.org/ontology#infoBit> "The bundle SCB Web allows access to SCB graphs over HTTP with JAX-RS."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///scb-web-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///scb-web-content-el/0> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 .
+<bundle:///scb-web-content-el/0> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2-content> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://discobits.org/ontology#pos> "1" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///scb-web-content-el/0-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-content-el/0-content> <http://discobits.org/ontology#infoBit> "To upload triples with a POST request, a client can use the URI path \"/graph\" and place the triples and other required information into the body as multipart/form-data which consists of\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>a file labeled \"graph\" containing the triples and specifying the mime-type.</li>\n<li>a text field labeled \"name\" specifying the name of the MGraph. If an MGraph with this name does not already exist, a new one will be created.</li>\n<li>an optional text field labeled \"mode\" specifying the mode. If the mode is \"replace\", existing triples of the MGraph will be deleted before new triples are added. If the mode is not specified or is \"append\", posted triples will be added to the MGraph.</li>\n<li>an optional text field labeled \"redirection\" specifying an URI which the client should be redirected to in case of success.</li>\n</ul>\nA response with the status co
 de BAD REQUEST (400) is returned if the required data are missing. If the request can be satisfied, one of the following responses is returned:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>SEE OTHER (303), if redirection is specified.</li>\n<li>CREATED (201), if redirection is not specified and a new MGraph is created.</li>\n<li>NO CONTENT (204), if redirection is not specified and no new MGraph is created.</li>\n</ul>\n<p xmlns=\"http://www.w3.org/1999/xhtml\">\nFor your convenience you may access a web-form at the Uri-Path <code>/graph/upload-form</code>.</p>\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///scb-web-content-el/2-title> <http://discobits.org/ontology#infoBit> "Backup of Triple Collections"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///scb-web-content-el/2-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-content-el/2-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///scb-web-content-el/2-content> <http://discobits.org/ontology#infoBit> "The platform allows the current user to download all triple collections that he has access to through the URI path \"/admin/backup/download\". The resulted file is a compressed archive in zip format. All triple collections in this file are serialized in N-Triples format. Furthermore, a file called \"triplecollections.nt\" is contained in backup.zip, which describes the mapping of file names to triple collection names.\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://discobits.org/ontology#pos> "1" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://discobits.org/ontology#pos> "0" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2-title> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0-title> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://discobits.org/ontology#pos> "0" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://discobits.org/ontology#pos> "1" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0-content> .
+<bundle:///scb-web> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 .
+<bundle:///scb-web> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 .
+<bundle:///scb-web> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://discobits.org/ontology#pos> "0" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/1> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://discobits.org/ontology#pos> "0" .
+_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://discobits.org/ontology#holds> <bundle:///scb-web-title> .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
new file mode 100644
index 0000000..0c43b13
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
@@ -0,0 +1,37 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+resultDocModifier.setTitle("Backup and restore");
+
+<div class="tx-content">
+	<p>
+		<form method="get" action="/admin/backup/download">
+    Retrieve a backup of all graphs. WARNING: while creating the backup parts of clerezza migh be irresponsive.
+			<input type="submit" value="Retrieve Backup" />
+		</form>
+	</p>
+	<p>
+		<form method="post" action="/admin/backup/restore" enctype="multipart/form-data">
+			<input type="file" name="file" />
+			<input type="submit" value="Restore from backup" />
+		</form>
+	</p>
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
new file mode 100644
index 0000000..0b71676
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
@@ -0,0 +1,62 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def gm(s: Any) = new UriRef("http://clerezza.org/2010/03/graph-management#"+s)
+def rdf(s: Any) = new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
+def tcp(s: Any) = new UriRef("http://clerezza.org/2009/06/tcprovider#"+s)
+
+resultDocModifier.setTitle("Manage Triple Collections");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Manage Triple Collections</h1>);
+
+import org.apache.clerezza.rdf.scala.utils.RichGraphNode
+
+<div id="tx-content">
+<table>
+	<tr><th>Name</th><th>Size</th><th>type</th><th colspan="3">Actions</th></tr>
+				{for (tc <- (res/gm("tripleCollection")).sortBy(tc => tc*)) yield
+					<tr>
+						<td>{tc*}</td>
+						<td>{tc/gm("size")*}</td>
+						<td>{if ((tc/rdf("type")).indexOf(new RichGraphNode(
+						new GraphNode(tcp("MGraph"), res.getGraph))) != -1) {
+						<span>MGraph</span> } else {
+						<span>Graph</span>
+						}
+						}
+						</td>
+						<td>{ifx ((tc/rdf("type")).indexOf(new RichGraphNode(
+						new GraphNode(tcp("MGraph"), res.getGraph))) != -1) {<form action="smush" method="post"><div>
+							<input type="hidden" name="graphName" value={tc*} />
+						<input type="submit" value="smush" /></div></form>}
+						}</td>
+                                                <td><form action="delete" method="post" onsubmit="return confirm('Are you sure you want to delete this graph?');"><div>
+							<input type="hidden" name="graphName" value={tc*} />
+						<input type="submit" value="delete" /></div></form>
+						</td>
+						<td><form action="/graph" method="get"><div>
+							<input type="hidden" name="name" value={tc*} />
+						<input type="submit" value="get" /></div></form>
+						</td>
+					</tr>
+				}
+</table>
+<p><a href="/graph/upload-form">UploadGraph</a></p>
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
new file mode 100644
index 0000000..1e6e233
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
@@ -0,0 +1,79 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def se(s: Any) = new UriRef("http://clerezza.org/2009/11/sparql-endpoint#"+s)
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
+	<head>
+		<title>SPARQL Endpoint</title>
+		<script type="text/javascript">
+			function toggle(checkbox){{
+				var uri = document.getElementById('stylesheeturi');
+				var urilable = document.getElementById('urilable');
+				var server = document.getElementById('server');
+				var serverlabel = document.getElementById('serverlabel');
+				if (checkbox.checked){{
+					uri.style.visibility = 'visible';
+					urilable.style.visibility = 'visible';
+					server.style.visibility = 'visible';
+					serverlabel.style.visibility = 'visible';
+				}} else {{
+					uri.style.visibility = 'hidden';
+					urilable.style.visibility = 'hidden';
+					server.style.visibility = 'hidden';
+					serverlabel.style.visibility = 'hidden';
+				}}
+			}}
+		</script>
+	</head>
+	<body>
+		<h1>SPARQL Endpoint</h1>
+		<hr />
+		<h4>SPARQL Query</h4>
+		<form method="post" action="../sparql">
+			<lable for="query">Type in your query:</lable>
+			<br />
+			<textarea cols="70" rows="10" name="query" >
+PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX disco: &lt;http://discobits.org/ontology#>
+SELECT ?c where {{?c rdf:type disco:TitledContent}}
+			</textarea>
+			<br />
+			<br />
+			<label for="default-graph-uri">Select a graph URI:</label>
+			<select	name="default-graph-uri">
+				{for (tc <- (res/se("tripleCollection"))) yield
+					<option>{tc*}</option>
+				}
+			</select>
+			<br />
+			<lable for="apply-style-sheet">Add XSLT style sheet on the result: </lable>
+			<input type="checkbox" name="apply-style-sheet" id="checkbox" onclick="toggle(this)" />
+			<br />
+			<label for="style-sheet-uri" id="urilable" style="visibility:hidden">URI of XSLT style sheet</label>
+			<input type="text" name="style-sheet-uri" id="stylesheeturi" style="width:350px;visibility:hidden" value="http://www.w3.org/TR/rdf-sparql-XMLres/result-to-html.xsl" />
+			<label id="serverlabel" style="visibility:hidden">Add stylesheet on server side</label>
+			<input type="checkbox" name="server-side" id="server" checked="checked" style="visibility:hidden"/>
+			<br />
+			<br />
+			<input type="submit" value="Submit Query" />
+		</form>
+	</body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
new file mode 100644
index 0000000..f2d1283
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>Upload triples</title>
+    </head>
+    <body>
+        
+            <form method="post" enctype="multipart/form-data" action="/graph">
+				<div>
+				<label for="graph">RDF File: </label><input id="graph" type="file" name="graph" /><br/>
+				<label for="name">Graph Name: </label>
+				<input type="text" id="name" name="name" value="urn:x-localinstance:/content.graph" size="80"/><br/>
+				<label for="mode">Insertion Mode (for existing Graphs): </label><select name="mode">
+					<option value="append">Append</option>
+					<option value="replace">Replace</option>
+				</select>
+				<input type="hidden" name="redirection" value="/graph/upload-form" /><br/>
+				<input type="submit" />
+				</div>
+			</form>
+
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
new file mode 100644
index 0000000..a43a6a2
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.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.TcProvider;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
+import org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.web.ontologies.BACKUP;
+import org.apache.commons.rdf.Literal;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests backup functionality.
+ *
+ * @author hasan
+ */
+public class BackupAndRestoreTest {
+
+    private static String testGraphFileName = "test.graph";
+
+    private static Graph testGraph0 = new SimpleGraph();
+    private static Iri testGraphUri0 = // the URI of testGraph0
+            new Iri("http://localhost/test0/"+testGraphFileName);
+    // a resource in testGraph0
+    private    static Iri uri0 = new Iri("http://localhost/test0/testuri");
+
+    private static Graph testGraph1 = new SimpleGraph();
+    private static Iri testGraphUri1 = // the URI of testGraph1
+            new Iri("http://localhost/test1/"+testGraphFileName);
+
+    // a resource in testGraph1
+    private    static Iri uri1 = new Iri("http://localhost/test1/testuri");
+
+    private static ImmutableGraph testGraphA;
+    private static Iri testGraphUriA = // the URI of testGraphA
+            new Iri("http://localhost/testA/"+testGraphFileName);
+
+    // a resource in testGraphA
+    private    static Iri uriA = new Iri("http://localhost/testA/testuri");
+    
+
+    private static String backupContentFileName = "triplecollections.nt";
+    private static BackupMessageBodyWriter backup;
+    private static Parser parser = Parser.getInstance();
+
+    @Before
+    public void setUp() {
+        backup = new BackupMessageBodyWriter();
+        backup.tcManager = new TestTcManager();
+        backup.serializer = Serializer.getInstance();
+        backup.serializer.bindSerializingProvider(
+                new JenaSerializerProvider());
+        testGraph0.add(new TripleImpl(uri0, uri0, uri0));
+        testGraph1.add(new TripleImpl(uri1, uri1, uri1));
+        Graph graphBuilder = new SimpleGraph();
+        graphBuilder.add(new TripleImpl(uriA, uriA, uriA));
+        testGraphA = graphBuilder.getImmutableGraph();
+    }
+
+    @Test
+    public void testBackup() throws IOException {
+        //ImmutableGraph downloadedTestGraphX = null;
+        //ImmutableGraph downloadedTestGraphY = null;
+        ImmutableGraph downloadedBackupContentsGraph = null;
+
+        byte[] download = backup.createBackup();
+        ByteArrayInputStream bais = new ByteArrayInputStream(download);
+        ZipInputStream compressedTcs = new ZipInputStream(bais);
+
+        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
+        String folder = "";
+        ZipEntry entry;
+        while ((entry = compressedTcs.getNextEntry()) != null) {
+            String entryName = entry.getName();
+            if (entry.isDirectory()) {
+                folder = entryName;
+            } else {
+                Assert.assertTrue(entryName.startsWith(folder+testGraphFileName)
+                        || entryName.equals(backupContentFileName));
+                ByteArrayOutputStream baos = new ByteArrayOutputStream(download.length);
+                int count;
+                byte buffer[] = new byte[2048];
+                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
+                    baos.write(buffer, 0, count);
+                }
+                ByteArrayInputStream serializedGraph = new ByteArrayInputStream(
+                        baos.toByteArray());
+                /*if (entryName.equals(folder+testGraphFileName + ".nt")) {
+                    downloadedTestGraphX = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                } else if (entryName.startsWith(folder+testGraphFileName)) {
+                    downloadedTestGraphY = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                }*/
+                if (entryName.equals(backupContentFileName)) {
+                    downloadedBackupContentsGraph = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                } else {
+                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
+                            SupportedFormat.N_TRIPLE, null);
+                    extractedTc.put(entryName, deserializedGraph);
+                }
+                baos.flush();
+                baos.close();
+            }
+        }
+        compressedTcs.close();
+        checkDownloadedGraphs(extractedTc,
+                downloadedBackupContentsGraph, folder);
+    }
+
+    @Test
+    public void restoreFromBackup() throws IOException {
+        byte[] backupData = backup.createBackup();
+        TcProvider tcProvider = EasyMock.createMock(TcProvider.class);
+        EasyMock.expect(tcProvider.getGraph(testGraphUri0)).andReturn(
+                EasyMock.createNiceMock(Graph.class));
+        EasyMock.expect(tcProvider.getGraph(testGraphUri1)).andReturn(
+                EasyMock.createNiceMock(Graph.class));
+        tcProvider.deleteGraph(testGraphUriA);
+        EasyMock.expect(tcProvider.createImmutableGraph(EasyMock.eq(testGraphUriA),
+                EasyMock.notNull(Graph.class))).andReturn(new SimpleGraph().getImmutableGraph());
+        EasyMock.replay(tcProvider);
+        Restorer restore = new Restorer();
+        restore.parser = Parser.getInstance();
+        restore.restore(new ByteArrayInputStream(backupData), tcProvider);
+        EasyMock.verify(tcProvider);
+    }
+
+    private void checkDownloadedGraphs(Map<String, Graph> extractedTc,
+            ImmutableGraph downloadedBackupContentsGraph, String folder) {
+        Assert.assertFalse(extractedTc.isEmpty());
+        Assert.assertNotNull(downloadedBackupContentsGraph);
+
+        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
+                testGraphUri0, RDF.type, BACKUP.Graph)));
+
+        Iterator<Triple> triples = downloadedBackupContentsGraph.filter(
+                testGraphUri0, BACKUP.file, null);
+        Assert.assertTrue(triples.hasNext());
+
+        String fileName0 = ((Literal) triples.next().getObject()).getLexicalForm();
+        Assert.assertTrue(fileName0.startsWith(folder+testGraphFileName));
+
+        Graph extracted0 = extractedTc.get(fileName0);
+        Assert.assertNotNull(extracted0);
+        Assert.assertTrue(extracted0.filter(uri0, uri0, uri0).hasNext());
+
+        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
+                testGraphUri1, RDF.type, BACKUP.Graph)));
+
+        triples = downloadedBackupContentsGraph.filter(
+                testGraphUri1, BACKUP.file, null);
+        Assert.assertTrue(triples.hasNext());
+
+        String fileName1 = ((Literal) triples.next().getObject()).getLexicalForm();
+        Assert.assertTrue(fileName1.startsWith(folder+testGraphFileName));
+
+        Graph extracted1 = extractedTc.get(fileName1);
+        Assert.assertNotNull(extracted1);
+
+        Assert.assertTrue(extracted1.filter(uri1, uri1, uri1).hasNext());
+    
+
+
+        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
+                testGraphUriA, RDF.type, BACKUP.Graph)));
+
+        triples = downloadedBackupContentsGraph.filter(
+                testGraphUriA, BACKUP.file, null);
+        Assert.assertTrue(triples.hasNext());
+
+        String fileNameA = ((Literal) triples.next().getObject()).getLexicalForm();
+        Assert.assertTrue(fileNameA.startsWith(folder+testGraphFileName));
+        Graph extractedA = extractedTc.get(fileNameA);
+        Assert.assertNotNull(extractedA);
+
+        Assert.assertTrue(extractedA.filter(uriA, uriA, uriA).hasNext());
+
+    }
+
+    private class TestTcManager extends TcManager {
+
+        // Associates testGraphUri0 with testGraph0 and testGraphUri1 with testGraph1
+        @Override
+        public Graph getGraph(Iri name) throws NoSuchEntityException {
+            if (name.equals(testGraphUri0)) {
+                return testGraph0;
+            } else if (name.equals(testGraphUri1)) {
+                return testGraph1;
+            } else if (name.equals(testGraphUriA)) {
+                return testGraphA;
+            }
+            return null;
+        }
+
+        @Override
+        public Set<Iri> listGraphs() {
+            Set<Iri> result = new HashSet<Iri>();
+            result.add(testGraphUri0);
+            result.add(testGraphUri1);
+            result.add(testGraphUriA);
+            return result;
+        }
+    }
+}
\ No newline at end of file


[81/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 2), also renamed IriSet -> IRISet and IriUtils -> IRIUtils

Posted by re...@apache.org.
CLEREZZA-983: Adapted to new casing of rdf-core (part 2), also renamed IriSet -> IRISet and IriUtils -> IRIUtils


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

Branch: refs/heads/master
Commit: f2811c721b94395057f27af3a09e57cc916f49d3
Parents: 60d73ea
Author: Reto Gmuer <re...@apache.org>
Authored: Sat Apr 11 13:40:22 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Sat Apr 11 13:40:22 2015 +0000

----------------------------------------------------------------------
 .../platform/config/PlatformConfig.java         |  8 +--
 .../PlatformGraphNodeProvider.scala             | 24 ++++----
 .../apache/clerezza/platform/BootMonitor.java   | 18 +++---
 .../src/main/scala/GlobalMenuRenderlet.scala    | 10 ++--
 .../src/main/scala/HeadedPageRenderlet.scala    |  4 +-
 .../jaxrs/TypeHandlerSpace.java                 |  4 +-
 .../typehandlerspace/TypeHandlerSpaceTest.java  | 14 ++---
 .../src/main/scala/Ontology.scala               |  4 +-
 .../scala/RenderletDescriptionRenderlet.scala   |  2 +-
 .../typerendering/scala/AbstractRenderlet.scala |  2 +-
 .../typerendering/scala/PageRenderlet.scala     |  4 +-
 .../typerendering/scala/RenderedPage.scala      |  6 +-
 .../typerendering/scala/SRenderlet.scala        |  2 +-
 .../typerendering/scala/XmlResult.scala         |  6 +-
 .../platform/typerendering/RendererFactory.java |  2 +-
 .../typerendering/exception-template.ssp        |  2 +-
 .../platform/usermanager/UserManager.java       |  8 +--
 .../UserGraphAcessPermissionProvider.scala      |  4 +-
 .../platform/users/WebIdGraphsService.scala     |  8 +--
 .../clerezza/platform/users/WebIdInfo.scala     |  4 +-
 .../rdf/virtuoso/storage/VirtuosoBNode.java     |  2 +-
 .../rdf/virtuoso/storage/access/DataAccess.java | 16 ++---
 .../clerezza/rdf/core/test/RandomGraph.java     | 48 +++++++--------
 .../clerezza/rdf/core/test/TcProviderTest.java  | 56 ++++++++---------
 .../rdf/file/storage/FileGraphTest.java         |  8 +--
 .../rdf/jena/commons/Jena2TriaUtil.java         |  4 +-
 .../rdf/jena/sparql/HashMapSolutionMapping.java |  4 +-
 .../clerezza/rdf/jena/tdb/internals/IRISet.java | 62 +++++++++++++++++++
 .../clerezza/rdf/jena/tdb/internals/IriSet.java | 62 -------------------
 .../rdf/jena/tdb/internals/ModelGraph.java      |  2 +-
 .../tdb/storage/SingleTdbDatasetTcProvider.java | 16 ++---
 .../clerezza/rdf/scala/utils/NameSpace.scala    | 10 ++--
 .../clerezza/rdf/scala/utils/EzMGraphTest.scala | 18 +++---
 .../rdf/scala/utils/RichGraphNodeTest.scala     | 18 +++---
 .../rdf/scala/utils/TypeConversionTest.scala    | 16 ++---
 rdf/storage.web/src/main/scala/WebProxy.scala   | 36 +++++------
 .../apache/clerezza/rdf/utils/GraphNode.java    |  4 +-
 .../org/apache/clerezza/rdf/utils/IRIUtil.java  | 63 ++++++++++++++++++++
 .../org/apache/clerezza/rdf/utils/IriUtil.java  | 63 --------------------
 .../org/apache/clerezza/rdf/utils/RdfList.java  | 34 +++++------
 .../clerezza/rdf/utils/UriMutatingGraph.java    | 38 ++++++------
 .../rdf/utils/smushing/BaseSmusher.java         | 10 ++--
 .../rdf/utils/smushing/SameAsSmusher.java       |  4 +-
 .../apache/clerezza/rdf/utils/IfpSmushTest.java |  4 +-
 .../clerezza/rdf/utils/TestGraphNode.java       | 20 +++----
 .../rdf/utils/smushing/SameAsSmushTest.java     |  2 +-
 .../rdf/web/core/BackupMessageBodyWriter.java   |  6 +-
 .../clerezza/rdf/web/core/graph-management.ssp  |  6 +-
 .../clerezza/rdf/web/core/sparql-endpoint.ssp   |  2 +-
 .../templating/seedsnipe/GraphNodeTest.java     |  2 +-
 50 files changed, 386 insertions(+), 386 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
index 16aa8cf..b05f0c1 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
@@ -115,10 +115,10 @@ public class PlatformConfig {
      * @return
      */
     public GraphNode getPlatformInstance() {
-        return new GraphNode(getPlatformInstanceRdfTerm(), systemGraph);
+        return new GraphNode(getPlatformInstanceRDFTerm(), systemGraph);
     }
 
-    private BlankNodeOrIRI getPlatformInstanceRdfTerm() {
+    private BlankNodeOrIRI getPlatformInstanceRDFTerm() {
         Lock l = systemGraph.getLock().readLock();
         l.lock();
         try {
@@ -164,7 +164,7 @@ public class PlatformConfig {
      * @param baseUri The base URI which will be added to the platform instance
      */
     public void addBaseUri(IRI baseUri) {
-        systemGraph.add(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
+        systemGraph.add(new TripleImpl(getPlatformInstanceRDFTerm(), PLATFORM.baseUri, baseUri));
     }
 
     /**
@@ -173,7 +173,7 @@ public class PlatformConfig {
      * @param baseUri The base URI which will be removed from the platform instance
      */
     public void removeBaseUri(IRI baseUri) {
-        systemGraph.remove(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
+        systemGraph.remove(new TripleImpl(getPlatformInstanceRDFTerm(), PLATFORM.baseUri, baseUri));
     }
 
     protected void activate(ComponentContext componentContext) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
index a06e971..54e0d78 100644
--- a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
+++ b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
@@ -47,7 +47,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
   /**
    * Get a GraphNode for the specified resource, see class comments for details.
    */
-  def get(uriRef: Iri): GraphNode = {
+  def get(uriRef: IRI): GraphNode = {
     val uriString = uriRef.getUnicodeString
     val isLocal: Boolean = {
       import scala.collection.JavaConversions._
@@ -59,10 +59,10 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
 
   /**
    * 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
+   * get(IRI) for a Uri with an authority section contained in the Set retuned by
    * <code>org.apache.clerezza.platform.config.PlatformConfig#getBaseUris()</code>
    */
-  def getLocal(uriRef: Iri): GraphNode = {
+  def getLocal(uriRef: IRI): GraphNode = {
     get(uriRef, true)
   }
     
@@ -70,17 +70,17 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
     /**
      *return true iff getLocal(uriRef).getNodeContext.size > 0
      */
-    def existsLocal(uriRef: Iri): Boolean = {
+    def existsLocal(uriRef: IRI): Boolean = {
         val cgGraph = cgProvider.getContentGraph
         lazy val localInstanceUri = {
             val uri = new java.net.URI(uriRef.getUnicodeString)
-      new Iri(Constants.URN_LOCAL_INSTANCE + uri.getPath)
+      new IRI(Constants.URN_LOCAL_INSTANCE + uri.getPath)
     }
         //TODO handle /user/
         existsInGraph(uriRef,cgGraph) || existsInGraph(localInstanceUri, cgGraph)
     }
   
-    private[this] def existsInGraph(nodeUri: Iri, tc: Graph): Boolean = {
+    private[this] def existsInGraph(nodeUri: IRI, tc: Graph): Boolean = {
         var readLock: Lock = tc.getLock.readLock
         readLock.lock
         try {
@@ -92,7 +92,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
     }
     
   
-  private def get(uriRef: Iri, isLocal: Boolean): GraphNode = {
+  private def get(uriRef: IRI, isLocal: Boolean): GraphNode = {
     val uriString = uriRef.getUnicodeString
     
 
@@ -106,7 +106,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
       uri.getScheme+"://"+uri.getAuthority
     }
 
-    val anyHostUri = new Iri(Constants.URN_LOCAL_INSTANCE + uriPath)
+    val anyHostUri = new IRI(Constants.URN_LOCAL_INSTANCE + uriPath)
 
     var mGraphs: List[Graph] = Nil
 
@@ -129,12 +129,12 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
       val nextSlash = uriPath.indexOf('/',6)    
       if (nextSlash != -1) {
         val userName = uriPath.substring(6, nextSlash)
-        val webIdOption = AccessController.doPrivileged(new PrivilegedAction[Option[Iri]]() {
-            def run(): Option[Iri] = {
+        val webIdOption = AccessController.doPrivileged(new PrivilegedAction[Option[IRI]]() {
+            def run(): Option[IRI] = {
               val userNode: GraphNode = userManager.getUserInSystemGraph(userName)
               if (userNode != null) {
                 userNode.getNode match {
-                  case u: Iri => Some(u)
+                  case u: IRI => Some(u)
                   case _ => None
                 }
               } else {
@@ -191,7 +191,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
         }
       }
       
-      addToUnion(tcManager.getGraph(new Iri(graphUriString)))
+      addToUnion(tcManager.getGraph(new IRI(graphUriString)))
     }
 
     val unionGraph = new UnionGraph(mGraphs:_*);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
----------------------------------------------------------------------
diff --git a/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java b/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
index 22d0e2d..bc00e5f 100644
--- a/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
+++ b/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
@@ -51,7 +51,7 @@ import org.osgi.service.component.ComponentContext;
  * see thread starting at http://www.mail-archive.com/users@felix.apache.org/msg07647.html
  */
 @Component(enabled = true, immediate = true)
-@Reference(name = "jaxrsRdfTerm",
+@Reference(name = "jaxrsRDFTerm",
 cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
 policy = ReferencePolicy.DYNAMIC,
 referenceInterface = Object.class,
@@ -60,7 +60,7 @@ public class BootMonitor {
 
     @Reference(target = "(javax.script.language=scala)")
     private ScriptEngineFactory scalaScriptEngineFactory;
-    private Set<Object> rootRdfTerms =
+    private Set<Object> rootRDFTerms =
             Collections.synchronizedSet(new HashSet<Object>());
     /**
      * true when the user has been notified that clerezza started
@@ -86,23 +86,23 @@ public class BootMonitor {
         t.start();
     }
 
-    protected void bindJaxrsRdfTerm(Object p) {
-        rootRdfTerms.add(p);
-        if (!clerezzaStarted && (rootRdfTerms.size() == 35)) {
+    protected void bindJaxrsRDFTerm(Object p) {
+        rootRDFTerms.add(p);
+        if (!clerezzaStarted && (rootRDFTerms.size() == 35)) {
             Thread t = new Thread() {
 
                 @Override
                 public void run() {
                     int lastSize = 0;
                     for (int i = 0; i < 100; i++) {
-                        if (rootRdfTerms.size() == lastSize) {
+                        if (rootRDFTerms.size() == lastSize) {
                             clerezzaStarted = true;
                             if (activated) {
                                 logger.info("The Apache Clerezza Platform is now operational.");
                                 return;
                             }
                         }
-                        lastSize = rootRdfTerms.size();
+                        lastSize = rootRDFTerms.size();
                         try {
                             Thread.sleep(500);
                         } catch (InterruptedException ex) {
@@ -115,7 +115,7 @@ public class BootMonitor {
         }
     }
 
-    protected void unbindJaxrsRdfTerm(Object p) {
-        rootRdfTerms.remove(p);
+    protected void unbindJaxrsRDFTerm(Object p) {
+        rootRDFTerms.remove(p);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
index 85efc6f..0e85384 100644
--- a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
+++ b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
@@ -23,7 +23,7 @@ package org.apache.clerezza.platform.style.default
 
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.rdf.core._
@@ -50,10 +50,10 @@ class GlobalMenuRenderlet extends SRenderlet {
          <a href={href}>{label}</a>
       }
       override def content = {
-        def menu(s: Any) = new Iri("http://clerezza.org/2009/11/global-menu#"+s)
-def rdfs(s: Any) = new Iri("http://www.w3.org/2000/01/rdf-schema#"+s)
-def platform(s: Any) = new Iri("http://clerezza.org/2009/08/platform#"+s)
-def dct(s: Any) = new Iri("http://purl.org/dc/terms/"+s)
+        def menu(s: Any) = new IRI("http://clerezza.org/2009/11/global-menu#"+s)
+def rdfs(s: Any) = new IRI("http://www.w3.org/2000/01/rdf-schema#"+s)
+def platform(s: Any) = new IRI("http://clerezza.org/2009/08/platform#"+s)
+def dct(s: Any) = new IRI("http://purl.org/dc/terms/"+s)
 
 <div class="column nav">
               <ul>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
index a39c0c8..b74163a 100644
--- a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
+++ b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
@@ -32,7 +32,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
 import org.apache.clerezza.rdf.ontologies.DC
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 
 /**
  * A Renderlet for the menu
@@ -92,7 +92,7 @@ resultDocModifier.addScriptReference("/scripts/status-message.js");
       <div class="zz-control">
         <div class="login">
             {
-              def platform(s: Any) = new Iri("http://clerezza.org/2009/08/platform#"+s)
+              def platform(s: Any) = new IRI("http://clerezza.org/2009/08/platform#"+s)
               val userName = context/platform("user")/platform("userName")*
               val displayName = if ((context/platform("user")/FOAF.name).length == 0) {
                     userName

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
index 2485850..11c37dc 100644
--- a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
+++ b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
@@ -95,7 +95,7 @@ public class TypeHandlerSpace {
             Lock lock =node.readLock();
             lock.lock();
             try {
-                Set<IRI> rdfTypes = getRdfTypesOfIri(node);
+                Set<IRI> rdfTypes = getRdfTypesOfIRI(node);
                 return typeHandlerDiscovery.getTypeHandler(rdfTypes);
             } finally {
                 lock.unlock();
@@ -105,7 +105,7 @@ public class TypeHandlerSpace {
         return null;
     }
 
-    private Set<IRI> getRdfTypesOfIri(GraphNode node) {
+    private Set<IRI> getRdfTypesOfIRI(GraphNode node) {
         Set<IRI> rdfTypes = new HashSet<IRI>();
         Iterator<RDFTerm> types = node.getObjects(RDF.type);
         while (types.hasNext()) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
index 1e89023..739a49b 100644
--- a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
+++ b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
@@ -34,7 +34,7 @@ public class TypeHandlerSpaceTest {
 //    
 //    private static LockableGraph mGraph = new LockableGraphWrapper(new SimpleGraph());
 //
-//    Iri myType = new Iri("org.example/myType");
+//    IRI myType = new IRI("org.example/myType");
 //    
 //    @Path("/myTypeHandler")
 //    public static class MyTypeHandler {
@@ -74,7 +74,7 @@ public class TypeHandlerSpaceTest {
 //        
 //        int port = createTestWebServer().getPort();
 //
-//        Iri uri = new Iri("http://localhost:" + port + "/test");
+//        IRI uri = new IRI("http://localhost:" + port + "/test");
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
 //        mGraph.add(triple);
@@ -109,7 +109,7 @@ public class TypeHandlerSpaceTest {
 //    public void testGet() throws IOException {
 //        
 //        int port = createTestWebServer().getPort();        
-//        Iri uri = new Iri("http://localhost:" + port + "/test");
+//        IRI uri = new IRI("http://localhost:" + port + "/test");
 //        
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
@@ -138,7 +138,7 @@ public class TypeHandlerSpaceTest {
 //    public void testGetDescription() throws IOException {
 //        
 //        int port = createTestWebServer().getPort();
-//        Iri uri = new Iri("http://localhost:" + port + "/test");
+//        IRI uri = new IRI("http://localhost:" + port + "/test");
 //        
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
@@ -177,7 +177,7 @@ public class TypeHandlerSpaceTest {
 //                TypeHandlerSpace typeHandlerSpace = new TypeHandlerSpace();
 //                typeHandlerSpace.tcManager = new TcManager(){
 //                    @Override
-//                    public LockableGraph getGraph(Iri name) {
+//                    public LockableGraph getGraph(IRI name) {
 //                        return new LockableGraph() {
 //
 //                            @Override
@@ -191,7 +191,7 @@ public class TypeHandlerSpaceTest {
 //                            }
 //
 //                            @Override
-//                            public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+//                            public Iterator<Triple> filter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
 //                                return mGraph.filter(subject, predicate, object);
 //                            }
 //
@@ -281,7 +281,7 @@ public class TypeHandlerSpaceTest {
 //                typeHandlerSpace.typeHandlerDiscovery = new TypeHandlerDiscovery() {
 //
 //                    @Override
-//                    public Object getTypeHandler(Set<Iri> rdfTypes) {
+//                    public Object getTypeHandler(Set<IRI> rdfTypes) {
 //                        if (rdfTypes.contains(myType)){
 //                            return typeHandler;
 //                        }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.gui/src/main/scala/Ontology.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/src/main/scala/Ontology.scala b/platform/typerendering.gui/src/main/scala/Ontology.scala
index fef2077..b09c32d 100644
--- a/platform/typerendering.gui/src/main/scala/Ontology.scala
+++ b/platform/typerendering.gui/src/main/scala/Ontology.scala
@@ -21,11 +21,11 @@
 
 package org.apache.clerezza.platform.typerendering.gui
 
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 
 object Ontology {
 
-  private def p(s: String) = new Iri("http://clerezza.org/2011/25/renderletgui#"+s)
+  private def p(s: String) = new IRI("http://clerezza.org/2011/25/renderletgui#"+s)
 
   val RenderletOverviewPage = p("RenderletOverviewPage")
   val Renderlet = p("Renderlet")

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala b/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
index b186d8b..849160c 100644
--- a/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
+++ b/platform/typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
@@ -23,7 +23,7 @@ package org.apache.clerezza.platform.typerendering.gui
 
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.rdf.core._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
index e1c4924..5d8e9ad 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
index 4140b3f..cad4f43 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._
@@ -40,7 +40,7 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
 abstract class PageRenderlet extends AbstractRenderlet {
 
   def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
-  def rdfType: Iri
+  def rdfType: IRI
   def mode = "naked"
 
   var renderletManager: RenderletManager = null;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
index edbd5f5..48fb6a2 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
@@ -32,7 +32,7 @@ import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.security.{PrivilegedAction, AccessController}
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 
@@ -83,7 +83,7 @@ abstract class RenderedPage(arguments: RenderedPage.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: Iri): Seq[Node] = {
+  def render(resource: IRI): Seq[Node] = {
     modeOption match {
       case Some(m) => render(resource, m)
       case None => render(resource, "naked")
@@ -94,7 +94,7 @@ abstract class RenderedPage(arguments: RenderedPage.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: Iri, mode: String) = {
+  def render(resource: IRI, mode: String) = {
     def parseNodeSeq(string: String) = {
       _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
index ab40c2e..6bec953 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.TypeRenderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
index f0b8935..c291bdf 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
@@ -34,7 +34,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.nio.charset.Charset
 import java.security.{PrivilegedAction, AccessController}
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 
@@ -85,7 +85,7 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: Iri): Seq[Node] = {
+  def render(resource: IRI): Seq[Node] = {
     modeOption match {
       case Some(m) => render(resource, m)
       case None => render(resource, "naked")
@@ -96,7 +96,7 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: Iri, mode: String) = {
+  def render(resource: IRI, mode: String) = {
     def parseNodeSeq(string: String) = {
       _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
index f0736cf..b91ee12 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
@@ -130,7 +130,7 @@ public class RendererFactory {
             types.add(((Literal) resource.getNode()).getDataType());
         } else {
             // extract rdf types
-            Iterator<IRI> it = resource.getIriObjects(RDF.type);
+            Iterator<IRI> it = resource.getIRIObjects(RDF.type);
             while (it.hasNext()) {
                 final IRI rdfType = it.next();
                 types.add(rdfType);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp b/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
index a450e08..f70a59b 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
+++ b/platform/typerendering/platform.typerendering.core/src/main/resources/org/apache/clerezza/platform/typerendering/exception-template.ssp
@@ -19,7 +19,7 @@
  *
 */
 
-def typerendering(s: Any) = new Iri("http://clerezza.org/2009/04/typerendering#"+s)
+def typerendering(s: Any) = new IRI("http://clerezza.org/2009/04/typerendering#"+s)
 
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
index 41bb488..4b8d7af 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
@@ -57,7 +57,7 @@ public interface UserManager {
     /**
      *
      * @param title
-     * @return BlankNodeOrIRI which is either a BlankNode or a Iri
+     * @return BlankNodeOrIRI which is either a BlankNode or a IRI
      */
     public BlankNodeOrIRI getRoleByTitle(String title);
 
@@ -70,7 +70,7 @@ public interface UserManager {
     /**
      *
      * @param user
-     *            the user is either a BlankNode or a Iri
+     *            the user is either a BlankNode or a IRI
      *
      * @return Iterator defining all the Roles the specified user owns
      */
@@ -95,7 +95,7 @@ public interface UserManager {
     /**
      *
      * @param role
-     *            the role is either a BlankNode or an Iri
+     *            the role is either a BlankNode or an IRI
      *
      * @return Iterator defining all permissions of a role
      */
@@ -234,7 +234,7 @@ public interface UserManager {
     /**
      *
      * @param user
-     *            the user is either a BlankNode or a Iri
+     *            the user is either a BlankNode or a IRI
      * @return  Iterator defining all permissions of the specified user
      */
     public Iterator<BlankNodeOrIRI> getPermissionsOfUser(BlankNodeOrIRI user);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
index dd9a6f5..84755b9 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
@@ -18,11 +18,11 @@
 /*package org.apache.clerezza.platform.users
 
 import org.apache.clerezza.platform.security.WebIdBasedPermissionProvider
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 
 class UserGraphAcessPermissionProvider extends WebIdBasedPermissionProvider {
   
-  override def getPermissions(webId: Iri) : java.util.Collection[String] = {
+  override def getPermissions(webId: IRI) : java.util.Collection[String] = {
     import scala.collection.JavaConversions._
     val uriString = webId.getUnicodeString
     def uriStringWithoutFragment = {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
index dba0e7d..535a2d3 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
@@ -27,7 +27,7 @@ import org.apache.clerezza.platform.config.PlatformConfig
 import org.apache.clerezza.platform.config.SystemConfig
 import org.apache.clerezza.commons.rdf.Graph
 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.SecuredGraph
 import org.apache.clerezza.rdf.core.access.TcManager
@@ -78,7 +78,7 @@ class WebIdGraphsService {
    * @param uri the Web-Id
    * @return a WebIdInfo allowing to access the graphs of the user
    */
-  def getWebIdInfo(uri: Iri): WebIdInfo = {
+  def getWebIdInfo(uri: IRI): WebIdInfo = {
     return new WebIdInfo {
 
       private val uriString = uri.getUnicodeString
@@ -103,7 +103,7 @@ class WebIdGraphsService {
       private lazy val localGraphUri = {
         if (isLocal) uri
         else {
-          new Iri("urn:x-localinstance:/user/"+hashTruncatedUriString)
+          new IRI("urn:x-localinstance:/user/"+hashTruncatedUriString)
         }
       }
 
@@ -118,7 +118,7 @@ class WebIdGraphsService {
 
 
       private lazy val profileDocumentUri = {
-        new Iri(profileDocumentUriString)
+        new IRI(profileDocumentUriString)
       }
 
       /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
index 28eca05..1338d4b 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
@@ -28,14 +28,14 @@ package org.apache.clerezza.platform.users
  *
  */
 import org.apache.clerezza.commons.rdf.Graph
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 
 trait WebIdInfo {
 
   /**
    * The WebID this instance is about
    */
-  def webId: Iri
+  def webId: IRI
 
   /**
    * The WebId profile graph, for remote users this is immutable

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/VirtuosoBNode.java
----------------------------------------------------------------------
diff --git a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/VirtuosoBNode.java b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/VirtuosoBNode.java
index e8cc46f..53de9c0 100644
--- a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/VirtuosoBNode.java
+++ b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/VirtuosoBNode.java
@@ -30,7 +30,7 @@ public class VirtuosoBNode extends BNode {
 		return skolemId;
 	}
 	
-	public String asSkolemIri(){
+	public String asSkolemIRI(){
 		return new StringBuilder().append('<').append(skolemId).append('>').toString();
 	}
 	

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/DataAccess.java
----------------------------------------------------------------------
diff --git a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/DataAccess.java b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/DataAccess.java
index f44a9c1..6b328a9 100644
--- a/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/DataAccess.java
+++ b/rdf.virtuoso.storage/src/main/java/org/apache/clerezza/rdf/virtuoso/storage/access/DataAccess.java
@@ -678,9 +678,9 @@ public class DataAccess {
 		if (object == null)
 			return null;
 		if (object instanceof UriRef) {
-			return toVirtIri((UriRef) object);
+			return toVirtIRI((UriRef) object);
 		} else if (object instanceof BNode) {
-			return toVirtBnode((BNode) object).asSkolemIri();
+			return toVirtBnode((BNode) object).asSkolemIRI();
 		} else if (object instanceof PlainLiteral) {
 			return toVirtPlainLiteral((PlainLiteral) object);
 		} else if (object instanceof TypedLiteral) {
@@ -708,7 +708,7 @@ public class DataAccess {
 						.equals("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"));
 		return new StringBuilder().append('"').append('"').append('"')
 				.append(prepared).append('"').append('"').append('"')
-				.append("^^").append(toVirtIri(dt)).toString();
+				.append("^^").append(toVirtIRI(dt)).toString();
 	}
 
 	private StringBuilder prepareString(String str, boolean xml) {
@@ -766,11 +766,11 @@ public class DataAccess {
 		logger.debug("toVirtPredicate(UriRef {}) ", predicate);
 		if (predicate == null)
 			return null;
-		return toVirtIri(predicate);
+		return toVirtIRI(predicate);
 	}
 
-	private String toVirtIri(UriRef ur) {
-		logger.debug("toVirtIri(UriRef {})", ur);
+	private String toVirtIRI(UriRef ur) {
+		logger.debug("toVirtIRI(UriRef {})", ur);
 		return "<" + ur.getUnicodeString() + ">";
 	}
 
@@ -786,9 +786,9 @@ public class DataAccess {
 			return null;
 		}
 		if (subject instanceof UriRef) {
-			return toVirtIri((UriRef) subject);
+			return toVirtIRI((UriRef) subject);
 		} else if (subject instanceof BNode) {
-			return toVirtBnode((BNode) subject).asSkolemIri();
+			return toVirtBnode((BNode) subject).asSkolemIRI();
 		} else {
 			// These should be the only 2 implementations
 			throw new IllegalArgumentException(

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
index 7e6741b..996ef6f 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/RandomGraph.java
@@ -120,21 +120,21 @@ public class RandomGraph extends GraphWrapper {
         }
         switch (random) {
             case 0: // create new BlankNodeOrIRI
-                RDFTerm newRdfTerm;
+                RDFTerm newRDFTerm;
                 do {
-                    newRdfTerm = createRandomRdfTerm();
-                } while (!(newRdfTerm instanceof BlankNodeOrIRI));
-                return (BlankNodeOrIRI) newRdfTerm;
+                    newRDFTerm = createRandomRDFTerm();
+                } while (!(newRDFTerm instanceof BlankNodeOrIRI));
+                return (BlankNodeOrIRI) newRDFTerm;
             default: // get existing BlankNodeOrIRI
-                RDFTerm existingRdfTerm;
+                RDFTerm existingRDFTerm;
                 do {
-                    existingRdfTerm = getExistingRdfTerm();
-                    if (existingRdfTerm == null) {
+                    existingRDFTerm = getExistingRDFTerm();
+                    if (existingRDFTerm == null) {
                         random = 0;
                     }
-                } while (!(existingRdfTerm instanceof BlankNodeOrIRI));
+                } while (!(existingRDFTerm instanceof BlankNodeOrIRI));
 
-                return (BlankNodeOrIRI) existingRdfTerm;
+                return (BlankNodeOrIRI) existingRDFTerm;
         }
     }
 
@@ -145,16 +145,16 @@ public class RandomGraph extends GraphWrapper {
         }
         switch (random) {
             case 0: // create new IRI
-                return createRandomIri();
+                return createRandomIRI();
             default: // get existing IRI
-                RDFTerm existingRdfTerm;
+                RDFTerm existingRDFTerm;
                 do {
-                    existingRdfTerm = getExistingRdfTerm();
-                    if (existingRdfTerm == null) {
+                    existingRDFTerm = getExistingRDFTerm();
+                    if (existingRDFTerm == null) {
                         random = 0;
                     }
-                } while (!(existingRdfTerm instanceof IRI));
-                return (IRI) existingRdfTerm;
+                } while (!(existingRDFTerm instanceof IRI));
+                return (IRI) existingRDFTerm;
         }
     }
 
@@ -165,13 +165,13 @@ public class RandomGraph extends GraphWrapper {
         }        
         switch (random) {
             case 0: // create new resource
-                return createRandomRdfTerm();
+                return createRandomRDFTerm();
             default: // get existing resource
-                RDFTerm existingRdfTerm = getExistingRdfTerm();
-                if (existingRdfTerm == null) {
+                RDFTerm existingRDFTerm = getExistingRDFTerm();
+                if (existingRDFTerm == null) {
                     random = 0;
                 }
-                return existingRdfTerm;
+                return existingRDFTerm;
         }
     }
 
@@ -179,19 +179,19 @@ public class RandomGraph extends GraphWrapper {
         return Double.valueOf(Math.random() * faces).intValue();
     }
 
-    private RDFTerm createRandomRdfTerm() {
+    private RDFTerm createRandomRDFTerm() {
         switch (rollDice(3)) {
             case 0:
                 return new BlankNode();
             case 1:
-                return createRandomIri();
+                return createRandomIRI();
             case 2:
                 return new PlainLiteralImpl(RandomStringUtils.random(rollDice(100) + 1));
         }
-        throw new RuntimeException("in createRandomRdfTerm()");
+        throw new RuntimeException("in createRandomRDFTerm()");
     }
 
-    private RDFTerm getExistingRdfTerm() {
+    private RDFTerm getExistingRDFTerm() {
         Triple triple = getRandomTriple();
         if (triple == null) {
             return null;
@@ -207,7 +207,7 @@ public class RandomGraph extends GraphWrapper {
         return null;
     }
 
-    private IRI createRandomIri() {
+    private IRI createRandomIRI() {
         return new IRI("http://" + UUID.randomUUID().toString());
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
index 856bdcc..bea479d 100644
--- a/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
+++ b/rdf/core.test/src/main/java/org/apache/clerezza/rdf/core/test/TcProviderTest.java
@@ -49,8 +49,8 @@ public abstract class TcProviderTest {
     protected final IRI uriRefB1 = generateUri("b1");
     protected final IRI uriRefC = generateUri("c");
 
-    protected final IRI graphIri = generateUri("myGraph");
-    protected final IRI otherGraphIri = new IRI(graphIri.getUnicodeString());
+    protected final IRI graphIRI = generateUri("myGraph");
+    protected final IRI otherGraphIRI = new IRI(graphIRI.getUnicodeString());
 
     @Test
     public void testCreateImmutableGraph() {
@@ -223,7 +223,7 @@ public abstract class TcProviderTest {
 //        simpleTcmProvider.createGraph(uriRefA, graph);
 //        simpleTcmProvider.createGraph(uriRefC, graph);
 //
-//        Set<Iri> names = simpleTcmProvider.getNames(graph);
+//        Set<IRI> names = simpleTcmProvider.getNames(graph);
 //
 //        assertTrue(names.contains(uriRefA));
 //        assertTrue(names.contains(uriRefC));
@@ -236,80 +236,80 @@ public abstract class TcProviderTest {
     public void testCreateGraphExtended() throws Exception {
 
         TcProvider provider = getInstance();
-        Graph graph = provider.createGraph(graphIri);
+        Graph graph = provider.createGraph(graphIRI);
         assertNotNull(graph);
         //get a new provider and check that graph is there
         provider = getInstance();
-        graph = provider.getGraph(graphIri);
+        graph = provider.getGraph(graphIRI);
         assertNotNull(graph);
         //check that there is no such graph, but only the mgraph
         boolean expThrown = false;
         try {
-            ImmutableGraph g = provider.getImmutableGraph(graphIri);
+            ImmutableGraph g = provider.getImmutableGraph(graphIRI);
         } catch(NoSuchEntityException e) {
             expThrown = true;
         }
 
         assertTrue(expThrown);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     @Test
     public void testCreateImmutableGraphExtended() throws Exception {
 
         TcProvider provider = getInstance();
-        ImmutableGraph graph = provider.createImmutableGraph(graphIri, null);
+        ImmutableGraph graph = provider.createImmutableGraph(graphIRI, null);
 
         assertNotNull(graph);
 
         //get a new provider and check that graph is there
         provider = getInstance();
-        graph = provider.getImmutableGraph(graphIri);
+        graph = provider.getImmutableGraph(graphIRI);
         assertNotNull(graph);
 
         //check that there is no such mgraph, but only the graph
         boolean expThrown = false;
 
         try {
-            Graph g = provider.getMGraph(graphIri);
+            Graph g = provider.getMGraph(graphIRI);
         } catch(NoSuchEntityException e) {
             expThrown = true;
         }
 
         assertTrue(expThrown);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     @Test
     public void testCreateGraphNoDuplicateNames() throws Exception {
 
         TcProvider provider = getInstance();
-        ImmutableGraph graph = provider.createImmutableGraph(graphIri, null);
+        ImmutableGraph graph = provider.createImmutableGraph(graphIRI, null);
         assertNotNull(graph);
         boolean expThrown = false;
         try {
-            ImmutableGraph other = provider.createImmutableGraph(otherGraphIri, null);
+            ImmutableGraph other = provider.createImmutableGraph(otherGraphIRI, null);
         } catch(EntityAlreadyExistsException eaee) {
             expThrown = true;
         }
         assertTrue(expThrown);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     @Test
     public void testCreateGraphNoDuplicateNames2() throws Exception {
 
         TcProvider provider = getInstance();
-        Graph graph = provider.createGraph(graphIri);
+        Graph graph = provider.createGraph(graphIRI);
         assertNotNull(graph);
         boolean expThrown = false;
         try {
-            Graph other = provider.createGraph(otherGraphIri);
+            Graph other = provider.createGraph(otherGraphIRI);
         } catch(EntityAlreadyExistsException eaee) {
             expThrown = true;
         }
         assertTrue(expThrown);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     @Test
@@ -319,11 +319,11 @@ public abstract class TcProviderTest {
 
         TcProvider provider = getInstance();
 
-        ImmutableGraph graph = provider.createImmutableGraph(graphIri, createTestTripleCollection(t1));
+        ImmutableGraph graph = provider.createImmutableGraph(graphIRI, createTestTripleCollection(t1));
 
         assertEquals(1, graph.size());
         assertTrue(graph.contains(t1));
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     @Test
@@ -335,7 +335,7 @@ public abstract class TcProviderTest {
 
         TcProvider provider = getInstance();
 
-        ImmutableGraph graph = provider.createImmutableGraph(graphIri, createTestTripleCollection(t1));
+        ImmutableGraph graph = provider.createImmutableGraph(graphIRI, createTestTripleCollection(t1));
 
         boolean expThrown = false;
 
@@ -384,7 +384,7 @@ public abstract class TcProviderTest {
         }
 
         assertTrue(expThrown);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
 //    This tests can not pass, because equals in AbstractGraph is not implemented
@@ -395,11 +395,11 @@ public abstract class TcProviderTest {
 //        TcProvider provider = getInstance();
 //
 //        Graph triples = createTestTripleCollection(createTestTriple());
-//        ImmutableGraph graph = provider.createGraph(graphIri, triples);
+//        ImmutableGraph graph = provider.createGraph(graphIRI, triples);
 //
 //        provider = getInstance();
-//        Set<Iri> names = provider.getNames(graph);
-//        assertTrue(names.contains(graphIri));
+//        Set<IRI> names = provider.getNames(graph);
+//        assertTrue(names.contains(graphIRI));
 //    }
 //
 //    @Test
@@ -414,7 +414,7 @@ public abstract class TcProviderTest {
 //        IRI name2 = new IRI("http://myGraph2");
 //        ImmutableGraph secondGraph = provider.createGraph(name2, triples);
 //
-//        Set<Iri> names = provider.getNames(graph);
+//        Set<IRI> names = provider.getNames(graph);
 //        assertNotNull(names);
 //        assertEquals(2, names.size());
 //    }
@@ -457,11 +457,11 @@ public abstract class TcProviderTest {
     public void testGetTriplesGraph() throws Exception {
         TcProvider provider = getInstance();
 
-        Graph graph = provider.createGraph(graphIri);
+        Graph graph = provider.createGraph(graphIRI);
 
-        Graph tc = provider.getGraph(graphIri);
+        Graph tc = provider.getGraph(graphIRI);
         assertNotNull(tc);
-        provider.deleteGraph(graphIri);
+        provider.deleteGraph(graphIRI);
     }
 
     private Triple createTestTriple() {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
index 048e976..a43a5fa 100644
--- a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
@@ -55,9 +55,9 @@ public class FileGraphTest {
 
     @BeforeClass
     public static void setup() throws Exception {
-        createTempFileFromRdfTerm(NT_FILE_NAME);
-        createTempFileFromRdfTerm(RDF_FILE_NAME);
-        createTempFileFromRdfTerm(TURTLE_FILE_NAME);
+        createTempFileFromRDFTerm(NT_FILE_NAME);
+        createTempFileFromRDFTerm(RDF_FILE_NAME);
+        createTempFileFromRDFTerm(TURTLE_FILE_NAME);
     }
 
     @AfterClass
@@ -67,7 +67,7 @@ public class FileGraphTest {
         deleteTempFile(TURTLE_FILE_NAME);
     }
 
-    private static void createTempFileFromRdfTerm(String resourceName) 
+    private static void createTempFileFromRDFTerm(String resourceName) 
             throws FileNotFoundException, IOException {
         InputStream in = FileTcProviderTest.class.getResourceAsStream(resourceName);
         File file = new File(URI.create(getTempFileUri(resourceName)));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
index 1be13fe..809d8ac 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
@@ -103,7 +103,7 @@ public class Jena2TriaUtil {
         if (node.isLiteral()) {
             return convertJenaLiteral2Literal(node);
         }
-        throw new RuntimeException("cannot convert " + node + " to RdfTerm");
+        throw new RuntimeException("cannot convert " + node + " to RDFTerm");
     }
 
     /**
@@ -124,7 +124,7 @@ public class Jena2TriaUtil {
         if (node.isURI()) {
             return convertJenaUri2UriRef(node);
         }
-        throw new RuntimeException("cannot convert " + node + " to BlankNodeOrIri");
+        throw new RuntimeException("cannot convert " + node + " to BlankNodeOrIRI");
     }
 
     public Triple convertTriple(com.hp.hpl.jena.graph.Triple triple) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
index f7d4431..404a23d 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
@@ -40,7 +40,7 @@ class HashMapSolutionMapping extends HashMap<Variable, RDFTerm> implements Solut
         final Iterator<String> varNames = querySolution.varNames();
         while (varNames.hasNext()) {
             final String varName = varNames.next();
-            put(new Variable(varName), toRdfTerm(querySolution.get(varName)));
+            put(new Variable(varName), toRDFTerm(querySolution.get(varName)));
         }
     }
     @Override
@@ -48,7 +48,7 @@ class HashMapSolutionMapping extends HashMap<Variable, RDFTerm> implements Solut
         return get(new Variable(name));
     }
 
-    private RDFTerm toRdfTerm(RDFNode node) {
+    private RDFTerm toRDFTerm(RDFNode node) {
         return convertor.convertJenaNode2Resource(node.asNode());
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IRISet.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IRISet.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IRISet.java
new file mode 100644
index 0000000..7520810
--- /dev/null
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IRISet.java
@@ -0,0 +1,62 @@
+package org.apache.clerezza.rdf.jena.tdb.internals;
+
+import java.util.AbstractSet;
+import java.util.Iterator;
+
+import org.apache.clerezza.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.IRI;
+import org.apache.clerezza.rdf.ontologies.RDF;
+
+/**
+ * Represents a set of uri ref Set<IRI>
+ * @author Minto van der Sluis
+ */
+public class IRISet extends AbstractSet<IRI> {
+    private ModelGraph graphNameIndex;
+    private IRI graphType;
+
+    public IRISet(ModelGraph index, IRI object) {
+        graphNameIndex = index;
+        graphType = object;
+    }
+  
+    @Override
+    public int size() {
+        // TODO: How to get the proper size based on graphType
+        return graphNameIndex.getGraph().size();
+    }
+  
+    @Override
+    public Iterator<IRI> iterator() {
+        final Iterator<Triple> indexIter = graphNameIndex.getGraph().filter( null, RDF.type, graphType );
+        return new Iterator<IRI>() {
+            @Override
+            public boolean hasNext() {
+                return indexIter.hasNext();
+            }
+  
+            @Override
+            public IRI next() {
+                return IRI.class.cast(indexIter.next().getSubject());
+            }
+  
+            @Override
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        };
+    }
+    
+    @Override
+    public boolean add(IRI o) {
+        throw new UnsupportedOperationException();
+    }
+  
+    @Override
+    public boolean contains(Object o) {
+        if (o instanceof IRI) {
+            return graphNameIndex.getGraph().filter(IRI.class.cast(o), RDF.type, graphType).hasNext();
+        }
+        return false;
+    }
+};    

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
deleted file mode 100644
index 3e5b2a2..0000000
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.apache.clerezza.rdf.jena.tdb.internals;
-
-import java.util.AbstractSet;
-import java.util.Iterator;
-
-import org.apache.clerezza.commons.rdf.Triple;
-import org.apache.clerezza.commons.rdf.IRI;
-import org.apache.clerezza.rdf.ontologies.RDF;
-
-/**
- * Represents a set of uri ref Set<Iri>
- * @author Minto van der Sluis
- */
-public class IriSet extends AbstractSet<IRI> {
-    private ModelGraph graphNameIndex;
-    private IRI graphType;
-
-    public IriSet(ModelGraph index, IRI object) {
-        graphNameIndex = index;
-        graphType = object;
-    }
-  
-    @Override
-    public int size() {
-        // TODO: How to get the proper size based on graphType
-        return graphNameIndex.getGraph().size();
-    }
-  
-    @Override
-    public Iterator<IRI> iterator() {
-        final Iterator<Triple> indexIter = graphNameIndex.getGraph().filter( null, RDF.type, graphType );
-        return new Iterator<IRI>() {
-            @Override
-            public boolean hasNext() {
-                return indexIter.hasNext();
-            }
-  
-            @Override
-            public IRI next() {
-                return IRI.class.cast(indexIter.next().getSubject());
-            }
-  
-            @Override
-            public void remove() {
-                throw new UnsupportedOperationException();
-            }
-        };
-    }
-    
-    @Override
-    public boolean add(IRI o) {
-        throw new UnsupportedOperationException();
-    }
-  
-    @Override
-    public boolean contains(Object o) {
-        if (o instanceof IRI) {
-            return graphNameIndex.getGraph().filter(IRI.class.cast(o), RDF.type, graphType).hasNext();
-        }
-        return false;
-    }
-};    

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
index 4a8258d..7044fe1 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
@@ -22,7 +22,7 @@ import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
  * Represents the Jena {@link Model} and the Clerezza {@link ImmutableGraph} or
  * {@link Graph}. It also provide access to the {@link JenaGraphAdaptor}
  * so that this component can add parsed data to {@link ImmutableGraph}s created
- * by calls to {@link SingleTdbDatasetTcProvider#createGraph(Iri, TripleCollection)}.
+ * by calls to {@link SingleTdbDatasetTcProvider#createGraph(IRI, TripleCollection)}.
  * @author Rupert Westenthaler
  *
  */

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
index 0e84390..d08b7b1 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
@@ -27,7 +27,7 @@ import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.jena.tdb.internals.ModelGraph;
 import org.apache.clerezza.rdf.jena.tdb.internals.Symbols;
-import org.apache.clerezza.rdf.jena.tdb.internals.IriSet;
+import org.apache.clerezza.rdf.jena.tdb.internals.IRISet;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -62,7 +62,7 @@ import org.apache.clerezza.rdf.core.access.TcManager;
  * such as <code>"${myHome}/myRdfStore"</code><p>
  * The {@link #DEFAULT_GRAPH_NAME} property can be used to define the
  * name of the ImmutableGraph that exposes the {@link Dataset#getDefaultModel()} as
- * both {@link TcProvider#getGraph(Iri)} and {@link TcProvider#getGraph(Iri)}.
+ * both {@link TcProvider#getGraph(IRI)} and {@link TcProvider#getGraph(IRI)}.
  * This easily allows to access the union graph of the Jena TDB dataset.<p>
  * This {@link TcProvider} {@link ConfigurationPolicy#REQUIRE requires} an
  * configuration and uses the {@link Component#configurationFactory() 
@@ -401,7 +401,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     @Override
     public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
-            throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
+            throw new IllegalArgumentException("The parsed ImmutableGraph IRI MUST NOT be NULL!");
         }
         datasetLock.readLock().lock();
         try {
@@ -422,7 +422,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     @Override
     public Graph getMGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
-            throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
+            throw new IllegalArgumentException("The parsed ImmutableGraph IRI MUST NOT be NULL!");
         }
         datasetLock.readLock().lock();
         try {
@@ -443,7 +443,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     @Override
     public Graph getGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
-            throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
+            throw new IllegalArgumentException("The parsed ImmutableGraph IRI MUST NOT be NULL!");
         }
         datasetLock.readLock().lock();
         try {
@@ -467,7 +467,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     public Set<IRI> listImmutableGraphs() {
         datasetLock.readLock().lock();
         try {
-            return new HashSet(new IriSet( graphNameIndex, Symbols.ImmutableGraph ));
+            return new HashSet(new IRISet( graphNameIndex, Symbols.ImmutableGraph ));
         } finally {
             datasetLock.readLock().unlock();
         }
@@ -481,7 +481,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     public Set<IRI> listMGraphs() {
         datasetLock.readLock().lock();
         try {
-            return  new HashSet(new IriSet( graphNameIndex, Symbols.Graph ));
+            return  new HashSet(new IRISet( graphNameIndex, Symbols.Graph ));
         } finally {
             datasetLock.readLock().unlock();
         }
@@ -495,7 +495,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     public Set<IRI> listGraphs() {
         datasetLock.readLock().lock();
         try {
-            return  new HashSet(new IriSet( graphNameIndex, null ));
+            return  new HashSet(new IRISet( graphNameIndex, null ));
         } finally {
             datasetLock.readLock().unlock();
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
index fc44b29..513098e 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.scala.utils
 
-import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.IRI
 
 /**
  * A IRI-namespace prefix
@@ -26,12 +26,12 @@ import org.apache.clerezza.commons.rdf.Iri
 class NameSpace(prefix: String) {
 
   /**
-   * returns a Iri applying this namespace prefix to the given symbol
+   * returns a IRI applying this namespace prefix to the given symbol
    */
-  def +(s: Symbol) = new Iri(prefix + s.name)
+  def +(s: Symbol) = new IRI(prefix + s.name)
 
   /**
-   * returns a Iri applying this prefix to the given string
+   * returns a IRI applying this prefix to the given string
    */
-  def +(s: String) = new Iri(prefix + s)
+  def +(s: String) = new IRI(prefix + s)
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
index d5e6544..bc9bd55 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.scala.utils
 
 import org.apache.clerezza.commons.rdf.BlankNode
 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.Language
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl
@@ -48,11 +48,11 @@ class EzGraphTest {
 
   /**import some references in order to reduce dependencies */
 
-  final val hex: Iri = new Iri("http://www.w3.org/ns/auth/cert#hex")
-  final val identity: Iri = new Iri("http://www.w3.org/ns/auth/cert#identity")
-  final val RSAPublicKey: Iri = new Iri("http://www.w3.org/ns/auth/rsa#RSAPublicKey")
-  final val modulus: Iri = new Iri("http://www.w3.org/ns/auth/rsa#modulus")
-  final val public_exponent: Iri = new Iri("http://www.w3.org/ns/auth/rsa#public_exponent")
+  final val hex: IRI = new IRI("http://www.w3.org/ns/auth/cert#hex")
+  final val identity: IRI = new IRI("http://www.w3.org/ns/auth/cert#identity")
+  final val RSAPublicKey: IRI = new IRI("http://www.w3.org/ns/auth/rsa#RSAPublicKey")
+  final val modulus: IRI = new IRI("http://www.w3.org/ns/auth/rsa#modulus")
+  final val public_exponent: IRI = new IRI("http://www.w3.org/ns/auth/rsa#public_exponent")
 
   val henryUri: String = "http://bblfish.net/#hjs"
   val retoUri: String = "http://farewellutopia.com/reto/#me"
@@ -63,13 +63,13 @@ class EzGraphTest {
     val gr = new SimpleGraph
     val reto = new BlankNode()
     val danny = new BlankNode()
-    val henry = new Iri(henryUri)
+    val henry = new IRI(henryUri)
 
     gr.add(new TripleImpl(reto, RDF.`type`, FOAF.Person))
     gr.add(new TripleImpl(reto, FOAF.name, new PlainLiteralImpl("Reto Bachman-Gmür", new Language("rm"))))
     //it is difficult to remember that one needs to put a string literal if one does not want to specify a language
     gr.add(new TripleImpl(reto, FOAF.title, new TypedLiteralImpl("Mr", XSD.string)))
-    gr.add(new TripleImpl(reto, FOAF.currentProject, new Iri("http://clerezza.org/")))
+    gr.add(new TripleImpl(reto, FOAF.currentProject, new IRI("http://clerezza.org/")))
     gr.add(new TripleImpl(reto, FOAF.knows, henry))
     gr.add(new TripleImpl(reto, FOAF.knows, danny))
 
@@ -79,7 +79,7 @@ class EzGraphTest {
     gr.add(new TripleImpl(danny, FOAF.knows, reto))
 
     gr.add(new TripleImpl(henry, FOAF.name, new TypedLiteralImpl("Henry Story", XSD.string))) //It is tricky to remember that one needs this for pure strings
-    gr.add(new TripleImpl(henry, FOAF.currentProject, new Iri("http://webid.info/")))
+    gr.add(new TripleImpl(henry, FOAF.currentProject, new IRI("http://webid.info/")))
     gr.add(new TripleImpl(henry, RDF.`type`, FOAF.Person))
     gr.add(new TripleImpl(henry, FOAF.knows, danny))
     gr.add(new TripleImpl(henry, FOAF.knows, reto))

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
index 5240cc7..fa0a8b0 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
@@ -24,7 +24,7 @@ import org.apache.clerezza.rdf.core.impl._
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.commons.rdf.BlankNode
 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.impl.utils.PlainLiteralImpl
@@ -36,10 +36,10 @@ import Preamble._
 
 class RichGraphNodeTest {
 
-  private val johnUri = new Iri("http://example.org/john")
-  private val susanneUri = new Iri("http://example.org/susanne")
-  private val listUri = new Iri("http://example.org/list")
-  private val greetingsUri = new Iri("http://example.org/greetings")
+  private val johnUri = new IRI("http://example.org/john")
+  private val susanneUri = new IRI("http://example.org/susanne")
+  private val listUri = new IRI("http://example.org/list")
+  private val greetingsUri = new IRI("http://example.org/greetings")
   private val billBlankNode = new BlankNode()
   private var node : RichGraphNode = null;
   private var mGraph = new SimpleGraph()
@@ -96,9 +96,9 @@ class RichGraphNodeTest {
   def testIterate = {
     val simple: Graph = new SimpleGraph();
     val node = new GraphNode(new BlankNode(), simple);
-    node.addProperty(DCTERMS.provenance, new Iri("http://example.org/foo"));
-    node.addProperty(DCTERMS.language, new Iri("http://www.bluewin.ch/"));
-    simple.add(new TripleImpl(new Iri("http://www.bluewin.ch/"),RDF.`type`, RDFS.Container));
+    node.addProperty(DCTERMS.provenance, new IRI("http://example.org/foo"));
+    node.addProperty(DCTERMS.language, new IRI("http://www.bluewin.ch/"));
+    simple.add(new TripleImpl(new IRI("http://www.bluewin.ch/"),RDF.`type`, RDFS.Container));
     node.addProperty(RDF.`type`, PLATFORM.HeadedPage);
     node.addProperty(RDF.`type`, RDFS.Class);
     val test: CollectedIter[RichGraphNode] = node/DCTERMS.language/RDF.`type`;
@@ -158,7 +158,7 @@ class RichGraphNodeTest {
   @Test
   def literalAsObject = {
     val dateLiteral = new TypedLiteralImpl("2009-01-01T01:33:58Z",
-          new Iri("http://www.w3.org/2001/XMLSchema#dateTime"))
+          new IRI("http://www.w3.org/2001/XMLSchema#dateTime"))
     val node = new GraphNode(dateLiteral, new SimpleGraph())
     Assert.assertNotNull(node.as[java.util.Date])
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
index d73d5f6..f60b1eb 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
@@ -18,7 +18,7 @@ package org.apache.clerezza.rdf.scala.utils
  * 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.commons.rdf.Language
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl
@@ -34,27 +34,27 @@ class TypeConversionTest {
 
   @Test
   def useStringAsObject {
-    val t = new TripleImpl(new Iri(("http://example.org/subject")), new Iri(("http://example.org/predicate")), "a value")
+    val t = new TripleImpl(new IRI(("http://example.org/subject")), new IRI(("http://example.org/predicate")), "a value")
     Assert.assertEquals(literalFactory.createTypedLiteral("a value"), t.getObject)
   }
 
   /*@Test
   def useStringWithLanguageTag {
-    val t = new TripleImpl(new Iri(("http://example.org/subject")), new Iri(("http://example.org/predicate")), "a value"("en"))
+    val t = new TripleImpl(new IRI(("http://example.org/subject")), new IRI(("http://example.org/predicate")), "a value"("en"))
     Assert.assertEquals(new PlainLiteralImpl("a value", new Language("en")), t.getObject)
   }*/
 
   @Test
   def useStringWithLanguageTag {
      val lit = new PlainLiteralImpl("a value", new Language("en"))
-    val t = new TripleImpl(new Iri(("http://example.org/subject")), new Iri(("http://example.org/predicate")), "a value" lang "en")
+    val t = new TripleImpl(new IRI(("http://example.org/subject")), new IRI(("http://example.org/predicate")), "a value" lang "en")
     Assert.assertEquals(lit, t.getObject)
   }
 
   @Test
   def useStringWithType {
-    val typeUri = new Iri("http://example.org/dt")
-    val t = new TripleImpl(new Iri(("http://example.org/subject")), new Iri(("http://example.org/predicate")), "a value"^^typeUri)
+    val typeUri = new IRI("http://example.org/dt")
+    val t = new TripleImpl(new IRI(("http://example.org/subject")), new IRI(("http://example.org/predicate")), "a value"^^typeUri)
     Assert.assertEquals(new TypedLiteralImpl("a value", typeUri), t.getObject)
   }
 
@@ -67,8 +67,8 @@ class TypeConversionTest {
 
   @Test
   def dotUri {
-    val t = new TripleImpl(new Iri(("http://example.org/subject")), new Iri(("http://example.org/predicate")), "http://example.org".iri)
-    Assert.assertEquals(new Iri("http://example.org"), t.getObject)
+    val t = new TripleImpl(new IRI(("http://example.org/subject")), new IRI(("http://example.org/predicate")), "http://example.org".iri)
+    Assert.assertEquals(new IRI("http://example.org"), t.getObject)
   }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/rdf/storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf/storage.web/src/main/scala/WebProxy.scala b/rdf/storage.web/src/main/scala/WebProxy.scala
index e51d91c..d501595 100644
--- a/rdf/storage.web/src/main/scala/WebProxy.scala
+++ b/rdf/storage.web/src/main/scala/WebProxy.scala
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.storage.web
 
 
 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._
 import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph
 import org.osgi.service.component.ComponentContext
@@ -96,10 +96,10 @@ class WebProxy extends WeightedTcProvider with Logging {
    * @return
    * @throws NoSuchEntityException
    */
-  def getMGraph(name: Iri): Graph = {
+  def getMGraph(name: IRI): Graph = {
     val graph = getImmutableGraph(name)
     return new AbstractGraph() {
-      protected def performFilter(subject: BlankNodeOrIri, predicate: Iri, `object` : RdfTerm): java.util.Iterator[Triple] = {
+      protected def performFilter(subject: BlankNodeOrIRI, predicate: IRI, `object` : RDFTerm): java.util.Iterator[Triple] = {
         graph.filter(subject, predicate, `object`)
       }
 
@@ -107,7 +107,7 @@ class WebProxy extends WeightedTcProvider with Logging {
     }
   }
 
-  def getImmutableGraph(name: Iri): ImmutableGraph = {
+  def getImmutableGraph(name: IRI): ImmutableGraph = {
     try {
       getGraph(name, Cache.Fetch)
     } catch {
@@ -119,24 +119,24 @@ class WebProxy extends WeightedTcProvider with Logging {
     }
   }
 
-  def getGraph(name: Iri): Graph = {
+  def getGraph(name: IRI): Graph = {
     return getMGraph(name)
   }
 
-  def createGraph(name: Iri): Graph = {
+  def createGraph(name: IRI): Graph = {
     throw new UnsupportedOperationException
   }
 
-  def createImmutableGraph(name: Iri, triples: Graph): ImmutableGraph = {
+  def createImmutableGraph(name: IRI, triples: Graph): ImmutableGraph = {
     throw new UnsupportedOperationException
   }
 
-  def deleteGraph(name: Iri): Unit = {
+  def deleteGraph(name: IRI): Unit = {
     throw new UnsupportedOperationException
   }
 
-  def getNames(graph: ImmutableGraph): java.util.Set[Iri] = {
-    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
+  def getNames(graph: ImmutableGraph): java.util.Set[IRI] = {
+    var result: java.util.Set[IRI] = new java.util.HashSet[IRI]
     import collection.JavaConversions._
     for (name <- listGraphs) {
       if (getImmutableGraph(name).equals(graph)) {
@@ -146,27 +146,27 @@ class WebProxy extends WeightedTcProvider with Logging {
     return result
   }
 
-  def listGraphs: java.util.Set[Iri] = {
-    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
+  def listGraphs: java.util.Set[IRI] = {
+    var result: java.util.Set[IRI] = new java.util.HashSet[IRI]
     result.addAll(listMGraphs)
     result.addAll(listImmutableGraphs)
     return result
   }
 
-  def listMGraphs: java.util.Set[Iri] = {
+  def listMGraphs: java.util.Set[IRI] = {
     //or should we list graphs for which we have a cached version?
-    return java.util.Collections.emptySet[Iri]
+    return java.util.Collections.emptySet[IRI]
   }
 
-  def listImmutableGraphs: java.util.Set[Iri] = {
-    return java.util.Collections.emptySet[Iri]
+  def listImmutableGraphs: java.util.Set[IRI] = {
+    return java.util.Collections.emptySet[IRI]
   }
 
   /**
    * The semantics of this resource
    * @param update if a remote URI, update information on the resource first
    */
-  def getGraph(name: Iri, updatePolicy: Cache.Value): ImmutableGraph = {
+  def getGraph(name: IRI, updatePolicy: Cache.Value): ImmutableGraph = {
     logger.debug("getting graph " + name)
     if (name.getUnicodeString.indexOf('#') != -1) {
       logger.debug("not dereferencing URI with hash sign. Please see CLEREZZA-533 for debate.")
@@ -176,7 +176,7 @@ class WebProxy extends WeightedTcProvider with Logging {
       //these are not dereferenceable
       throw new NoSuchEntityException(name)
     }
-    val cacheGraphName = new Iri("urn:x-localinstance:/cache/" + name.getUnicodeString)
+    val cacheGraphName = new IRI("urn:x-localinstance:/cache/" + name.getUnicodeString)
     //todo: follow redirects and keep track of them
     //todo: keep track of headers especially date and etag. test for etag similarity
     //todo: for https connection allow user to specify his webid and send his key: ie allow web server to be an agent

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f2811c72/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 c710699..b052b01 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
@@ -398,7 +398,7 @@ public class GraphNode {
         };
     }
 
-    public Iterator<IRI> getIriObjects(IRI property) {
+    public Iterator<IRI> getIRIObjects(IRI property) {
         return getTypeSelectedObjects(property, IRI.class);
 
     }
@@ -450,7 +450,7 @@ public class GraphNode {
     /**
      *
      * @param triples
-     * @returnan {@link Iterator}<{@link Iri}> containing the predicates from
+     * @returnan {@link Iterator}<{@link IRI}> containing the predicates from
      * an {@link Iterator}<{@link Triple}>
      */
     private Iterator<IRI> getUniquePredicates(final Iterator<Triple> triples) {


[46/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
new file mode 100644
index 0000000..fcab2c1
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-provider-manipulation.js
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function ConceptProviderGui(){};
+
+ConceptProviderGui.isModified = false;
+
+ConceptProviderGui.query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> \n" +
+	"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" +
+	"PREFIX skos08: <http://www.w3.org/2008/05/skos#> \n" +
+	"PREFIX skos04: <http://www.w3.org/2004/02/skos/core#> \n" +
+	"CONSTRUCT { ?concept a skos08:Concept; skos08:prefLabel ?prefLabel; " +
+		"rdfs:comment ?comment; owl:sameAs ?sameConcept . } \n" +
+	"WHERE { ?concept a skos04:Concept; skos04:prefLabel ?prefLabel . \n" +
+	"OPTIONAL { ?concept rdfs:comment ?comment . } \n" +
+	"OPTIONAL { ?concept owl:sameAs ?sameConcept . } \n" +
+	"FILTER (REGEX(STR(?prefLabel), '${searchTerm}', 'i'))}";
+
+ConceptProviderGui.initButtons = function() {
+
+	ConceptProviderGui.updateButtonState();
+
+	$("#deleteButton").click(function(event) {
+		$("input:checked").each(function() {
+			$(this).parent().parent().remove();
+		});
+		$(this).addClass("tx-inactive");
+		ConceptProviderGui.isModified = true;
+	});
+
+	$("#addProvider").click(function(event) {
+		ConceptProviderGui.addProvider($("#type").val(),
+					$("#conceptScheme").val(),
+					$("#sparqlEndPoint").val(),
+					$("#defaultGraph").val(),
+					$("#query").val());
+		$("#conceptScheme").val("");
+		$("#sparqlEndPoint").val("");
+		$("#defaultGraph").val("");
+		$("#query").val("");
+	});
+
+	$("#addButton").click(function(event) {
+		if($(this).text() == "Save") {
+			var options = new AjaxOptions("update-providers", "updating providers", function(obj) {
+			});
+			$("textarea[id!=query]").each(function() {
+				$(this).removeAttr("disabled");
+			});
+			options.type = "POST";
+			options.url = "update-concept-provider-list";
+			options.data = $("#providers").serialize();
+			$.ajax(options);
+		}
+	});
+}
+
+ConceptProviderGui.addProvider = function(rdfType, conceptScheme, sparqlEndPoint, defaultGraph, query) {
+	var tr = $("<tr/>").attr("id", "");
+	var td1 = $("<td/>");
+	var div = $("<div/>").text("Provider:");
+	var td2 = $("<td/>");
+
+	var selection = $("<select/>").attr("name","types");
+
+	$("#type > option:not(:selected)").each(function() {
+		selection.append($(this).clone());
+	});
+	$("#type > option:selected").each(function() {
+		var option = $(this).clone();
+		option.attr("selected", "selected");
+		selection.append(option);
+	});
+
+	td2.append(div);
+	td2.append(selection);
+	
+	var inputText = $("<input/>").attr({
+				"type":"text",
+				"name":"conceptSchemes",
+				"value": conceptScheme
+				});
+	
+	div = $("<div/>").text("Concept Scheme:");
+	td2.append(div);
+	td2.append(inputText);
+
+	inputText = $("<input/>").attr({
+				"type":"text",
+				"name":"sparqlEndPoints",
+				"value": sparqlEndPoint
+				});
+
+	div = $("<div/>").text("SPARQL End Point");
+	td2.append(div);
+	td2.append(inputText);
+
+	inputText = $("<input/>").attr({
+				"type":"text",
+				"name":"defaultGraphs",
+				"value": defaultGraph
+				});
+
+	div = $("<div/>").text("Default Graph:");
+	td2.append(div);
+	td2.append(inputText)
+	var inputCheckbox = $("<input/>").attr({
+				"type":"checkbox",
+				"value": rdfType
+				});
+
+	inputCheckbox.appendTo(td1);
+
+	td1.appendTo(tr);
+	
+	var textArea = $("<textarea/>").attr({
+				"rows":"8",
+				"name":"queryTemplates"
+				}).val(query);
+	div = $("<div/>").text("Query Template:");
+	td2.append(div);
+	td2.append(textArea);
+	td2.append($("<br/>"));
+	td2.append($("<br/>"));
+	td2.appendTo(tr);
+	tr.insertBefore("#last");
+	ConceptProviderGui.isModified = true;
+
+	$("select[name=types] > option:selected").each(function() {
+		ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
+	});
+}
+
+ConceptProviderGui.updateDropDown = function (obj, name) {
+	if(obj.val().indexOf("Local") != -1) {
+		obj.parent().parent().find("input[name!=" + name + "]").each(function() {
+			$(this).prev().hide();
+			$(this).hide();
+		});
+		obj.parent().parent().find("input[name=" + name + "]").each(function() {
+			$(this).prev().show();
+			$(this).show();
+		});
+		obj.parent().parent().find("textarea").each(function() {
+			$(this).prev().hide();
+			$(this).hide();
+		});
+	} else {
+		obj.parent().parent().find("input[name!=" + name + "]").each(function() {
+			$(this).prev().show();
+			$(this).show();
+		});
+		obj.parent().parent().find("input[name=" + name + "]").each(function() {
+			$(this).prev().hide();
+			$(this).hide();
+		});
+		obj.parent().parent().find("textarea").each(function() {
+			$(this).prev().show();
+			$(this).show();
+		});
+	}
+}
+
+ConceptProviderGui.updateButtonState = function() {
+	var counter = $("input:checked").length;
+	if(counter == 0) {
+		$("#deleteButton").addClass("tx-inactive");
+	} else {
+		$("#deleteButton").removeClass("tx-inactive");
+	}
+}
+
+$(document).ready(function () {
+
+	$("select[name=types]").live("change", function() {
+		$("select[name=types] > option:selected").each(function(){
+			ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
+		});
+	});
+	$("select[name=types] > option:selected").each(function() {
+		ConceptProviderGui.updateDropDown($(this), "conceptSchemes");
+	});
+	$("#type").live("change", function() {
+		$("#type > option:selected").each(function(){
+			ConceptProviderGui.updateDropDown($(this), "conceptScheme");
+			$("#query").val(ConceptProviderGui.query);
+		});
+	});
+	$("#type > option:selected").each(function() {
+		ConceptProviderGui.updateDropDown($(this), "conceptScheme");
+		$("#query").val(ConceptProviderGui.query);
+	});
+	$("input:checkbox").live("change",function() {
+		ConceptProviderGui.updateButtonState();
+	});
+
+	ConceptProviderGui.initButtons();
+});


[60/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.ontologies/LICENSE b/rdf/web/rdf.web.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rdf/web/rdf.web.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.ontologies/pom.xml b/rdf/web/rdf.web.ontologies/pom.xml
new file mode 100644
index 0000000..1713a43
--- /dev/null
+++ b/rdf/web/rdf.web.ontologies/pom.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>rdf.web.ontologies</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - SCB Web Access Ontologies</name>
+    <description>Ontologies defined for local use in SCB Web Access</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>1.0.0-SNAPSHOT</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
new file mode 100644
index 0000000..17d70ee
--- /dev/null
+++ b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/backup.rdf
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF xmlns="http://clerezza.org/2009/11/backup#"
+	xml:base="http://clerezza.org/2009/11/backup"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/11/backup#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Backup
+	</dc:title>
+</owl:Ontology>
+
+<!-- Classes -->
+<rdfs:Class rdf:about="#Graph">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Graph</rdfs:label>
+	<skos:definition xml:lang="en">An RDF graph.</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#MGraph">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">MGraph</rdfs:label>
+	<skos:definition xml:lang="en">A mutable RDF graph.</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#BackupAdminPage">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">BackupAdminPage</rdfs:label>
+	<skos:definition xml:lang="en">The administrative page to get backups and restore from backups.</skos:definition>
+</rdfs:Class>
+
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="#file">
+	<rdf:type rdf:resource="owl:DatatypeProperty" />
+	<rdfs:label xml:lang="en">file</rdfs:label>
+	<skos:definition xml:lang="en">Points to the backup filename of the subject.
+	</skos:definition>
+	<rdfs:domain rdf:resource="#Graph"/>
+	<rdfs:range rdf:resource="xsd:string"/>
+</rdf:Property>
+
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
new file mode 100644
index 0000000..3368915
--- /dev/null
+++ b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/graphmanagement.rdf
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF xmlns="http://clerezza.org/2010/03/graph-management#"
+	xml:base="http://clerezza.org/2010/03/graph-management"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+	xmlns:tcp="http://clerezza.org/2009/06/tcprovider#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2010/03/graph-management#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Ontology for Graph Management Page related concepts
+	</dc:title>
+</owl:Ontology>
+
+<!-- Classes -->
+<rdfs:Class rdf:about="#GraphManagementPage">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">GraphManagementPage</rdfs:label>
+	<skos:definition xml:lang="en">
+		A web page fro managing triple collections
+	</skos:definition>
+</rdfs:Class>
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="#tripleCollection">
+	<rdf:type rdf:resource="owl:ObjectProperty" />
+	<rdfs:label xml:lang="en">tripleCollection</rdfs:label>
+	<skos:definition xml:lang="en">Points to a Triple Collection.
+	</skos:definition>
+	<rdfs:range rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#size">
+	<rdf:type rdf:resource="owl:DatatypeProperty" />
+	<rdfs:label xml:lang="en">size</rdfs:label>
+	<skos:definition xml:lang="en">The size (in triples) of a Triple Collection
+	</skos:definition>
+	<rdfs:domain rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
+</rdf:Property>
+
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
new file mode 100644
index 0000000..60dc58d
--- /dev/null
+++ b/rdf/web/rdf.web.ontologies/src/main/resources/org/apache/clerezza/rdf/web/ontologies/sparqlendpoint.rdf
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF xmlns="http://clerezza.org/2009/11/sparql-endpoint#"
+	xml:base="http://clerezza.org/2009/11/sparql-endpoint"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+	xmlns:tcp="http://clerezza.org/2009/06/tcprovider#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/11/sparql-endpoint#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Sparql-Endpoint
+	</dc:title>
+</owl:Ontology>
+
+<!-- Classes -->
+<rdfs:Class rdf:about="#SparqlEndpoint">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">SparqlEndpoint</rdfs:label>
+	<skos:definition xml:lang="en">
+		A web page containing a form for entering a SPARQL query.
+	</skos:definition>
+</rdfs:Class>
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="#tripleCollection">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
+	<rdfs:label xml:lang="en">tripleCollection</rdfs:label>
+	<skos:definition xml:lang="en">Points to a Triple Collection.
+	</skos:definition>
+	<rdfs:range rdf:resource="http://clerezza.org/2009/06/tcprovider#TripleCollection"/>
+</rdf:Property>
+
+</rdf:RDF>
+


[25/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone-min.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone-min.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone-min.js
new file mode 100644
index 0000000..3541019
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone-min.js
@@ -0,0 +1,4 @@
+(function(){var t=this;var e=t.Backbone;var i=[];var r=i.push;var s=i.slice;var n=i.splice;var a;if(typeof exports!=="undefined"){a=exports}else{a=t.Backbone={}}a.VERSION="1.0.0";var h=t._;if(!h&&typeof require!=="undefined")h=require("underscore");a.$=t.jQuery||t.Zepto||t.ender||t.$;a.noConflict=function(){t.Backbone=e;return this};a.emulateHTTP=false;a.emulateJSON=false;var o=a.Events={on:function(t,e,i){if(!l(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,i){if(!l(this,"once",t,[e,i])||!e)return this;var r=this;var s=h.once(function(){r.off(t,s);e.apply(this,arguments)});s._callback=e;return this.on(t,s,i)},off:function(t,e,i){var r,s,n,a,o,u,c,f;if(!this._events||!l(this,"off",t,[e,i]))return this;if(!t&&!e&&!i){this._events={};return this}a=t?[t]:h.keys(this._events);for(o=0,u=a.length;o<u;o++){t=a[o];if(n=this._events[t]){this._events[t]=r=[
 ];if(e||i){for(c=0,f=n.length;c<f;c++){s=n[c];if(e&&e!==s.callback&&e!==s.callback._callback||i&&i!==s.context){r.push(s)}}}if(!r.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=s.call(arguments,1);if(!l(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)c(i,e);if(r)c(r,arguments);return this},stopListening:function(t,e,i){var r=this._listeners;if(!r)return this;var s=!e&&!i;if(typeof e==="object")i=this;if(t)(r={})[t._listenerId]=t;for(var n in r){r[n].off(e,i,this);if(s)delete this._listeners[n]}return this}};var u=/\s+/;var l=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(u.test(i)){var n=i.split(u);for(var a=0,h=n.length;a<h;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var c=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],h=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;ca
 se 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,h);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e)}};var f={listenTo:"on",listenToOnce:"once"};h.each(f,function(t,e){o[e]=function(e,i,r){var s=this._listeners||(this._listeners={});var n=e._listenerId||(e._listenerId=h.uniqueId("l"));s[n]=e;if(typeof i==="object")r=this;e[t](i,r,this);return this}});o.bind=o.on;o.unbind=o.off;h.extend(a,o);var d=a.Model=function(t,e){var i;var r=t||{};e||(e={});this.cid=h.uniqueId("c");this.attributes={};h.extend(this,h.pick(e,p));if(e.parse)r=this.parse(r,e)||{};if(i=h.result(this,"defaults")){r=h.defaults({},r,i)}this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};var p=["url","urlRoot","collection"];h.extend(d.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return h.clone(this.attributes)},syn
 c:function(){return a.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return h.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,i){var r,s,n,a,o,u,l,c;if(t==null)return this;if(typeof t==="object"){s=t;i=e}else{(s={})[t]=e}i||(i={});if(!this._validate(s,i))return false;n=i.unset;o=i.silent;a=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=h.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in s)this.id=s[this.idAttribute];for(r in s){e=s[r];if(!h.isEqual(c[r],e))a.push(r);if(!h.isEqual(l[r],e)){this.changed[r]=e}else{delete this.changed[r]}n?delete c[r]:c[r]=e}if(!o){if(a.length)this._pending=true;for(var f=0,d=a.length;f<d;f++){this.trigger("change:"+a[f],this,c[a[f]],i)}}if(u)return this;if(!o){while(this._pending){this._pending=false;this.trigger("change",this,i)}}this._pending=false;this._changing=false;return this},unset:function
 (t,e){return this.set(t,void 0,h.extend({},e,{unset:true}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,h.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!h.isEmpty(this.changed);return h.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?h.clone(this.changed):false;var e,i=false;var r=this._changing?this._previousAttributes:this.attributes;for(var s in t){if(h.isEqual(r[s],e=t[s]))continue;(i||(i={}))[s]=e}return i},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return h.clone(this._previousAttributes)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var i=t.success;t.success=function(r){if(!e.set(e.parse(r,t),t))return false;if(i)i(e,r,t);e.trigger("sync",e,r,t)};R(this,t);return this.sync("read",this,t)},save:function(t,e,i){var r,s,n,a=this.attributes;if(t==null||typ
 eof t==="object"){r=t;i=e}else{(r={})[t]=e}if(r&&(!i||!i.wait)&&!this.set(r,i))return false;i=h.extend({validate:true},i);if(!this._validate(r,i))return false;if(r&&i.wait){this.attributes=h.extend({},a,r)}if(i.parse===void 0)i.parse=true;var o=this;var u=i.success;i.success=function(t){o.attributes=a;var e=o.parse(t,i);if(i.wait)e=h.extend(r||{},e);if(h.isObject(e)&&!o.set(e,i)){return false}if(u)u(o,t,i);o.trigger("sync",o,t,i)};R(this,i);s=this.isNew()?"create":i.patch?"patch":"update";if(s==="patch")i.attrs=r;n=this.sync(s,this,i);if(r&&i.wait)this.attributes=a;return n},destroy:function(t){t=t?h.clone(t):{};var e=this;var i=t.success;var r=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(s){if(t.wait||e.isNew())r();if(i)i(e,s,t);if(!e.isNew())e.trigger("sync",e,s,t)};if(this.isNew()){t.success();return false}R(this,t);var s=this.sync("delete",this,t);if(!t.wait)r();return s},url:function(){var t=h.result(this,"urlRoot")||h.result(this.collection,"url")||U();
 if(this.isNew())return t;return t+(t.charAt(t.length-1)==="/"?"":"/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},isValid:function(t){return this._validate({},h.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=h.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;if(!i)return true;this.trigger("invalid",this,i,h.extend(e||{},{validationError:i}));return false}});var v=["keys","values","pairs","invert","pick","omit"];h.each(v,function(t){d.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.attributes);return h[t].apply(h,e)}});var g=a.Collection=function(t,e){e||(e={});if(e.url)this.url=e.url;if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,h.extend({silent:true},e))};var m=
 {add:true,remove:true,merge:true};var y={add:true,merge:false,remove:false};h.extend(g.prototype,o,{model:d,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return a.sync.apply(this,arguments)},add:function(t,e){return this.set(t,h.defaults(e||{},y))},remove:function(t,e){t=h.isArray(t)?t.slice():[t];e||(e={});var i,r,s,n;for(i=0,r=t.length;i<r;i++){n=this.get(t[i]);if(!n)continue;delete this._byId[n.id];delete this._byId[n.cid];s=this.indexOf(n);this.models.splice(s,1);this.length--;if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}this._removeReference(n)}return this},set:function(t,e){e=h.defaults(e||{},m);if(e.parse)t=this.parse(t,e);if(!h.isArray(t))t=t?[t]:[];var i,s,a,o,u,l;var c=e.at;var f=this.comparator&&c==null&&e.sort!==false;var d=h.isString(this.comparator)?this.comparator:null;var p=[],v=[],g={};for(i=0,s=t.length;i<s;i++){if(!(a=this._prepareModel(t[i],e)))continue;if(u=this.get(a)){if(e.remove)g[u.cid]=t
 rue;if(e.merge){u.set(a.attributes,e);if(f&&!l&&u.hasChanged(d))l=true}}else if(e.add){p.push(a);a.on("all",this._onModelEvent,this);this._byId[a.cid]=a;if(a.id!=null)this._byId[a.id]=a}}if(e.remove){for(i=0,s=this.length;i<s;++i){if(!g[(a=this.models[i]).cid])v.push(a)}if(v.length)this.remove(v,e)}if(p.length){if(f)l=true;this.length+=p.length;if(c!=null){n.apply(this.models,[c,0].concat(p))}else{r.apply(this.models,p)}}if(l)this.sort({silent:true});if(e.silent)return this;for(i=0,s=p.length;i<s;i++){(a=p[i]).trigger("add",a,this,e)}if(l)this.trigger("sort",this,e);return this},reset:function(t,e){e||(e={});for(var i=0,r=this.models.length;i<r;i++){this._removeReference(this.models[i])}e.previousModels=this.models;this._reset();this.add(t,h.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return this},push:function(t,e){t=this._prepareModel(t,e);this.add(t,h.extend({at:this.length},e));return t},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return 
 e},unshift:function(t,e){t=this._prepareModel(t,e);this.add(t,h.extend({at:0},e));return t},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){if(t==null)return void 0;return this._byId[t.id!=null?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){if(h.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(h.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(h.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},sortedIndex:function(t,e,i){e||(e=this.comparator);var r=h.isFunction(e)?e:function(t){return t.get(e)};return h.sortedIndex(this.models,t,r,
 i)},pluck:function(t){return h.invoke(this.models,"get",t)},fetch:function(t){t=t?h.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var i=this;t.success=function(r){var s=t.reset?"reset":"set";i[s](r,t);if(e)e(i,r,t);i.trigger("sync",i,r,t)};R(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?h.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var i=this;var r=e.success;e.success=function(s){if(e.wait)i.add(t,e);if(r)r(t,s,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof d){if(!t.collection)t.collection=this;return t}e||(e={});e.collection=this;var i=new this.model(t,e);if(!i._validate(t,e)){this.trigger("invalid",this,t,e);return false}return i},_removeReference:function(t){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,thi
 s)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];h.each(_,function(t){g.prototype[t]=function(){var e=s.call(arguments);e.unshift(this.models);return h[t].apply(h,e)}});var w=["groupBy","countBy","sortBy"];h.each(w,function(t){g.prototype[t]=function(e,i){var r=h.isFunction(e)?e:function(t){return t.get(e)};return h[t](this.models,r,i)}});var b=a.View=function(t){this.cid=h.uniqueId("view");this._configure(t||{});this._ensureElement();
 this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];h.extend(b.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,e){if(this.$el)this.undelegateEvents();this.$el=t instanceof a.$?t:a.$(t);this.el=this.$el[0];if(e!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=h.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(!h.isFunction(i))i=this[t[e]];if(!i)continue;var r=e.match(x);var s=r[1],n=r[2];i=h.bind(i,this);s+=".delegateEvents"+this.cid;if(n===""){this.$el.on(s,i)}else{this.$el.on(s,n,i)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_configure:function(t){if(this.options)t=h.extend({},h.resu
 lt(this,"options"),t);h.extend(this,h.pick(t,E));this.options=t},_ensureElement:function(){if(!this.el){var t=h.extend({},h.result(this,"attributes"));if(this.id)t.id=h.result(this,"id");if(this.className)t["class"]=h.result(this,"className");var e=a.$("<"+h.result(this,"tagName")+">").attr(t);this.setElement(e,false)}else{this.setElement(h.result(this,"el"),false)}}});a.sync=function(t,e,i){var r=k[t];h.defaults(i||(i={}),{emulateHTTP:a.emulateHTTP,emulateJSON:a.emulateJSON});var s={type:r,dataType:"json"};if(!i.url){s.url=h.result(e,"url")||U()}if(i.data==null&&e&&(t==="create"||t==="update"||t==="patch")){s.contentType="application/json";s.data=JSON.stringify(i.attrs||e.toJSON(i))}if(i.emulateJSON){s.contentType="application/x-www-form-urlencoded";s.data=s.data?{model:s.data}:{}}if(i.emulateHTTP&&(r==="PUT"||r==="DELETE"||r==="PATCH")){s.type="POST";if(i.emulateJSON)s.data._method=r;var n=i.beforeSend;i.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",r);if(n)re
 turn n.apply(this,arguments)}}if(s.type!=="GET"&&!i.emulateJSON){s.processData=false}if(s.type==="PATCH"&&window.ActiveXObject&&!(window.external&&window.external.msActiveXFilteringEnabled)){s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var o=i.xhr=a.ajax(h.extend(s,i));e.trigger("request",e,o,i);return o};var k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};a.ajax=function(){return a.$.ajax.apply(a.$,arguments)};var S=a.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var $=/\((.*?)\)/g;var T=/(\(\?)?:\w+/g;var H=/\*\w+/g;var A=/[\-{}\[\]+?.,\\\^$|#\s]/g;h.extend(S.prototype,o,{initialize:function(){},route:function(t,e,i){if(!h.isRegExp(t))t=this._routeToRegExp(t);if(h.isFunction(e)){i=e;e=""}if(!i)i=this[e];var r=this;a.history.route(t,function(s){var n=r._extractParameters(t,s);i&&i.apply(r,n);r.trigger.apply(r,["route:"+e].concat(n));r.trigger("route",e,n);a.history
 .trigger("route",r,e,n)});return this},navigate:function(t,e){a.history.navigate(t,e);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=h.result(this,"routes");var t,e=h.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(A,"\\$&").replace($,"(?:$1)?").replace(T,function(t,e){return e?t:"([^/]+)"}).replace(H,"(.*?)");return new RegExp("^"+t+"$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return h.map(i,function(t){return t?decodeURIComponent(t):null})}});var I=a.History=function(){this.handlers=[];h.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var P=/^\/+|\/+$/g;var O=/msie [\w.]+/;var C=/\/$/;I.started=false;h.extend(I.prototype,o,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._w
 antsHashChange||e){t=this.location.pathname;var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.substr(i.length)}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=true;this.options=h.extend({},{root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment();var i=document.documentMode;var r=O.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(P,"/");if(r&&this._wantsHashChange){this.iframe=a.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow;this.navigate(e)}if(this._hasPushState){a.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!r){a.$(window).on("hashchange",this.ch
 eckUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=e;var s=this.location;var n=s.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!n){this.fragment=this.getFragment(null,true);this.location.replace(this.root+this.location.search+"#"+this.fragment);return true}else if(this._wantsPushState&&this._hasPushState&&n&&s.hash){this.fragment=this.getHash().replace(N,"");this.history.replaceState({},document.title,this.root+this.fragment+s.search)}if(!this.options.silent)return this.loadUrl()},stop:function(){a.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);I.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(thi
 s.iframe)this.navigate(e);this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(t){var e=this.fragment=this.getFragment(t);var i=h.any(this.handlers,function(t){if(t.route.test(e)){t.callback(e);return true}});return i},navigate:function(t,e){if(!I.started)return false;if(!e||e===true)e={trigger:e};t=this.getFragment(t||"");if(this.fragment===t)return;this.fragment=t;var i=this.root+t;if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});a.history=new I;var j=function(t,e){var i=this;var r;if(t&&h.has(t,"construc
 tor")){r=t.constructor}else{r=function(){return i.apply(this,arguments)}}h.extend(r,i,e);var s=function(){this.constructor=r};s.prototype=i.prototype;r.prototype=new s;if(t)h.extend(r.prototype,t);r.__super__=i.prototype;return r};d.extend=g.extend=S.extend=b.extend=I.extend=j;var U=function(){throw new Error('A "url" property or function must be specified')};var R=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}}}).call(this);
+/*
+//@ sourceMappingURL=backbone-min.map
+*/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone.stickit.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone.stickit.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone.stickit.js
new file mode 100644
index 0000000..aa5112b
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/backbone.stickit.js
@@ -0,0 +1,468 @@
+//
+// backbone.stickit - v0.6.3
+// The MIT License
+// Copyright (c) 2012 The New York Times, CMS Group, Matthew DeLambo <de...@gmail.com> 
+//
+(function($) {
+
+  // Backbone.Stickit Namespace
+  // --------------------------
+
+  Backbone.Stickit = {
+
+    _handlers: [],
+
+    addHandler: function(handlers) {
+      // Fill-in default values.
+      handlers = _.map(_.flatten([handlers]), function(handler) {
+        return _.extend({
+          updateModel: true,
+          updateView: true,
+          updateMethod: 'text'
+        }, handler);
+      });
+      this._handlers = this._handlers.concat(handlers);
+    }
+  };
+
+  // Backbone.View Mixins
+  // --------------------
+
+  _.extend(Backbone.View.prototype, {
+
+    // Collection of model event bindings.
+    //   [{model,event,fn}, ...]
+    _modelBindings: null,
+
+    // Unbind the model and event bindings from `this._modelBindings` and
+    // `this.$el`. If the optional `model` parameter is defined, then only
+    // delete bindings for the given `model` and its corresponding view events.
+    unstickit: function(model) {
+      _.each(this._modelBindings, _.bind(function(binding, i) {
+        if (model && binding.model !== model) return false;
+        binding.model.off(binding.event, binding.fn);
+        delete this._modelBindings[i];
+      }, this));
+      this._modelBindings = _.compact(this._modelBindings);
+
+      this.$el.off('.stickit' + (model ? '.' + model.cid : ''));
+    },
+
+    // Using `this.bindings` configuration or the `optionalBindingsConfig`, binds `this.model`
+    // or the `optionalModel` to elements in the view.
+    stickit: function(optionalModel, optionalBindingsConfig) {
+      var self = this,
+        model = optionalModel || this.model,
+        namespace = '.stickit.' + model.cid,
+        bindings = optionalBindingsConfig || this.bindings || {};
+
+      this._modelBindings || (this._modelBindings = []);
+      this.unstickit(model);
+
+      // Iterate through the selectors in the bindings configuration and configure
+      // the various options for each field.
+      _.each(_.keys(bindings), function(selector) {
+        var $el, options, modelAttr, config,
+          binding = bindings[selector] || {},
+          bindKey = _.uniqueId();
+
+        // Support ':el' selector - special case selector for the view managed delegate.
+        if (selector != ':el') $el = self.$(selector);
+        else {
+          $el = self.$el;
+          selector = '';
+        }
+
+        // Fail fast if the selector didn't match an element.
+        if (!$el.length) return;
+
+        // Allow shorthand setting of model attributes - `'selector':'observe'`.
+        if (_.isString(binding)) binding = {observe:binding};
+
+        config = getConfiguration($el, binding);
+
+        modelAttr = config.observe;
+
+        // Create the model set options with a unique `bindKey` so that we
+        // can avoid double-binding in the `change:attribute` event handler.
+        options = _.extend({bindKey:bindKey}, config.setOptions || {});
+
+        initializeAttributes(self, $el, config, model, modelAttr);
+
+        initializeVisible(self, $el, config, model, modelAttr);
+
+        if (modelAttr) {
+          // Setup one-way, form element to model, bindings.
+          _.each(config.events || [], function(type) {
+            var event = type + namespace;
+            var method = function(event) {
+              var val = config.getVal.call(self, $el, event, config);
+              // Don't update the model if false is returned from the `updateModel` configuration.
+              if (evaluateBoolean(self, config.updateModel, val, config))
+                setAttr(model, modelAttr, val, options, self, config);
+            };
+            if (selector === '') self.$el.on(event, method);
+            else self.$el.on(event, selector, method);
+          });
+
+          // Setup a `change:modelAttr` observer to keep the view element in sync.
+          // `modelAttr` may be an array of attributes or a single string value.
+          _.each(_.flatten([modelAttr]), function(attr) {
+            observeModelEvent(model, self, 'change:'+attr, function(model, val, options) {
+              if (options == null || options.bindKey != bindKey)
+                updateViewBindEl(self, $el, config, getAttr(model, modelAttr, config, self), model);
+            });
+          });
+
+          updateViewBindEl(self, $el, config, getAttr(model, modelAttr, config, self), model, true);
+        }
+
+        // After each binding is setup, call the `initialize` callback.
+        applyViewFn(self, config.initialize, $el, model, config);
+      });
+
+      // Wrap `view.remove` to unbind stickit model and dom events.
+      this.remove = _.wrap(this.remove, function(oldRemove) {
+        self.unstickit();
+        if (oldRemove) oldRemove.call(self);
+      });
+    }
+  });
+
+  // Helpers
+  // -------
+
+  // Evaluates the given `path` (in object/dot-notation) relative to the given
+  // `obj`. If the path is null/undefined, then the given `obj` is returned.
+  var evaluatePath = function(obj, path) {
+    var parts = (path || '').split('.');
+    var result = _.reduce(parts, function(memo, i) { return memo[i]; }, obj);
+    return result == null ? obj : result;
+  };
+
+  // If the given `fn` is a string, then view[fn] is called, otherwise it is
+  // a function that should be executed.
+  var applyViewFn = function(view, fn) {
+    if (fn) return (_.isString(fn) ? view[fn] : fn).apply(view, _.toArray(arguments).slice(2));
+  };
+
+  var getSelectedOption = function($select) { return $select.find('option').not(function(){ return !this.selected; }); };
+
+  // Given a function, string (view function reference), or a boolean
+  // value, returns the truthy result. Any other types evaluate as false.
+  var evaluateBoolean = function(view, reference) {
+    if (_.isBoolean(reference)) return reference;
+    else if (_.isFunction(reference) || _.isString(reference))
+      return applyViewFn.apply(this, _.toArray(arguments));
+    return false;
+  };
+
+  // Setup a model event binding with the given function, and track the event
+  // in the view's _modelBindings.
+  var observeModelEvent = function(model, view, event, fn) {
+    model.on(event, fn, view);
+    view._modelBindings.push({model:model, event:event, fn:fn});
+  };
+
+  // Prepares the given `val`ue and sets it into the `model`.
+  var setAttr = function(model, attr, val, options, context, config) {
+    if (config.onSet) val = applyViewFn(context, config.onSet, val, config);
+    model.set(attr, val, options);
+  };
+
+  // Returns the given `attr`'s value from the `model`, escaping and
+  // formatting if necessary. If `attr` is an array, then an array of
+  // respective values will be returned.
+  var getAttr = function(model, attr, config, context) {
+    var val, retrieveVal = function(field) {
+      var retrieved = config.escape ? model.escape(field) : model.get(field);
+      return _.isUndefined(retrieved) ? '' : retrieved;
+    };
+    val = _.isArray(attr) ? _.map(attr, retrieveVal) : retrieveVal(attr);
+    return config.onGet ? applyViewFn(context, config.onGet, val, config) : val;
+  };
+
+  // Find handlers in `Backbone.Stickit._handlers` with selectors that match
+  // `$el` and generate a configuration by mixing them in the order that they
+  // were found with the with the givne `binding`.
+  var getConfiguration = function($el, binding) {
+    var handlers = [{
+      updateModel: false,
+      updateView: true,
+      updateMethod: 'text',
+      update: function($el, val, m, opts) { $el[opts.updateMethod](val); },
+      getVal: function($el, e, opts) { return $el[opts.updateMethod](); }
+    }];
+    _.each(Backbone.Stickit._handlers, function(handler) {
+      if ($el.is(handler.selector)) handlers.push(handler);
+    });
+    handlers.push(binding);
+    var config = _.extend.apply(_, handlers);
+    delete config.selector;
+    return config;
+  };
+
+  // Setup the attributes configuration - a list that maps an attribute or
+  // property `name`, to an `observe`d model attribute, using an optional
+  // `onGet` formatter.
+  //
+  //     attributes: [{
+  //       name: 'attributeOrPropertyName',
+  //       observe: 'modelAttrName'
+  //       onGet: function(modelAttrVal, modelAttrName) { ... }
+  //     }, ...]
+  //
+  var initializeAttributes = function(view, $el, config, model, modelAttr) {
+    var props = ['autofocus', 'autoplay', 'async', 'checked', 'controls', 'defer', 'disabled', 'hidden', 'loop', 'multiple', 'open', 'readonly', 'required', 'scoped', 'selected'];
+
+    _.each(config.attributes || [], function(attrConfig) {
+      var lastClass = '',
+        observed = attrConfig.observe || (attrConfig.observe = modelAttr),
+        updateAttr = function() {
+          var updateType = _.indexOf(props, attrConfig.name, true) > -1 ? 'prop' : 'attr',
+            val = getAttr(model, observed, attrConfig, view);
+          // If it is a class then we need to remove the last value and add the new.
+          if (attrConfig.name == 'class') {
+            $el.removeClass(lastClass).addClass(val);
+            lastClass = val;
+          }
+          else $el[updateType](attrConfig.name, val);
+        };
+      _.each(_.flatten([observed]), function(attr) {
+        observeModelEvent(model, view, 'change:' + attr, updateAttr);
+      });
+      updateAttr();
+    });
+  };
+
+  // If `visible` is configured, then the view element will be shown/hidden
+  // based on the truthiness of the modelattr's value or the result of the
+  // given callback. If a `visibleFn` is also supplied, then that callback
+  // will be executed to manually handle showing/hiding the view element.
+  //
+  //     observe: 'isRight',
+  //     visible: true, // or function(val, options) {}
+  //     visibleFn: function($el, isVisible, options) {} // optional handler
+  //
+  var initializeVisible = function(view, $el, config, model, modelAttr) {
+    if (config.visible == null) return;
+    var visibleCb = function() {
+      var visible = config.visible,
+          visibleFn = config.visibleFn,
+          val = getAttr(model, modelAttr, config, view),
+          isVisible = !!val;
+      // If `visible` is a function then it should return a boolean result to show/hide.
+      if (_.isFunction(visible) || _.isString(visible)) isVisible = applyViewFn(view, visible, val, config);
+      // Either use the custom `visibleFn`, if provided, or execute the standard show/hide.
+      if (visibleFn) applyViewFn(view, visibleFn, $el, isVisible, config);
+      else {
+        if (isVisible) $el.show();
+        else $el.hide();
+      }
+    };
+    _.each(_.flatten([modelAttr]), function(attr) {
+      observeModelEvent(model, view, 'change:' + attr, visibleCb);
+    });
+    visibleCb();
+  };
+
+  // Update the value of `$el` using the given configuration and trigger the
+  // `afterUpdate` callback. This action may be blocked by `config.updateView`.
+  //
+  //     update: function($el, val, model, options) {},  // handler for updating
+  //     updateView: true, // defaults to true
+  //     afterUpdate: function($el, val, options) {} // optional callback
+  //
+  var updateViewBindEl = function(view, $el, config, val, model, isInitializing) {
+    if (!evaluateBoolean(view, config.updateView, val, config)) return;
+    config.update.call(view, $el, val, model, config);
+    if (!isInitializing) applyViewFn(view, config.afterUpdate, $el, val, config);
+  };
+
+  // Default Handlers
+  // ----------------
+
+  Backbone.Stickit.addHandler([{
+    selector: '[contenteditable="true"]',
+    updateMethod: 'html',
+    events: ['keyup', 'change', 'paste', 'cut']
+  }, {
+    selector: 'input',
+    events: ['keyup', 'change', 'paste', 'cut'],
+    update: function($el, val) { $el.val(val); },
+    getVal: function($el) {
+      var val = $el.val();
+      if ($el.is('[type="number"]')) return val == null ? val : Number(val);
+      else return val;
+    }
+  }, {
+    selector: 'textarea',
+    events: ['keyup', 'change', 'paste', 'cut'],
+    update: function($el, val) { $el.val(val); },
+    getVal: function($el) { return $el.val(); }
+  }, {
+    selector: 'input[type="radio"]',
+    events: ['change'],
+    update: function($el, val) {
+      $el.filter('[value="'+val+'"]').prop('checked', true);
+    },
+    getVal: function($el) {
+      return $el.filter(':checked').val();
+    }
+  }, {
+    selector: 'input[type="checkbox"]',
+    events: ['change'],
+    update: function($el, val, model, options) {
+      if ($el.length > 1) {
+        // There are multiple checkboxes so we need to go through them and check
+        // any that have value attributes that match what's in the array of `val`s.
+        val || (val = []);
+        _.each($el, function(el) {
+          if (_.indexOf(val, $(el).val()) > -1) $(el).prop('checked', true);
+          else $(el).prop('checked', false);
+        });
+      } else {
+        if (_.isBoolean(val)) $el.prop('checked', val);
+        else $el.prop('checked', val == $el.val());
+      }
+    },
+    getVal: function($el) {
+      var val;
+      if ($el.length > 1) {
+        val = _.reduce($el, function(memo, el) {
+          if ($(el).prop('checked')) memo.push($(el).val());
+          return memo;
+        }, []);
+      } else {
+        val = $el.prop('checked');
+        // If the checkbox has a value attribute defined, then
+        // use that value. Most browsers use "on" as a default.
+        var boxval = $el.val();
+        if (boxval != 'on' && boxval != null) {
+          if (val) val = $el.val();
+          else val = null;
+        }
+      }
+      return val;
+    }
+  }, {
+    selector: 'select',
+    events: ['change'],
+    update: function($el, val, model, options) {
+      var optList,
+        selectConfig = options.selectOptions,
+        list = selectConfig && selectConfig.collection || undefined,
+        isMultiple = $el.prop('multiple');
+
+      // If there are no `selectOptions` then we assume that the `<select>`
+      // is pre-rendered and that we need to generate the collection.
+      if (!selectConfig) {
+        selectConfig = {};
+        var getList = function($el) {
+          return $el.find('option').map(function() {
+            return {value:this.value, label:this.text};
+          }).get();
+        };
+        if ($el.find('optgroup').length) {
+          list = {opt_labels:[]};
+          _.each($el.find('optgroup'), function(el) {
+            var label = $(el).attr('label');
+            list.opt_labels.push(label);
+            list[label] = getList($(el));
+          });
+        } else {
+          list = getList($el);
+        }
+      }
+
+      // Fill in default label and path values.
+      selectConfig.valuePath = selectConfig.valuePath || 'value';
+      selectConfig.labelPath = selectConfig.labelPath || 'label';
+
+      var addSelectOptions = function(optList, $el, fieldVal) {
+        // Add a flag for default option at the beginning of the list.
+        if (selectConfig.defaultOption) {
+          optList = _.clone(optList);
+          optList.unshift('__default__');
+        }
+        _.each(optList, function(obj) {
+          var option = $('<option/>'), optionVal = obj;
+
+          var fillOption = function(text, val) {
+            option.text(text);
+            optionVal = val;
+            // Save the option value as data so that we can reference it later.
+            option.data('stickit_bind_val', optionVal);
+            if (!_.isArray(optionVal) && !_.isObject(optionVal)) option.val(optionVal);
+          };
+
+          if (obj === '__default__')
+            fillOption(selectConfig.defaultOption.label, selectConfig.defaultOption.value);
+          else
+            fillOption(evaluatePath(obj, selectConfig.labelPath), evaluatePath(obj, selectConfig.valuePath));
+
+          // Determine if this option is selected.
+          if (!isMultiple && optionVal != null && fieldVal != null && optionVal == fieldVal || (_.isObject(fieldVal) && _.isEqual(optionVal, fieldVal)))
+            option.prop('selected', true);
+          else if (isMultiple && _.isArray(fieldVal)) {
+            _.each(fieldVal, function(val) {
+              if (_.isObject(val)) val = evaluatePath(val, selectConfig.valuePath);
+              if (val == optionVal || (_.isObject(val) && _.isEqual(optionVal, val)))
+                option.prop('selected', true);
+            });
+          }
+
+          $el.append(option);
+        });
+      };
+
+      $el.html('');
+
+      // The `list` configuration is a function that returns the options list or a string
+      // which represents the path to the list relative to `window` or the view/`this`.
+      var evaluate = function(view, list) {
+        var context = window;
+        if (list.indexOf('this.') === 0) context = view;
+        list = list.replace(/^[a-z]*\.(.+)$/, '$1');
+        return evaluatePath(context, list);
+      };
+      if (_.isString(list)) optList = evaluate(this, list);
+      else if (_.isFunction(list)) optList = applyViewFn(this, list, $el, options);
+      else optList = list;
+
+      // Support Backbone.Collection and deserialize.
+      if (optList instanceof Backbone.Collection) optList = optList.toJSON();
+
+      if (_.isArray(optList)) {
+        addSelectOptions(optList, $el, val);
+      } else {
+        // If the optList is an object, then it should be used to define an optgroup. An
+        // optgroup object configuration looks like the following:
+        //
+        //     {
+        //       'opt_labels': ['Looney Tunes', 'Three Stooges'],
+        //       'Looney Tunes': [{id: 1, name: 'Bugs Bunny'}, {id: 2, name: 'Donald Duck'}],
+        //       'Three Stooges': [{id: 3, name : 'moe'}, {id: 4, name : 'larry'}, {id: 5, name : 'curly'}]
+        //     }
+        //
+        _.each(optList.opt_labels, function(label) {
+          var $group = $('<optgroup/>').attr('label', label);
+          addSelectOptions(optList[label], $group, val);
+          $el.append($group);
+        });
+      }
+    },
+    getVal: function($el) {
+      var val;
+      if ($el.prop('multiple')) {
+        val = $(getSelectedOption($el).map(function() {
+          return $(this).data('stickit_bind_val');
+        })).get();
+      } else {
+        val = getSelectedOption($el).data('stickit_bind_val');
+      }
+      return val;
+    }
+  }]);
+
+})(window.jQuery || window.Zepto);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/etch.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/etch.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/etch.js
new file mode 100644
index 0000000..a0402e9
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/etch.js
@@ -0,0 +1,366 @@
+(function() {
+  'use strict';
+    
+  var models = {},
+    views = {},
+    collections = {},
+    etch = {};
+	
+  // versioning as per semver.org
+  etch.VERSION = '0.6.2';
+
+  etch.config = {
+    // selector to specify editable elements   
+    selector: '.editable',
+      
+    // Named sets of buttons to be specified on the editable element
+    // in the markup as "data-button-class"   
+    buttonClasses: {
+      'default': ['save'],
+      'all': ['bold', 'italic', 'underline', 'unordered-list', 'ordered-list', 'link', 'clear-formatting', 'save'],
+      'title': ['bold', 'italic', 'underline', 'save']
+    }
+  };
+
+  models.Editor = Backbone.Model;
+
+  views.Editor = Backbone.View.extend({
+    initialize: function() {
+      this.$el = $(this.el);
+            
+      // Model attribute event listeners:
+      _.bindAll(this, 'changeButtons', 'changePosition', 'changeEditable', 'insertImage');
+      this.model.bind('change:buttons', this.changeButtons);
+      this.model.bind('change:position', this.changePosition);
+      this.model.bind('change:editable', this.changeEditable);
+
+      // Init Routines:
+      this.changeEditable();
+    },
+
+    events: {
+      'click .etch-bold': 'toggleBold',
+      'click .etch-italic': 'toggleItalic',
+      'click .etch-underline': 'toggleUnderline',
+      'click .etch-heading': 'toggleHeading',
+      'click .etch-unordered-list': 'toggleUnorderedList',
+      'click .etch-justify-left': 'justifyLeft',
+      'click .etch-justify-center': 'justifyCenter',
+      'click .etch-justify-right': 'justifyRight',
+      'click .etch-ordered-list': 'toggleOrderedList',
+      'click .etch-link': 'toggleLink',
+      'click .etch-image': 'getImage',
+      'click .etch-save': 'save',
+      'click .etch-clear-formatting': 'clearFormatting'
+    },
+        
+    changeEditable: function() {
+      this.setButtonClass();
+      // Im assuming that Ill add more functionality here
+    },
+
+    setButtonClass: function() {
+      // check the button class of the element being edited and set the associated buttons on the model
+      var editorModel = this.model;
+      var buttonClass = editorModel.get('editable').attr('data-button-class') || 'default';
+      editorModel.set({ buttons: etch.config.buttonClasses[buttonClass] });
+    },
+
+    changeButtons: function() {
+      // render the buttons into the editor-panel
+      this.$el.empty();
+      var view = this;
+      var buttons = this.model.get('buttons');
+            
+      // hide editor panel if there are no buttons in it and exit early
+      if (!buttons.length) { $(this.el).hide(); return; }
+            
+      _.each(this.model.get('buttons'), function(button){
+        var $buttonEl = $('<a href="#" class="etch-editor-button etch-'+ button +'" title="'+ button.replace('-', ' ') +'"><span></span></a>');
+        view.$el.append($buttonEl);
+      });
+            
+      $(this.el).show('fast');
+    },
+
+    changePosition: function() {
+      // animate editor-panel to new position
+      var pos = this.model.get('position');
+      this.$el.animate({'top': pos.y, 'left': pos.x}, { queue: false });
+    },
+        
+    wrapSelection: function(selectionOrRange, elString, cb) {
+      // wrap current selection with elString tag
+      var range = selectionOrRange === Range ? selectionOrRange : selectionOrRange.getRangeAt(0);
+      var el = document.createElement(elString);
+      range.surroundContents(el);
+    },
+        
+    clearFormatting: function(e) {
+      e.preventDefault();
+      document.execCommand('removeFormat', false, null);
+    },
+        
+    toggleBold: function(e) {
+      e.preventDefault();
+      document.execCommand('bold', false, null);
+    },
+
+    toggleItalic: function(e) {
+      e.preventDefault();
+      document.execCommand('italic', false, null);
+    },
+
+    toggleUnderline: function(e) {
+      e.preventDefault();
+      document.execCommand('underline', false, null);
+    },
+        
+    toggleHeading: function(e) {
+      e.preventDefault();
+      var range = window.getSelection().getRangeAt(0);
+      var wrapper = range.commonAncestorContainer.parentElement
+      if ($(wrapper).is('h3')) {
+        $(wrapper).replaceWith(wrapper.textContent)
+        return;
+      }
+      var h3 = document.createElement('h3');
+      range.surroundContents(h3);
+    },
+
+    urlPrompt: function(callback) {
+      // This uses the default browser UI prompt to get a url.
+      // Override this function if you want to implement a custom UI.
+        
+      var url = prompt('Enter a url', 'http://');
+        
+      // Ensure a new link URL starts with http:// or https:// 
+      // before it's added to the DOM.
+      //
+      // NOTE: This implementation will disallow relative URLs from being added
+      // but will make it easier for users typing external URLs.
+      if (/^((http|https)...)/.test(url)) {
+        callback(url);
+      } else {
+        callback("http://" + url);
+      }
+    },
+    
+    toggleLink: function(e) {
+      e.preventDefault();
+      var range = window.getSelection().getRangeAt(0);
+
+      // are we in an anchor element?
+      if (range.startContainer.parentNode.tagName === 'A' || range.endContainer.parentNode.tagName === 'A') {
+        // unlink anchor
+        document.execCommand('unlink', false, null);
+      } else {
+        // promt for url and create link
+        this.urlPrompt(function(url) {
+          document.execCommand('createLink', false, url);
+        });
+      }
+    },
+
+    toggleUnorderedList: function(e) {
+      e.preventDefault();
+      document.execCommand('insertUnorderedList', false, null);
+    },
+
+    toggleOrderedList: function(e){
+      e.preventDefault();
+      document.execCommand('insertOrderedList', false, null);
+    },
+        
+    justifyLeft: function(e) {
+      e.preventDefault();
+      document.execCommand('justifyLeft', false, null);
+    },
+
+    justifyCenter: function(e) {
+      e.preventDefault();
+      document.execCommand('justifyCenter', false, null);
+    },
+
+    justifyRight: function(e) {
+      e.preventDefault();
+      document.execCommand('justifyRight', false, null);
+    },
+
+    getImage: function(e) {
+      e.preventDefault();
+
+      // call startUploader with callback to handle inserting it once it is uploded/cropped
+      this.startUploader(this.insertImage);
+    },
+        
+    startUploader: function(cb) {
+      // initialize Image Uploader
+      var model = new models.ImageUploader();
+      var view = new views.ImageUploader({model: model});
+            
+      // stash a reference to the callback to be called after image is uploaded
+      model._imageCallback = function(image) {
+        view.startCropper(image, cb);
+      };
+
+
+      // stash reference to saved range for inserting the image once its 
+      this._savedRange = window.getSelection().getRangeAt(0);
+
+      // insert uploader html into DOM
+      $('body').append(view.render().el);
+    },
+        
+    insertImage: function(image) {
+      // insert image - passed as a callback to startUploader
+      var sel = window.getSelection();
+      sel.removeAllRanges();
+      sel.addRange(this._savedRange);
+            
+      var attrs = {
+        'editable': this.model.get('editable'),
+        'editableModel': this.model.get('editableModel')
+      };
+            
+      _.extend(attrs, image);
+
+      var model = new models.EditableImage(attrs);
+      var view = new views.EditableImage({model: model});
+      this._savedRange.insertNode($(view.render().el).addClass('etch-float-left')[0]);
+    },
+        
+    save: function(e) {
+      e.preventDefault();
+      var editableModel = this.model.get('editableModel');
+      editableModel.trigger('save');
+    }
+  });
+
+  // tack on models, views, etc... as well as init function
+  _.extend(etch, {
+    models: models,
+    views: views,
+    collections: collections,
+
+    // This function is to be used as callback to whatever event
+    // you use to initialize editing 
+    editableInit: function(e) {
+      e.stopPropagation();
+      var target = e.target || e.srcElement;
+      var $editable = $(target).etchFindEditable();
+      $editable.attr('contenteditable', true);
+
+      // if the editor isn't already built, build it
+      var $editor = $('.etch-editor-panel');
+      var editorModel = $editor.data('model');
+      if (!$editor.size()) {
+        $editor = $('<div class="etch-editor-panel">');
+        var editorAttrs = { editable: $editable, editableModel: this.model };
+        document.body.appendChild($editor[0]);
+        $editor.etchInstantiate({classType: 'Editor', attrs: editorAttrs});
+        editorModel = $editor.data('model');
+
+      // check if we are on a new editable
+      } else if ($editable[0] !== editorModel.get('editable')[0]) {
+        // set new editable
+        editorModel.set({
+          editable: $editable,
+          editableModel: this.model
+        });
+      }
+      
+      // Firefox seems to be only browser that defaults to `StyleWithCSS == true`
+      // so we turn it off here. Plus a try..catch to avoid an error being thrown in IE8.
+      try {
+        document.execCommand('StyleWithCSS', false, false);
+      }
+      catch (err) {
+        // expecting to just eat IE8 error, but if different error, rethrow
+        if (err.message !== "Invalid argument.") {
+          throw err;
+        }
+      }
+
+      if (models.EditableImage) {
+        // instantiate any images that may be in the editable
+        var $imgs = $editable.find('img');
+        if ($imgs.size()) {
+          var attrs = { editable: $editable, editableModel: this.model };
+          $imgs.each(function() {
+            var $this = $(this);
+            if (!$this.data('editableImageModel')) {
+              var editableImageModel =  new models.EditableImage(attrs);
+              var editableImageView = new views.EditableImage({model: editableImageModel, el: this, tagName: this.tagName});
+              $this.data('editableImageModel', editableImageModel);
+            }
+          });
+        }
+      }
+
+      // listen for mousedowns that are not coming from the editor
+      // and close the editor
+      $('body').bind('mousedown.editor', function(e) {
+        // check to see if the click was in an etch tool
+        var target = e.target || e.srcElement;
+        if ($(target).not('.etch-editor-panel, .etch-editor-panel *, .etch-image-tools, .etch-image-tools *').size()) {
+          // remove editor
+          $editor.remove();
+                    
+                    
+          if (models.EditableImage) {
+            // unblind the image-tools if the editor isn't active
+            $editable.find('img').unbind('mouseenter');
+
+            // remove any latent image tool model references
+            $(etch.config.selector+' img').data('editableImageModel', false)
+          }
+                    
+          // once the editor is removed, remove the body binding for it
+          $(this).unbind('mousedown.editor');
+        }
+      });
+
+      editorModel.set({position: {x: e.pageX - 15, y: e.pageY - 80}});
+    }
+  });
+
+  // jquery helper functions
+  $.fn.etchInstantiate = function(options, cb) {
+    return this.each(function() {
+      var $el = $(this);
+      options || (options = {});
+
+      var settings = {
+        el: this,
+        attrs: {}
+      }
+
+      _.extend(settings, options);
+
+      var model = new models[settings.classType](settings.attrs, settings);
+
+      // initialize a view is there is one
+      if (_.isFunction(views[settings.classType])) {
+        var view = new views[settings.classType]({model: model, el: this, tagName: this.tagName});
+      }
+           
+      // stash the model and view on the elements data object
+      $el.data({model: model});
+      $el.data({view: view});
+
+      if (_.isFunction(cb)) {
+        cb({model: model, view: view});
+      }
+    });
+  }
+
+  $.fn.etchFindEditable = function() {
+    // function that looks for the editable selector on itself or its parents
+    // and returns that el when it is found
+    var $el = $(this);
+    return $el.is(etch.config.selector) ? $el : $el.closest(etch.config.selector);
+  }
+    
+  window.etch = etch;
+})();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/greenrdfstore.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/greenrdfstore.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/greenrdfstore.js
new file mode 100644
index 0000000..eef998f
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/greenrdfstore.js
@@ -0,0 +1,78 @@
+/*
+ * functions to read RDFa to an rdfstore-js graph
+ */
+
+function GreenRdfStore() {
+}
+
+GreenRdfStore.getGraph = function(element, callback) {
+    var store = rdfstore.create();
+    store.graph(function(success,graph) {
+        var env = store.rdf;
+        CallbackProcessor.prototype = new RDFaProcessor();
+        CallbackProcessor.prototype.constructor=RDFaProcessor;
+        function CallbackProcessor() {
+           RDFaProcessor.call(this);
+        }
+        var bNodeTable = {};
+        CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+            function convertNonLiteral(node) { 
+                if (node.startsWith("_:")) {
+                    if (!bNodeTable[node]) {
+                        bNodeTable[node] = env.createBlankNode(node);
+                    }
+                    return bNodeTable[node];
+                } else {
+                    return env.createNamedNode(node);s
+                }
+            }
+            function serializeNodeList(nodeList) {
+                //code taken from Greenturtle's GraphRDFaProcessor
+                var serializer = new XMLSerializer();
+                var value = "";
+                for (var x=0; x<nodeList.length; x++) {
+                   if (nodeList[x].nodeType==Node.ELEMENT_NODE) {
+                      var prefixMap = RDFaPredicate.getPrefixMap(nodeList[x]);
+                      var prefixes = [];
+                      for (var prefix in prefixMap) {
+                         prefixes.push(prefix);
+                      }
+                      prefixes.sort();
+                      var e = nodeList[x].cloneNode(true);
+                      for (var p=0; p<prefixes.length; p++) {
+                         e.setAttributeNS("http://www.w3.org/2000/xmlns/",prefixes[p].length==0 ? "xmlns" : "xmlns:"+prefixes[p],prefixMap[prefixes[p]]);
+                      }
+                      value += serializer.serializeToString(e);
+                   } else if (nodeList[x].nodeType==Node.TEXT_NODE) {
+                      value += nodeList[x].nodeValue;
+                   }
+                }
+                return value;
+            }
+            //alert("New triple: "+subject+", predicate "+predicate+", object "+object.value+", "+object.language+", "+object.type);
+            var subjectRS = convertNonLiteral(subject);
+            
+            var predicateRS = env.createNamedNode(predicate);
+            if (object.type === "http://www.w3.org/1999/02/22-rdf-syntax-ns#object") {
+                var objectRS = convertNonLiteral(object.value);
+            } else {
+                if (origin.getAttribute("content")) {
+                    //according to the spec this attribute should be ignored for xmlLiterals, we don't
+                    var value = origin.getAttribute("content");
+                } else {
+                    if (object.value.length) {
+                        var value = serializeNodeList(object.value);
+                    } else {
+                        var value = object.value;
+                    }
+                }
+                var objectRS = env.createLiteral(value.toString(), object.language, object.type);
+            }
+            graph.add(env.createTriple(subjectRS, predicateRS, objectRS));
+        };
+        var gp = new CallbackProcessor();
+                    //gp.target.graph = new RDFaGraph();
+        gp.process(element);
+        callback(graph)
+    });
+};
\ No newline at end of file


[06/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
deleted file mode 100644
index f30cc14..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-function SelectedConcepts(){};
-
-SelectedConcepts.exists = function (concept) {
-	var exists = false;
-	$("input[name='concepts']").each( function () {
-		if ($(this).val() == concept) {
-			exists = true;
-		}
-	});
-	return exists;
-}
-
-SelectedConcepts.addConcept = function (prefLabel, uri) {
-	var div = $("<div/>");
-	ConceptFinder.createConceptWidgets(prefLabel, uri).appendTo(div);
-	SelectedConcepts.createDeleteButton(prefLabel, uri).appendTo(div);
-	$("<br />").appendTo(div);
-	$("<br />").appendTo(div);
-	$("#selected-concepts").append(div);
-}
-
-/**
- * Creates a button that allows to delete a concept.
- */
-SelectedConcepts.createDeleteButton = function(prefLabel, uri) {
-	var deleteLink = $("<a/>").attr("href", "#");
-	deleteLink.addClass("tx-icon tx-icon-delete").text("Delete");
-	deleteLink.click(function() {
-		deleteLink.parent().remove();
-		ConceptFinder.createSystemFoundConcept(prefLabel, uri)
-	});
-	return deleteLink;
-}
-
-
-$(document).ready(function () {
-	$(".tx-icon-delete").click(function() {
-		$(this).parent().remove();
-	});
-});

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
deleted file mode 100644
index fe8d6fe..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-input, select, textarea {
-	width: 32em;
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java b/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
deleted file mode 100644
index c73da54..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.util.Arrays;
-import java.util.List;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.RuntimeDelegate;
-import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
-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.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.wink.common.internal.runtime.RuntimeDelegateImpl;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This class tests the functionality of a SimpleConceptProviderManager.
- *
- * @author hasan
- */
-public class ConceptProviderManagerTest {
-
-    private class TestConceptProvider implements ConceptProvider {
-        @Override
-        public Graph retrieveConcepts(String searchTerm) {
-            return null;
-        }
-    }
-
-    private class TestedConceptProviderManager extends SimpleConceptProviderManager {
-        public void fillConceptProviderList() {
-            ConceptProvider CP1 = new TestConceptProvider();
-            ConceptProvider CP2 = new TestConceptProvider();
-            getConceptProviders().add(CP1);
-            getConceptProviders().add(CP2);
-        }
-    }
-
-    private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
-
-    private TestedConceptProviderManager testedConceptProviderManager;
-
-    @Before
-    public void setUp() {
-        RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
-        testedConceptProviderManager = new TestedConceptProviderManager();
-        testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
-
-            @Override
-            public LockableMGraph getContentGraph() {
-                return mGraph;
-            }
-        };
-    }
-
-    @Test
-    public void testUpdateConceptProviders() {
-        testedConceptProviderManager.fillConceptProviderList();
-        List<ConceptProvider> cpl = testedConceptProviderManager
-                .getConceptProviders();
-        Assert.assertTrue(cpl.get(0) instanceof TestConceptProvider);
-        Assert.assertTrue(cpl.get(1) instanceof TestConceptProvider);
-        Assert.assertTrue(cpl.size()==2);
-        List<String> types = Arrays.asList(
-                CONCEPTS.LocalConceptProvider.getUnicodeString(),
-                CONCEPTS.RemoteConceptProvider.getUnicodeString());
-        List<String> sparqlEndPoint = Arrays.asList(
-                "", "http://example.org/sparql");
-        List<String> defaultGraphs = Arrays.asList(
-                "", "http://example.org/graph");
-        List<String> queryTemplates = Arrays.asList(
-                "", "CONSTRUCT {?a ?b ?c .} WHERE {?a ?b ?c .}");
-        List<String> conceptSchemes = Arrays.asList(
-                "http://localhost:8080/default", "");
-        Response response = testedConceptProviderManager.updateConceptProviders(
-                types, sparqlEndPoint, defaultGraphs, queryTemplates,
-                conceptSchemes);
-        cpl = testedConceptProviderManager.getConceptProviders();
-        Assert.assertTrue(cpl.get(0) instanceof LocalConceptProvider);
-        Assert.assertTrue(cpl.get(1) instanceof RemoteConceptProvider);
-        Assert.assertTrue(cpl.size()==2);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java b/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
deleted file mode 100644
index ef63d25..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.util.Arrays;
-import java.util.List;
-import org.apache.clerezza.platform.config.PlatformConfig;
-import org.apache.clerezza.platform.concepts.ontologies.QUERYRESULT;
-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.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.OWL;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.SKOS;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This class tests the functionality of a ConceptsFinder.
- *
- * @author hasan
- */
-public class ConceptsFinderTest {
-
-    private final UriRef concept1a = new UriRef("http://example.org/concept1a");
-    private final UriRef concept1b = new UriRef("http://example.org/concept1b");
-    private final UriRef concept1c = new UriRef("http://example.org/concept1c");
-    private final UriRef concept1d = new UriRef("http://example.org/concept1d");
-
-    private final UriRef concept2a = new UriRef("http://example.org/concept2a");
-    private final UriRef concept2b = new UriRef("http://example.org/concept2b");
-    private final UriRef concept2c = new UriRef("http://example.org/concept2c");
-    private final UriRef concept2d = new UriRef("http://example.org/concept2d");
-
-    private final List<UriRef> concepts1 = Arrays.asList(
-            concept1a, concept1b, concept1c, concept1d);
-    private final List<UriRef> concepts2 = Arrays.asList(
-            concept2a, concept2b, concept2c, concept2d);
-
-    private class TestConceptProvider implements ConceptProvider {
-        MGraph conceptGraph = new SimpleMGraph();
-
-        public TestConceptProvider(List<UriRef> myConcepts,
-                List<UriRef> yourConcepts, List<Integer> sameAs) {
-            Assert.assertTrue(myConcepts.size()==4);
-            Assert.assertTrue(yourConcepts.size()==4);
-            for (UriRef concept : myConcepts) {
-                conceptGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
-            }
-            for (Integer index : sameAs) {
-                conceptGraph.add(new TripleImpl(myConcepts.get(index), OWL.sameAs,
-                    yourConcepts.get(index)));
-            }
-        }
-
-        @Override
-        public Graph retrieveConcepts(String searchTerm) {
-            return conceptGraph.getGraph();
-        }
-    }
-
-    private class TestedConceptProviderManager extends SimpleConceptProviderManager {
-        public void fillConceptProviderList() {
-            ConceptProvider CP1 = new TestConceptProvider(concepts1, concepts2,
-                    Arrays.asList(1,3));
-            ConceptProvider CP2 = new TestConceptProvider(concepts2, concepts1,
-                    Arrays.asList(2,3));
-            getConceptProviders().add(CP1);
-            getConceptProviders().add(CP2);
-        }
-    }
-
-    private class TestedConceptsFinder extends ConceptsFinder {
-    }
-
-    private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
-    private TestedConceptProviderManager testedConceptProviderManager;
-    private TestedConceptsFinder testedConceptsFinder;
-
-    @Before
-    public void setUp() {
-        final PlatformConfig platformConfig = new PlatformConfig() {
-
-            @Override
-            public UriRef getDefaultBaseUri() {
-                return new UriRef("http://testing.localhost/");
-            }
-            
-        };
-        final ContentGraphProvider cgProvider = new ContentGraphProvider() {
-
-            @Override
-            public LockableMGraph getContentGraph() {
-                return new LockableMGraphWrapper(new SimpleMGraph());
-            }
-
-        };
-
-        testedConceptProviderManager = new TestedConceptProviderManager();
-        testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
-            @Override
-            public LockableMGraph getContentGraph() {
-                return mGraph;
-            }
-        };
-        testedConceptsFinder = new TestedConceptsFinder() {
-            {
-                bindPlatformConfig(platformConfig);
-                bindCgProvider(cgProvider);
-            }
-        };
-        testedConceptsFinder.conceptProviderManager =
-                testedConceptProviderManager;
-
-    }
-
-    @Test
-    public void testFindConcepts() {
-        testedConceptProviderManager.fillConceptProviderList();
-        GraphNode proposals = testedConceptsFinder.findConcepts("any");
-        Assert.assertEquals(5, proposals.countObjects(QUERYRESULT.concept));
-        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1a));
-        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1b));
-        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1c));
-        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1d));
-        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept2a));
-        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2b));
-        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2c));
-        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2d));
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.ontologies/LICENSE b/platform/platform.concepts/platform.concepts.ontologies/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.concepts/platform.concepts.ontologies/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.ontologies/pom.xml b/platform/platform.concepts/platform.concepts.ontologies/pom.xml
deleted file mode 100644
index d266140..0000000
--- a/platform/platform.concepts/platform.concepts.ontologies/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.concepts</artifactId>
-        <version>0.2</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.concepts.ontologies</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Concepts Ontologies</name>
-    <description>
-        Ontologies for Platform Concepts Core
-    </description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.clerezza</groupId>
-                <artifactId>maven-ontologies-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <configuration>
-                            <resourcePath>${basedir}/src/main/resources</resourcePath>
-                            <sources>
-                                <source>${basedir}/target/generated-sources/main/java</source>
-                            </sources>
-                        </configuration>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>0.4</version>
-        </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf b/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
deleted file mode 100644
index a8cb5e4..0000000
--- a/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-	xmlns="http://clerezza.org/2010/01/concepts#"
-	xml:base="http://clerezza.org/2010/01/concepts"
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
-	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2010/01/concepts#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Clerezza Concepts
-	</dc:title>
-</owl:Ontology>
-
-<!-- Classes -->
-
-<rdfs:Class rdf:about="#ConceptsPage">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Concepts Page</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page containing a list of concept entries and associated information.
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ManageConceptProvidersPage">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Manage Concept Providers Page</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page for managing all concept providers
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#SearchTerm">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Search Term</rdfs:label>
-	<skos:definition xml:lang="en">A search term</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ConceptProvider">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Concept Provider</rdfs:label>
-	<skos:definition xml:lang="en">
-		A Provider for retrieving concepts
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#LocalConceptProvider">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:subClassOf rdf:resource="ConceptProvider"/>
-	<rdfs:label xml:lang="en">Local Concept Provider</rdfs:label>
-	<skos:definition xml:lang="en">
-		A Concept Provider for retrieving concepts from a graph in localhost
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#RemoteConceptProvider">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Remote Concept Provider</rdfs:label>
-	<rdfs:subClassOf rdf:resource="ConceptProvider"/>
-	<skos:definition xml:lang="en">
-		A Concept Provider for retrieving concepts via a sparql endpoint
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ConceptProviderList">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Concept Provider List</rdfs:label>
-	<skos:definition xml:lang="en">
-		A list of Concept Providers
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#ConceptCache">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Concept Cache</rdfs:label>
-	<skos:definition xml:lang="en">A cache for all concepts retrieved from a
-		specific Graph managed by a specific SPARQL End Point.
-	</skos:definition>
-</rdfs:Class>
-
-<rdfs:Class rdf:about="#GenericResourcePage">
-	<rdf:type rdf:resource="owl:Class"/>
-	<rdfs:label xml:lang="en">Generic Resource Page</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page containing a resource and selected concepts.
-	</skos:definition>
-</rdfs:Class>
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="#selectedScheme">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">selected concept scheme</rdfs:label>
-	<skos:definition xml:lang="en">Points to the selected concept scheme.</skos:definition>
-	<rdfs:domain rdf:resource="#ConceptsPage"/>
-	<rdfs:domain rdf:resource="#ConceptProvider"/>
-	<rdfs:range rdf:resource="skos:ConceptScheme"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#queryTemplate">
-	<rdf:type rdf:resource="owl:DatatypeProperty"/>
-	<rdfs:label xml:lang="en">query template</rdfs:label>
-	<skos:definition xml:lang="en">
-		Points to a template containing a sparql query string which will
-		be applied by the subject to retrieve concepts.
-	</skos:definition>
-	<rdfs:domain rdf:resource="#ConceptProvider"/>
-	<rdfs:range rdf:resource="xsd:string"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#searchTerm">
-	<rdf:type rdf:resource="owl:DatatypeProperty"/>
-	<rdfs:label xml:lang="en">search Term</rdfs:label>
-	<skos:definition xml:lang="en">Points to a string as a term to be
-		searched in concept labels.</skos:definition>
-	<rdfs:domain rdf:resource="#SearchTerm"/>
-	<rdfs:range rdf:resource="xsd:string"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#searchResult">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">search Result</rdfs:label>
-	<skos:definition xml:lang="en">Points to a concept which is a result of
-		a search using the term represented by the subject.
-	</skos:definition>
-	<rdfs:domain rdf:resource="#SearchTerm"/>
-	<rdfs:range rdf:resource="skos:Concept"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#sparqlEndPoint">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">Sparql End Point</rdfs:label>
-	<skos:definition xml:lang="en">
-		Points to a UriRef of a sparql endpoint.
-	</skos:definition>
-	<rdfs:domain rdf:resource="#RemoteConceptProvider"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#defaultGraph">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">default Graph</rdfs:label>
-	<skos:definition xml:lang="en">Points to a graph against which the subject
-		performs its queries.</skos:definition>
-	<rdfs:domain rdf:resource="#ConceptProvider"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#cacheEntry">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">cache Entry</rdfs:label>
-	<skos:definition xml:lang="en">Points to a resource which describes
-		cached search results for a search term.
-	</skos:definition>
-	<rdfs:domain rdf:resource="#ConceptCache"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="#resource">
-	<rdf:type rdf:resource="owl:ObjectProperty"/>
-	<rdfs:label xml:lang="en">Resource</rdfs:label>
-	<skos:definition xml:lang="en">Points to a resource.</skos:definition>
-	<rdfs:domain rdf:resource="#GenericConceptScheme"/>
-</rdf:Property>
-
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf b/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
deleted file mode 100644
index 4b298b0..0000000
--- a/platform/platform.concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-    xmlns:skos="http://www.w3.org/2008/05/skos#"
-    xmlns="http://clerezza.org/2010/04/queryresult#"
-    xmlns:owl="http://www.w3.org/2002/07/owl#"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
-    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-  xml:base="http://clerezza.org/2010/04/queryresult">
-  <owl:Ontology rdf:about="#">
-    <owl:versionInfo>Revision: 0.1</owl:versionInfo>
-    <dc:title xml:lang="en">
-		Ontology for describing the result of a Query for Concepts
-	</dc:title>
-  </owl:Ontology>
-  <rdfs:Class rdf:ID="QueryResult">
-    <rdfs:label xml:lang="en">Query Result</rdfs:label>
-    <skos:definition xml:lang="en">
-		The result of a query for concepts.
-	</skos:definition>
-    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-  </rdfs:Class>
-  <rdf:Property rdf:ID="concept">
-    <rdfs:label xml:lang="en">concept</rdfs:label>
-    <skos:definition xml:lang="en">Points to a concept matching the query yielding to the subject.</skos:definition>
-    <rdfs:domain rdf:resource="#QueryResult"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2008/05/skos#Concept"/>
-    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
-  </rdf:Property>
-  <rdf:Property rdf:ID="creationOfNewFreeConceptSuggested">
-    <rdfs:label xml:lang="en">creationOfNewFreeConceptSuggested</rdfs:label>
-    <skos:definition xml:lang="en">Points to a boolean value that indicates whether 
-    consumers of the subject are suggested to create new concepts with a query as 
-    preferred label.</skos:definition>
-    <rdfs:domain rdf:resource="#QueryResult"/>
-    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
-    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
-  </rdf:Property>
-</rdf:RDF>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/pom.xml b/platform/platform.concepts/pom.xml
deleted file mode 100644
index 7133468..0000000
--- a/platform/platform.concepts/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>clerezza</artifactId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.concepts</artifactId>
-    <packaging>pom</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - Platform Concepts</name>
-    <description>Provides services for tagging resources with SKOS concepts.</description>
-    <modules>
-        <module>platform.concepts.ontologies</module>
-        <module>platform.concepts.core</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/LICENSE b/platform/platform.config.gui/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.config.gui/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/pom.xml b/platform/platform.config.gui/pom.xml
deleted file mode 100644
index 96493dc..0000000
--- a/platform/platform.config.gui/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.config.gui</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Configuration GUI</name>
-    <description>This bundles initializes a GUI to
-        edit configuration options.
-    </description>
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.globalmenu.api</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>0.4</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java b/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
deleted file mode 100644
index a341bc5..0000000
--- a/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.config.gui;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permission to use the Config GUI. Note that the user
- * additionally needs permission write into the system graph.
- *
- * @author tio
- */
-@PermissionInfo(value="Config GUI Access Permission", description="Grants access " +
-    "to the Config GUI")
-public class ConfigGuiAccessPermission extends Permission{
-
-    public ConfigGuiAccessPermission() {
-        super("Config GUI Access permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public ConfigGuiAccessPermission(String target, String actions) {
-        super("Config GUI Access permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 2177987;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java b/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
deleted file mode 100644
index 647a0e6..0000000
--- a/platform/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.config.gui;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.platform.config.PlatformConfig;
-import org.apache.clerezza.platform.config.SystemConfig;
-
-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;
-import org.apache.felix.scr.annotations.Services;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
-import org.osgi.framework.Bundle;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.UriRef;
-
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.utils.GraphNode;
-
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-
-import org.apache.clerezza.rdf.ontologies.*;
-import org.apache.clerezza.web.fileserver.BundlePathNode;
-import org.apache.clerezza.web.fileserver.FileServer;
-import org.wymiwyg.commons.util.dirbrowser.PathNode;
-
-/**
- * Provides a GUI to change platform default values.
- *
- * @author osr
- */
-@Component
-@Services({
-    @Service(value = Object.class),
-    @Service(value = GlobalMenuItemsProvider.class)
-})
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/admin/configuration")
-public class PlatformConfigGui implements GlobalMenuItemsProvider {
-
-    private final static char SLASH = '/';
-    @Reference
-    private PlatformConfig platformConfig;
-    @Reference
-    private RenderletManager renderletManager;
-    private final Logger logger = LoggerFactory.getLogger(getClass());
-    private final UriRef CONFIG_PAGE = new UriRef("http://clerezza.org/2009/08/platform#ConfigPage");
-    private FileServer fileServer;
-
-    protected void activate(ComponentContext context) throws IOException,
-            URISyntaxException {
-        Bundle bundle = context.getBundleContext().getBundle();
-        URL resourceDir = getClass().getResource("staticweb");
-        PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
-
-        logger.debug("Initializing file server for {} ({})", resourceDir,
-                resourceDir.getFile());
-
-        fileServer = new FileServer(pathNode);
-
-        URL template = getClass().getResource(
-                "config.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(template.toURI().toString()),
-                CONFIG_PAGE, "naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-    }
-
-    protected void deactivate(ComponentContext context) {
-        fileServer = null;
-    }
-
-    /**
-     * Returns a headed page listing RSS Feeds. The optional parameter query is a
-     * search term, which tests if the term is contained in thee title or uri
-     * of the feed.
-     *
-     * @param query an optional parameter which specifies a search term criteria.
-     * The search term will be tested if contained in the title or the uri of the feed.
-     *
-     * @return {@link GraphNode}
-     *
-     */
-    @GET
-    public GraphNode getConfig() {
-        AccessController.checkPermission(new ConfigGuiAccessPermission());
-        GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
-        node.addProperty(RDF.type, CONFIG_PAGE);
-        node.addProperty(RDF.type, PLATFORM.HeadedPage);
-        node.addProperty(PLATFORM.defaultBaseUri, platformConfig.getDefaultBaseUri());
-        return node;
-
-    }
-
-    @POST
-    public Response setConfig(@FormParam(value = "defaultBaseUri") String defaultBaseUri,
-            @Context UriInfo uriInfo) {
-        AccessController.checkPermission(new ConfigGuiAccessPermission());
-        logger.debug("Setting base-uri to {}", defaultBaseUri);
-        if (defaultBaseUri.charAt(defaultBaseUri.length() - 1) != SLASH) {
-            defaultBaseUri += SLASH;
-        }
-        UriRef uri = new UriRef(defaultBaseUri);
-        GraphNode node = platformConfig.getPlatformInstance();
-        LockableMGraph sysGraph = (LockableMGraph) node.getGraph();
-        Lock writeLock = sysGraph.getLock().writeLock();
-        writeLock.lock();
-        try {
-            node.deleteProperties(PLATFORM.defaultBaseUri);
-            node.addProperty(PLATFORM.defaultBaseUri, uri);
-        } finally {
-            writeLock.unlock();
-        }
-        return Response.status(Response.Status.ACCEPTED).build();
-    }
-
-    @Override
-    public Set<GlobalMenuItem> getMenuItems() {
-        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
-        try {
-            AccessController.checkPermission(new ConfigGuiAccessPermission());
-            AccessController.checkPermission(
-                    new TcPermission(SystemConfig.SYSTEM_GRAPH_URI.toString(),
-                    TcPermission.READWRITE));
-        } catch (AccessControlException e) {
-            return items;
-        }
-        items.add(new GlobalMenuItem("/admin/configuration", "Configuration", "Configuration", 2,
-                "Administration"));
-        return items;
-    }
-
-    /**
-     * Returns a PathNode of a static file from the staticweb folder.
-     *
-     * @param path specifies the path parameter
-     * @return {@link PathNode}
-     */
-    @GET
-    @Path("{path:.+}")
-    public PathNode getStaticFile(
-            @PathParam("path") String path) {
-        return fileServer.getNode(path);
-
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp b/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
deleted file mode 100644
index 627cf18..0000000
--- a/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
-resultDocModifier.addStyleSheet("style/form.css");
-resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
-resultDocModifier.addScriptReference("/admin/configuration/js/platformconfig.js");
-resultDocModifier.addStyleSheet("/yui/2/container/assets/container-core.css");
-resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
-resultDocModifier.addScriptReference("/yui/2/element/element-min.js");
-resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
-resultDocModifier.addScriptReference("/scripts/alert-message.js");
-resultDocModifier.addScriptReference("/scripts/ajax-options.js");
-resultDocModifier.addScriptReference("/scripts/modification-status.js");
-resultDocModifier.addScripts("ModificationStatus.watchElements(\"input\");");
-
-resultDocModifier.setTitle("Apache Clerezza Configuration");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Apache Clerezza Configuration</h1>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a class="tx-button tx-button-create " id="saveButton" href="#">Save</a></li>);
-<div id="tx-content">
-	<fieldset>
-		<legend></legend>
-		<ol>
-			<li class="tx-line">
-				<label for="defaultBaseUri">Default Base URI</label>
-				<input id="defaultBaseUri" name="defaultBaseUri" value={res/platform("defaultBaseUri")*}/>
-
-			</li>
-		</ol>
-	</fieldset>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
----------------------------------------------------------------------
diff --git a/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js b/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
deleted file mode 100644
index 5e922a1..0000000
--- a/platform/platform.config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-$(document).ready(function() {
-    $('#saveButton').click(function(){
-
-        if(isUrl($('#defaultBaseUri').val())){
-            var q = "Are you sure you want to change the URI to "+$('#defaultBaseUri').val();
-            AlertMessage.show(function(){
-
-                var data = "defaultBaseUri=" + encodeURIComponent($("#defaultBaseUri").val());
-                var options = new AjaxOptions("platform-config", "Save Config", function() {
-					ModificationStatus.isModified = false;
-				});
-                options.type = "POST";
-                options.url = "/admin/configuration/";
-                options.data = data;
-                $.ajax(options);
-            }, q , "Change Config?");
-            
-        }else {
-            AlertMessage.show(function(){}, " No valid URL ", "Error", "OK");
-        }
-
-
-
-
-    })
-})
-
-
-
-function isUrl(s) {
-    var regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
-    return regexp.test(s);
-}
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.config/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.config/LICENSE b/platform/platform.config/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.config/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.


[14/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/main/assembly/src.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/main/assembly/src.xml b/platform/launcher.tdb/src/main/assembly/src.xml
new file mode 100644
index 0000000..d146357
--- /dev/null
+++ b/platform/launcher.tdb/src/main/assembly/src.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>distribution</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <files>
+    <file>
+      <source>README.txt</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <!-- <file>
+        <source>target/platform.launcher.tdb-*-SNAPSHOT.jar</source>
+        <outputDirectory>/</outputDirectory>
+    </file> -->
+    <file>
+      <source>LICENSE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>target/classes/META-INF/NOTICE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>DISCLAIMER</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+  </files>
+    <fileSets>
+        <fileSet>
+            <includes>
+                <include>LICENSE*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>target</directory>
+            <includes>
+                <include>platform.launcher.tdb-*.jar</include>
+            </includes>
+            <excludes>
+                <exclude>*sources.jar</exclude>
+            </excludes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/resources/documentation/images/tut_1_class_diagram.png
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/resources/documentation/images/tut_1_class_diagram.png b/platform/launcher.tdb/src/site/resources/documentation/images/tut_1_class_diagram.png
new file mode 100644
index 0000000..0bd04f4
Binary files /dev/null and b/platform/launcher.tdb/src/site/resources/documentation/images/tut_1_class_diagram.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/resources/documentation/style/style.css b/platform/launcher.tdb/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/launcher.tdb/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/resources/images/clerezza.png b/platform/launcher.tdb/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/launcher.tdb/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/site.xml b/platform/launcher.tdb/src/site/site.xml
new file mode 100644
index 0000000..62c8fd3
--- /dev/null
+++ b/platform/launcher.tdb/src/site/site.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Information" href="documentation/information.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/xsite/content/information.xhtml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/xsite/content/information.xhtml b/platform/launcher.tdb/src/site/xsite/content/information.xhtml
new file mode 100644
index 0000000..358d672
--- /dev/null
+++ b/platform/launcher.tdb/src/site/xsite/content/information.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Clerezza platform launcher with Jena TDB storage</title>
+	</head>
+	<body>
+		<h1>Clerezza platform launcher with Jena TDB storage</h1>
+		<p>Author: Manuel Innerhofer - clerezza.org</p>
+		<p>Date: June 24, 2009</p>
+		<h2 id="information">Information</h2>
+		<p>
+			This is a launcher for the clerezza platform. It uses Jena TDB as
+			rdf storage. For further information on how to use this launcher read
+			the documentation of the storageless launcher under
+            <br />
+			<a href="http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/</a>
+		</p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/xsite/content/sitemap.xml b/platform/launcher.tdb/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..289f795
--- /dev/null
+++ b/platform/launcher.tdb/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>information.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.tdb/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/launcher.tdb/src/site/xsite/templates/skin.html b/platform/launcher.tdb/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..bb1b45d
--- /dev/null
+++ b/platform/launcher.tdb/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/DISCLAIMER
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/DISCLAIMER b/platform/launcher.virtuoso/DISCLAIMER
new file mode 100644
index 0000000..ab24be4
--- /dev/null
+++ b/platform/launcher.virtuoso/DISCLAIMER
@@ -0,0 +1,11 @@
+Apache Clerezza is an effort undergoing incubation at The Apache Software 
+Foundation (ASF), sponsored by the Apache Incubator. 
+
+Incubation is required of all newly accepted projects until a further 
+review indicates that the infrastructure, communications, and decision 
+making process have stabilized in a manner consistent with other 
+successful ASF projects. 
+
+While incubation status is not necessarily a reflection of the 
+completeness or stability of the code, it does indicate that the 
+project has yet to be fully endorsed by the ASF.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/LICENSE b/platform/launcher.virtuoso/LICENSE
new file mode 100644
index 0000000..e8d41e4
--- /dev/null
+++ b/platform/launcher.virtuoso/LICENSE
@@ -0,0 +1,471 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+APACHE CLEREZZA TDB LAUNCHER SUBCOMPONENTS: 
+
+The Apache Clerezza TDB Launcher includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses. 
+
+For the yui javascript library:
+
+Copyright (c) 2009, Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * 	Redistributions of source code must retain the above copyright notice, this list of conditions and the
+     	following disclaimer.
+    * 	Redistributions in binary form must reproduce the above copyright notice, this 	list of conditions and the following disclaimer in the documentation and/or other 	materials provided with the distribution.
+    * 	Neither the name of Yahoo! Inc. nor the names of its contributors may be used 	to endorse or promote products derived from this software without specific prior written permission of Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the jQuery javascript library:
+
+Copyright (c) 2011 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For Asm:
+
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+For Bouncycastle:
+
+Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+For the RDFa parsing library:
+
+© Copyright 2009 University of Bristol
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS’’ AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+- For the jSSLutils library:
+  
+Copyright (c) 2008-2010, The University of Manchester, United Kingdom.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the The University of Manchester nor the names of 
+      its contributors may be used to endorse or promote products derived 
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGE.
+
+
+For Jetty:
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+- For scala:
+
+Copyright (c) 2002-2012 EPFL, Lausanne, unless otherwise specified.
+All rights reserved.
+
+This software was developed by the Programming Methods Laboratory of the
+Swiss Federal Institute of Technology (EPFL), Lausanne, Switzerland.
+
+Permission to use, copy, modify, and distribute this software in source
+or binary form for any purpose with or without fee is hereby granted,
+provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+   3. Neither the name of the EPFL nor the names of its contributors
+      may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/README.txt
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/README.txt b/platform/launcher.virtuoso/README.txt
new file mode 100644
index 0000000..2367061
--- /dev/null
+++ b/platform/launcher.virtuoso/README.txt
@@ -0,0 +1,24 @@
+Apache Clerezza Virtuoso Launcher
+
+The provided launcher jar is executable, however on most platform you must
+provide additional arguments to java so that Clerezza has enough memory to run.
+
+Start clerezza with:
+
+  java -XX:MaxPermSize=400m -Dfile.encoding=utf-8 -Xss512k -Xmx2g -jar platform.launcher.virtuoso-*.jar
+
+Add the --help at the end of the line above to see possible argument for Clerezza
+
+How to configure Virtuoso JDBC connection?
+
+To provide the initial configuration you can use the following parameters as system properties:
+ - virtuoso.host (default localhost)
+ - virtuoso.port (default 1111)
+ - virtuoso.user (default dba)
+ - virtuoso.password (default dba)
+
+for example
+
+  java -XX:MaxPermSize=400m -Dfile.encoding=utf-8 -Xss512k -Xmx2g -Dvirtuoso.password=mysecret -Dvirtuoso.user=clerezza -jar platform.launcher.virtuoso-*.jar
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/pom.xml b/platform/launcher.virtuoso/pom.xml
new file mode 100644
index 0000000..b4805da
--- /dev/null
+++ b/platform/launcher.virtuoso/pom.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.virtuoso</artifactId>
+    <version>0.1-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Launcher with Virtuoso</name>
+    <description>Virtuoso variant of standalone java application for launching the clerezza.org platform. It is also a bundle, but there is no OSGi container known to support this (we are working on it :-) ).</description>
+    <build>
+        <plugins>
+             <plugin>
+                    <groupId>org.codehaus.xsite</groupId>
+                    <artifactId>xsite-maven-plugin</artifactId>
+                    <configuration>
+                            <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                            <sitemapPath>content/sitemap.xml</sitemapPath>
+                            <skinPath>templates/skin.html</skinPath>
+                            <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                    </configuration>
+                    <executions>
+                            <execution>
+                                    <phase>pre-site</phase>
+                                    <goals>
+                                            <goal>run</goal>
+                                    </goals>
+                            </execution>
+                    </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
+                <executions>
+                    <execution>
+                        <id>inline-jars</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                platform.launcher.storageless
+                            </includeArtifactIds>
+                            <outputDirectory>target/extracted</outputDirectory>
+                            <includes>**</includes>
+                            <excludes>
+                                META-INF/**,**/org.apache.jena*
+                            </excludes>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-platform-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-3</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <excludeArtifactIds>slf4j-api</excludeArtifactIds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.clerezza.platform.launcher.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-Name>Clerezza - Platform Launcher (Virtuoso variant)</Bundle-Name>
+                            <Bundle-SymbolicName>org.apache.clerezza.platform.launcher.virtuoso</Bundle-SymbolicName>
+                            <Bundle-Activator>org.apache.clerezza.platform.launcher.Main</Bundle-Activator>
+                            <Import-Package>org.osgi.framework,org.osgi.service.startlevel</Import-Package>
+                            <Private-Package>*</Private-Package>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2.1</version>
+                <configuration>
+                    <finalName>clerezza-virtuoso</finalName>
+                    <descriptors>
+                        <descriptor>src/main/assembly/src.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
+                        <phase>package</phase> <!-- bind to the packaging phase -->
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.7</version>
+                <configuration>
+                    <target>
+                        <property name="vm.args" value=""/>
+                        <java fork="true" jar="${project.build.directory}/${project.build.finalName}.jar"
+                  dir="${project.build.directory}">
+                            <jvmarg line="-Xmx1024m -XX:MaxPermSize=256M -Dfile.encoding=utf-8 ${vm.args}"/>
+                        </java>
+                    </target>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>target/extracted/</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+            </resource>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <filtering>false</filtering>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>NOTICE.txt</include>
+                    <include>LICENSE.*</include>
+                </includes>
+            </resource>
+            <!-- the exclude rules are here because the maven-dependency-plugin
+            copies both -SNAPSHOT version as well as the one with the timestamp,
+            see http://jira.codehaus.org/browse/MDEP-209 -->
+            <resource>
+                <targetPath>bundles</targetPath>
+                <directory>target/bundles</directory>
+                <excludes>
+                    <exclude>**/*20*.*-*.jar</exclude>
+                </excludes>
+            </resource>
+        </resources>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.launcher.storageless</artifactId>
+            <scope>provided</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <!-- what makes this variant special -->
+	<dependency>
+		<groupId>org.jboss.spec.javax.transaction</groupId>
+		<artifactId>jboss-transaction-api_1.1_spec</artifactId>
+        	<scope>runtime</scope>
+		<version>1.0.1.Final</version>
+	</dependency>    
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>ext.virtuoso.jdbc</artifactId>
+            <scope>runtime</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.virtuoso.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+<!--
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.tdb.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.7-SNAPSHOT</version>
+        </dependency>
+-->     <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-iri</artifactId>
+            <scope>runtime</scope>
+            <version>1.0.0_1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xerces</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.0_1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.servicemix.bundles</groupId>
+            <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
+            <scope>runtime</scope>
+            <version>1.2_5</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-core</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.0_1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-arq</artifactId>
+            <scope>runtime</scope>
+            <version>2.11.0_1-SNAPSHOT</version>
+        </dependency>
+<!--
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.apache.jena.jena-tdb</artifactId>
+            <scope>runtime</scope>
+            <version>1.0.0_1-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>14.0</version>
+        </dependency>
+-->
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/main/appended-resources/META-INF/NOTICE b/platform/launcher.virtuoso/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..7d1928c
--- /dev/null
+++ b/platform/launcher.virtuoso/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,18 @@
+
+- Mort Bay Jetty Project (http://www.mortbay.org/jetty/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- WYMIWYG (http://wymiwyg.org/)
+- HP Labs Semantic Web Research (http://www.hpl.hp.com/semweb/)
+- The OSGi Alliance (http://www.osgi.org/)
+- Yahoo! Inc. (http://yahoo.com/)
+- Eclipse Foundation (http://eclipse.org/)
+- INRIA, France Telecom (http://asm.ow2.org/)
+- The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+- University of Bristol (http://stars.ilrt.bris.ac.uk/)
+- The University of Manchester (http://www.manchester.ac.uk/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- EPFL, Lausanne (http://www.epfl.ch/)
+
+This product includes JQuery and other javascript 
+files Licensed under the MIT License, see the individual
+files for their copyright notice.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/main/assembly/src.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/main/assembly/src.xml b/platform/launcher.virtuoso/src/main/assembly/src.xml
new file mode 100644
index 0000000..bb27993
--- /dev/null
+++ b/platform/launcher.virtuoso/src/main/assembly/src.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>distribution</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <files>
+    <file>
+      <source>README.txt</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <!-- <file>
+        <source>target/platform.launcher.tdb-*-SNAPSHOT.jar</source>
+        <outputDirectory>/</outputDirectory>
+    </file> -->
+    <file>
+      <source>LICENSE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>target/classes/META-INF/NOTICE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>DISCLAIMER</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+  </files>
+    <fileSets>
+        <fileSet>
+            <includes>
+                <include>LICENSE*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>target</directory>
+            <includes>
+                <include>platform.launcher.virtuoso-*.jar</include>
+            </includes>
+            <excludes>
+                <exclude>*sources.jar</exclude>
+            </excludes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/resources/documentation/images/tut_1_class_diagram.png
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/resources/documentation/images/tut_1_class_diagram.png b/platform/launcher.virtuoso/src/site/resources/documentation/images/tut_1_class_diagram.png
new file mode 100644
index 0000000..0bd04f4
Binary files /dev/null and b/platform/launcher.virtuoso/src/site/resources/documentation/images/tut_1_class_diagram.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/resources/documentation/style/style.css b/platform/launcher.virtuoso/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/launcher.virtuoso/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/resources/images/clerezza.png b/platform/launcher.virtuoso/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/launcher.virtuoso/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/site.xml b/platform/launcher.virtuoso/src/site/site.xml
new file mode 100644
index 0000000..62c8fd3
--- /dev/null
+++ b/platform/launcher.virtuoso/src/site/site.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Information" href="documentation/information.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/xsite/content/information.xhtml
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/xsite/content/information.xhtml b/platform/launcher.virtuoso/src/site/xsite/content/information.xhtml
new file mode 100644
index 0000000..8ec375c
--- /dev/null
+++ b/platform/launcher.virtuoso/src/site/xsite/content/information.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Clerezza platform launcher for Virtuoso storage</title>
+	</head>
+	<body>
+		<h1>Clerezza platform launcher for Virtuoso storage</h1>
+		<p>Author: Enrico Daga - clerezza.org</p>
+		<p>Date: March 28, 2014</p>
+		<h2 id="information">Information</h2>
+		<p>
+			This is a launcher for the clerezza platform. It is meant to use Virtuoso as
+			rdf storage. For further information on how to use this launcher read
+			the documentation of the storageless launcher under
+            <br />
+			<a href="http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/</a>
+		</p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/xsite/content/sitemap.xml b/platform/launcher.virtuoso/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..289f795
--- /dev/null
+++ b/platform/launcher.virtuoso/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>information.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.virtuoso/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/launcher.virtuoso/src/site/xsite/templates/skin.html b/platform/launcher.virtuoso/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..bb1b45d
--- /dev/null
+++ b/platform/launcher.virtuoso/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>


[37/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/font.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/font.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/font.png
new file mode 100755
index 0000000..b7960db
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/font.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/help.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/help.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/help.png
new file mode 100755
index 0000000..5c87017
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/help.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/html.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/html.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/html.png
new file mode 100755
index 0000000..55d1072
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/html.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/information.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/information.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/information.png
new file mode 100755
index 0000000..12cd1ae
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/information.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_add.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_add.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_add.png
new file mode 100755
index 0000000..00be352
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_add.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_break.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_break.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_break.png
new file mode 100755
index 0000000..5235753
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/link_break.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_copy.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_copy.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_copy.png
new file mode 100755
index 0000000..195dc6d
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_copy.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_edit.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_edit.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_edit.png
new file mode 100755
index 0000000..046811e
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_edit.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_paste.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_paste.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_paste.png
new file mode 100755
index 0000000..968f073
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_paste.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_save.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_save.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_save.png
new file mode 100755
index 0000000..caea546
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/page_save.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintbrush.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintbrush.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintbrush.png
new file mode 100755
index 0000000..a3ecf87
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintbrush.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintcan.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintcan.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintcan.png
new file mode 100755
index 0000000..f82a886
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paintcan.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paste_plain.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paste_plain.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paste_plain.png
new file mode 100755
index 0000000..c0490eb
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/paste_plain.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/photo_add.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/photo_add.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/photo_add.png
new file mode 100755
index 0000000..63cc355
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/photo_add.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/pilcrow.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/pilcrow.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/pilcrow.png
new file mode 100755
index 0000000..95704fb
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/pilcrow.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/style.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/style.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/style.png
new file mode 100755
index 0000000..81e41de
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/style.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_center.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_center.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_center.png
new file mode 100755
index 0000000..57beb38
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_center.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_justify.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_justify.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_justify.png
new file mode 100755
index 0000000..2fbdd69
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_justify.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_left.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_left.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_left.png
new file mode 100755
index 0000000..6c8fcc1
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_left.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_right.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_right.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_right.png
new file mode 100755
index 0000000..a150257
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_align_right.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_bold.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_bold.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_bold.png
new file mode 100755
index 0000000..889ae80
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_bold.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_1.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_1.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_1.png
new file mode 100755
index 0000000..9c122e9
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_1.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_2.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_2.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_2.png
new file mode 100755
index 0000000..fbd8765
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_2.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_3.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_3.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_3.png
new file mode 100755
index 0000000..c7836cf
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_3.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_4.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_4.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_4.png
new file mode 100755
index 0000000..4e929ea
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_4.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_5.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_5.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_5.png
new file mode 100755
index 0000000..30cabeb
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_5.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_6.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_6.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_6.png
new file mode 100755
index 0000000..058170a
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_heading_6.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_horizontalrule.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_horizontalrule.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_horizontalrule.png
new file mode 100755
index 0000000..8dd1da1
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_horizontalrule.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent.png
new file mode 100755
index 0000000..9364532
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent_remove.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent_remove.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent_remove.png
new file mode 100755
index 0000000..1651b07
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_indent_remove.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_italic.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_italic.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_italic.png
new file mode 100755
index 0000000..8482ac8
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_italic.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_bullets.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_bullets.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_bullets.png
new file mode 100755
index 0000000..4a8672b
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_bullets.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_numbers.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_numbers.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_numbers.png
new file mode 100755
index 0000000..33b0b8d
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_list_numbers.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_strikethrough.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_strikethrough.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_strikethrough.png
new file mode 100755
index 0000000..612058a
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_strikethrough.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_subscript.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_subscript.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_subscript.png
new file mode 100755
index 0000000..1a2b010
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_subscript.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_superscript.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_superscript.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_superscript.png
new file mode 100755
index 0000000..2fb2a7c
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_superscript.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_underline.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_underline.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_underline.png
new file mode 100755
index 0000000..90d0df2
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/text_underline.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/tick.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/tick.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/tick.png
new file mode 100755
index 0000000..a9925a0
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/tick.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/docbook.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/docbook.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/docbook.rng
new file mode 100644
index 0000000..4d9dd78
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/docbook.rng
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook">
+
+	<start>
+		<ref name="db.book"/>
+  </start>
+	
+	<define name="db.attr.common">
+		<optional>
+			<attribute name="id"/>
+		</optional>
+	</define>
+  
+	<define name="db.book">
+		<element name="book">  
+			<ref name="db.book.info"/>
+			<oneOrMore>
+				<ref name="db.chapter"/>
+			</oneOrMore>
+		</element>
+	</define>
+	
+	<define name="db.book.info">
+		<ref name="db.title"/>
+		<optional>
+			<ref name="db.author"/>
+		</optional>
+  </define>
+	
+	<define name="db.title">
+		<element name="title">
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.author">
+		<element name="author">
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.chapter">
+		<element name="chapter">
+			<ref name="db.attr.common"/>
+			<ref name="db.title"/>
+			<oneOrMore>
+				<ref name="db.section"/>
+			</oneOrMore>
+		</element>
+	</define>
+	
+	<define name="db.section">
+		<element name="section">
+			<ref name="db.attr.common"/>
+			<ref name="db.title"/>
+			<oneOrMore>
+				<ref name="db.blocks"/>
+			</oneOrMore>
+		</element>
+	</define>
+	
+	<define name="db.para">
+		<element name="para">
+			<ref name="db.attr.common"/>
+			<ref name="db.inline"/>
+		</element>
+	</define>
+	
+	<define name="db.itemizedlist">
+		<element name="itemizedlist">
+			<ref name="db.attr.common"/>
+			<optional>
+				<attribute name="numeration"/>
+			</optional>
+			<optional>
+				<ref name="db.title"/>
+			</optional>
+			<oneOrMore>
+				<ref name="db.listitem"/>
+			</oneOrMore>
+		</element>
+	</define>
+	
+	<define name="db.listitem">
+		<element name="listitem">
+			<ref name="db.attr.common"/>
+			<ref name="db.inline"/>
+		</element>
+	</define>
+	
+	<define name="db.acronym">
+		<element name="acronym">
+			<ref name="db.attr.common"/>
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.code">
+		<element name="code">
+			<ref name="db.attr.common"/>
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.filename">
+		<element name="filename">
+			<ref name="db.attr.common"/>
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.emphasis">
+		<element name="emphasis">
+			<ref name="db.attr.common"/>
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.link">
+		<element name="link">
+			<ref name="db.attr.common"/>
+			<attribute name="href"/>
+			<text/>
+		</element>
+	</define>
+	
+	<define name="db.blocks">
+		<choice>
+			<ref name="db.section"/>
+			<ref name="db.para"/>
+			<ref name="db.itemizedlist"/>
+		</choice>
+	</define>
+	
+	<define name="db.inline">
+		<choice>
+			<text/>
+			<ref name="db.acronym"/>
+			<ref name="db.code"/>
+			<ref name="db.emphasis"/>
+			<ref name="db.filename"/>
+			<ref name="db.link"/>
+		</choice>
+	</define>
+  
+</grammar>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/local.conf
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/local.conf b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/local.conf
new file mode 100644
index 0000000..c9e1659
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/local.conf
@@ -0,0 +1,25 @@
+<?php
+
+// site branding
+$local_conf_no_wrap=ON;
+$local_conf_serve_as_is=ON;
+$local_conf_mime_types=ON;
+
+// toggle cvs commit view
+$local_conf_commits=OFF;
+
+// other configuration options
+// we need to set these with the correct defaults
+//
+// $local_conf_last_updated
+// $local_conf_serve_as_is
+// $local_conf_skin
+// $local_conf_nav_off
+//
+// $local_conf_use_local_error_pages // uses error/404.html unless $local_conf_error_page set
+// $local_conf_error_page = 'error/404.html'; // path relative to PROJECTNAME/www
+//
+// $local_conf_use_local_footer
+// $local_conf_auto_generate_memberlist
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml-basic.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml-basic.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml-basic.rng
new file mode 100755
index 0000000..903f35d
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml-basic.rng
@@ -0,0 +1,727 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Test Schema -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+	xmlns:m="http://mozile.mozdev.org/ns/mes/1.0">
+
+<m:define name="Inline">
+	<m:command name="strong" class="Wrap" element="b" accel="Command-B"
+		label="Bold" image="silk/text_bold" tooltip="Make text bold"/>
+	<m:command name="em" class="Wrap" element="i" accel="Command-I"
+		label="Italic" image="silk/text_italic" tooltip="Italicize text"/>
+	<m:command name="underline" class="Wrap" accel="Command-U" element="u" 
+		label="Underline" image="silk/text_underline" tooltip="Underline text"/>
+	<m:command name="strikethrough" class="Wrap" element="strike"
+		label="Strikethrough" image="silk/text_strikethrough" tooltip="Strikethrough text"/>
+	<m:command name="superscript" class="Wrap" element="sup"
+		label="Superscript" image="silk/text_superscript" tooltip="Raise text"/>
+	<m:command name="subscript" class="Wrap" element="sub"
+		label="Subscript" image="silk/text_subscript" tooltip="Lower text"/>
+
+	<m:command name="link" class="Insert" element="a" remove="false"
+		label="Link" image="silk/link_add" tooltip="Create hyperlink">
+		<m:script>
+			<![CDATA[
+			this.prompt = function(event, state) {
+				if(!state || !state.element) return false;
+				var href = prompt("What is the URL for this link?", "");
+				if(!href) return false;
+				state.element.setAttribute("href", href);
+				return true;
+			}
+			]]>
+		</m:script>
+	</m:command>
+	<m:command name="unlink" class="Unwrap" target="localName a"
+		label="Remove Link" image="silk/link_break" tooltip="Remove hyperlinks"/>
+
+
+	<m:group name="formats"
+		label="Formats" image="silk/text_heading_1" tooltip="Select a format">
+
+		<m:command name="paragraph" class="Replace" element="p" target="block"
+			label="Paragraph" image="silk/pilcrow" tooltip="Use a paragraph"/>
+		<m:command name="h1" class="Replace" element="div" className="heading1" target="block" accel="Command-1"
+			label="Heading 1" image="silk/text_heading_1" tooltip="Use a first level heading"/>
+		<m:command name="h2" class="Replace" element="div" className="heading2" target="block" accel="Command-2"
+			label="Heading 2" image="silk/text_heading_2" tooltip="Use a second level heading"/>
+		<m:command name="h3" class="Replace" element="div" className="heading3" target="block" accel="Command-3"
+			label="Heading 3" image="silk/text_heading_3" tooltip="Use a third level heading"/>
+		<m:command name="nowiki" class="Replace" element="p" className="nowiki" target="block"
+			label="Nowiki" tooltip="Use a nowiki block"/>
+		<m:command name="pre" class="Replace" element="pre" target="block"
+			label="Pre-formatted" tooltip="Use pre-formatted text."/>
+		<m:command name="center" class="Replace" element="center" target="block"
+			label="Center" tooltip="Center the text."/>
+		<m:command name="blockquote" class="Replace" element="blockquote" target="block"
+			label="Blockquote" tooltip="Use a blockquote."/>
+		<m:command name="listitem" class="Replace" element="li" target="block"
+			label="List Item" tooltip="Use list item."/>
+		<m:command name="unformat" class="Unwrap" target="block"
+			label="Unformat" tooltip="Remove formatting"/>
+
+	</m:group>
+
+	<m:group name="insertion"
+		label="Insert Objects" image="silk/photo_add" tooltip="Insert objects">
+
+		<m:command name="image" class="Insert" element="img"
+			label="Image" image="silk/photo_add" tooltip="Insert an image">
+			<m:script>
+				<![CDATA[
+				this.prompt = function(event, state) {
+					if(!state || !state.element) return false;
+					var src = prompt("What is the URL for this image?", "");
+					if(!src) return false;
+					state.element.setAttribute("src", src);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+
+		<m:command name="lineBreak" class="Insert" element="br" accel="Shift-Return"
+			label="Line-Break" tooltip="Insert a line-break"/>
+		<m:command name="hr" class="Insert" element="hr"
+			label="Horizontal Rule" image="silk/text_horizontalrule" tooltip="Insert a horizontal rule"/>
+		<m:command name="unorderedList" class="Insert"
+			label="Unordered List" image="silk/text_list_bullets" tooltip="Insert an unordered list">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("ul");
+				var li = mozile.dom.createElement("li");
+				li.appendChild(document.createTextNode(mozile.emptyToken));
+				this.element.appendChild(li);
+				]]>
+			</m:script>
+		</m:command>
+		<m:command name="orderedList" class="Insert"
+			label="Ordered List" image="silk/text_list_numbers" tooltip="Insert an ordered list">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("ol");
+				var li = mozile.dom.createElement("li");
+				li.appendChild(document.createTextNode(mozile.emptyToken));
+				this.element.appendChild(li);
+				]]>
+			</m:script>
+		</m:command>
+
+		<m:command name="style" class="Command"
+			label="Change Style" image="" tooltip="Change the element's style">
+			<m:script>
+				<![CDATA[  
+				// Find the target and get the new style.
+				this.prompt = function(event, state) {
+					var selection = mozile.dom.selection.get();
+					if(!selection) return false;
+					var range = selection.getRangeAt(0);
+					if(!range) return false;
+					var target = range.commonAncestorContainer;
+					if(!target) return false;
+					if(target.nodeType == mozile.dom.TEXT_NODE) target = target.parentNode;
+					state.target = target;
+					state.oldStyle = "";
+					if(mozile.browser.isIE) {
+						if(target.style.cssText) state.oldStyle = target.style.cssText;
+					}
+					else if(target.getAttribute("style")) {
+						state.oldStyle = target.getAttribute("style");
+					}
+					var style = prompt("What should the style of the element '"+ target.nodeName +"' be?", state.oldStyle);
+					if(style) {
+						state.newStyle = style;
+						return true;
+					}
+					return false;
+				}
+				this.execute = function(state, fresh) {
+					if(mozile.browser.isIE) {
+						state.target.style.cssText = state.newStyle;
+					}
+					else state.target.setAttribute("style", state.newStyle);
+					state.executed = true;
+					return state;
+				}
+				this.unexecute = function(state, fresh) {
+					if(mozile.browser.isIE) {
+						state.target.style.cssText = state.oldStyle;
+					}
+					else state.target.setAttribute("style", state.oldStyle);
+					state.executed = false;
+					return state;
+				}
+				]]>
+			</m:script>
+		</m:command>
+
+		<m:command name="attribute" class="Command" accel="Command-Shift-A"
+			label="Change an Attribute" image="" tooltip="Change an attribute of the element">
+			<m:script>
+				<![CDATA[  
+				// Find the target and get the new style.
+				this.prompt = function(event, state) {
+					var selection = mozile.dom.selection.get();
+					if(!selection) return false;
+					var range = selection.getRangeAt(0);
+					if(!range) return false;
+					var target = range.commonAncestorContainer;
+					if(!target) return false;
+					if(target.nodeType == mozile.dom.TEXT_NODE) target = target.parentNode;
+					state.target = target;
+					var attr = prompt("What attribute of the element '"+ target.nodeName +"' should be changed?", "");
+					if(!attr) return false;
+					state.attr = attr;
+					state.oldValue = "";
+					if(attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						if(target.style.cssText) state.oldValue = target.style.cssText;
+					}
+					else if(target.getAttribute(attr)) {
+						state.oldValue = target.getAttribute(attr);
+					}
+					var value = prompt("What should the value of '"+ attr +"' be?", state.oldValue);
+					if(value) {
+						state.newValue = value;
+						return true;
+					}
+					return false;
+				}
+				this.execute = function(state, fresh) {
+					if(state.attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						state.target.style.cssText = state.newValue;
+					}
+					else state.target.setAttribute(state.attr, state.newValue);
+					state.executed = true;
+					return state;
+				}
+				this.unexecute = function(state, fresh) {
+					if(state.attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						state.target.style.cssText = state.oldValue;
+					}
+					else state.target.setAttribute(state.attr, state.oldValue);
+					state.executed = false;
+					return state;
+				}
+				]]>
+			</m:script>
+		</m:command>
+
+	</m:group>
+
+</m:define>
+
+
+<define name="Common.attrib">
+	<optional>
+		<attribute name="id"/>
+	</optional>
+	<!--<ref name="Core.attrib"/>
+	<ref name="I18n.attrib"/>-->
+</define>
+
+<define name="br">
+	<element name="br">
+		<!--<ref name="Core.attrib"/>-->
+		<ref name="Common.attrib"/>
+		<empty/>
+	</element>
+</define>
+
+<define name="span">
+	<element name="span">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="a">
+	<element name="a">
+		<ref name="a.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="a.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="href">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="charset">
+			<ref name="Charset.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="type">
+			<ref name="ContentType.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="hreflang">
+			<ref name="LanguageCode.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="rel">
+			<ref name="LinkTypes.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="rev">
+			<ref name="LinkTypes.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="accesskey">
+			<ref name="Character.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="tabindex">
+			<ref name="Number.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<!--
+<define name="abbr">
+	<element name="abbr">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="acronym">
+	<element name="acronym">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="cite">
+	<element name="cite">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="code">
+	<element name="code">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="dfn">
+	<element name="dfn">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="em">
+	<element name="em">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="i">
+	<element name="i">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="kbd">
+	<element name="kbd">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="q">
+	<element name="q">
+		<ref name="q.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="q.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="cite">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<define name="samp">
+	<element name="samp">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="strong">
+	<element name="strong">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="b">
+	<element name="b">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="u">
+	<element name="u">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="s">
+	<element name="s">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="sub">
+	<element name="sub">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="sup">
+	<element name="sup">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="var">
+	<element name="var">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="div">
+	<element name="div">
+		<ref name="Common.attrib"/>
+		<ref name="Flow.model"/>
+	</element>
+</define>
+
+<define name="p">
+	<element name="p">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="center">
+	<element name="center">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="address">
+	<element name="address">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="blockquote">
+	<element name="blockquote">
+		<ref name="blockquote.attlist"/>
+		<ref name="Block.model"/>
+	</element>
+</define>
+
+<define name="blockquote.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="cite">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<define name="pre">
+	<element name="pre">
+		<ref name="pre.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="pre.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="xml:space">
+			<value>preserve</value>
+		</attribute>
+	</optional>
+</define>
+
+<define name="h1">
+	<element name="h1">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h2">
+	<element name="h2">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h3">
+	<element name="h3">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h4">
+	<element name="h4">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h5">
+	<element name="h5">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+
+<define name="h6">
+	<element name="h6">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+
+<define name="Heading.attrib">
+	<ref name="Common.attrib"/>
+</define>
+ 
+<define name="Heading.content">
+	<ref name="Inline.model"/>
+</define>
+
+<define name="Heading.class">
+	<choice>
+		<ref name="h1"/>
+		<ref name="h2"/>
+		<ref name="h3"/>
+		<ref name="h4"/>
+		<ref name="h5"/>
+		<ref name="h6"/>
+	</choice>
+</define>
+
+<define name="Block.class">
+	<choice>
+		<!--<ref name="address"/>-->
+		<ref name="blockquote"/>
+		<ref name="center"/>
+		<ref name="div"/>
+		<ref name="p"/>
+		<ref name="pre"/>
+		<ref name="Heading.class"/>
+		<ref name="hr"/>
+		<ref name="br"/>
+	</choice>
+</define>
+
+<define name="Inline.class">
+	<choice>
+		<ref name="a"/>
+		<!--
+		<ref name="abbr"/>
+		<ref name="acronym"/>
+		-->
+		<ref name="br"/>
+		<!--
+		<ref name="cite"/>
+		-->
+		<ref name="code"/>
+		<!--
+		<ref name="dfn"/>
+		-->
+		<ref name="em"/>
+		<!--
+		<ref name="kbd"/>
+		<ref name="q"/>
+		<ref name="samp"/>
+		-->
+		<ref name="span"/>
+		<ref name="strong"/>
+		<ref name="sub"/>
+		<ref name="sup"/>
+		<!--
+		<ref name="var"/>
+		-->
+		<ref name="br"/>
+		<!-- Added -->
+		<ref name="img"/>
+	</choice>
+</define>
+
+<define name="Inline.model">
+	<m:ref name="Inline"/>
+	<zeroOrMore>
+		<choice>
+			<text/>
+			<ref name="Inline.class"/>
+		</choice>
+	</zeroOrMore>
+</define>
+
+<!-- This is redefined by the legacy module to include inlines. -->
+<define name="Block.mix">
+	<ref name="Block.class"/>
+</define>
+
+<define name="Block.model">
+	<oneOrMore>
+		<ref name="Block.mix"/>
+	</oneOrMore>
+</define>
+
+<define name="Flow.model">
+	<m:ref name="Inline"/>
+	<zeroOrMore>
+		<choice>
+			<!--<text/>-->
+			<ref name="Inline.class"/>
+			<ref name="Block.class"/>
+		</choice>
+	</zeroOrMore>
+</define>
+
+<define name="dl">
+	<element name="dl">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<choice>
+	<ref name="dt"/>
+	<ref name="dd"/>
+			</choice>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="dt">
+	<element name="dt">
+	<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="dd">
+	<element name="dd">
+		<ref name="Common.attrib"/>
+		<ref name="Flow.model"/>
+	</element>
+</define>
+
+<define name="ol">
+	<element name="ol">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<ref name="li"/>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="ul">
+	<element name="ul">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<ref name="li"/>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="li">
+	<element name="li">
+		<ref name="Common.attrib"/>
+		<!--<ref name="Flow.model"/>-->
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="List.class">
+	<choice>
+		<ref name="ul"/>
+		<ref name="ol"/>
+		<ref name="dl"/>
+	</choice>
+</define>
+
+<define name="Block.class" combine="choice">
+	<ref name="List.class"/>
+</define>
+
+<define name="img">
+	<element name="img">
+		<ref name="img.attlist"/>
+	</element>
+</define>
+
+<define name="img.attlist">
+	<ref name="Common.attrib"/>
+	<attribute name="src">
+		<ref name="URI.datatype"/>
+	</attribute>
+	<attribute name="alt">
+		<ref name="Text.datatype"/>
+	</attribute>
+	<optional>
+		<attribute name="longdesc">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="height">
+			<ref name="Length.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="width">
+			<ref name="Length.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<define name="hr">
+	<element name="hr">
+		<ref name="Common.attrib"/>
+	</element>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml.rng
new file mode 100755
index 0000000..6871001
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml.rng
@@ -0,0 +1,993 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Test Schema -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+	xmlns:m="http://mozile.mozdev.org/ns/mes/1.0">
+
+<m:define name="Inline">
+	<!-- Text commands -->
+	<m:command name="splitInline" class="Split" target="block" accel="Return Enter"/>
+	<m:command name="nonBreakingSpace" class="Insert" priority="11" text="&#x00A0;" accel="Shift-Space"/>
+	<m:command name="nextBlock" class="Navigate" direction="next" target="block" accel="Tab"/>
+	<m:command name="prevBlock" class="Navigate" direction="previous" target="block" accel="Shift-Tab"/>
+
+	<!-- Toolbar commands -->
+	<m:command name="strong" class="Wrap" element="strong" accel="Command-B"
+		label="Bold" image="silk/text_bold" tooltip="Make text bold"/>
+	<m:command name="em" class="Wrap" element="em" accel="Command-I"
+		label="Italic" image="silk/text_italic" tooltip="Italicize text"/>
+	<m:command name="underline" class="Wrap" accel="Command-U" 
+		element="span" styleName="text-decoration" styleValue="underline"
+		label="Underline" image="silk/text_underline" tooltip="Underline text"/>
+	<m:command name="strikethrough" class="Wrap"
+		element="span" styleName="text-decoration" styleValue="line-through"
+		label="Strikethrough" image="silk/text_strikethrough" tooltip="Strikethrough text"/>
+	<m:command name="superscript" class="Wrap" element="sup"
+		label="Superscript" image="silk/text_superscript" tooltip="Raise text"/>
+	<m:command name="subscript" class="Wrap" element="sub"
+		label="Subscript" image="silk/text_subscript" tooltip="Lower text"/>
+	<m:command name="indent" class="Style" target="block" styleName="text-indent"
+		label="Indent" image="silk/text_indent" tooltip="Indent text">
+		<m:script>
+			<![CDATA[
+			this.styleValue = function(event, state) {
+				if(!state.targetNode || !state.targetNode.style) return null;
+				var value = state.targetNode.style[state.styleName];
+				if(value) {
+					var match = value.match(/(\d+)pt/);
+					if(match && match[1]) {
+						value = Number(match[1]);
+						return (value + 12) +"pt";
+					}
+				}
+				return "12pt";
+			}
+			]]>
+		</m:script>
+	</m:command>
+	<m:command name="unindent" class="Style" target="block" styleName="text-indent"
+		label="Unindent" image="silk/text_indent_remove" tooltip="Unindent text">
+		<m:script>
+			<![CDATA[
+			this.styleValue = function(event, state) {
+				if(!state.targetNode || !state.targetNode.style) return null;
+				var value = state.targetNode.style[state.styleName];
+				if(value) {
+					var match = value.match(/(\d+)pt/);
+					if(match && match[1]) {
+						value = Number(match[1]);
+						if(value - 12 > 0) return (value - 12) +"pt";
+					}
+					return "";
+				}
+				return null;
+			}
+			]]>
+		</m:script>
+	</m:command>
+
+	<m:command name="link" class="Insert" element="a" remove="false"
+		label="Link" image="silk/link_add" tooltip="Create hyperlink">
+		<m:script>
+			<![CDATA[
+			this.prompt = function(event, state) {
+				if(!state || !state.element) return false;
+				var href = prompt("What is the URL for this link?", "");
+				if(!href) return false;
+				state.element.setAttribute("href", href);
+				return true;
+			}
+			]]>
+		</m:script>
+	</m:command>
+	<m:command name="unlink" class="Unwrap" target="localName a"
+		label="Remove Link" image="silk/link_break" tooltip="Remove hyperlinks"/>
+
+	<m:group name="fonts"
+		label="Fonts" image="silk/font" tooltip="Select a font">
+		<m:command name="setFont" class="Wrap" accel="Command-Shift-F"
+			label="Set Font" image="silk/font" tooltip="Set the font">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("span");
+				this.prompt = function(event, state) {
+					if(!state || !state.wrapper) return false;
+					var font = prompt("What font-family should be used?", "");
+					if(!font) return false;
+					mozile.dom.setStyle(state.wrapper, "font-family", font);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		
+		<m:separator/>
+		
+		<m:command name="times" class="Wrap"
+			element="span" styleName="font-family" styleValue="smaller"
+			label="Times" tooltip="Use Times font"/>
+		<m:command name="arial" class="Wrap"
+			element="span" styleName="font-family" styleValue="arial, sans-serif"
+			label="Arial" tooltip="Use Arial font"/>
+		<m:command name="courier" class="Wrap"
+			element="span" styleName="font-family" styleValue="courier, monospace"
+			label="Courier" tooltip="Use courier font"/>
+		<m:separator/>
+		<m:command name="serif" class="Wrap"
+			element="span" styleName="font-family" styleValue="serif"
+			label="Serif" tooltip="Use serif font"/>
+		<m:command name="sans-serif" class="Wrap"
+			element="span" styleName="font-family" styleValue="sans-serif"
+			label="Sans-Serif" tooltip="Use sans-serif font"/>
+		<m:command name="monospace" class="Wrap"
+			element="span" styleName="font-family" styleValue="monospace"
+			label="Monospace" tooltip="Use monospace font"/>
+	</m:group>
+
+	<m:group name="sizes"
+		label="Sizes" image="silk/style" tooltip="Select a font size">
+		<m:command name="setSize" class="Wrap"
+			label="Set Size" image="silk/style" tooltip="Set the font size">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("span");
+				this.prompt = function(event, state) {
+					if(!state || !state.wrapper) return false;
+					var size = prompt("What should the font-size be?", "");
+					if(!size) return false;
+					mozile.dom.setStyle(state.wrapper, "font-size", size);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		
+		<m:separator/>
+		
+		<m:command name="smaller" class="Wrap"
+			element="span" styleName="font-size" styleValue="smaller"
+			label="Smaller" tooltip="Make text smaller"/>
+		<m:command name="xx-small" class="Wrap"
+			element="span" styleName="font-size" styleValue="xx-small"
+			label="Extremely Small" tooltip="Make text extremely small"/>
+		<m:command name="x-small" class="Wrap"
+			element="span" styleName="font-size" styleValue="x-small"
+			label="Very Small" tooltip="Make text very small"/>
+		<m:command name="small" class="Wrap"
+			element="span" styleName="font-size" styleValue="small"
+			label="Small" tooltip="Make text small"/>
+		<m:command name="medium" class="Wrap"
+			element="span" styleName="font-size" styleValue="medium"
+			label="Medium" tooltip="Make text medium size"/>
+		<m:command name="large" class="Wrap"
+			element="span" styleName="font-size" styleValue="large"
+			label="Large" tooltip="Make text large"/>
+		<m:command name="x-large" class="Wrap"
+			element="span" styleName="font-size" styleValue="x-large"
+			label="Very Large" tooltip="Make text very large"/>
+		<m:command name="xx-large" class="Wrap"
+			element="span" styleName="font-size" styleValue="xx-large"
+			label="Extremely Large" tooltip="Make text extremely large"/>
+		<m:command name="larger" class="Wrap"
+			element="span" styleName="font-size" styleValue="larger"
+			label="Larger" tooltip="Make text larger"/>
+	</m:group>
+
+	<m:group name="formats"
+		label="Formats" image="silk/text_heading_1" tooltip="Select a format">
+
+		<m:command name="paragraph" class="Replace" element="p" target="block"
+			label="Paragraph" image="silk/pilcrow" tooltip="Use a paragraph"/>
+		<m:command name="h1" class="Replace" element="h1" target="block" accel="Command-1"
+			label="Heading 1" image="silk/text_heading_1" tooltip="Use a first level heading"/>
+		<m:command name="h2" class="Replace" element="h2" target="block" accel="Command-2"
+			label="Heading 2" image="silk/text_heading_2" tooltip="Use a second level heading"/>
+		<m:command name="h3" class="Replace" element="h3" target="block" accel="Command-3"
+			label="Heading 3" image="silk/text_heading_3" tooltip="Use a third level heading"/>
+		<m:command name="h4" class="Replace" element="h4" target="block" accel="Command-4"
+			label="Heading 4" image="silk/text_heading_4" tooltip="Use a fourth level heading"/>
+		<m:command name="h5" class="Replace" element="h5" target="block" accel="Command-5"
+			label="Heading 5" image="silk/text_heading_5" tooltip="Use a fifth level heading"/>
+		<m:command name="h6" class="Replace" element="h6" target="block" accel="Command-6"
+			label="Heading 6" image="silk/text_heading_6" tooltip="Use a sixth level heading"/>
+		<m:command name="pre" class="Replace" element="pre" target="block"
+			label="Pre-formatted" tooltip="Use pre-formatted text."/>
+		<m:command name="divison" class="Replace" element="div" target="block"
+			label="Division" tooltip="Use a division"/>
+		<m:command name="listitem" class="Replace" element="li" target="block"
+			label="List Item" tooltip="Use list item."/>
+		<m:command name="unformat" class="Unwrap" target="block"
+			label="Unformat" tooltip="Remove formatting"/>
+
+	</m:group>
+
+	<m:group name="justifications"
+		label="Justifications" image="silk/text_align_left" tooltip="Justify text">
+
+		<m:command name="left" class="Style" styleName="text-align" styleValue="left" target="block"
+			label="Align left" image="silk/text_align_left" tooltip="Align the text to the left margin"/>
+		<m:command name="right" class="Style" styleName="text-align" styleValue="right" target="block"
+			label="Align right" image="silk/text_align_right" tooltip="Align the text to the right margin"/>
+		<m:command name="center" class="Style" styleName="text-align" styleValue="center" target="block"
+			label="Center" image="silk/text_align_center" tooltip="Center the text"/>
+		<m:command name="justify" class="Style" styleName="text-align" styleValue="justify" target="block"
+			label="Justify" image="silk/text_align_justify" tooltip="Justify the text"/>
+
+	</m:group>
+
+	<m:group name="textColor"
+		label="Text Color" image="silk/paintbrush" tooltip="Choose text color">
+
+		<m:command name="setTextColor" class="Wrap"
+			label="Set Text Color" image="silk/paintbrush" tooltip="Set the text color">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("span");
+				this.prompt = function(event, state) {
+					if(!state || !state.wrapper) return false;
+					var color = prompt("What color should the text be?", "");
+					if(!color) return false;
+					mozile.dom.setStyle(state.wrapper, "color", color);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		
+		<m:separator/>
+		
+		<m:command name="blackText" class="Wrap"
+			element="span" styleName="color" styleValue="black"
+			label="Black" tooltip="Make text black"/>
+		<m:command name="whiteText" class="Wrap"
+			element="span" styleName="color" styleValue="white"
+			label="White" tooltip="Make text white"/>
+		<m:command name="grayText" class="Wrap"
+			element="span" styleName="color" styleValue="gray"
+			label="Gray" tooltip="Make text gray"/>
+		<m:command name="redText" class="Wrap"
+			element="span" styleName="color" styleValue="red"
+			label="Red" tooltip="Make text red"/>
+		<m:command name="blueText" class="Wrap"
+			element="span" styleName="color" styleValue="blue"
+			label="Blue" tooltip="Make text blue"/>
+		<m:command name="greenText" class="Wrap"
+			element="span" styleName="color" styleValue="green"
+			label="Green" tooltip="Make text green"/>
+		<m:command name="yellowText" class="Wrap"
+			element="span" styleName="color" styleValue="yellow"
+			label="Yellow" tooltip="Make text yellow"/>
+		<m:command name="orangeText" class="Wrap"
+			element="span" styleName="color" styleValue="orange"
+			label="Orange" tooltip="Make text orange"/>
+		<m:command name="purpleText" class="Wrap"
+			element="span" styleName="color" styleValue="purple"
+			label="Purple" tooltip="Make text purple"/>
+	</m:group>
+
+	<m:group name="backgroundColor"
+		label="Background Color" image="silk/paintcan" tooltip="Choose background color">
+		<m:command name="setBackgroundColor" class="Wrap"
+			label="Set Background Color" image="silk/paintcan" tooltip="Set the background color">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("span");
+				this.prompt = function(event, state) {
+					if(!state || !state.wrapper) return false;
+					var color = prompt("What colour should the background be?", "");
+					if(!color) return false;
+					mozile.dom.setStyle(state.wrapper, "background-color", color);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		
+		<m:separator/>
+		
+		<m:command name="blackBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="black"
+			label="Black" tooltip="Make background black"/>
+		<m:command name="whiteBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="white"
+			label="White" tooltip="Make background white"/>
+		<m:command name="grayBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="gray"
+			label="Gray" tooltip="Make background gray"/>
+		<m:command name="redBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="red"
+			label="Red" tooltip="Make background red"/>
+		<m:command name="blueBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="blue"
+			label="Blue" tooltip="Make background blue"/>
+		<m:command name="greenBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="green"
+			label="Green" tooltip="Make background green"/>
+		<m:command name="yellowBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="yellow"
+			label="Yellow" tooltip="Make background yellow"/>
+		<m:command name="orangeBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="orange"
+			label="Orange" tooltip="Make background orange"/>
+		<m:command name="purpleBackground" class="Wrap"
+			element="span" styleName="background-color" styleValue="purple"
+			label="Purple" tooltip="Make background purple"/>
+	</m:group>
+
+	<m:group name="insertion"
+		label="Insert Objects" image="silk/photo_add" tooltip="Insert objects">
+
+		<m:command name="image" class="Insert" element="img"
+			label="Image" image="silk/photo_add" tooltip="Insert an image">
+			<m:script>
+				<![CDATA[
+				this.prompt = function(event, state) {
+					if(!state || !state.element) return false;
+					var src = prompt("What is the URL for this image?", "");
+					if(!src) return false;
+					state.element.setAttribute("src", src);
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+
+		<m:command name="lineBreak" class="Insert" accel="Shift-Return Shift-Enter"
+			label="Line-Break" tooltip="Insert a line-break">			
+			<m:script>
+				<![CDATA[
+				this.prompt = function(event, state) {
+					var selection = mozile.dom.selection.get();
+					var whitespace = mozile.dom.getStyle(selection.focusNode, "white-space");
+					if(whitespace != "pre") state.element = mozile.dom.createElement("br");
+					else if(mozile.browser.isIE) state.text = "\r";
+					else state.text = "\n";
+					return true;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		<m:command name="hr" class="Insert" element="hr"
+			label="Horizontal Rule" image="silk/text_horizontalrule" tooltip="Insert a horizontal rule"/>
+		<m:command name="unorderedList" class="Insert"
+			label="Unordered List" image="silk/text_list_bullets" tooltip="Insert an unordered list">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("ul");
+				var li = mozile.dom.createElement("li");
+				li.appendChild(document.createTextNode(mozile.emptyToken));
+				this.element.appendChild(li);
+				]]>
+			</m:script>
+		</m:command>
+		<m:command name="orderedList" class="Insert"
+			label="Ordered List" image="silk/text_list_numbers" tooltip="Insert an ordered list">
+			<m:script>
+				<![CDATA[
+				this.element = mozile.dom.createElement("ol");
+				var li = mozile.dom.createElement("li");
+				li.appendChild(document.createTextNode(mozile.emptyToken));
+				this.element.appendChild(li);
+				]]>
+			</m:script>
+		</m:command>
+			
+		<m:command name="title" class="Command"
+			label="Change Title" image="" tooltip="Change document title">
+			<m:script>
+				<![CDATA[	 
+				// Find the title node and get the new title.
+				this.prompt = function(event, state) {
+					var titles = document.documentElement.getElementsByTagName("title");
+					if(titles && titles.length != 0) {
+						state.titleNode = titles[0];
+						state.oldTitle = document.title;
+						var title = prompt("What should the title be?", state.oldTitle);
+						if(title) {
+							state.newTitle = title;
+							return true;
+						}
+					}
+					else alert("Could not set title. Document does not have a title element.");
+					return false;
+				}
+				this.execute = function(state, fresh) {
+					if(mozile.browser.isMozilla) {
+						mozile.dom.removeChildNodes(state.titleNode);
+						state.titleNode.appendChild(document.createTextNode(state.newTitle));
+					}
+					document.title = state.newTitle;
+					state.executed = true;
+					return state;
+				}
+				this.unexecute = function(state, fresh) {
+					if(mozile.browser.isMozilla) {
+						mozile.dom.removeChildNodes(state.titleNode);
+						state.titleNode.appendChild(document.createTextNode(state.oldTitle));
+					}
+					document.title = state.oldTitle;
+					state.executed = false;
+					return state;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		<m:command name="style" class="Command"
+			label="Change Style" image="" tooltip="Change the element's style">
+			<m:script>
+				<![CDATA[	 
+				// Find the target and get the new style.
+				this.prompt = function(event, state) {
+					var selection = mozile.dom.selection.get();
+					if(!selection) return false;
+					var range = selection.getRangeAt(0);
+					if(!range) return false;
+					var target = range.commonAncestorContainer;
+					if(!target) return false;
+					if(target.nodeType == mozile.dom.TEXT_NODE) target = target.parentNode;
+					state.target = target;
+					state.oldStyle = "";
+					if(mozile.browser.isIE) {
+						if(target.style.cssText) state.oldStyle = target.style.cssText;
+					}
+					else if(target.getAttribute("style")) {
+						state.oldStyle = target.getAttribute("style");
+					}
+					var style = prompt("What should the style of the element '"+ target.nodeName +"' be?", state.oldStyle);
+					if(style) {
+						state.newStyle = style;
+						return true;
+					}
+					return false;
+				}
+				this.execute = function(state, fresh) {
+					if(mozile.browser.isIE) {
+						state.target.style.cssText = state.newStyle;
+					}
+					else state.target.setAttribute("style", state.newStyle);
+					state.executed = true;
+					return state;
+				}
+				this.unexecute = function(state, fresh) {
+					if(mozile.browser.isIE) {
+						state.target.style.cssText = state.oldStyle;
+					}
+					else state.target.setAttribute("style", state.oldStyle);
+					state.executed = false;
+					return state;
+				}
+				]]>
+			</m:script>
+		</m:command>
+		<m:command name="attribute" class="Command" accel="Command-Shift-A"
+			label="Change an Attribute" image="" tooltip="Change an attribute of the element">
+			<m:script>
+				<![CDATA[	 
+				// Find the target and get the new style.
+				this.prompt = function(event, state) {
+					var selection = mozile.dom.selection.get();
+					if(!selection) return false;
+					var range = selection.getRangeAt(0);
+					if(!range) return false;
+					var target = range.commonAncestorContainer;
+					if(!target) return false;
+					if(target.nodeType == mozile.dom.TEXT_NODE) target = target.parentNode;
+					state.target = target;
+					var attr = prompt("What attribute of the element '"+ target.nodeName +"' should be changed?", "");
+					if(!attr) return false;
+					state.attr = attr;
+					state.oldValue = "";
+					if(attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						if(target.style.cssText) state.oldValue = target.style.cssText;
+					}
+					else if(target.getAttribute(attr)) {
+						state.oldValue = target.getAttribute(attr);
+					}
+					var value = prompt("What should the value of '"+ attr +"' be?", state.oldValue);
+					if(value) {
+						state.newValue = value;
+						return true;
+					}
+					return false;
+				}
+				this.execute = function(state, fresh) {
+					if(state.attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						state.target.style.cssText = state.newValue;
+					}
+					else state.target.setAttribute(state.attr, state.newValue);
+					state.executed = true;
+					return state;
+				}
+				this.unexecute = function(state, fresh) {
+					if(state.attr.toLowerCase() == "style" && mozile.browser.isIE) {
+						state.target.style.cssText = state.oldValue;
+					}
+					else state.target.setAttribute(state.attr, state.oldValue);
+					state.executed = false;
+					return state;
+				}
+				]]>
+			</m:script>
+		</m:command>
+
+	</m:group>
+</m:define>
+
+
+<define name="Common.attrib">
+	<optional>
+		<attribute name="id"/>
+	</optional>
+	<!--<ref name="Core.attrib"/>
+	<ref name="I18n.attrib"/>-->
+</define>
+
+<define name="br">
+	<element name="br">
+		<!--<ref name="Core.attrib"/>-->
+		<ref name="Common.attrib"/>
+		<empty/>
+	</element>
+</define>
+
+<define name="span">
+	<element name="span">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="a">
+	<element name="a">
+		<ref name="a.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="a.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="href">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="charset">
+			<ref name="Charset.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="type">
+			<ref name="ContentType.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="hreflang">
+			<ref name="LanguageCode.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="rel">
+			<ref name="LinkTypes.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="rev">
+			<ref name="LinkTypes.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="accesskey">
+			<ref name="Character.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="tabindex">
+			<ref name="Number.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<!--
+<define name="abbr">
+	<element name="abbr">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="acronym">
+	<element name="acronym">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="cite">
+	<element name="cite">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="code">
+	<element name="code">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="dfn">
+	<element name="dfn">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="em">
+	<element name="em">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="kbd">
+	<element name="kbd">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="q">
+	<element name="q">
+		<ref name="q.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="q.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="cite">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<define name="samp">
+	<element name="samp">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="strong">
+	<element name="strong">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="sub">
+	<element name="sub">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="sup">
+	<element name="sup">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="var">
+	<element name="var">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+-->
+
+<define name="div">
+	<element name="div">
+		<ref name="Common.attrib"/>
+		<ref name="Flow.model"/>
+	</element>
+</define>
+
+<define name="p">
+	<element name="p">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<!--
+<define name="address">
+	<element name="address">
+		<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="blockquote">
+	<element name="blockquote">
+		<ref name="blockquote.attlist"/>
+		<ref name="Block.model"/>
+	</element>
+</define>
+
+<define name="blockquote.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="cite">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+</define>
+-->
+
+<define name="pre">
+	<element name="pre">
+		<ref name="pre.attlist"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="pre.attlist">
+	<ref name="Common.attrib"/>
+	<optional>
+		<attribute name="xml:space">
+			<value>preserve</value>
+		</attribute>
+	</optional>
+</define>
+
+<define name="h1">
+	<element name="h1">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h2">
+	<element name="h2">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h3">
+	<element name="h3">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h4">
+	<element name="h4">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+ 
+<define name="h5">
+	<element name="h5">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+
+<define name="h6">
+	<element name="h6">
+		<ref name="Heading.attrib"/>
+		<ref name="Heading.content"/>
+	</element>
+</define>
+
+<define name="Heading.attrib">
+	<ref name="Common.attrib"/>
+</define>
+ 
+<define name="Heading.content">
+	<ref name="Inline.model"/>
+</define>
+
+<define name="Heading.class">
+	<choice>
+		<ref name="h1"/>
+		<ref name="h2"/>
+		<ref name="h3"/>
+		<ref name="h4"/>
+		<ref name="h5"/>
+		<ref name="h6"/>
+	</choice>
+</define>
+
+<define name="Block.class">
+	<choice>
+		<!--<ref name="address"/>
+		<ref name="blockquote"/>-->
+		<ref name="div"/>
+		<ref name="p"/>
+		<ref name="pre"/>
+		<ref name="Heading.class"/>
+		<ref name="hr"/>
+		<ref name="br"/>
+	</choice>
+</define>
+
+<define name="Inline.class">
+	<choice>
+		<ref name="a"/>
+		<!--
+		<ref name="abbr"/>
+		<ref name="acronym"/>
+		-->
+		<ref name="br"/>
+		<!--
+		<ref name="cite"/>
+		-->
+		<ref name="code"/>
+		<!--
+		<ref name="dfn"/>
+		-->
+		<ref name="em"/>
+		<!--
+		<ref name="kbd"/>
+		<ref name="q"/>
+		<ref name="samp"/>
+		-->
+		<ref name="span"/>
+		<ref name="strong"/>
+		<ref name="sub"/>
+		<ref name="sup"/>
+		<!--
+		<ref name="var"/>
+		-->
+		<ref name="br"/>
+		<!-- Added -->
+		<ref name="img"/>
+	</choice>
+</define>
+
+<define name="Inline.model">
+	<m:ref name="Inline"/>
+	<zeroOrMore>
+		<choice>
+			<text/>
+			<ref name="Inline.class"/>
+		</choice>
+	</zeroOrMore>
+</define>
+
+<!-- This is redefined by the legacy module to include inlines. -->
+<define name="Block.mix">
+	<ref name="Block.class"/>
+</define>
+
+<define name="Block.model">
+	<oneOrMore>
+		<ref name="Block.mix"/>
+	</oneOrMore>
+</define>
+
+<define name="Flow.model">
+	<zeroOrMore>
+		<choice>
+			<!--<text/>-->
+			<ref name="Inline.class"/>
+			<ref name="Block.class"/>
+		</choice>
+	</zeroOrMore>
+</define>
+
+<define name="dl">
+	<element name="dl">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<choice>
+	<ref name="dt"/>
+	<ref name="dd"/>
+			</choice>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="dt">
+	<element name="dt">
+	<ref name="Common.attrib"/>
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="dd">
+	<element name="dd">
+		<ref name="Common.attrib"/>
+		<ref name="Flow.model"/>
+	</element>
+</define>
+
+<define name="ol">
+	<element name="ol">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<ref name="li"/>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="ul">
+	<element name="ul">
+		<ref name="Common.attrib"/>
+		<oneOrMore>
+			<ref name="li"/>
+		</oneOrMore>
+	</element>
+</define>
+
+<define name="li">
+	<element name="li">
+		<ref name="Common.attrib"/>
+		<!--<ref name="Flow.model"/>-->
+		<ref name="Inline.model"/>
+	</element>
+</define>
+
+<define name="List.class">
+	<choice>
+		<ref name="ul"/>
+		<ref name="ol"/>
+		<ref name="dl"/>
+	</choice>
+</define>
+
+<define name="Block.class" combine="choice">
+	<ref name="List.class"/>
+</define>
+
+<define name="img">
+	<element name="img">
+		<ref name="img.attlist"/>
+	</element>
+</define>
+
+<define name="img.attlist">
+	<ref name="Common.attrib"/>
+	<attribute name="src">
+		<ref name="URI.datatype"/>
+	</attribute>
+	<attribute name="alt">
+		<ref name="Text.datatype"/>
+	</attribute>
+	<optional>
+		<attribute name="longdesc">
+			<ref name="URI.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="height">
+			<ref name="Length.datatype"/>
+		</attribute>
+	</optional>
+	<optional>
+		<attribute name="width">
+			<ref name="Length.datatype"/>
+		</attribute>
+	</optional>
+</define>
+
+<define name="hr">
+	<element name="hr">
+		<ref name="Common.attrib"/>
+	</element>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic-table.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic-table.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic-table.rng
new file mode 100755
index 0000000..2fa9f50
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic-table.rng
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Checks exclusions applying to basic-table module.
+  This schema is intended to be used in addition to xhtml.rng.
+-->
+<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
+  <start>
+    <ref name="normalElement"/>
+  </start>
+  <define name="normalElement">
+    <element>
+      <anyName>
+        <except>
+          <name>table</name>
+        </except>
+      </anyName>
+      <ref name="normalContent"/>
+    </element>
+  </define>
+  <define name="normalContent">
+    <zeroOrMore>
+      <choice>
+        <ref name="normalElement"/>
+        <ref name="tableElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="tableElement">
+    <element name="table">
+      <ref name="tableContent"/>
+    </element>
+  </define>
+  <define name="tableContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>table</name>
+            </except>
+          </anyName>
+          <ref name="tableContent"/>
+        </element>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="anyAttribute">
+    <attribute>
+      <anyName/>
+    </attribute>
+  </define>
+</grammar>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic.rng
new file mode 100755
index 0000000..a922fa2
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/basic.rng
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Checks exclusions applying to "a" and "pre" elements.
+  This schema is intended to be used in addition to xhtml.rng.
+-->
+<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
+  <start>
+    <ref name="normalElement"/>
+  </start>
+  <define name="normalElement">
+    <element>
+      <anyName>
+        <except>
+          <name>a</name>
+          <name>pre</name>
+        </except>
+      </anyName>
+      <ref name="normalContent"/>
+    </element>
+  </define>
+  <define name="normalContent">
+    <zeroOrMore>
+      <choice>
+        <ref name="normalElement"/>
+        <ref name="aElement"/>
+        <ref name="preElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="aElement">
+    <element name="a">
+      <ref name="aContent"/>
+    </element>
+  </define>
+  <define name="aContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>a</name>
+              <name>pre</name>
+            </except>
+          </anyName>
+          <ref name="aContent"/>
+        </element>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="preElement">
+    <element name="pre">
+      <ref name="preContent"/>
+    </element>
+  </define>
+  <define name="preContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>a</name>
+              <name>pre</name>
+              <name>img</name>
+              <name>object</name>
+              <name>applet</name>
+              <name>big</name>
+              <name>small</name>
+              <name>sub</name>
+              <name>sup</name>
+              <name>font</name>
+              <name>basefont</name>
+            </except>
+          </anyName>
+          <ref name="preContent"/>
+        </element>
+        <ref name="aPreElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="aPreElement">
+    <element name="a">
+      <ref name="aPreContent"/>
+    </element>
+  </define>
+  <define name="aPreContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>a</name>
+              <name>pre</name>
+              <name>img</name>
+              <name>object</name>
+              <name>applet</name>
+              <name>big</name>
+              <name>small</name>
+              <name>sub</name>
+              <name>sup</name>
+              <name>font</name>
+              <name>basefont</name>
+            </except>
+          </anyName>
+          <ref name="aPreContent"/>
+        </element>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="anyAttribute">
+    <attribute>
+      <anyName/>
+    </attribute>
+  </define>
+</grammar>


[28/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/pom.xml
----------------------------------------------------------------------
diff --git a/platform/editor/pom.xml b/platform/editor/pom.xml
new file mode 100644
index 0000000..76cdb57
--- /dev/null
+++ b/platform/editor/pom.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>    
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.editor</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Clerezza - Platform Editor</name>
+    <description>An editor for discobits content on the platform.</description>
+    <dependencies>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typehandlerspace</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scala</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphnodeprovider</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.seedsnipe</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>javax.servlet</artifactId>
+                    <groupId>org.apache.felix</groupId>
+                </exclusion>
+            </exclusions>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>wymiwyg-commons-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <version>1.9.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </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>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.metadata</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core.test</artifactId>
+            <scope>test</scope>
+            <version>0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>${project.build.directory}/generated-resources</directory>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+				<groupId>org.scala-tools</groupId>
+				<artifactId>maven-scala-plugin</artifactId>
+			</plugin>
+            <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>2.4.0</version>
+          <extensions>true</extensions>
+          <configuration>
+            <instructions>
+              <Import-Package>org.osgi.*; version="[1,2)",javax.ws.rs.*; version="[1,3)",
+                                            org.apache.stanbol.commons.security.*; version="[0,3)",
+                  !org.apache.felix.scr.annotations.*,*</Import-Package>
+              <Bundle-SymbolicName>org.apache.clerezza.platform.editor</Bundle-SymbolicName>
+              <_nodefaultversion />
+            </instructions>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-scr-plugin</artifactId>
+          <version>1.14.0</version>
+          <executions>
+            <execution>
+              <id>generate-scr-scrdescriptor</id>
+              <goals>
+                <goal>scr</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+              <scanClasses>true</scanClasses> 
+          </configuration>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file


[26/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFaProcessor.1.3.0.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFaProcessor.1.3.0.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFaProcessor.1.3.0.js
new file mode 100644
index 0000000..1dc3f47
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/RDFaProcessor.1.3.0.js
@@ -0,0 +1,1644 @@
+/** @preserve green-turtle version 1.3.0 Copyright (c) 2011-2013, R. Alexander Milowski <al...@milowski.com> All rights reserved. */
+/**         
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+function URIResolver() {
+}
+URIResolver.SCHEME = /^[A-Za-z][A-Za-z0-9\+\-\.]*\:/;
+
+URIResolver.prototype.parseURI = function(uri) {
+   var match = URIResolver.SCHEME.exec(uri);
+   if (!match) {
+      throw "Bad URI value, no scheme: "+uri;
+   }
+   var parsed = { spec: uri };
+   parsed.scheme = match[0].substring(0,match[0].length-1);
+   parsed.schemeSpecificPart = parsed.spec.substring(match[0].length);
+   if (parsed.schemeSpecificPart.charAt(0)=='/' && parsed.schemeSpecificPart.charAt(1)=='/') {
+      this.parseGeneric(parsed);
+   } else {
+      parsed.isGeneric = false;
+   }
+   parsed.normalize = function() {
+      if (!this.isGeneric) {
+         return;
+      }
+      if (this.segments.length==0) {
+         return;
+      }
+      // edge case of ending in "/."
+      if (this.path.length>1 && this.path.substring(this.path.length-2)=="/.") {
+         this.path = this.path.substring(0,this.path.length-1);
+         this.segments.splice(this.segments.length-1,1);
+         this.schemeSpecificPart = "//"+this.authority+this.path;
+         if (typeof this.query != "undefined") {
+            this.schemeSpecificPart += "?" + this.query;
+         }
+         if (typeof this.fragment != "undefined") {
+            this.schemeSpecificPart += "#" + this.fragment;
+         }
+         this.spec = this.scheme+":"+this.schemeSpecificPart;
+         return;
+      }
+      var end = this.path.charAt(this.path.length-1);
+      if (end!="/") {
+         end = "";
+      }
+      for (var i=0; i<this.segments.length; i++) {
+         if (i>0 && this.segments[i]=="..") {
+            this.segments.splice(i-1,2);
+            i -= 2;
+         }
+         if (this.segments[i]==".") {
+            this.segments.splice(i,1);
+            i--;
+         }
+      }
+      this.path = this.segments.length==0 ? "/" : "/"+this.segments.join("/")+end;
+      this.schemeSpecificPart = "//"+this.authority+this.path;
+      if (typeof this.query != "undefined") {
+         this.schemeSpecificPart += "?" + this.query;
+      }
+      if (typeof this.fragment != "undefined") {
+         this.schemeSpecificPart += "#" + this.fragment;
+      }
+      this.spec = this.scheme+":"+this.schemeSpecificPart;
+   }
+   parsed.resolve = function(href) {
+      if (!href) {
+         return this.spec;
+      }
+      if (href.charAt(0)=='#') {
+         var lastHash = this.spec.lastIndexOf('#');
+         return lastHash<0 ? this.spec+href : this.spec.substring(0,lastHash)+href;
+      }
+      if (!this.isGeneric) {
+         throw "Cannot resolve uri against non-generic URI: "+this.spec;
+      }
+      var colon = href.indexOf(':');
+      if (href.charAt(0)=='/') {
+         return this.scheme+"://"+this.authority+href;
+      } else if (href.charAt(0)=='.' && href.charAt(1)=='/') {
+         if (this.path.charAt(this.path.length-1)=='/') {
+            return this.scheme+"://"+this.authority+this.path+href.substring(2);
+         } else {
+            var last = this.path.lastIndexOf('/');
+            return this.scheme+"://"+this.authority+this.path.substring(0,last)+href.substring(1);
+         }
+      } else if (URIResolver.SCHEME.test(href)) {
+         return href;
+      } else if (href.charAt(0)=="?") {
+         return this.scheme+"://"+this.authority+this.path+href;
+      } else {
+         if (this.path.charAt(this.path.length-1)=='/') {
+            return this.scheme+"://"+this.authority+this.path+href;
+         } else {
+            var last = this.path.lastIndexOf('/');
+            return this.scheme+"://"+this.authority+this.path.substring(0,last+1)+href;
+         }
+      }
+   };
+   parsed.relativeTo = function(otherURI) {
+      if (otherURI.scheme!=this.scheme) {
+         return this.spec;
+      }
+      if (!this.isGeneric) {
+         throw "A non generic URI cannot be made relative: "+this.spec;
+      }
+      if (!otherURI.isGeneric) {
+         throw "Cannot make a relative URI against a non-generic URI: "+otherURI.spec;
+      }
+      if (otherURI.authority!=this.authority) {
+         return this.spec;
+      }
+      var i=0;
+      for (; i<this.segments.length && i<otherURI.segments.length; i++) {
+         if (this.segments[i]!=otherURI.segments[i]) {
+            //alert(this.path+" different from "+otherURI.path+" at '"+this.segments[i]+"' vs '"+otherURI.segments[i]+"'");
+            var relative = "";
+            for (var j=i; j<otherURI.segments.length; j++) {
+               relative += "../";
+            }
+            for (var j=i; j<this.segments.length; j++) {
+               relative += this.segments[j];
+               if ((j+1)<this.segments.length) {
+                  relative += "/";
+               }
+            }
+            if (this.path.charAt(this.path.length-1)=='/') {
+               relative += "/";
+            }
+            return relative;
+         }
+      }
+      if (this.segments.length==otherURI.segments.length) {
+         return this.hash ? this.hash : (this.query ? this.query : "");
+      } else if (i<this.segments.length) {
+         var relative = "";
+         for (var j=i; j<this.segments.length; j++) {
+            relative += this.segments[j];
+            if ((j+1)<this.segments.length) {
+               relative += "/";
+            }
+         }
+         if (this.path.charAt(this.path.length-1)=='/') {
+            relative += "/";
+         }
+         return relative;
+      } else {
+         throw "Cannot calculate a relative URI for "+this.spec+" against "+otherURI.spec;
+      } 
+   };
+   return parsed;
+}
+
+URIResolver.prototype.parseGeneric = function(parsed) {
+   if (parsed.schemeSpecificPart.charAt(0)!='/' || parsed.schemeSpecificPart.charAt(1)!='/') {
+      throw "Generic URI values should start with '//':"+parsed.spec;
+   }
+  
+   var work = parsed.schemeSpecificPart.substring(2);
+   var pathStart = work.indexOf("/");
+   parsed.authority = pathStart<0 ? work : work.substring(0,pathStart);
+   parsed.path = pathStart<0 ? "" : work.substring(pathStart);
+   var hash = parsed.path.indexOf('#');
+   if (hash>=0) {
+      parsed.fragment = parsed.path.substring(hash+1);
+      parsed.path = parsed.path.substring(0,hash);
+   }
+   var questionMark = parsed.path.indexOf('?');
+   if (questionMark>=0) {
+      parsed.query = parsed.path.substring(questionMark+1);
+      parsed.path = parsed.path.substring(0,questionMark);
+   }
+   if (parsed.path=="/" || parsed.path=="") {
+      parsed.segments = [];
+   } else {
+      parsed.segments = parsed.path.split(/\//);
+      if (parsed.segments.length>0 && parsed.segments[0]=='' && parsed.path.length>1 && parsed.path.charAt(1)!='/') {
+         // empty segment at the start, remove it
+         parsed.segments.shift();
+      }
+      if (parsed.segments.length>0 && parsed.path.length>0 && parsed.path.charAt(parsed.path.length-1)=='/' && parsed.segments[parsed.segments.length-1]=='') {
+         // we may have an empty the end
+         // check to see if it is legimate
+         if (parsed.path.length>1 && parsed.path.charAt(parsed.path.length-2)!='/') {
+            parsed.segments.pop();
+         }
+      }
+      // check for non-escaped characters
+      for (var i=0; i<parsed.segments.length; i++) {
+         var check = parsed.segments[i].split(/%[A-Za-z0-9][A-Za-z0-9]|[\ud800-\udfff][\ud800-\udfff]|[A-Za-z0-9\-\._~!$&'()*+,;=@:\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/);
+
+                 for (var j=0; j<check.length; j++) {
+            if (check[j].length>0) {
+               throw "Unecaped character "+check[j].charAt(0)+" ("+check[j].charCodeAt(0)+") in URI "+parsed.spec;
+            }
+         }
+      }
+   }
+   parsed.isGeneric = true;
+}
+
+RDFaProcessor.prototype = new URIResolver();
+RDFaProcessor.prototype.constructor=RDFaProcessor;
+function RDFaProcessor(targetObject) {
+   if (targetObject) {
+      this.target = targetObject;
+   } else {
+      this.target = {
+         graph: {
+            subjects: {},
+            prefixes: {},
+            terms: {}
+         }
+      };
+   }
+   this.theOne = "_:"+(new Date()).getTime();
+   this.language = null;
+   this.vocabulary = null;
+   this.blankCounter = 0;
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" } ];
+   this.inXHTMLMode = false;
+   this.absURIRE = /[\w\_\-]+:\S+/;
+   this.finishedHandlers = [];
+   this.init();
+}
+
+RDFaProcessor.prototype.newBlankNode = function() {
+   this.blankCounter++;
+   return "_:"+this.blankCounter;
+}
+
+RDFaProcessor.XMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"; 
+RDFaProcessor.HTMLLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML"; 
+RDFaProcessor.PlainLiteralURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral";
+RDFaProcessor.objectURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#object";
+RDFaProcessor.typeURI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
+
+RDFaProcessor.nameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]';
+RDFaProcessor.nameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0
 B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u
 1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]';
+RDFaProcessor.NCNAME = new RegExp('^' + RDFaProcessor.nameStartChar + RDFaProcessor.nameChar + '*$');
+
+RDFaProcessor.trim = function(str) {
+   return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+}
+
+RDFaProcessor.prototype.tokenize = function(str) {
+   return RDFaProcessor.trim(str).split(/\s+/);
+}
+
+
+RDFaProcessor.prototype.parseSafeCURIEOrCURIEOrURI = function(value,prefixes,base) {
+   value = RDFaProcessor.trim(value);
+   if (value.charAt(0)=='[' && value.charAt(value.length-1)==']') {
+      value = value.substring(1,value.length-1);
+      value = value.trim(value);
+      if (value.length==0) {
+         return null;
+      }
+      if (value=="_:") {
+         // the one node
+         return this.theOne;
+      }
+      return this.parseCURIE(value,prefixes,base);
+   } else {
+      return this.parseCURIEOrURI(value,prefixes,base);
+   }
+}
+
+RDFaProcessor.prototype.parseCURIE = function(value,prefixes,base) {
+   var colon = value.indexOf(":");
+   if (colon>=0) {
+      var prefix = value.substring(0,colon);
+      if (prefix=="") {
+         // default prefix
+         var uri = prefixes[""];
+         return uri ? uri+value.substring(colon+1) : null;
+      } else if (prefix=="_") {
+         // blank node
+         return "_:"+value.substring(colon+1);
+      } else if (RDFaProcessor.NCNAME.test(prefix)) {
+         var uri = prefixes[prefix];
+         if (uri) {
+            return uri+value.substring(colon+1);
+         }
+      }
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.parseCURIEOrURI = function(value,prefixes,base) {
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   }
+   return this.resolveAndNormalize(base,value);
+}
+
+RDFaProcessor.prototype.parsePredicate = function(value,defaultVocabulary,terms,prefixes,base,ignoreTerms) {
+   if (value=="") {
+      return null;
+   }
+   var predicate = this.parseTermOrCURIEOrAbsURI(value,defaultVocabulary,ignoreTerms ? null : terms,prefixes,base);
+   if (predicate && predicate.indexOf("_:")==0) {
+      return null;
+   }
+   return predicate;
+}
+
+RDFaProcessor.prototype.parseTermOrCURIEOrURI = function(value,defaultVocabulary,terms,prefixes,base) {
+   //alert("Parsing "+value+" with default vocab "+defaultVocabulary);
+   value = RDFaProcessor.trim(value);
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   } else {
+       var term = terms[value];
+       if (term) {
+          return term;
+       }
+       var lcvalue = value.toLowerCase();
+       term = terms[lcvalue];
+       if (term) {
+          return term;
+       }
+       if (defaultVocabulary && !this.absURIRE.exec(value)) {
+          return defaultVocabulary+value
+       }
+   }
+   return this.resolveAndNormalize(base,value);
+}
+
+RDFaProcessor.prototype.parseTermOrCURIEOrAbsURI = function(value,defaultVocabulary,terms,prefixes,base) {
+   //alert("Parsing "+value+" with default vocab "+defaultVocabulary);
+   value = RDFaProcessor.trim(value);
+   var curie = this.parseCURIE(value,prefixes,base);
+   if (curie) {
+      return curie;
+   } else if (terms) {
+       if (defaultVocabulary && !this.absURIRE.exec(value)) {
+          return defaultVocabulary+value
+       }
+       var term = terms[value];
+       if (term) {
+          return term;
+       }
+       var lcvalue = value.toLowerCase();
+       term = terms[lcvalue];
+       if (term) {
+          return term;
+       }
+   }
+   if (this.absURIRE.exec(value)) {
+      return this.resolveAndNormalize(base,value);
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.resolveAndNormalize = function(base,href) {
+   var u = base.resolve(href);
+   var parsed = this.parseURI(u);
+   parsed.normalize();
+   return parsed.spec;
+}
+
+RDFaProcessor.prototype.parsePrefixMappings = function(str,target) {
+   var values = this.tokenize(str);
+   var prefix = null;
+   var uri = null;
+   for (var i=0; i<values.length; i++) {
+      if (values[i][values[i].length-1]==':') {
+         prefix = values[i].substring(0,values[i].length-1);
+      } else if (prefix) {
+         target[prefix] = this.target.baseURI ? this.target.baseURI.resolve(values[i]) : values[i];
+         prefix = null;
+      }
+   }
+}
+
+RDFaProcessor.prototype.copyMappings = function(mappings) {
+   var newMappings = {};
+   for (var k in mappings) {
+      newMappings[k] = mappings[k];
+   }
+   return newMappings;
+}
+
+RDFaProcessor.prototype.ancestorPath = function(node) {
+   var path = "";
+   while (node && node.nodeType!=Node.DOCUMENT_NODE) {
+      path = "/"+node.localName+path;
+      node = node.parentNode;
+   }
+   return path;
+}
+
+RDFaProcessor.prototype.setContext = function(node) {
+
+   // We only recognized XHTML+RDFa 1.1 if the version is set propertyly
+   if (node.localName=="html" && node.getAttribute("version")=="XHTML+RDFa 1.1") {
+      this.setXHTMLContext();
+   } else if (node.localName=="html" || node.namespaceURI=="http://www.w3.org/1999/xhtml") {
+      if (document.doctype) {
+         if (document.doctype.publicId=="-//W3C//DTD XHTML+RDFa 1.0//EN" && document.doctype.systemId=="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") {
+            console.log("WARNING: RDF 1.0 is not supported.  Defaulting to HTML5 mode.");
+            this.setHTMLContext();
+         } else if (document.doctype.publicId=="-//W3C//DTD XHTML+RDFa 1.1//EN" && document.doctype.systemId=="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd") {
+            this.setXHTMLContext();
+         } else {
+            this.setHTMLContext();
+         }
+      } else {
+         this.setHTMLContext();
+      }
+   } else {
+      this.setXMLContext();
+   }
+
+}
+
+RDFaProcessor.prototype.setInitialContext = function() {
+   this.vocabulary = null;
+   // By default, the prefixes are terms are loaded to the RDFa 1.1. standard within the graph constructor
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" } ];
+}
+
+RDFaProcessor.prototype.setXMLContext = function() {
+   this.setInitialContext();
+   this.inXHTMLMode = false;
+   this.inHTMLMode = false;
+}
+
+RDFaProcessor.prototype.setHTMLContext = function() {
+   this.setInitialContext();
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" },
+                           { namespaceURI: null, localName: "lang" }];
+   this.inXHTMLMode = false;
+   this.inHTMLMode = true;
+}
+
+RDFaProcessor.prototype.setXHTMLContext = function() {
+
+   this.setInitialContext();
+   
+   this.inXHTMLMode = true;
+   this.inHTMLMode = false;
+   
+   this.langAttributes = [ { namespaceURI: "http://www.w3.org/XML/1998/namespace", localName: "lang" },
+                           { namespaceURI: null, localName: "lang" }];
+
+   // From http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1
+   this.target.graph.terms["alternate"] = "http://www.w3.org/1999/xhtml/vocab#alternate";
+   this.target.graph.terms["appendix"] = "http://www.w3.org/1999/xhtml/vocab#appendix";
+   this.target.graph.terms["bookmark"] = "http://www.w3.org/1999/xhtml/vocab#bookmark";
+   this.target.graph.terms["cite"] = "http://www.w3.org/1999/xhtml/vocab#cite"
+   this.target.graph.terms["chapter"] = "http://www.w3.org/1999/xhtml/vocab#chapter";
+   this.target.graph.terms["contents"] = "http://www.w3.org/1999/xhtml/vocab#contents";
+   this.target.graph.terms["copyright"] = "http://www.w3.org/1999/xhtml/vocab#copyright";
+   this.target.graph.terms["first"] = "http://www.w3.org/1999/xhtml/vocab#first";
+   this.target.graph.terms["glossary"] = "http://www.w3.org/1999/xhtml/vocab#glossary";
+   this.target.graph.terms["help"] = "http://www.w3.org/1999/xhtml/vocab#help";
+   this.target.graph.terms["icon"] = "http://www.w3.org/1999/xhtml/vocab#icon";
+   this.target.graph.terms["index"] = "http://www.w3.org/1999/xhtml/vocab#index";
+   this.target.graph.terms["last"] = "http://www.w3.org/1999/xhtml/vocab#last";
+   this.target.graph.terms["license"] = "http://www.w3.org/1999/xhtml/vocab#license";
+   this.target.graph.terms["meta"] = "http://www.w3.org/1999/xhtml/vocab#meta";
+   this.target.graph.terms["next"] = "http://www.w3.org/1999/xhtml/vocab#next";
+   this.target.graph.terms["prev"] = "http://www.w3.org/1999/xhtml/vocab#prev";
+   this.target.graph.terms["previous"] = "http://www.w3.org/1999/xhtml/vocab#previous";
+   this.target.graph.terms["section"] = "http://www.w3.org/1999/xhtml/vocab#section";
+   this.target.graph.terms["stylesheet"] = "http://www.w3.org/1999/xhtml/vocab#stylesheet";
+   this.target.graph.terms["subsection"] = "http://www.w3.org/1999/xhtml/vocab#subsection";
+   this.target.graph.terms["start"] = "http://www.w3.org/1999/xhtml/vocab#start";
+   this.target.graph.terms["top"] = "http://www.w3.org/1999/xhtml/vocab#top";
+   this.target.graph.terms["up"] = "http://www.w3.org/1999/xhtml/vocab#up";
+   this.target.graph.terms["p3pv1"] = "http://www.w3.org/1999/xhtml/vocab#p3pv1";
+
+   // other
+   this.target.graph.terms["related"] = "http://www.w3.org/1999/xhtml/vocab#related";
+   this.target.graph.terms["role"] = "http://www.w3.org/1999/xhtml/vocab#role";
+   this.target.graph.terms["transformation"] = "http://www.w3.org/1999/xhtml/vocab#transformation";
+}
+
+RDFaProcessor.prototype.init = function() {
+}
+
+RDFaProcessor.prototype.newSubjectOrigin = function(origin,subject) {
+}
+
+RDFaProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+}
+
+RDFaProcessor.dateTimeTypes = [
+   { pattern: /-?P(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+(?:\.[0-9]+)?S)?)?/,
+     type: "http://www.w3.org/2001/XMLSchema#duration" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9]T(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#dateTime" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]-[0-9][0-9](?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#date" },
+   { pattern: /(?:[0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9](?:\.[0-9]+)?(?:Z|[+\-][0-9][0-9]:[0-9][0-9])?/,
+     type: "http://www.w3.org/2001/XMLSchema#time" },
+   { pattern: /-?(?:[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9])-[0-9][0-9]/,
+     type: "http://www.w3.org/2001/XMLSchema#gYearMonth" },
+   { pattern: /-?[1-9][0-9][0-9][0-9]|0[1-9][0-9][0-9]|00[1-9][0-9]|000[1-9]/,
+     type: "http://www.w3.org/2001/XMLSchema#gYear" }
+];
+
+RDFaProcessor.deriveDateTimeType = function(value) {
+   for (var i=0; i<RDFaProcessor.dateTimeTypes.length; i++) {
+      //console.log("Checking "+value+" against "+RDFaProcessor.dateTimeTypes[i].type);
+      var matched = RDFaProcessor.dateTimeTypes[i].pattern.exec(value);
+      if (matched && matched[0].length==value.length) {
+         //console.log("Matched!");
+         return RDFaProcessor.dateTimeTypes[i].type;
+      }
+   }
+   return null;
+}
+
+RDFaProcessor.prototype.process = function(node,options) {
+
+   /*
+   if (!window.console) {
+      window.console = { log: function() {} };
+   }*/
+   if (node.nodeType==Node.DOCUMENT_NODE) {
+      node = node.documentElement;
+      this.setContext(node);
+   } else if (node.parentNode.nodeType==Node.DOCUMENT_NODE) {
+      this.setContext(node);
+   } 
+   var queue = [];
+   // Fix for Firefox that includes the hash in the base URI
+   var removeHash = function(baseURI) {
+      var hash = baseURI.indexOf("#");
+      if (hash>=0) {
+         baseURI = baseURI.substring(0,hash);
+      }
+      if (options && options.baseURIMap) {
+         baseURI = options.baseURIMap(baseURI);
+      }
+      return baseURI;
+   }
+   queue.push({ current: node, context: this.push(null,removeHash(node.baseURI))});
+   while (queue.length>0) {
+      var item = queue.shift();
+      if (item.parent) {
+         // Sequence Step 14: list triple generation
+         if (item.context.parent && item.context.parent.listMapping==item.listMapping) {
+            // Skip a child context with exactly the same mapping
+            continue;
+         }
+         //console.log("Generating lists for "+item.subject+", tag "+item.parent.localName);
+         for (var predicate in item.listMapping) {
+            var list = item.listMapping[predicate];
+            if (list.length==0) {
+               this.addTriple(item.parent,item.subject,predicate,{ type: RDFaProcessor.objectURI, value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" });
+               continue;
+            }
+            var bnodes = [];
+            for (var i=0; i<list.length; i++) {
+               bnodes.push(this.newBlankNode());
+               //this.newSubject(item.parent,bnodes[i]);
+            }
+            for (var i=0; i<bnodes.length; i++) {
+               this.addTriple(item.parent,bnodes[i],"http://www.w3.org/1999/02/22-rdf-syntax-ns#first",list[i]);
+               this.addTriple(item.parent,bnodes[i],"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",{ type: RDFaProcessor.objectURI , value: (i+1)<bnodes.length ? bnodes[i+1] : "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" });
+            }
+            this.addTriple(item.parent,item.subject,predicate,{ type: RDFaProcessor.objectURI, value: bnodes[0] });
+         }
+         continue;
+      }
+      var current = item.current;
+      var context = item.context;
+
+      //console.log("Tag: "+current.localName+", listMapping="+JSON.stringify(context.listMapping));
+
+      // Sequence Step 1
+      var skip = false;
+      var newSubject = null;
+      var currentObjectResource = null;
+      var typedResource = null;
+      var prefixes = context.prefixes;
+      var prefixesCopied = false;
+      var incomplete = [];
+      var listMapping = context.listMapping;
+      var listMappingDifferent = context.parent ? false : true;
+      var language = context.language;
+      var vocabulary = context.vocabulary;
+
+      // TODO: the "base" element may be used for HTML+RDFa 1.1
+      var base = this.parseURI(removeHash(current.baseURI));
+      current.item = null;
+
+      // Sequence Step 2: set the default vocabulary
+      var vocabAtt = current.getAttributeNode("vocab");
+      if (vocabAtt) {
+         var value = RDFaProcessor.trim(vocabAtt.value);
+         if (value.length>0) {
+            vocabulary = value;
+            var baseSubject = base.spec;
+            //this.newSubject(current,baseSubject);
+            this.addTriple(current,baseSubject,"http://www.w3.org/ns/rdfa#usesVocabulary",{ type: RDFaProcessor.objectURI , value: vocabulary});
+         } else {
+            vocabulary = this.vocabulary;
+         }
+      }
+
+      // Sequence Step 3: IRI mappings
+      // handle xmlns attributes
+      for (var i=0; i<current.attributes.length; i++) {
+         var att = current.attributes[i];
+         //if (att.namespaceURI=="http://www.w3.org/2000/xmlns/") {
+         if (att.nodeName.charAt(0)=="x" && att.nodeName.indexOf("xmlns:")==0) {
+            if (!prefixesCopied) {
+               prefixes = this.copyMappings(prefixes);
+               prefixesCopied = true;
+            }
+            var prefix = att.nodeName.substring(6);
+            // TODO: resolve relative?
+            var ref = RDFaProcessor.trim(att.value);
+            prefixes[prefix] = this.target.baseURI ? this.target.baseURI.resolve(ref) : ref;
+         }
+      }
+      // Handle prefix mappings (@prefix)
+      var prefixAtt = current.getAttributeNode("prefix");
+      if (prefixAtt) {
+         if (!prefixesCopied) {
+            prefixes = this.copyMappings(prefixes);
+            prefixesCopied = true;
+         }
+         this.parsePrefixMappings(prefixAtt.value,prefixes);
+      }
+
+
+      // Sequence Step 4: language
+      var xmlLangAtt = null;
+      for (var i=0; !xmlLangAtt && i<this.langAttributes.length; i++) {
+         xmlLangAtt = current.getAttributeNodeNS(this.langAttributes[i].namespaceURI,this.langAttributes[i].localName);
+      }
+      if (xmlLangAtt) {
+         var value = RDFaProcessor.trim(xmlLangAtt.value);
+         if (value.length>0) {
+            language = value;
+         } else {
+            language = null;
+         }
+      }
+
+      var relAtt = current.getAttributeNode("rel");
+      var revAtt = current.getAttributeNode("rev");
+      var typeofAtt = current.getAttributeNode("typeof");
+      var propertyAtt = current.getAttributeNode("property");
+      var datatypeAtt = current.getAttributeNode("datatype");
+      var datetimeAtt = this.inHTMLMode ? current.getAttributeNode("datetime") : null;
+      var contentAtt = current.getAttributeNode("content");
+      var aboutAtt = current.getAttributeNode("about");
+      var srcAtt = current.getAttributeNode("src");
+      var resourceAtt = current.getAttributeNode("resource");
+      var hrefAtt = current.getAttributeNode("href");
+      var inlistAtt = current.getAttributeNode("inlist");
+      
+      var relAttPredicates = [];
+      if (relAtt) {
+         var values = this.tokenize(relAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base,this.inHTMLMode && propertyAtt!=null);
+            if (predicate) {
+               relAttPredicates.push(predicate);
+            }
+         }
+      }
+      var revAttPredicates = [];
+      if (revAtt) {
+         var values = this.tokenize(revAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base,this.inHTMLMode && propertyAtt!=null);
+            if (predicate) {
+               revAttPredicates.push(predicate);
+            }
+         }
+      }
+      
+      // Section 3.1, bullet 7
+      if (this.inHTMLMode && (relAtt!=null || revAtt!=null) && propertyAtt!=null) {
+         if (relAttPredicates.length==0) {
+            relAtt = null;
+         }
+         if (revAttPredicates.length==0) {
+            revAtt = null;
+         }
+      }
+
+      if (relAtt || revAtt) {
+         // Sequence Step 6: establish new subject and value
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+         }
+         if (typeofAtt) {
+            typedResource = newSubject;
+         }
+         if (!newSubject) {
+            if (current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+               newSubject = removeHash(current.baseURI);
+            } else if (context.parentObject) {
+               // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+            }
+         }
+         if (resourceAtt) {
+            currentObjectResource = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+         }
+         
+         if (!currentObjectResource) {
+            if (hrefAtt) {
+               currentObjectResource = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            } else if (srcAtt) {
+               currentObjectResource = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            } else if (typeofAtt && !aboutAtt && !(this.inXHTMLMode && (current.localName=="head" || current.localName=="body"))) {
+               currentObjectResource = this.newBlankNode();
+            }
+         }
+         if (typeofAtt && !aboutAtt && this.inXHTMLMode && (current.localName=="head" || current.localName=="body")) {
+            typedResource = newSubject;
+         } else if (typeofAtt && !aboutAtt) {
+            typedResource = currentObjectResource;
+         }
+
+      } else if (propertyAtt && !contentAtt && !datatypeAtt) {
+         // Sequence Step 5.1: establish a new subject
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+            if (typeofAtt) {
+               typedResource = newSubject;
+            }
+         }
+         if (!newSubject && current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+            newSubject = removeHash(current.baseURI);
+            if (typeofAtt) {
+               typedResource = newSubject;
+            }
+         } else if (!newSubject && context.parentObject) {
+            // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+            newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+         }
+         if (typeofAtt && !typedResource) {
+            if (resourceAtt) {
+               typedResource = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+            }
+            if (!typedResource &&hrefAtt) {
+               typedResource = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            }
+            if (!typedResource && srcAtt) {
+               typedResource = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            }
+            if (!typedResource && (this.inXHTMLMode || this.inHTMLMode) && (current.localName=="head" || current.localName=="body")) {
+               typedResource = newSubject;
+            }
+            if (!typedResource) {
+               typedResource = this.newBlankNode();
+            }
+            currentObjectResource = typedResource;
+         }
+         //console.log(current.localName+", newSubject="+newSubject+", typedResource="+typedResource+", currentObjectResource="+currentObjectResource);
+      } else {
+         // Sequence Step 5.2: establish a new subject
+         if (aboutAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(aboutAtt.value,prefixes,base);
+         }
+         if (!newSubject && resourceAtt) {
+            newSubject = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+         }
+         if (!newSubject && hrefAtt) {
+            newSubject = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+         }
+         if (!newSubject && srcAtt) {
+            newSubject = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+         }
+         if (!newSubject) {
+            if (current.parentNode.nodeType==Node.DOCUMENT_NODE) {
+               newSubject = removeHash(current.baseURI);
+            } else if ((this.inXHTMLMode || this.inHTMLMode) && (current.localName=="head" || current.localName=="body")) {
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+            } else if (typeofAtt) {
+               newSubject = this.newBlankNode();
+            } else if (context.parentObject) {
+               // TODO: Verify: If the xml:base has been set and the parentObject is the baseURI of the parent, then the subject needs to be the new base URI
+               newSubject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+               if (!propertyAtt) {
+                  skip = true;
+               }
+            }
+         }
+         if (typeofAtt) {
+            typedResource = newSubject;
+         }
+      }
+
+      //console.log(current.tagName+": newSubject="+newSubject+", currentObjectResource="+currentObjectResource+", typedResource="+typedResource+", skip="+skip);
+
+      var rdfaData = null;
+      if (newSubject) {
+         //this.newSubject(current,newSubject);
+         if (aboutAtt || resourceAtt || typedResource) {
+            var id = newSubject;
+            if (typeofAtt && !aboutAtt && !resourceAtt && currentObjectResource) {
+               id = currentObjectResource;
+            }
+            //console.log("Setting data attribute for "+current.localName+" for subject "+id);
+            this.newSubjectOrigin(current,id);
+         }
+      }
+      
+      // Sequence Step 7: generate type triple
+      if (typedResource) {
+         var values = this.tokenize(typeofAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var object = this.parseTermOrCURIEOrAbsURI(values[i],vocabulary,context.terms,prefixes,base);
+            if (object) {
+               this.addTriple(current,typedResource,RDFaProcessor.typeURI,{ type: RDFaProcessor.objectURI , value: object});
+            }
+         }
+      }
+
+      // Sequence Step 8: new list mappings if there is a new subject
+      //console.log("Step 8: newSubject="+newSubject+", context.parentObject="+context.parentObject);
+      if (newSubject && newSubject!=context.parentObject) {
+         //console.log("Generating new list mapping for "+newSubject);
+         listMapping = {};
+         listMappingDifferent = true;
+      }
+
+      // Sequence Step 9: generate object triple
+      if (currentObjectResource) {
+         if (relAtt && inlistAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               var list = listMapping[relAttPredicates[i]];
+               if (!list) {
+                  list = [];
+                  listMapping[relAttPredicates[i]] = list;
+               }
+               list.push({ type: RDFaProcessor.objectURI, value: currentObjectResource });
+            }
+         } else if (relAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               this.addTriple(current,newSubject,relAttPredicates[i],{ type: RDFaProcessor.objectURI, value: currentObjectResource});
+            }
+         }
+         if (revAtt) {
+            for (var i=0; i<revAttPredicates.length; i++) {
+               this.addTriple(current,currentObjectResource, revAttPredicates[i], { type: RDFaProcessor.objectURI, value: newSubject});
+            }
+         }
+      } else {
+         // Sequence Step 10: incomplete triples
+         if (newSubject && !currentObjectResource && (relAtt || revAtt)) {
+            currentObjectResource = this.newBlankNode();
+            //alert(current.tagName+": generated blank node, newSubject="+newSubject+" currentObjectResource="+currentObjectResource);
+         }
+         if (relAtt && inlistAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               var list = listMapping[relAttPredicates[i]];
+               if (!list) {
+                  list = [];
+                  listMapping[predicate] = list;
+               }
+               //console.log("Adding incomplete list for "+predicate);
+               incomplete.push({ predicate: relAttPredicates[i], list: list });
+            }
+         } else if (relAtt) {
+            for (var i=0; i<relAttPredicates.length; i++) {
+               incomplete.push({ predicate: relAttPredicates[i], forward: true });
+            }
+         }
+         if (revAtt) {
+            for (var i=0; i<revAttPredicates.length; i++) {
+               incomplete.push({ predicate: revAttPredicates[i], forward: false });
+            }
+         }
+      }
+
+      // Step 11: Current property values
+      if (propertyAtt) {
+         var datatype = null;
+         var content = null; 
+         if (datatypeAtt) {
+            datatype = datatypeAtt.value=="" ? RDFaProcessor.PlainLiteralURI : this.parseTermOrCURIEOrAbsURI(datatypeAtt.value,vocabulary,context.terms,prefixes,base);
+            if (datetimeAtt && !contentAtt) {
+               content = datetimeAtt.value;
+            } else {
+               content = datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI ? null : (contentAtt ? contentAtt.value : current.textContent);
+            }
+         } else if (contentAtt) {
+            datatype = RDFaProcessor.PlainLiteralURI;
+            content = contentAtt.value;
+         } else if (datetimeAtt) {
+            content = datetimeAtt.value;
+            datatype = RDFaProcessor.deriveDateTimeType(content);
+            if (!datatype) {
+               datatype = RDFaProcessor.PlainLiteralURI;
+            }
+         } else if (!relAtt && !revAtt) {
+            if (resourceAtt) {
+               content = this.parseSafeCURIEOrCURIEOrURI(resourceAtt.value,prefixes,base);
+            }
+            if (!content && hrefAtt) {
+               content = this.resolveAndNormalize(base,encodeURI(hrefAtt.value));
+            } else if (!content && srcAtt) {
+               content = this.resolveAndNormalize(base,encodeURI(srcAtt.value));
+            }
+            if (content) {
+               datatype = RDFaProcessor.objectURI;
+            }
+         }
+         if (!datatype) {
+            if (typeofAtt && !aboutAtt) {
+               datatype = RDFaProcessor.objectURI;
+               content = typedResource;
+            } else {
+               content = current.textContent;
+               if (this.inHTMLMode && current.localName=="time") {
+                  datatype = RDFaProcessor.deriveDateTimeType(content);
+               }
+               if (!datatype) {
+                  datatype = RDFaProcessor.PlainLiteralURI;
+               }
+            }
+         }
+         var values = this.tokenize(propertyAtt.value);
+         for (var i=0; i<values.length; i++) {
+            var predicate = this.parsePredicate(values[i],vocabulary,context.terms,prefixes,base);
+            if (predicate) {
+               if (inlistAtt) {
+                  var list = listMapping[predicate];
+                  if (!list) {
+                     list = [];
+                     listMapping[predicate] = list;
+                  }
+                  list.push((datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI) ? { type: datatype, value: current.childNodes} : { type: datatype ? datatype : RDFaProcessor.PlainLiteralURI, value: content, language: language});
+               } else {
+                  if (datatype==RDFaProcessor.XMLLiteralURI || datatype==RDFaProcessor.HTMLLiteralURI) {
+                     this.addTriple(current,newSubject,predicate,{ type: datatype, value: current.childNodes});
+                  } else {
+                     this.addTriple(current,newSubject,predicate,{ type: datatype ? datatype : RDFaProcessor.PlainLiteralURI, value: content, language: language});
+                     //console.log(newSubject+" "+predicate+"="+content);
+                  }
+               }
+            }
+         }
+      }
+
+      // Sequence Step 12: complete incomplete triples with new subject
+      if (newSubject && !skip) {
+         for (var i=0; i<context.incomplete.length; i++) {
+            if (context.incomplete[i].list) {
+               //console.log("Adding subject "+newSubject+" to list for "+context.incomplete[i].predicate);
+               // TODO: it is unclear what to do here
+               context.incomplete[i].list.push({ type: RDFaProcessor.objectURI, value: newSubject });
+            } else if (context.incomplete[i].forward) {
+               //console.log(current.tagName+": completing forward triple "+context.incomplete[i].predicate+" with object="+newSubject);
+               this.addTriple(current,context.subject,context.incomplete[i].predicate, { type: RDFaProcessor.objectURI, value: newSubject});
+            } else {
+               //console.log(current.tagName+": completing reverse triple with object="+context.subject);
+               this.addTriple(current,newSubject,context.incomplete[i].predicate,{ type: RDFaProcessor.objectURI, value: context.subject});
+            }
+         }
+      }
+
+      var childContext = null;
+      var listSubject = newSubject;
+      if (skip) {
+         // TODO: should subject be null?
+         childContext = this.push(context,context.subject);
+         // TODO: should the entObject be passed along?  If not, then intermediary children will keep properties from being associated with incomplete triples.
+         // TODO: Verify: if the current baseURI has changed and the parentObject is the parent's base URI, then the baseURI should change
+         childContext.parentObject = removeHash(current.parentNode.baseURI)==context.parentObject ? removeHash(current.baseURI) : context.parentObject;
+         childContext.incomplete = context.incomplete;
+         childContext.language = language;
+         childContext.prefixes = prefixes;
+         childContext.vocabulary = vocabulary;
+      } else {
+         childContext = this.push(context,newSubject);
+         childContext.parentObject = currentObjectResource ? currentObjectResource : (newSubject ? newSubject : context.subject);
+         childContext.prefixes = prefixes;
+         childContext.incomplete = incomplete;
+         if (currentObjectResource) {
+            //console.log("Generating new list mapping for "+currentObjectResource);
+            listSubject = currentObjectResource;
+            listMapping = {};
+            listMappingDifferent = true;
+         }
+         childContext.listMapping = listMapping;
+         childContext.language = language;
+         childContext.vocabulary = vocabulary;
+      }
+      if (listMappingDifferent) {
+         //console.log("Pushing list parent "+current.localName);
+         queue.unshift({ parent: current, context: context, subject: listSubject, listMapping: listMapping});
+      }
+      for (var child = current.lastChild; child; child = child.previousSibling) {
+         if (child.nodeType==Node.ELEMENT_NODE) {
+            //console.log("Pushing child "+child.localName);
+            queue.unshift({ current: child, context: childContext});
+         }
+      }
+   }
+   
+   if (this.inHTMLMode) {
+      this.copyProperties();
+   }
+
+   for (var i=0; i<this.finishedHandlers.length; i++) {
+      this.finishedHandlers[i](node);
+   }
+}
+
+RDFaProcessor.prototype.copyProperties = function() {
+}
+
+
+RDFaProcessor.prototype.push = function(parent,subject) {
+   return {
+      parent: parent,
+      subject: subject ? subject : (parent ? parent.subject : null),
+      parentObject: null,
+      incomplete: [],
+      listMapping: parent ? parent.listMapping : {},
+      language: parent ? parent.language : this.language,
+      prefixes: parent ? parent.prefixes : this.target.graph.prefixes,
+      terms: parent ? parent.terms : this.target.graph.terms,
+      vocabulary: parent ? parent.vocabulary : this.vocabulary
+   };
+};
+
+function RDFaGraph()
+{
+   var dataContext = this;
+   this.curieParser = {
+      trim: function(str) {
+         return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+      },
+      parse: function(value,resolve) {
+         value = this.trim(value);
+         if (value.charAt(0)=='[' && value.charAt(value.length-1)==']') {
+            value = value.substring(1,value.length-1);
+         }
+         var colon = value.indexOf(":");
+         if (colon>=0) {
+            var prefix = value.substring(0,colon);
+            if (prefix=="") {
+               // default prefix
+               var uri = dataContext.prefixes[""];
+               return uri ? uri+value.substring(colon+1) : null;
+            } else if (prefix=="_") {
+               // blank node
+               return "_:"+value.substring(colon+1);
+            } else if (DocumentData.NCNAME.test(prefix)) {
+               var uri = dataContext.prefixes[prefix];
+               if (uri) {
+                  return uri+value.substring(colon+1);
+               }
+            }
+         }
+
+         return resolve ? dataContext.baseURI.resolve(value) : value;
+      }
+   };
+   this.base =  null;
+   this.toString = function(requestOptions) {
+      var options = requestOptions && requestOptions.shorten ? { graph: this, shorten: true, prefixesUsed: {} } : null;
+      if (requestOptions && requestOptions.blankNodePrefix) {
+         options.filterBlankNode = function(id) {
+            return "_:"+requestOptions.blankNodePrefix+id.substring(2);
+         }
+      }
+      if (requestOptions && requestOptions.numericalBlankNodePrefix) {
+         var onlyNumbers = /^[0-9]+$/;
+         options.filterBlankNode = function(id) {
+            var label = id.substring(2);
+            return onlyNumbers.test(label) ? "_:"+requestOptions.numericalBlankNodePrefix+label : id;
+         }
+      }
+      s = "";
+      for (var subject in this.subjects) {
+         var snode = this.subjects[subject];
+         s += snode.toString(options);
+         s += "\n";
+      }
+      var prolog = requestOptions && requestOptions.baseURI ? "@base <"+baseURI+"> .\n" : "";
+      if (options && options.shorten) {
+         for (var prefix in options.prefixesUsed) {
+            prolog += "@prefix "+prefix+": <"+this.prefixes[prefix]+"> .\n";
+         }
+      }
+      return prolog.length==0 ? s : prolog+"\n"+s;
+   };
+   this.blankNodeCounter = 0;
+   this.clear = function() {
+      this.subjects = {};
+      this.prefixes = {};
+      this.terms = {};
+      this.blankNodeCounter = 0;
+   }
+   this.clear();
+   this.prefixes[""] = "http://www.w3.org/1999/xhtml/vocab#";
+
+   // w3c
+   this.prefixes["grddl"] = "http://www.w3.org/2003/g/data-view#";
+   this.prefixes["ma"] = "http://www.w3.org/ns/ma-ont#";
+   this.prefixes["owl"] = "http://www.w3.org/2002/07/owl#";
+   this.prefixes["rdf"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   this.prefixes["rdfa"] = "http://www.w3.org/ns/rdfa#";
+   this.prefixes["rdfs"] = "http://www.w3.org/2000/01/rdf-schema#";
+   this.prefixes["rif"] = "http://www.w3.org/2007/rif#";
+   this.prefixes["skos"] = "http://www.w3.org/2004/02/skos/core#";
+   this.prefixes["skosxl"] = "http://www.w3.org/2008/05/skos-xl#";
+   this.prefixes["wdr"] = "http://www.w3.org/2007/05/powder#";
+   this.prefixes["void"] = "http://rdfs.org/ns/void#";
+   this.prefixes["wdrs"] = "http://www.w3.org/2007/05/powder-s#";
+   this.prefixes["xhv"] = "http://www.w3.org/1999/xhtml/vocab#";
+   this.prefixes["xml"] = "http://www.w3.org/XML/1998/namespace";
+   this.prefixes["xsd"] = "http://www.w3.org/2001/XMLSchema#";
+   // non-rec w3c
+   this.prefixes["sd"] = "http://www.w3.org/ns/sparql-service-description#";
+   this.prefixes["org"] = "http://www.w3.org/ns/org#";
+   this.prefixes["gldp"] = "http://www.w3.org/ns/people#";
+   this.prefixes["cnt"] = "http://www.w3.org/2008/content#";
+   this.prefixes["dcat"] = "http://www.w3.org/ns/dcat#";
+   this.prefixes["earl"] = "http://www.w3.org/ns/earl#";
+   this.prefixes["ht"] = "http://www.w3.org/2006/http#";
+   this.prefixes["ptr"] = "http://www.w3.org/2009/pointers#";
+   // widely used
+   this.prefixes["cc"] = "http://creativecommons.org/ns#";
+   this.prefixes["ctag"] = "http://commontag.org/ns#";
+   this.prefixes["dc"] = "http://purl.org/dc/terms/";
+   this.prefixes["dcterms"] = "http://purl.org/dc/terms/";
+   this.prefixes["foaf"] = "http://xmlns.com/foaf/0.1/";
+   this.prefixes["gr"] = "http://purl.org/goodrelations/v1#";
+   this.prefixes["ical"] = "http://www.w3.org/2002/12/cal/icaltzd#";
+   this.prefixes["og"] = "http://ogp.me/ns#";
+   this.prefixes["rev"] = "http://purl.org/stuff/rev#";
+   this.prefixes["sioc"] = "http://rdfs.org/sioc/ns#";
+   this.prefixes["v"] = "http://rdf.data-vocabulary.org/#";
+   this.prefixes["vcard"] = "http://www.w3.org/2006/vcard/ns#";
+   this.prefixes["schema"] = "http://schema.org/";
+   
+   // terms
+   this.terms["describedby"] = "http://www.w3.org/2007/05/powder-s#describedby";
+   this.terms["license"] = "http://www.w3.org/1999/xhtml/vocab#license";
+   this.terms["role"] = "http://www.w3.org/1999/xhtml/vocab#role";
+
+   Object.defineProperty(this,"tripleCount",{
+      enumerable: true,
+      configurable: false,
+      get: function() {
+         var count = 0;
+         for (var s in this.subjects) {
+            var snode = this.subjects[s];
+            for (var p in snode.predicates) {
+               count += snode.predicates[p].objects.length;
+            }
+         }
+         return count;
+      }
+   });
+}
+
+RDFaGraph.prototype.newBlankNode = function() {
+   this.blankNodeCounter++;
+   return "_:"+this.blankNodeCounter;
+}
+
+RDFaGraph.prototype.expand = function(curie) {
+   return this.curieParser.parse(curie,true);  
+}
+
+RDFaGraph.prototype.shorten = function(uri,prefixesUsed) {
+   for (prefix in this.prefixes) {
+      var mapped = this.prefixes[prefix];
+      if (uri.indexOf(mapped)==0) {
+         if (prefixesUsed) {
+            prefixesUsed[prefix] = mapped;
+         }
+         return prefix+":"+uri.substring(mapped.length);
+      }
+   }
+   return null;
+}
+
+RDFaGraph.prototype.add = function(subject,predicate,object,options) {
+   if (!subject || !predicate || !object) {
+      return;
+   }
+   subject = this.expand(subject);
+   predicate = this.expand(predicate);
+   var snode = this.subjects[subject];
+   if (!snode) {
+      snode = new RDFaSubject(this,subject);
+      this.subjects[subject] = snode;
+   }
+   if (options && options.origin) {
+      snode.origins.push(options.origin);
+   }
+   if (predicate=="http://www.w3.org/1999/02/22-rdf-syntax-ns#type") {
+      snode.types.push(object);
+   }
+   var pnode = snode.predicates[predicate];
+   if (!pnode) {
+      pnode = new RDFaPredicate(predicate);
+      snode.predicates[predicate] = pnode;
+   }
+   
+   if (typeof object == "string") {
+      pnode.objects.push({
+         type: RDFaProcessor.PlainLiteralURI,
+         value: object
+      });
+   } else {
+      pnode.objects.push({
+         type: object.type ? this.expand(object.type) : RDFaProcessor.PlainLiteralURI,
+         value: object.value ? object.value : "",
+         origin: object.origin,
+         language: object.language
+      });
+   }
+   
+}
+
+RDFaGraph.prototype.addCollection = function(subject,predicate,objectList,options) {
+   if (!subject || !predicate || !objectList) {
+      return;
+   }
+   
+   var lastSubject = subject;
+   var lastPredicate = predicate;
+   for (var i=0; i<objectList.length; i++) {
+      var object = { type: options && options.type ? options.type : "rdf:PlainLiteral"};
+      if (options && options.language) {
+         object.language = options.language;
+      }
+      if (options && options.datatype) {
+         object.datatype = options.datatype;
+      }
+      if (typeof objectList[i] == "object") {
+         object.value = objectList[i].value ?  objectList[i].value : "";
+         if (objectList[i].type) {
+            object.type = objectList[i].type;
+         }
+         if (objectList[i].language) {
+            object.language = objectList[i].language;
+         }
+         if (objectList[i].datatype) {
+            object.datatype = objectList[i].datatype;
+         }
+      } else {
+         object.value = objectList[i]
+      }
+      var bnode = this.newBlankNode();
+      this.add(lastSubject,lastPredicate,{ type: "rdf:object", value: bnode});
+      this.add(bnode,"rdf:first",object);
+      lastSubject = bnode;
+      lastPredicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest";
+   }
+   this.add(lastSubject,lastPredicate,{ type: "rdf:object", value: "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"});
+}
+
+RDFaGraph.prototype.remove = function(subject,predicate) {
+   if (!subject) {
+      this.subjects = {};
+      return;
+   }
+   subject = this.expand(subject);
+   var snode = this.subjects[snode];
+   if (!snode) {
+      return;
+   }
+   if (!predicate) {
+      delete this.subjects[subject];
+      return;
+   }
+   predicate = this.expand(predicate);
+   delete snode.predicates[predicate];
+}
+
+function RDFaSubject(graph,subject) {
+   this.graph = graph;
+   // TODO: subject or id?
+   this.subject = subject
+   this.id = subject;
+   this.predicates =  {};
+   this.origins = [];
+   this.types = [];
+}
+
+RDFaSubject.prototype.toString = function(options) {
+   var s = null;
+   if (this.subject.substring(0,2)=="_:") {
+      if (options && options.filterBlankNode) {
+         s = options.filterBlankNode(this.subject);
+      } else {
+         s = this.subject;
+      }
+   } else if (options && options.shorten) {
+      s = this.graph.shorten(this.subject,options.prefixesUsed);
+      if (!s) {
+         s = "<" + this.subject + ">";
+      }
+   } else {
+      s = "<" + this.subject + ">";
+   }
+   var first = true;
+   for (var predicate in this.predicates) {
+      if (!first) {
+         s += ";\n";
+      } else {
+         first = false;
+      }
+      s += " " + this.predicates[predicate].toString(options);
+   }
+   s += " .";
+   return s;
+}
+
+RDFaSubject.prototype.toObject = function() {
+   var o = { subject: this.subject, predicates: {} };
+   for (var predicate in this.predicates) {
+      var pnode = this.predicates[predicate];
+      var p = { predicate: predicate, objects: [] };
+      o.predicates[predicate] = p;
+      for (var i=0; i<pnode.objects.length; i++) {
+         var object = pnode.objects[i];
+         if (object.type==RDFaProcessor.XMLLiteralURI) {
+            var serializer = new XMLSerializer();
+            var value = "";
+            for (var x=0; x<object.value.length; x++) {
+               if (object.value[x].nodeType==Node.ELEMENT_NODE) {
+                  value += serializer.serializeToString(object.value[x]);
+               } else if (object.value[x].nodeType==Node.TEXT_NODE) {
+                  value += object.value[x].nodeValue;
+               }
+            } 
+            p.objects.push({ type: object.type, value: value, language: object.language });
+         } else {
+            p.objects.push({ type: object.type, value: object.value, language: object.language });
+         }
+      }
+   }
+   return o;
+   
+}
+
+RDFaSubject.prototype.getValues = function() {
+   var values = [];
+   for (var i=0; i<arguments.length; i++) {
+      var property = this.graph.curieParser.parse(arguments[i],true)
+      var pnode = this.predicates[property];
+      if (pnode) {
+         for (var j=0; j<pnode.objects.length; j++) {
+            values.push(pnode.objects[j].value);
+         }
+      }
+   }
+   return values;
+}
+
+function RDFaPredicate(predicate) {
+   this.id = predicate;
+   this.predicate = predicate;
+   this.objects = [];
+}
+
+RDFaPredicate.getPrefixMap = function(e) {
+   var prefixMap = {};
+   while (e.attributes) {
+      for (var i=0; i<e.attributes.length; i++) {
+         if (e.attributes[i].namespaceURI=="http://www.w3.org/2000/xmlns/") {
+            var prefix = e.attributes[i].localName;
+            if (e.attributes[i].localName=="xmlns") {
+               prefix = "";
+            }
+            if (!(prefix in prefixMap)) {
+               prefixMap[prefix] = e.attributes[i].nodeValue;
+            }
+         }
+      }
+      e = e.parentNode;
+   }
+   return prefixMap;
+}
+
+RDFaPredicate.prototype.toString = function(options) {
+   var s = null;
+   if (options && options.shorten && options.graph) {
+      s = options.graph.shorten(this.predicate,options.prefixesUsed);
+      if (!s) {
+         s = "<" + this.predicate + ">"
+      }
+   } else {
+      s = "<" + this.predicate + ">"
+   }
+   s += " ";
+   for (var i=0; i<this.objects.length; i++) {
+      if (i>0) {
+         s += ", ";
+      }
+      // TODO: handle HTML literal
+      if (this.objects[i].type=="http://www.w3.org/1999/02/22-rdf-syntax-ns#object") {
+         if (this.objects[i].value.substring(0,2)=="_:") {
+            if (options && options.filterBlankNode) {
+               s += options.filterBlankNode(this.objects[i].value);
+            } else {
+               s += this.objects[i].value;
+            }
+         } else if (options && options.shorten && options.graph) {
+            u = options.graph.shorten(this.objects[i].value,options.prefixesUsed);
+            if (u) {
+               s += u;
+            } else {
+               s += "<" + this.objects[i].value + ">";
+            }
+         } else {
+            s += "<" + this.objects[i].value + ">";
+         }
+      } else if (this.objects[i].type=="http://www.w3.org/2001/XMLSchema#integer" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#decimal" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#double" ||
+                 this.objects[i].type=="http://www.w3.org/2001/XMLSchema#boolean") {
+         s += this.objects[i].value;
+      } else if (this.objects[i].type=="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") {
+         var serializer = new XMLSerializer();
+         var value = "";
+         for (var x=0; x<this.objects[i].value.length; x++) {
+            if (this.objects[i].value[x].nodeType==Node.ELEMENT_NODE) {
+               var prefixMap = RDFaPredicate.getPrefixMap(this.objects[i].value[x]);
+               var prefixes = [];
+               for (var prefix in prefixMap) {
+                  prefixes.push(prefix);
+               }
+               prefixes.sort();
+               var e = this.objects[i].value[x].cloneNode(true);
+               for (var p=0; p<prefixes.length; p++) {
+                  e.setAttributeNS("http://www.w3.org/2000/xmlns/",prefixes[p].length==0 ? "xmlns" : "xmlns:"+prefixes[p],prefixMap[prefixes[p]]);
+               }
+               value += serializer.serializeToString(e);
+            } else if (this.objects[i].value[x].nodeType==Node.TEXT_NODE) {
+               value += this.objects[i].value[x].nodeValue;
+            }
+         }
+         s += '"""'+value.replace(/"""/,"\\\"\\\"\\\"")+'"""^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>';
+      } else {
+         var l = this.objects[i].value;
+         if (l.indexOf("\n")>=0 || l.indexOf("\r")>=0) {
+            s += '"""' + l.replace(/"""/,"\\\"\\\"\\\"") + '"""';
+         } else {
+            s += '"' + l.replace(/"/,"\\\"") + '"';
+         }
+         if (this.objects[i].type!="http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral") {
+             s += "^^<"+this.objects[i].type+">";
+         } else if (this.objects[i].language) {
+             s += "@"+this.objects[i].language;
+         }
+      }
+   }
+   return s;
+}
+GraphRDFaProcessor.prototype = new RDFaProcessor();
+GraphRDFaProcessor.prototype.constructor=RDFaProcessor;
+function GraphRDFaProcessor(target) {
+   RDFaProcessor.call(this,target);
+}
+
+GraphRDFaProcessor.prototype.getObjectSize = function(obj) {
+   var size = 0;
+   for (var key in obj) {
+      if (obj.hasOwnProperty(key)) {
+         size++;
+      }
+   }
+   return size;
+};
+
+
+GraphRDFaProcessor.prototype.init = function() {
+   var thisObj = this;
+   this.finishedHandlers.push(function(node) {
+      for (var subject in thisObj.target.graph.subjects) {
+         var snode = thisObj.target.graph.subjects[subject];
+         if (thisObj.getObjectSize(snode.predicates)==0) {
+            delete thisObj.target.graph.subjects[subject];
+         }
+      }
+   });
+}
+GraphRDFaProcessor.prototype.newBlankNode = function() {
+   return this.target.graph.newBlankNode();
+}
+
+GraphRDFaProcessor.prototype.newSubjectOrigin = function(origin,subject) {
+   var snode = this.newSubject(null,subject);
+   for (var i=0; i<snode.origins.length; i++) {
+      if (snode.origins[i]===origin) {
+         return;
+      }
+   }
+   snode.origins.push(origin);
+   if (!origin.data) {
+      Object.defineProperty(origin,"data", {
+            value: snode,
+            writable: false,
+            configurable: true,
+            enumerable: true
+         });
+   }
+}
+
+GraphRDFaProcessor.prototype.newSubject = function(origin,subject) {
+   var snode = this.target.graph.subjects[subject];
+   if (!snode) {
+      snode = new RDFaSubject(this.target.graph,subject);
+      this.target.graph.subjects[subject] = snode;
+   }
+   return snode;
+}
+
+
+GraphRDFaProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+   var snode = this.newSubject(origin,subject);
+   var pnode = snode.predicates[predicate];
+   if (!pnode) {
+      pnode = new RDFaPredicate(predicate);
+      snode.predicates[predicate] = pnode;
+   }
+
+   for (var i=0; i<pnode.objects.length; i++) {
+      if (pnode.objects[i].type==object.type && pnode.objects[i].value==object.value) {
+         if (pnode.objects[i].origin!==origin) {
+            if (!Array.isArray(pnode.objects[i].origin)) {
+               var origins = [];
+               origins.push(pnode.objects[i].origin);
+               pnode.objects[i].origin = origins;
+            }
+            pnode.objects[i].origin.push(origin);
+         }
+         return;
+      }
+   }
+   pnode.objects.push(object);   
+   object.origin = origin;
+   if (predicate==RDFaProcessor.typeURI) {
+      snode.types.push(object.value);
+   }
+}
+
+GraphRDFaProcessor.rdfaCopyPredicate = "http://www.w3.org/ns/rdfa#copy";
+GraphRDFaProcessor.rdfaPatternType = "http://www.w3.org/ns/rdfa#Pattern";
+
+GraphRDFaProcessor.prototype.copyProperties = function() {
+   var copySubjects = [];
+   var patternSubjects = {};
+   for (var subject in this.target.graph.subjects) {
+      var snode = this.target.graph.subjects[subject];
+      var pnode = snode.predicates[GraphRDFaProcessor.rdfaCopyPredicate];
+      if (!pnode) {
+         continue;
+      }
+      copySubjects.push(subject);
+      for (var i=0; i<pnode.objects.length; i++) {
+         if (pnode.objects[i].type!=RDFaProcessor.objectURI) {
+            continue;
+         }
+         var target = pnode.objects[i].value;
+         var patternSubjectNode = this.target.graph.subjects[target];
+         if (!patternSubjectNode) {
+            continue;
+         }
+         var patternTypes = patternSubjectNode.predicates[RDFaProcessor.typeURI];
+         if (!patternTypes) {
+            continue;
+         }
+         var isPattern = false;
+         for (var j=0; j<patternTypes.objects.length && !isPattern; j++) {
+            if (patternTypes.objects[j].value==GraphRDFaProcessor.rdfaPatternType && 
+                patternTypes.objects[j].type==RDFaProcessor.objectURI) {
+               isPattern = true;
+            }
+         }
+         if (!isPattern) {
+            continue;
+         }
+         patternSubjects[target] = true;
+         for (var predicate in patternSubjectNode.predicates) {
+            var targetPNode = patternSubjectNode.predicates[predicate];
+            if (predicate==RDFaProcessor.typeURI) {
+               if (targetPNode.objects.length==1) {
+                  continue;
+               }
+               for (var j=0; j<targetPNode.objects.length; j++) {
+                  if (targetPNode.objects[j].value!=GraphRDFaProcessor.rdfaPatternType) {
+                      var subjectPNode = snode.predicates[predicate];
+                      if (!subjectPNode) {
+                         subjectPNode = new RDFaPredicate(predicate);
+                         snode.predicates[predicate] = subjectPNode;
+                      }
+                      subjectPNode.objects.push(
+                         { type: targetPNode.objects[j].type, 
+                           value: targetPNode.objects[j].value, 
+                           language: targetPNode.objects[j].language, 
+                           origin: targetPNode.objects[j].origin}
+                      );
+                      snode.types.push(targetPNode.objects[j].value);
+                  }
+               }
+            } else {
+               var subjectPNode = snode.predicates[predicate];
+               if (!subjectPNode) {
+                  subjectPNode = new RDFaPredicate(predicate);
+                  snode.predicates[predicate] = subjectPNode;
+               }
+               for (var j=0; j<targetPNode.objects.length; j++) {
+                   subjectPNode.objects.push(
+                      { type: targetPNode.objects[j].type, 
+                        value: targetPNode.objects[j].value, 
+                        language: targetPNode.objects[j].language, 
+                        origin: targetPNode.objects[j].origin}
+                   );
+               }
+            }
+         }
+      }
+   }
+   for (var i=0; i<copySubjects.length; i++) {
+      var snode = this.target.graph.subjects[copySubjects[i]];
+      delete snode.predicates[GraphRDFaProcessor.rdfaCopyPredicate];
+   }
+   for (var subject in patternSubjects) {
+      delete this.target.graph.subjects[subject];
+   }
+}
+


[12/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/LICENSE
----------------------------------------------------------------------
diff --git a/platform/mail/LICENSE b/platform/mail/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/mail/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/pom.xml
----------------------------------------------------------------------
diff --git a/platform/mail/pom.xml b/platform/mail/pom.xml
new file mode 100644
index 0000000..97cbcee
--- /dev/null
+++ b/platform/mail/pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.mail</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Mail Deliverly</name>
+    <description>Provides services for mail deliverly</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <artifactId>mail</artifactId>
+            <groupId>javax.mail</groupId>
+            <version>1.4.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/GraphNodeDataHandler.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/GraphNodeDataHandler.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/GraphNodeDataHandler.java
new file mode 100644
index 0000000..6e23e9e
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/GraphNodeDataHandler.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.mail;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+
+import javax.activation.CommandInfo;
+import javax.activation.CommandMap;
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import org.apache.clerezza.platform.typerendering.Renderer;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * 
+ * @author mir
+ */
+public class GraphNodeDataHandler extends DataHandler{
+
+    private GraphNode graphNode;
+    private Renderer renderer;
+    
+    
+    public GraphNodeDataHandler(GraphNode graphNode,
+            Renderer renderer) {
+        super(null, null);
+        this.graphNode = graphNode;
+        this.renderer = renderer;
+    }
+    
+
+    @Override
+    public CommandInfo[] getAllCommands() {
+        throw new UnsupportedOperationException("Operation not supported 1");
+    }
+
+    @Override
+    public Object getBean(CommandInfo arg0) {
+        throw new UnsupportedOperationException("Operation not supported 2");
+    }
+
+    @Override
+    public CommandInfo getCommand(String arg0) {
+        throw new UnsupportedOperationException("Operation not supported 3");
+    }
+
+    @Override
+    public Object getContent() throws IOException {
+        throw new UnsupportedOperationException("Operation not supported 4");
+    }
+
+    @Override
+    public String getContentType() {
+        return renderer.getMediaType().toString();
+    }
+
+    @Override
+    public DataSource getDataSource() {
+        throw new UnsupportedOperationException("Operation not supported 6");
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        throw new UnsupportedOperationException("Operation not supported 7");
+    }
+
+    @Override
+    public String getName() {
+        return null;
+    }
+
+    @Override
+    public OutputStream getOutputStream() throws IOException {
+        throw new UnsupportedOperationException("Operation not supported 9");
+    }
+
+    @Override
+    public CommandInfo[] getPreferredCommands() {
+        throw new UnsupportedOperationException("Operation not supported 10");
+    }
+
+    @Override
+    public Object getTransferData(DataFlavor arg0)
+            throws UnsupportedFlavorException, IOException {
+        throw new UnsupportedOperationException("Operation not supported 11");
+    }
+
+    @Override
+    public synchronized DataFlavor[] getTransferDataFlavors() {
+        throw new UnsupportedOperationException("Operation not supported 12");
+    }
+
+    @Override
+    public boolean isDataFlavorSupported(DataFlavor arg0) {
+        throw new UnsupportedOperationException("Operation not supported 13");
+    }
+
+    @Override
+    public synchronized void setCommandMap(CommandMap arg0) {
+        throw new UnsupportedOperationException("Operation not supported 14");
+    }
+
+    @Override
+    public void writeTo(OutputStream os) throws IOException {
+        renderer.render(graphNode, null, null, null, null, null, new HashMap<String, Object>(), os);
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailMan.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailMan.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailMan.java
new file mode 100644
index 0000000..4699c4d
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailMan.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.mail;
+
+import java.util.List;
+import javax.mail.MessagingException;
+import javax.mail.internet.InternetAddress;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+
+/**
+ * Implementations provide methods for sending emails, in particular to platform
+ * users.
+ * 
+ * @author mir
+ */
+public interface MailMan {
+
+    /**
+     * Sends the specified message to the email address of the specified platform
+     * user toUser. As sender address the email address of the fromUser is used.
+     * The subject of the email will be the specified subject.
+     * @param fromUser the user, which email address will be used as sender address ("from")
+     * @param toUser the user to whose email address the message will be sent ("to")
+     * @param subject the subject of the email
+     * @param message the message of the email
+     */
+    public void sendEmailToUser(String fromUser, String toUser, String subject,
+            String message) throws MessagingException;
+
+    /**
+     * Sends the rendered <code>GraphNode</code> to the email address of the specified platform
+     * user toUser. As sender address the email address of the fromUser is used.
+     * The subject of the email will be the specified subject.
+     * An appropriate renderer for the <code>GraphNode</code> is selected on the
+     * basis of the specified <code>mode</code>, <code>acceptableMediaTypes</code> 
+     * and the rdf-type of the graph node itself.
+     * The <code>acceptableMediaTypes</code> list represent the media
+     * types that are acceptable for the rendered <code>GraphNode</code>. The list has a
+     * order where the most desirable media type is at the beginning of the list.
+     * The media type of the rendered <code>GraphNode</code> will be compatible to at least one
+     * media types in the list. <code>acceptableMediaTypes</code> and <code>mode</code> can
+     * be null. <code>acceptableMediaTypes = null</code> is equivalent to a list containing
+     * the media type "*\/*".
+     * @param fromUser the user, which email address will be used as sender address ("from")
+     * @param toUser the user to whose email address the message will be sent ("to")
+     * @param subject the subject of the email
+     * @param message the message of the email
+     */
+    public void sendEmailToUser(String fromUser, String toUser, String subject,
+            GraphNode graphNode, List<MediaType> acceptableMediaTypes, String mode)
+            throws MessagingException ;
+
+    /**
+     * Sends the specified message to the email addresses of the specified platform
+     * users toUsers. As sender address the email address of the fromUser is used.
+     * The subject of the email will be the specified subject. A recipient wont
+     * see the addresses or names of other recipients.
+     * @param fromUser the user, which email address will be used as sender address ("from")
+     * @param toUsers the users to whose email addresses the message will be sent ("to")
+     * @param subject the subject of the email
+     * @param graphNode will be rendered and sent as message body
+     * @param acceptableMediaTypes acceptable media types for the rendered output
+     * @param mode the rendering mode
+     */
+    public void sendEmailToUsers(String fromUser, String[] toUsers,String subject,
+            String message) throws MessagingException;
+
+    /**
+     * Sends the rendered <code>GraphNode</code> to the email addresses of the specified platform
+     * users toUsers. As sender address the email address of the fromUser is used.
+     * The subject of the email will be the specified subject. A recipient wont
+     * see the addresses or names of other recipients.
+     * An appropriate renderer for the <code>GraphNode</code> is selected on the
+     * basis of the specified <code>mode</code>, <code>acceptableMediaTypes</code>
+     * and the rdf-type of the graph node itself.
+     * The <code>acceptableMediaTypes</code> list represent the media
+     * types that are acceptable for the rendered <code>GraphNode</code>. The list has a
+     * order where the most desirable media type is at the beginning of the list.
+     * The media type of the rendered <code>GraphNode</code> will be compatible to at least one
+     * media types in the list. <code>acceptableMediaTypes</code> and <code>mode</code> can
+     * be null. <code>acceptableMediaTypes = null</code> is equivalent to a list containing
+     * the media type "*\/*".
+     * @param fromUser the user, which email address will be used as sender address ("from")
+     * @param toUser the user to whose email address the message will be sent ("to")
+     * @param subject the subject of the email
+     * @param graphNode will be rendered and sent as message body
+     * @param acceptableMediaTypes acceptable media types for the rendered output
+     * @param mode the rendering mode
+     */
+    public void sendEmailToUsers(String fromUser, String[] toUsers, String subject,
+            GraphNode graphNode, List<MediaType> acceptableMediaTypes, String mode)
+            throws MessagingException ;
+
+    /**
+     * Sends an message with the specified subject to the specified
+     * <code>Adress</code> to and carbon copies to the <code>Adress<code>es
+     * cc and bcc (Not visible to other recipients). Cc and bcc can be null, all
+     * other parameter has to be specified.
+     * @param from sender address
+     * @param to recipient address
+     * @param cc addresess to which copies of the message will be sent to
+     * @param bcc addreses to which copies of the message will be sent to,
+     * but not visible to other recipients.
+     * @param subject the subject of the message
+     * @param message the message to be sent
+     * @deprecated use javax.mail with the session returned by MailSessionFactory
+     */
+    @Deprecated
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            String message) throws MessagingException;
+
+    /**
+     * Sends an message with the specified subject to the specified
+     * <code>Adress</code> to and carbon copies to the <code>Adress<code>es
+     * cc and bcc (Not visible to other recipients). Cc and bcc can be null, all
+     * other parameter has to be specified.
+     * @author oliver straesser
+     * @param from sender address
+     * @param to recipient address
+     * @param cc addresess to which copies of the message will be sent to
+     * @param bcc addreses to which copies of the message will be sent to,
+     * but not visible to other recipients.
+     * @param subject the subject of the message
+     * @param message the message to be sent
+     * @deprecated use javax.mail with the session returned by MailSessionFactory
+     */
+    @Deprecated
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            String message, String mediaType) throws MessagingException;
+
+    /**
+     * Sends the rendered <code>GraphNode</code> with the specified subject to the specified
+     * <code>Adress</code> to and carbon copies to the <code>Adress<code>es
+     * cc and bcc (Not visible to other recipients). Cc and bcc can be null.
+     * The <code>acceptableMediaTypes</code> list represent the media
+     * types that are acceptable for the rendered <code>GraphNode</code>. The list has a
+     * order where the most desirable media type is at the beginning of the list.
+     * The media type of the rendered <code>GraphNode</code> will be compatible to at least one
+     * media types in the list. <code>acceptableMediaTypes</code> and <code>mode</code> can
+     * be null. <code>acceptableMediaTypes = null</code> is equivalent to a list containing
+     * the media type "*\/*".
+     * @param from sender address
+     * @param to recipient address
+     * @param cc addresess to which copies of the message will be sent to
+     * @param bcc addreses to which copies of the message will be sent to,
+     * but not visible to other recipients.
+     * @param subject the subject of the message
+     * @param graphNode will be rendered and sent as message body
+     * @param acceptableMediaTypes acceptable media types for the rendered output
+     * @param mode the rendering mode
+     */
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            GraphNode graphNode, List<MediaType> acceptableMediaTypes, String mode)
+            throws MessagingException;
+    
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManImpl.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManImpl.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManImpl.java
new file mode 100644
index 0000000..827c39c
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManImpl.java
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.mail;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.platform.typerendering.Renderer;
+import org.apache.clerezza.platform.typerendering.RendererFactory;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.Resource;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.sparql.ParseException;
+import org.apache.clerezza.rdf.core.sparql.QueryParser;
+import org.apache.clerezza.rdf.core.sparql.ResultSet;
+import org.apache.clerezza.rdf.core.sparql.query.SelectQuery;
+import org.apache.clerezza.rdf.ontologies.FOAF;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+
+/**
+ *
+ * Implementation of <code>MailMan</code> providing  utility methods to send
+ * emails rendering GraphNodes
+ *
+ * @author mir, daniel
+ */
+@Component
+@Service(MailMan.class)
+public class MailManImpl implements MailMan {
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    RendererFactory rendererFactory;
+
+    @Reference
+    MailSessionFactory mailSessionFactory;
+
+
+    private static String SYSTEM_GRAPH_URI = "urn:x-localinstance:/system.graph";
+    private UriRef systemGraphUri = new UriRef(SYSTEM_GRAPH_URI);
+
+    @Override
+    public void sendEmailToUser(final String fromUser, final String toUser,
+            final String subject, final String message) throws MessagingException {
+        try {
+            AccessController.checkPermission(new MailManPermission(fromUser, MailManPermission.SEND_FROM));
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+
+                @Override
+                public Object run() throws MessagingException {
+                    InternetAddress fromAddress = getUserAddress(fromUser);
+                    InternetAddress toAddress = getUserAddress(toUser);
+                    sendEmail(fromAddress, toAddress, null, null, subject, message);
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            if (ex.getException() instanceof MessagingException) {
+                throw (MessagingException) ex.getException();
+            } else {
+                throw new RuntimeException(ex.getException());
+            }
+
+        }
+    }
+
+    @Override
+    public void sendEmailToUser(final String fromUser, final String toUser,
+            final String subject, final GraphNode graphNode,
+            final List<MediaType> acceptableMediaTypes, final String mode)
+            throws MessagingException {
+        try {
+            AccessController.checkPermission(
+                    new MailManPermission(fromUser, MailManPermission.SEND_FROM));
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+
+                @Override
+                public Object run() throws MessagingException {
+                    InternetAddress fromAddress = getUserAddress(fromUser);
+                    InternetAddress toAddress = getUserAddress(toUser);
+                    sendEmail(fromAddress, toAddress, null, null, subject, graphNode,
+                            acceptableMediaTypes, mode);
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            if (ex.getException() instanceof MessagingException) {
+                throw (MessagingException) ex.getException();
+            } else {
+                throw new RuntimeException(ex.getException());
+            }
+        }
+    }
+
+    @Override
+    public void sendEmailToUsers(final String fromUser, final String[] toUsers,
+            final String subject, final String message) throws MessagingException {
+
+        try {
+            AccessController.checkPermission(
+                    new MailManPermission(fromUser, MailManPermission.SEND_FROM));
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+
+                @Override
+                public Object run() throws MessagingException {
+                    for (int i = 0; i < toUsers.length; i++) {
+                        String toUser = toUsers[i];
+                        sendEmailToUser(fromUser, toUser, subject, message);
+                    }
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            if (ex.getException() instanceof MessagingException) {
+                throw (MessagingException) ex.getException();
+            } else {
+                throw new RuntimeException(ex.getException());
+            }
+        }
+    }
+
+    @Override
+    public void sendEmailToUsers(final String fromUser, final String[] toUsers,
+            final String subject, final GraphNode graphNode,
+            final List<MediaType> acceptableMediaTypes, final String mode)
+            throws MessagingException {
+        try {
+            AccessController.checkPermission(
+                    new MailManPermission(fromUser, MailManPermission.SEND_FROM));
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+
+                @Override
+                public Object run() throws MessagingException {
+                    for (int i = 0; i < toUsers.length; i++) {
+                        String toUser = toUsers[i];
+                        sendEmailToUser(fromUser, toUser, subject, graphNode,
+                                acceptableMediaTypes, mode);
+                    }
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            if (ex.getException() instanceof MessagingException) {
+                throw (MessagingException) ex.getException();
+            } else {
+                throw new RuntimeException(ex.getException());
+            }
+        }
+    }
+
+    @Override
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            GraphNode graphNode, List<MediaType> acceptableMediaTypes,
+            String mode) throws MessagingException {
+        AccessController.checkPermission(
+                new MailManPermission("", MailManPermission.SEND_MAIL));
+        sendEmail(from, to, cc, bcc, subject, graphNode, null, acceptableMediaTypes,
+                mode);
+    }
+
+    @Override
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            String message) throws MessagingException {
+        AccessController.checkPermission(
+                new MailManPermission("", MailManPermission.SEND_MAIL));
+        sendEmail(from, to, cc, bcc, subject, message, "text/plain", null, null);
+    }
+
+    @Override
+    public void sendEmail(InternetAddress from, InternetAddress to,
+            InternetAddress[] cc, InternetAddress[] bcc, String subject,
+            String message, String mediaType) throws MessagingException {
+        AccessController.checkPermission(
+                new MailManPermission("", MailManPermission.SEND_MAIL));
+        sendEmail(from, to, cc, bcc, subject, message, mediaType, null, null);
+    }
+
+    private void sendEmail(final InternetAddress from, final InternetAddress to,
+            final InternetAddress[] cc, final InternetAddress[] bcc,
+            final String subject, final Object content, final String mediaType,
+            final List<MediaType> acceptableMediaTypes, final String mode)
+            throws MessagingException {
+        final Session session = mailSessionFactory.getSession();
+        try {
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
+
+                @Override
+                public Object run() throws MessagingException {
+                    MimeMessage mimeMessage = new MimeMessage(session);
+                    Date date = new Date();
+                    mimeMessage.setSentDate(date);
+                    mimeMessage.setSubject(subject);
+                    if (content instanceof GraphNode) {
+                        GraphNode graphNode = (GraphNode) content;
+                        Renderer renderer = rendererFactory.createRenderer(graphNode, mode,
+                                acceptableMediaTypes == null ? Collections.singletonList(
+                                MediaType.WILDCARD_TYPE) : acceptableMediaTypes);
+                        if (renderer == null) {
+                            throw new MessagingException("No renderer appropriate found");
+                        }
+                        mimeMessage.setDataHandler(
+                                new GraphNodeDataHandler(graphNode, renderer));
+                    } else {
+                        mimeMessage.setContent(content, mediaType);
+                    }
+                    mimeMessage.setFrom(from);
+                    if (to != null) {
+                        mimeMessage.addRecipient(Message.RecipientType.TO, to);
+                    }
+                    if (cc != null) {
+                        mimeMessage.addRecipients(Message.RecipientType.CC, cc);
+                    }
+                    if (bcc != null) {
+                        mimeMessage.addRecipients(Message.RecipientType.BCC, bcc);
+                    }
+                    Transport.send(mimeMessage);
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            if (ex.getException() instanceof MessagingException) {
+                throw (MessagingException) ex.getException();
+            } else {
+                throw new RuntimeException(ex.getException());
+            }
+        }
+
+    }
+
+
+    private InternetAddress getUserAddress(String user) throws MessagingException {
+        MGraph systemGraph = tcManager.getMGraph(systemGraphUri);
+
+        final String queryString = "SELECT ?email WHERE { "
+                + "?x " + FOAF.mbox + " ?email . "
+                + "?x " + PLATFORM.userName + " \"" + user + "\" . "
+                + "}";
+        try {
+            SelectQuery selectQuery = (SelectQuery) QueryParser.getInstance().parse(queryString);
+            ResultSet result = tcManager.executeSparqlQuery(selectQuery, systemGraph);
+            if (result.hasNext()) {
+                Resource email = result.next().get("email");
+                String emailString = ((UriRef) email).getUnicodeString();
+                //TODO should add personal name (if available) as well
+                return new InternetAddress(emailString.substring("mailto:".length()));
+            }
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex);
+        } catch (AddressException ex) {
+            throw new RuntimeException(ex);
+        }
+        throw new MessagingException("No address found for user " + user);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManPermission.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManPermission.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManPermission.java
new file mode 100644
index 0000000..42db6b6
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailManPermission.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.mail;
+
+import java.security.Permission;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import org.apache.stanbol.commons.security.UserUtil;
+
+/**
+ * A permission to send e-mails as a specific user.
+ *
+ * @author mir
+ */
+public class MailManPermission extends Permission {
+    private String namePattern;
+    private SortedSet<String> actions;
+    
+    public static final String SEND_FROM = "send from";
+    public static final String SEND_MAIL = "send mail";
+    
+    public static final String SELF_ACTION = "<self>";
+
+    public MailManPermission(String namePattern, String actions)  {
+        super(namePattern);
+        this.namePattern = namePattern;
+        this.actions = new TreeSet<String>(Arrays.asList(actions.split(",")));
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        if (permission instanceof MailManPermission) {
+            MailManPermission other = (MailManPermission) permission;
+
+            if(other.actions.contains(SEND_FROM)) {
+                if (!patternImplies(other.namePattern)) {
+                    return false;
+                }
+            }
+            if (!actionsImplies(other.actions)) {
+                return false;
+            }
+            return true;
+            
+            
+        }
+        return false;
+    }
+
+    private boolean actionsImplies(Set<String> actionsOther) {
+        return actions.containsAll(actionsOther);
+        
+        
+    }
+
+    private boolean patternImplies(String namePatternOther) {
+        if (namePattern.equals(namePatternOther)) {
+            return true;
+        }
+
+        if (namePattern.equals(SELF_ACTION)) {
+            String userName = UserUtil.getCurrentUserName();
+            if (userName == null) {
+                return false;
+            }
+            return userName.equals(namePatternOther);
+        }
+        return namePatternOther.matches(namePattern);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final MailManPermission other = (MailManPermission) obj;
+        if (this.namePattern != other.namePattern 
+                && (this.namePattern == null
+                || !this.namePattern.equals(other.namePattern))) {
+            return false;
+        }
+        if (this.actions != other.actions 
+                && (this.actions == null
+                || !this.actions.equals(other.actions))) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 97 * hash + (this.namePattern != null ?
+            this.namePattern.hashCode() : 0);
+        return hash;
+    }
+
+    
+
+    @Override
+    public String getActions() {
+        StringBuffer sb = new StringBuffer();
+        Iterator<String> it = actions.iterator();
+        while(it.hasNext()) {
+            String action = it.next();
+            sb.append(action);
+            if (it.hasNext()) {
+                sb.append(",");    
+            }                    
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailPermissionDescriptionsProvider.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailPermissionDescriptionsProvider.java
new file mode 100644
index 0000000..7ed61c2
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailPermissionDescriptionsProvider.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.mail;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider;
+import org.apache.clerezza.permissiondescriptions.PermissionDescripton;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+/**
+ * <code>PermissionDescriptionsProvider</code> implementation that provides
+ * <code>PermissionDescripton</code>s for the most common <code>MailManPermission<code>s
+ * used.
+ * 
+ * @author mir
+ */
+@Component
+@Service(PermissionDescriptionsProvider.class)
+public class MailPermissionDescriptionsProvider implements PermissionDescriptionsProvider {
+
+    private static final Set<PermissionDescripton> MAIL_PERMISSION_DESCRIPTIONS = new HashSet<PermissionDescripton>();
+    static {
+        MAIL_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Send Mails From Account Permission",
+                "Grants permission to the user to send emails from his/her account. The sender email address will" +
+                " be the address associated to the user account.", null, MailManPermission.class,
+                "(org.apache.clerezza.platform.mail.MailManPermission \"" + MailManPermission.SELF_ACTION +
+                "\" \"" + MailManPermission.SEND_FROM + "\")"));
+
+        MAIL_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Send Mails Permission",
+                "Grants permission to send emails. The sender email address can be freely specified. " +
+                "This permission does not grant permission to send emails from any accounts.", null, MailManPermission.class,
+                "(org.apache.clerezza.platform.mail.MailManPermission \"\" \"" + MailManPermission.SEND_MAIL + "\")"));
+    }
+
+    @Override
+    public Set<PermissionDescripton> getPermissionDescriptors() {
+        return MAIL_PERMISSION_DESCRIPTIONS;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailSessionFactory.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailSessionFactory.java b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailSessionFactory.java
new file mode 100644
index 0000000..a2b5f5c
--- /dev/null
+++ b/platform/mail/src/main/java/org/apache/clerezza/platform/mail/MailSessionFactory.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.mail;
+
+
+import java.util.Properties;
+import javax.mail.Authenticator;
+import javax.mail.PasswordAuthentication;
+import javax.mail.Session;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * Provides an isntance of javax.mail.Session matching the configuration of this 
+ * service.
+ *
+ * @author reto
+ */
+@Component(metatype=true)
+@Service(MailSessionFactory.class)
+public class MailSessionFactory {
+    /**
+     * Service property
+     *
+     */
+    @Property(value="false", description="Specifies if TLS (SSL) encryption is used.")
+    public static final String MAIL_USE_TLS = "useTLS";
+    /**
+     * Service property
+     *
+     */
+    @Property(value="localhost", description="Specifies the SMTP host.")
+    public static final String MAIL_SMTP_HOST = "smtpHost";
+    /**
+     * Service property
+     */
+    @Property(value="25", description="Specifies the SMTP port.")
+    public static final String MAIL_SMTP_PORT = "smtpPort";
+    /**
+     * Service property
+     *
+     */
+    @Property(value="myPassword", description="Specifies the authentication password for SMTP.")
+    public static final String MAIL_SMTP_PASSWORD = "smtpPassword";
+    /**
+     * Service property
+     *
+     */
+    @Property(value="myUserName", description="Specifies the User to authenticate for SMTP.")
+    public static final String MAIL_SMTP_USER = "smtpUser";
+
+    private Properties properties;
+
+    protected void activate(ComponentContext componentContext) {
+        properties = new Properties();
+        properties.setProperty("mail.debug", "false");
+        if (((String) componentContext.getProperties().get(MAIL_USE_TLS)).equals("true")) {
+            properties.setProperty("mail.smtp.starttls.enable", "true");
+            properties.setProperty("mail.smtp.auth", "true");
+            properties.setProperty("mail.smtp.socketFactory.fallback", "false");
+        }
+        properties.setProperty("mail.transport.protocol", "smtp");
+        properties.setProperty("mail.smtp.port", (String) componentContext.getProperties().get(MAIL_SMTP_PORT));
+        properties.setProperty("mail.smtp.host", (String) componentContext.getProperties().get(MAIL_SMTP_HOST));
+        properties.setProperty("smtpUser", (String) componentContext.getProperties().get(MAIL_SMTP_USER));
+        properties.setProperty("smtpPassword", (String) componentContext.getProperties().get(MAIL_SMTP_PASSWORD));
+    }
+
+    public Session getSession() {
+        Authenticator auth = new Authenticator() {
+            @Override
+            public PasswordAuthentication getPasswordAuthentication() {
+                return new PasswordAuthentication(properties.
+                        getProperty("smtpUser"),
+                        properties.getProperty("smtpPassword"));
+            }
+        };
+        return Session.getInstance(properties, auth);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/mail/src/test/java/org/apache/clerezza/platform/mail/MailManPermissionTest.java
----------------------------------------------------------------------
diff --git a/platform/mail/src/test/java/org/apache/clerezza/platform/mail/MailManPermissionTest.java b/platform/mail/src/test/java/org/apache/clerezza/platform/mail/MailManPermissionTest.java
new file mode 100644
index 0000000..b998c75
--- /dev/null
+++ b/platform/mail/src/test/java/org/apache/clerezza/platform/mail/MailManPermissionTest.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.mail;
+
+import java.security.Permission;
+import java.security.PrivilegedAction;
+import java.util.Collections;
+import javax.security.auth.Subject;
+import org.junit.Test;
+import org.apache.stanbol.commons.security.auth.PrincipalImpl;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
+/**
+ *
+ * @author mir
+ */
+public class MailManPermissionTest  {
+
+    @Test
+    public void testImpliesSendFrom() {
+        Permission userX1 = new MailManPermission("userNameX", MailManPermission.SEND_FROM);
+        Permission userX2 = new MailManPermission("userNameX", MailManPermission.SEND_FROM);
+        Permission userY = new MailManPermission("userNameY", MailManPermission.SEND_FROM);
+        Permission userAll = new MailManPermission("userName[A-Z]", MailManPermission.SEND_FROM);
+
+        assertTrue(userX1.implies(userX2));
+        assertTrue(userX1.equals(userX2));
+        assertFalse(userX1.implies(userY));
+        assertTrue(userAll.implies(userX1));
+        assertTrue(userAll.implies(userY));
+        assertFalse(userY.implies(userAll));
+    }
+    
+    @Test
+    public void testImpliesSelf() {
+        final Permission userX = new MailManPermission("userNameX", MailManPermission.SEND_FROM);
+        final Permission self = new MailManPermission(MailManPermission.SELF_ACTION, MailManPermission.SEND_FROM);
+
+        Subject subject = new Subject(true,
+                Collections.singleton(new PrincipalImpl("userNameX")),
+                Collections.EMPTY_SET,
+                Collections.EMPTY_SET);
+        Subject.doAs(subject, new PrivilegedAction<Object>() {
+            @Override
+            public Object run() {
+                assertTrue(self.implies(userX));
+                return null;
+            }
+
+        });
+        assertFalse(self.implies(userX));
+    }
+
+    @Test
+    public void testImpliesSendMail() {
+        Permission sendMail1 = new MailManPermission("userNameX", MailManPermission.SEND_MAIL);
+        Permission sendMail2 = new MailManPermission("", MailManPermission.SEND_MAIL);
+        Permission sendMailFrom = new MailManPermission("userNameY", MailManPermission.SEND_FROM +
+                "," + MailManPermission.SEND_MAIL);
+        Permission userY = new MailManPermission("userNameY", MailManPermission.SEND_FROM);
+        assertTrue(sendMail1.implies(sendMail2));
+        assertTrue(sendMailFrom.implies(sendMail1));
+        assertFalse(sendMail1.implies(sendMailFrom));
+        assertTrue(sendMailFrom.implies(userY));
+    }
+
+    @Test
+    public void testGetActions() {
+        Permission sendMailFrom1 = new MailManPermission("userNameY", MailManPermission.SEND_FROM +
+                "," + MailManPermission.SEND_MAIL);
+        Permission sendMailFrom2 = new MailManPermission("userNameY", MailManPermission.SEND_MAIL +
+                "," + MailManPermission.SEND_FROM);
+
+        assertEquals(sendMailFrom1.getActions(), sendMailFrom2.getActions());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/LICENSE b/platform/platform.accountcontrolpanel/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.accountcontrolpanel/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.


[65/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
----------------------------------------------------------------------
diff --git a/rdf.storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml b/rdf.storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
deleted file mode 100644
index e1bd1fb..0000000
--- a/rdf.storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0" localization="OSGI-INF/metatype/metatype">
-    <OCD id="org.apache.clerezza.rdf.storage.web.WebProxy"
-         name="Clerezza SCB Web Storage Provider"
-         description="%org.apache.clerezza.rdf.storage.web.WebProxy.description">
-        <AD id="network-timeout" type="int" default="false" name="Network Timeout" description="Specifies the network timeout in ms."/>
-    </OCD>
-    <Designate pid="org.apache.clerezza.rdf.storage.web.WebProxy">
-        <Object ocdref="org.apache.clerezza.rdf.storage.web.WebProxy"/>
-    </Designate>
-</metatype:MetaData>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/rdf.storage.web/src/main/resources/OSGI-INF/serviceComponents.xml b/rdf.storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
deleted file mode 100644
index ff9b296..0000000
--- a/rdf.storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
-
-    <scr:component enabled="true" name="org.apache.clerezza.rdf.storage.web.WebProxy">
-        <implementation class="org.apache.clerezza.rdf.storage.web.WebProxy"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.rdf.storage.web.WebProxy"/>
-            <provide interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"/>
-        </service>
-        <!-- hard coded <property name="weight" type="Integer" value="0"/> -->
-        <reference name="weightedTcProvider" interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"
-                   cardinality="1..n" policy="dynamic" bind="bindWeightedTcProvider" unbind="unbindWeightedTcProvider"/>
-        <reference name="parser" interface="org.apache.clerezza.rdf.core.serializedform.Parser"
-        cardinality="1..1" policy="static" bind="bindParser" unbind="unbindParser"/>
-        <property name="network-timeout" value="3000" type="Integer"/>
-    </scr:component>
-
-</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf.storage.web/src/main/scala/WebProxy.scala b/rdf.storage.web/src/main/scala/WebProxy.scala
deleted file mode 100644
index 3a03e3b..0000000
--- a/rdf.storage.web/src/main/scala/WebProxy.scala
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.rdf.storage.web
-
-
-import org.apache.commons.rdf.ImmutableGraph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf._
-import org.apache.commons.rdf.impl.utils.AbstractGraph
-import org.osgi.service.component.ComponentContext
-import java.io.IOException
-import java.net.{HttpURLConnection, URL}
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat
-import org.apache.clerezza.rdf.core.serializedform.Parser
-import java.security.{PrivilegedExceptionAction, PrivilegedActionException, AccessController}
-
-import org.slf4j.scala._
-import org.apache.clerezza.rdf.core.access._
-import org.apache.clerezza.rdf.core._
-import java.sql.Time
-
-/**
- * The Web Proxy Service enables applications to request remote (and local) graphs.
- * It keeps cached version of the remote graphs in store for faster delivery.
- *
- */
-class WebProxy extends WeightedTcProvider with Logging {
-
-  val networkTimeoutKey = "network-timeout"
-
-  private var networkTimeout: Int = _
-
-  private var tcProvider: TcProviderMultiplexer = new TcProviderMultiplexer
-
-  /**
-   * Register a provider
-   *
-   * @param provider
-   *            the provider to be registered
-   */
-  protected def bindWeightedTcProvider(provider: WeightedTcProvider): Unit = {
-    tcProvider.addWeightedTcProvider(provider)
-  }
-
-  /**
-   * Deregister a provider
-   *
-   * @param provider
-   *            the provider to be deregistered
-   */
-  protected def unbindWeightedTcProvider(provider: WeightedTcProvider): Unit = {
-    tcProvider.removeWeightedTcProvider(provider)
-  }
-
-  /**OSGI method, called on activation */
-  protected def activate(context: ComponentContext) = {
-    networkTimeout = Integer.parseInt(context.getProperties.get(networkTimeoutKey).toString)
-  }
-
-
-  private var parser: Parser = null
-
-  protected def bindParser(p: Parser) = {
-    parser = p
-  }
-
-  protected def unbindParser(p: Parser) = {
-    parser = null
-  }
-
-  def getWeight: Int = {
-    return 0
-  }
-
-  /**
-   * Any Graph is available as ImmutableGraph as well as immutable Graph
-   *
-   * @param name
-   * @return
-   * @throws NoSuchEntityException
-   */
-  def getMGraph(name: Iri): Graph = {
-    val graph = getImmutableGraph(name)
-    return new AbstractGraph() {
-      protected def performFilter(subject: BlankNodeOrIri, predicate: Iri, `object` : RdfTerm): java.util.Iterator[Triple] = {
-        graph.filter(subject, predicate, `object`)
-      }
-
-      def performSize = graph.size
-    }
-  }
-
-  def getImmutableGraph(name: Iri): ImmutableGraph = {
-    try {
-      getGraph(name, Cache.Fetch)
-    } catch {
-      case e: IOException => {
-          logger.debug("could not get graph by dereferencing uri", e)
-          throw new NoSuchEntityException(name)
-      }
-
-    }
-  }
-
-  def getGraph(name: Iri): Graph = {
-    return getMGraph(name)
-  }
-
-  def createGraph(name: Iri): Graph = {
-    throw new UnsupportedOperationException
-  }
-
-  def createImmutableGraph(name: Iri, triples: Graph): ImmutableGraph = {
-    throw new UnsupportedOperationException
-  }
-
-  def deleteGraph(name: Iri): Unit = {
-    throw new UnsupportedOperationException
-  }
-
-  def getNames(graph: ImmutableGraph): java.util.Set[Iri] = {
-    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
-    import collection.JavaConversions._
-    for (name <- listGraphs) {
-      if (getImmutableGraph(name).equals(graph)) {
-        result.add(name)
-      }
-    }
-    return result
-  }
-
-  def listGraphs: java.util.Set[Iri] = {
-    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
-    result.addAll(listMGraphs)
-    result.addAll(listImmutableGraphs)
-    return result
-  }
-
-  def listMGraphs: java.util.Set[Iri] = {
-    //or should we list graphs for which we have a cached version?
-    return java.util.Collections.emptySet[Iri]
-  }
-
-  def listImmutableGraphs: java.util.Set[Iri] = {
-    return java.util.Collections.emptySet[Iri]
-  }
-
-  /**
-   * The semantics of this resource
-   * @param update if a remote URI, update information on the resource first
-   */
-  def getGraph(name: Iri, updatePolicy: Cache.Value): ImmutableGraph = {
-    logger.debug("getting graph " + name)
-    if (name.getUnicodeString.indexOf('#') != -1) {
-      logger.debug("not dereferencing URI with hash sign. Please see CLEREZZA-533 for debate.")
-      throw new NoSuchEntityException(name)
-    }
-    if (name.getUnicodeString.startsWith("urn")) {
-      //these are not dereferenceable
-      throw new NoSuchEntityException(name)
-    }
-    val cacheGraphName = new Iri("urn:x-localinstance:/cache/" + name.getUnicodeString)
-    //todo: follow redirects and keep track of them
-    //todo: keep track of headers especially date and etag. test for etag similarity
-    //todo: for https connection allow user to specify his webid and send his key: ie allow web server to be an agent
-    //todo: add GRDDL functionality, so that other return types can be processed too
-    //todo: enable ftp and other formats (though content negotiation won't work there)
-    def updateGraph() {
-      val url = new URL(name.getUnicodeString)
-      val connection = url.openConnection()
-      connection match {
-        case hc: HttpURLConnection => {
-          hc.addRequestProperty("Accept", acceptHeader)
-          hc.setReadTimeout(networkTimeout)
-          hc.setConnectTimeout(networkTimeout)
-        };
-      }
-      connection.connect()
-      val in = connection.getInputStream()
-      val mediaType = connection.getContentType()
-      val remoteTriples = parser.parse(in, mediaType, name)
-      tcProvider.synchronized {
-        try {
-          tcProvider.deleteGraph(cacheGraphName)
-        } catch {
-          case e: NoSuchEntityException =>;
-        }
-        tcProvider.createImmutableGraph(cacheGraphName, remoteTriples)
-      }
-    }
-    try {
-      //the logic here is not quite right, as we don't look at time of previous fetch.
-      updatePolicy match {
-        case Cache.Fetch => try {
-          tcProvider.getImmutableGraph(cacheGraphName)
-        } catch {
-          case e: NoSuchEntityException => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
-        }
-        case Cache.ForceUpdate => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
-        case Cache.CacheOnly => tcProvider.getImmutableGraph(cacheGraphName)
-      }
-    } catch {
-      case ex: PrivilegedActionException => {
-        var cause: Throwable = ex.getCause
-        if (cause.isInstanceOf[UnsupportedOperationException]) {
-          throw cause.asInstanceOf[UnsupportedOperationException]
-        }
-        if (cause.isInstanceOf[EntityAlreadyExistsException]) {
-          throw cause.asInstanceOf[EntityAlreadyExistsException]
-        }
-        if (cause.isInstanceOf[RuntimeException]) {
-          throw cause.asInstanceOf[RuntimeException]
-        }
-        throw new RuntimeException(cause)
-      }
-    }
-  }
-
-
-  private lazy val acceptHeader = {
-
-    import scala.collection.JavaConversions._
-
-    (for (f <- parser.getSupportedFormats) yield {
-      val qualityOfFormat = {
-        f match {
-          //the default, well established format
-          case SupportedFormat.RDF_XML => "1.0";
-          //n3 is a bit less well defined and/or many parsers supports only subsets
-          case SupportedFormat.N3 => "0.6";
-          //we prefer most dedicated formats to (X)HTML, not because those are "better",
-          //but just because it is quite likely that the pure RDF format will be
-          //lighter (contain less presentation markup), and it is also possible that HTML does not
-          //contain any RDFa, but just points to another format.
-          case SupportedFormat.XHTML => "0.5";
-          //we prefer XHTML over html, because parsing (should) be easier
-          case SupportedFormat.HTML => "0.4";
-          //all other formats known currently are structured formats
-          case _ => "0.8"
-        }
-      }
-      f + "; q=" + qualityOfFormat + ","
-    }).mkString + " *; q=.1" //is that for GRDDL?
-  }
-}
-
-object Cache extends Enumeration {
-  /**fetch if not in cache, if version in cache is out of date, or return cache */
-  val Fetch = Value
-  /**fetch from source whatever is in cache */
-  val ForceUpdate = Value
-  /**only get cached version. If none exists return empty graph */
-  val CacheOnly = Value
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.web/LICENSE b/rdf.web/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.web/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/pom.xml b/rdf.web/pom.xml
deleted file mode 100644
index 7dc74da..0000000
--- a/rdf.web/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>clerezza</artifactId>
-        <version>7-SNAPSHOT</version>
-        <relativePath />
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>rdf.web</artifactId>
-    <packaging>pom</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - RDF Web Access</name>
-    <description>Allows access to Clerezza graphs over HTTP with JAX-RS</description>
-    <modules>
-        <module>rdf.web.core</module>
-        <module>rdf.web.ontologies</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/LICENSE
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/LICENSE b/rdf.web/rdf.web.core/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/rdf.web/rdf.web.core/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/nbactions.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/nbactions.xml b/rdf.web/rdf.web.core/nbactions.xml
deleted file mode 100644
index 49e8307..0000000
--- a/rdf.web/rdf.web.core/nbactions.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<actions>
-    <action>
-        <actionName>CUSTOM-deploy to localhost:8080</actionName>
-        <displayName>deploy to localhost:8080</displayName>
-        <goals>
-            <goal>install</goal>
-            <goal>org.apache.sling:maven-sling-plugin:install</goal>
-        </goals>
-    </action>
-</actions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/pom.xml b/rdf.web/rdf.web.core/pom.xml
deleted file mode 100644
index 2cad597..0000000
--- a/rdf.web/rdf.web.core/pom.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
-    -->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>clerezza</artifactId>
-        <version>7-SNAPSHOT</version>
-        <relativePath />
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>rdf.web.core</artifactId>
-    <packaging>bundle</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - RDF Web Access Core</name>
-    <description>The core part of Clerezza RDF  Web Access</description>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.jena.serializer</artifactId>
-            <scope>test</scope>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.jena.parser</artifactId>
-            <scope>test</scope>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.easymock</groupId>
-            <artifactId>easymock</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.web.ontologies</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.globalmenu.api</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>permissiondescriptions</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
deleted file mode 100644
index 440e877..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.web.ontologies.BACKUP;
-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;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.ResponseBuilder;
-import javax.ws.rs.core.Response.Status;
-import java.net.URL;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * This JAX-RS resource provides a method to retrieve a zip file containing
- * all triple collections that the use may access. The triple collection are
- * serialized in N-Triples format. The URI path of this resource is
- * "/admin/backup".
- *
- * This class adds a global menu-item for users that can read the system graph
- * (as there's currently no dedicated backup-permission).
- *
- * @author hasan, reto
- */
-@Component
-@Service({Object.class, GlobalMenuItemsProvider.class})
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/admin/backup")
-public class Backup implements GlobalMenuItemsProvider {
-
-    final Logger logger = LoggerFactory.getLogger(Backup.class);
-    @Reference
-    private ScalaServerPagesService scalaServerPagesService;
-    private Set<ServiceRegistration> serviceRegistrations = new HashSet<ServiceRegistration>();
-
-    /**
-     * The activate method is called when SCR activates the component configuration.
-     *
-     * @param componentContext
-     */
-    protected void activate(ComponentContext componentContext) {
-        URL templateURL = getClass().getResource("backup-management.ssp");
-        serviceRegistrations.add(scalaServerPagesService.registerScalaServerPage(templateURL, BACKUP.BackupAdminPage, "naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE));
-    }
-
-    protected void deactivate(ComponentContext context) {
-        for (ServiceRegistration r : serviceRegistrations) {
-            r.unregister();
-        }
-    }
-
-    /**
-     * Get a zipped file containing all triple collections which the
-     * user may access. The resource is accessible through the URI path
-     * "/admin/backup/download".
-     * The triple collections are serialized in N-Triples format before being
-     * archived in a single zipped file.
-     * A mapping of the names of the files in the archive to triple collection
-     * names is available as well in the archive as a text file named
-     * triplecollections.nt.
-     *
-     * @return a response that will cause the creation of a zipped file
-     */
-    @GET
-    @Path("download")
-    @Produces("application/zip")
-    public Response download() {
-        AccessController.checkPermission(new BackupPermission());
-        return AccessController.doPrivileged(new PrivilegedAction<Response>() {
-
-            @Override
-            public Response run() {
-                ResponseBuilder responseBuilder = Response.status(Status.OK).
-                        entity(Backup.this);
-                responseBuilder.header("Content-Disposition",
-                        "attachment; filename=backup" + getCurrentDate() + ".zip");
-                return responseBuilder.build();
-            }
-        });
-
-    }
-
-    @GET
-    public GraphNode overviewPage() {
-        Graph resultGraph = new SimpleGraph();
-        GraphNode result = new GraphNode(new BlankNode(), resultGraph);
-        result.addProperty(RDF.type, BACKUP.BackupAdminPage);
-        result.addProperty(RDF.type, PLATFORM.HeadedPage);
-        return result;
-    }
-
-    private String getCurrentDate() {
-        DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
-        Date date = new Date();
-        return dateFormat.format(date);
-    }
-
-    @Override
-    public Set<GlobalMenuItem> getMenuItems() {
-        //need backup or restore permission for the menu item to be shown
-        Set<GlobalMenuItem> result = new HashSet<GlobalMenuItem>();
-        try {
-            AccessController.checkPermission(new BackupPermission());
-        } catch (AccessControlException e) {
-            try {
-                AccessController.checkPermission(new RestorePermission());
-            } catch (AccessControlException e1) {
-                return result;
-            }
-        }
-        result.add(new GlobalMenuItem("/admin/backup",
-                "BCK", "Backup and Restore", 5, "Administration"));
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
deleted file mode 100644
index 5029eea..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-import javax.ws.rs.Produces;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Provider;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-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;
-import org.apache.commons.rdf.Graph;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.web.ontologies.BACKUP;
-
-/**
- * This does the actual work of producing a backup
- * 
- * @author hasan, reto
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Produces("application/zip")
-@Provider
-public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
-
-    @Reference
-    TcManager tcManager;
-
-    @Reference
-    Serializer serializer;
-
-    final Logger logger = LoggerFactory.getLogger(BackupMessageBodyWriter.class);
-
-    private final String folder = "graphs/";
-
-
-    byte[] createBackup() {
-        ByteArrayOutputStream result = new ByteArrayOutputStream();
-        writeBackup(result);
-        return result.toByteArray();
-    }
-
-    private void archive(ZipOutputStream compressedTcs, 
-            Graph tripleCollection,
-            String fileName) throws IOException, UnsupportedFormatException {
-        Lock readLock = null;
-        compressedTcs.putNextEntry(new ZipEntry(fileName));
-        if (tripleCollection instanceof Graph) {
-            readLock = ((Graph) tripleCollection).getLock().readLock();
-            readLock.lock();
-        }
-        try {
-            serializer.serialize(compressedTcs, tripleCollection,
-                    SupportedFormat.N_TRIPLE);
-        } finally {
-            if (readLock != null) {
-                readLock.unlock();
-            }
-        }
-    }
-
-    private String getTcFileName(Iri tcUri, String extension,
-            Map<String, Integer> fileNameCount) {
-        String fileName = tcUri.getUnicodeString();
-        fileName = fileName.substring(fileName.lastIndexOf("/")+1);
-        Integer count = fileNameCount.get(fileName);
-        if (count == null) {
-            fileNameCount.put(fileName, 0);
-        } else {
-            count++;
-            fileNameCount.put(fileName, count);
-            fileName = fileName.concat("_" + count);
-        }
-        return  fileName.concat(extension);
-    }
-
-    private void writeBackup(OutputStream result) {
-        Map<String, Integer> fileNameCount = new HashMap<String, Integer>();
-        Graph backupContents = new SimpleGraph();
-        try {
-            ZipOutputStream compressedTcs = new ZipOutputStream(result);
-
-            compressedTcs.putNextEntry(new ZipEntry(folder));
-
-            Set<Iri> tripleCollections = tcManager.listGraphs();
-            Iterator<Iri> tcIris = tripleCollections.iterator();
-            while (tcIris.hasNext()) {
-                Iri tcUri = tcIris.next();
-                String fileName = folder + getTcFileName(tcUri, ".nt",
-                        fileNameCount);
-                Graph tripleCollection = tcManager.getGraph(tcUri);
-                archive(compressedTcs, tripleCollection, fileName);
-                if (tripleCollection instanceof Graph) {
-                    backupContents.add(new TripleImpl(tcUri, RDF.type,
-                            BACKUP.Graph));
-                } else {
-                    backupContents.add(new TripleImpl(tcUri, RDF.type,
-                            BACKUP.Graph));
-                }
-                backupContents.add(new TripleImpl(tcUri, BACKUP.file,
-                        LiteralFactory.getInstance().createTypedLiteral(
-                        fileName)));
-            }
-            archive(compressedTcs, backupContents, "triplecollections.nt");
-            compressedTcs.close();
-
-        } catch (UnsupportedFormatException ufe) {
-            throw new WebApplicationException(Response.status(
-                    Status.NOT_ACCEPTABLE).entity(ufe.getMessage()).build());
-        } catch (IOException ex) {
-            throw new WebApplicationException(ex);
-        }
-    }
-
-    @Override
-    public boolean isWriteable(Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return Backup.class.isAssignableFrom(type);
-    }
-
-    @Override
-    public long getSize(Backup t, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return -1;
-    }
-
-    @Override
-    public void writeTo(Backup t, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType,
-            MultivaluedMap<String, Object> httpHeaders,
-            OutputStream entityStream) throws IOException, WebApplicationException {
-        writeBackup(entityStream);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
deleted file mode 100644
index caf5d18..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-import java.security.Permission;
-
-/**
- * Permission to retrieve a backup copy of all graphs provided by TcManager
- *
- * @author reto
- */
-@PermissionInfo(value="Backup Permission", description="Permission " +
-    "to retrieve a backup of all Triple Collections")
-public class BackupPermission extends Permission {
-
-
-    public BackupPermission() {
-        super("ImmutableGraph Management permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public BackupPermission(String target, String actions) {
-        super("ImmutableGraph Management permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 77988;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
deleted file mode 100644
index c00bf1b..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
-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;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.FOAF;
-import org.apache.clerezza.rdf.ontologies.OWL;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.Smusher;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
- * 
- * @author reto
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("/admin/graphs/delete")
-public class Delete {
-    
-    @Reference
-    private TcManager tcManager;
-
-    
-    @POST
-    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
-        tcManager.deleteGraph(graphName);
-        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
deleted file mode 100644
index 886d1e7..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.net.URL;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.util.HashSet;
-import java.util.Set;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.Graph;
-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;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.TCPROVIDER;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.web.ontologies.GRAPHMANAGEMENT;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * This JAX-RS resource provides an interface designed to allow various management
- * functions on triple collections. The URI path of this resource is
- * "/admin/graph-management".
- * 
- * @author reto
- */
-@Component
-@Service({Object.class, GlobalMenuItemsProvider.class})
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("/admin/graphs")
-public class GraphManagement implements GlobalMenuItemsProvider {
-
-    @Reference
-    private TcManager tcManager;
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    protected void activate(ComponentContext componentContext) {
-        URL templateURL = getClass().getResource("graph-management.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new Iri(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
-                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-    }
-
-    @GET
-    public GraphNode mainPage(@Context UriInfo uriInfo) {
-        AccessController.checkPermission(new GraphManagementAppPermission());
-        TrailingSlash.enforcePresent(uriInfo);
-        final SimpleGraph resultGraph = new SimpleGraph();
-        GraphNode graphNode = new GraphNode(new BlankNode(), resultGraph);
-        Set<Iri> tripleCollections = tcManager.listGraphs();
-        for (Iri uriRef : tripleCollections) {
-            graphNode.addProperty(GRAPHMANAGEMENT.tripleCollection, uriRef);
-            final Graph tripleCollection = tcManager.getGraph(uriRef);
-            resultGraph.add(new TripleImpl(uriRef,GRAPHMANAGEMENT.size,
-                    LiteralFactory.getInstance().createTypedLiteral(
-                    tripleCollection.size())));
-            if (tripleCollection instanceof ImmutableGraph) {
-                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
-            } else {
-                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
-            }
-        }
-        graphNode.addProperty(RDF.type, GRAPHMANAGEMENT.GraphManagementPage);
-        graphNode.addProperty(RDF.type, PLATFORM.HeadedPage);
-        return graphNode;
-    }
-
-    @Override
-    public Set<GlobalMenuItem> getMenuItems() {
-
-        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
-        try {
-            AccessController.checkPermission(
-                    new GraphManagementAppPermission());
-        } catch (AccessControlException e) {
-            return items;
-        }
-        String path = "/admin/graphs";
-        items.add(new GlobalMenuItem(path, "GM", "Graphs", 5,"Administration"));
-        return items;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
deleted file mode 100644
index 09ec04d..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permission to use the ImmutableGraph-Management page. Nothe that the user
- * additioonally needs permssion on the Graphs they manipulate.
- *
- * @author reto
- */
-@PermissionInfo(value="ImmutableGraph Management Access Permission", description="Grants access " +
-    "to the ImmutableGraph Management page")
-public class GraphManagementAppPermission extends Permission {
-
-
-    public GraphManagementAppPermission() {
-        super("ImmutableGraph Management permission");
-    }
-    /**
-     * 
-     * @param target ignored
-     * @param action ignored
-     */
-    public GraphManagementAppPermission(String target, String actions) {
-        super("ImmutableGraph Management permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 77985;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
deleted file mode 100644
index 2d96602..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.ResponseBuilder;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.jaxrs.utils.form.FormFile;
-import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
-import org.apache.clerezza.rdf.core.access.TcManager;
-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;
-
-/**
- * A service to restore the triple collections of a clerezza platform instance
- *
- * @author reto
- */
-@Component
-@Service({Object.class, PlatformRestorer.class})
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/admin/backup/restore")
-public class PlatformRestorer {
-
-    @Reference
-    private Restorer restorer;
-
-    @Reference
-    private TcManager tcManager;
-
-    /**
-     * Restores the triple collection of TcManager from a backup
-     *
-     * @param backupData the backup data
-     */
-    public void restore(InputStream backupData) throws IOException {
-        restorer.restore(backupData, tcManager);
-    }
-
-    @POST
-    public Response restore(MultiPartBody body, @Context final UriInfo uriInfo) 
-            throws Throwable {
-        AccessController.checkPermission(new RestorePermission());
-        FormFile[] files = body.getFormFileParameterValues("file");
-        if (files.length != 1) {
-            throw new RuntimeException("Must submit exactly one file");
-        }
-        final FormFile file = files[0];
-        try {
-            return AccessController.doPrivileged(new PrivilegedExceptionAction<Response>() {
-
-                @Override
-                public Response run() throws IOException {
-                    restore(new ByteArrayInputStream(file.getContent()));
-                    return RedirectUtil.createSeeOtherResponse("/admin/backup", uriInfo);
-                }
-            });
-        } catch (PrivilegedActionException ex) {
-            throw ex.getCause();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
deleted file mode 100644
index 6080df9..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-import java.security.Permission;
-
-/**
- * Permission to restore all graphs provided by TcManager from a backup copy.
- *
- * This a very powerfull permission as it allows to write to all graphs.
- *
- * @author reto
- */
-@PermissionInfo(value="Restore Permission", description="Permission " +
-    "to replace all triple collections with the contents of backup file")
-public class RestorePermission extends Permission {
-
-
-    public RestorePermission() {
-        super("Restore permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public RestorePermission(String target, String actions) {
-        super("Restore permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 77965;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
deleted file mode 100644
index d0ceed7..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.web.ontologies.BACKUP;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A service to restore the triple collection
- *
- * @author reto
- */
-@Component
-@Service(Restorer.class)
-public class Restorer {
-
-    private final static Logger log = LoggerFactory.getLogger(Restorer.class);
-
-    @Reference
-    Parser parser;
-
-    /**
-     * Restores triple-collections from a backup to a specified TcProvider
-     *
-     * @param backupData the bytes of a backup zip
-     * @param target the TcProvider into which to restore the data
-     */
-    public void restore(InputStream backupData, TcProvider target) throws IOException {
-        ZipInputStream compressedTcs = new ZipInputStream(backupData);
-
-        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
-        String folder = "";
-        ZipEntry entry;
-        ImmutableGraph metaGraph = null;
-        while ((entry = compressedTcs.getNextEntry()) != null) {
-            String entryName = entry.getName();
-            if (entry.isDirectory()) {
-                folder = entryName;
-            } else {
-                File tempFile = File.createTempFile("graph", "data");
-                OutputStream fos = new FileOutputStream(tempFile);
-                
-                int count;
-                byte buffer[] = new byte[2048];
-                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
-                    fos.write(buffer, 0, count);
-                }
-                fos.close();
-                InputStream serializedGraph = new FileInputStream(tempFile);
-                /*
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                int count;
-                byte buffer[] = new byte[2048];
-                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
-                    baos.write(buffer, 0, count);
-                }
-                baos.close();
-                ByteArrayInputStream serializedGraph = new ByteArrayInputStream(
-                        baos.toByteArray());
-                */
-                if (entryName.equals("triplecollections.nt")) {
-                    metaGraph = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                } else {
-                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                    extractedTc.put(entryName, deserializedGraph);
-                }
-                serializedGraph.close();
-            }
-        }
-        if (metaGraph == null) {
-            throw new RuntimeException("No metadata graph found in backup.");
-        }
-        compressedTcs.close();
-        {
-            final Iterator<Triple> mGraphIterator = metaGraph.filter(null, RDF.type, BACKUP.Graph);
-            while (mGraphIterator.hasNext()) {
-                GraphNode graphGN = new GraphNode(mGraphIterator.next().getSubject(), metaGraph);
-                String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
-                Graph extracted = extractedTc.get(fileName);
-                
-                Graph mGraph;
-                boolean created = false;
-                try {
-                    mGraph = target.getGraph((Iri)graphGN.getNode());
-                    try {
-                        mGraph.clear();
-                    } catch (UnsupportedOperationException ex) {
-                        log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
-                                + "collection could not be cleared");
-                        continue;
-                    }
-                } catch (NoSuchEntityException ex) {
-                    mGraph = target.createGraph((Iri)graphGN.getNode());
-                    created = true;
-                }
-                try {
-                    mGraph.addAll(extracted);
-                } catch (Exception ex) {
-                    String actionDone = created ? "created" : "cleared";
-                    log.error("after the mgraph "+graphGN.getNode()+" could successfully be "+actionDone
-                            + ", an exception occured adding the data", ex);
-                }
-            }
-        }
-        {
-            final Iterator<Triple> graphIterator = metaGraph.filter(null, RDF.type, BACKUP.Graph);
-            while (graphIterator.hasNext()) {
-                GraphNode graphGN = new GraphNode(graphIterator.next().getSubject(), metaGraph);
-                String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
-                Graph extracted = extractedTc.get(fileName);
-                try {
-                    target.deleteGraph((Iri)graphGN.getNode());
-                } catch (UnsupportedOperationException ex) {
-                    log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
-                            + "collection could not be deleted");
-                    continue;
-                } catch (NoSuchEntityException ex) {
-                    log.debug("could not remove "+graphGN.getNode()+", no such entity");
-                }
-                target.createImmutableGraph((Iri)graphGN.getNode(), extracted);
-            }
-        }
-        for (Map.Entry<String, Graph> pathTcPair : extractedTc.entrySet()) {
-            Literal fileNameLit = LiteralFactory.getInstance().createTypedLiteral(
-                        pathTcPair.getKey());
-            Iterator<Triple> graphResIterator = metaGraph.filter(null, BACKUP.file, fileNameLit);
-        }
-    }
-}


[51/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
CLEREZZA-966: removed platform. prefix of folder names

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

Branch: refs/heads/master
Commit: 70220239fa0e864a2d5127b562c3e973e2bc668c
Parents: 4d35191
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 17:02:45 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 17:02:45 2015 +0000

----------------------------------------------------------------------
 platform/accountcontrolpanel/LICENSE            |   201 +
 .../platform.accountcontrolpanel.core/LICENSE   |   201 +
 .../platform.accountcontrolpanel.core/pom.xml   |   198 +
 .../account-control-panel/scripts/IEKeygen.js   |   287 +
 .../account-control-panel/scripts/profile.js    |    64 +
 .../account-control-panel/style/profile.css     |    51 +
 .../resources/OSGI-INF/serviceComponents.xml    |   101 +
 .../AcpPermissionDescriptionsProvider.scala     |    75 +
 .../accountcontrolpanel/MenuItemProvider.scala  |    71 +
 .../accountcontrolpanel/ProfilePanel.scala      |   466 +
 .../accountcontrolpanel/SettingsPanel.scala     |   646 +
 .../html/ContactConfirmRenderlet.scala          |   109 +
 .../accountcontrolpanel/html/PersonBox.scala    |    63 +
 .../accountcontrolpanel/html/ProfilePanel.scala |   295 +
 .../html/RenderingUtility.scala                 |    94 +
 .../html/SettingsPanel.scala                    |   163 +
 .../accountcontrolpanel/permissions.scala       |   103 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 .../src/site/site.xml                           |    30 +
 .../src/site/xsite/content/sitemap.xml          |    28 +
 .../src/site/xsite/content/usage.xhtml          |    49 +
 .../src/site/xsite/templates/skin.html          |    71 +
 .../LICENSE                                     |   201 +
 .../pom.xml                                     |    67 +
 .../ontologies/controlpanel.rdf                 |   120 +
 platform/accountcontrolpanel/pom.xml            |    41 +
 platform/concepts/LICENSE                       |   201 +
 platform/concepts/README.txt                    |    18 +
 .../concepts/platform.concepts.core/LICENSE     |   201 +
 .../concepts/platform.concepts.core/pom.xml     |   111 +
 .../platform/concepts/core/ConceptCache.java    |   285 +
 .../concepts/core/ConceptManipulator.java       |   124 +
 .../platform/concepts/core/ConceptProvider.java |    40 +
 .../concepts/core/ConceptProviderManager.java   |    39 +
 .../ConceptProviderManagerAppPermission.java    |    66 +
 .../platform/concepts/core/ConceptsFinder.java  |   266 +
 .../concepts/core/GenericResourcePage.java      |   111 +
 .../concepts/core/LocalConceptProvider.java     |    90 +
 .../concepts/core/RemoteConceptProvider.java    |   134 +
 .../core/RemoteConceptsDescriptionManager.java  |   102 +
 .../platform/concepts/core/ResourceTagger.java  |   131 +
 .../core/SimpleConceptProviderManager.java      |   319 +
 .../concepts/scripts/concept-find-create.js     |    21 +
 .../scripts/concept-provider-manipulation.js    |    21 +
 .../concepts/scripts/selected-concepts.js       |    21 +
 .../META-INF/static-web/concepts/style/form.css |    21 +
 .../concepts/core/concept-existing-subjects.ssp |    29 +
 .../concepts/core/concept-find-create.ssp       |    61 +
 .../platform/concepts/core/concept-tagging.ssp  |    23 +
 .../concepts/core/generic-resource-page.ssp     |    43 +
 .../core/manage-concept-providers-page.ssp      |   128 +
 .../concepts/core/selected-concepts.ssp         |    41 +
 .../concepts/core/skos-collection-json.ssp      |    33 +
 .../staticweb/scripts/concept-find-create.js    |   217 +
 .../scripts/concept-provider-manipulation.js    |   213 +
 .../scripts/jquery.rdfquery.core-1.0.js         |  4040 +++
 .../core/staticweb/scripts/selected-concepts.js |    58 +
 .../concepts/core/staticweb/style/form.css      |    24 +
 .../core/ConceptProviderManagerTest.java        |   104 +
 .../concepts/core/ConceptsFinderTest.java       |   154 +
 .../platform.concepts.ontologies/LICENSE        |   201 +
 .../platform.concepts.ontologies/pom.xml        |    65 +
 .../platform/concepts/ontologies/concepts.rdf   |   191 +
 .../concepts/ontologies/queryresult.rdf         |    62 +
 platform/concepts/pom.xml                       |    38 +
 platform/config.gui/LICENSE                     |   201 +
 platform/config.gui/pom.xml                     |    92 +
 .../config/gui/ConfigGuiAccessPermission.java   |    66 +
 .../platform/config/gui/PlatformConfigGui.java  |   190 +
 .../clerezza/platform/config/gui/config.ssp     |    49 +
 .../config/gui/staticweb/js/platformconfig.js   |    52 +
 platform/config/LICENSE                         |   201 +
 platform/config/pom.xml                         |    79 +
 .../platform/config/PlatformConfig.java         |   191 +
 .../clerezza/platform/config/SystemConfig.java  |   186 +
 .../TcPermissionDescriptionsProvider.java       |    70 +
 .../platform/config/default-system-graph.rdf    |   103 +
 platform/content.default404/LICENSE             |   201 +
 platform/content.default404/pom.xml             |   100 +
 .../main/resources/META-INF/documentation.nt    |    35 +
 .../resources/OSGI-INF/serviceComponents.xml    |    30 +
 .../default404/DefaultPageNotFoundService.scala |    64 +
 platform/content.fsadaptor/LICENSE              |   201 +
 platform/content.fsadaptor/pom.xml              |   116 +
 .../resources/OSGI-INF/serviceComponents.xml    |    38 +
 .../content/fsadaptor/BundleFsLoader.scala      |   301 +
 .../content/fsadaptor/DirectoryOverlay.scala    |    86 +
 .../platform/content/fsadaptor/Logger.scala     |    30 +
 .../content/fsadaptor/PathNode2MGraph.scala     |   146 +
 platform/content.imagemetadata/LICENSE          |   201 +
 platform/content.imagemetadata/pom.xml          |    67 +
 .../imagemetadata/ImageMetaDataGenerator.java   |    64 +
 platform/content.representations/LICENSE        |   201 +
 .../LICENSE                                     |   201 +
 .../pom.xml                                     |    87 +
 .../AlternativeRepresentationGenerator.java     |   327 +
 .../representations/core/ThumbnailService.java  |   378 +
 .../LICENSE                                     |   201 +
 .../pom.xml                                     |    67 +
 .../ontologies/representations.rdf              |    52 +
 platform/content.representations/pom.xml        |    41 +
 platform/content/LICENSE                        |   201 +
 platform/content/pom.xml                        |   154 +
 .../content/AbstractDiscobitsHandler.java       |   151 +
 .../platform/content/CollectionTypeHandler.java |   164 +
 .../platform/content/ContentPostSupport.java    |    98 +
 .../platform/content/DiscobitTemplating.java    |    77 +
 .../platform/content/DiscobitsHandler.java      |    70 +
 .../platform/content/DiscobitsTypeHandler.java  |   556 +
 .../clerezza/platform/content/Editor.java       |   177 +
 .../clerezza/platform/content/InfoDiscobit.java |   105 +
 .../platform/content/InfoDiscobitWriter.java    |    67 +
 .../platform/content/PageNotFoundService.java   |    40 +
 .../content/SimpleDiscobitsHandler.java         |    49 +
 .../content/TitledContentRenderlet.java         |   142 +
 .../clerezza/platform/content/WebDavUtils.java  |   703 +
 .../content/collections/CollectionCreator.java  |    74 +
 .../GenericMetaDataGenerator.java               |    53 +
 .../clerezza/platform/content/webdav/COPY.java  |    38 +
 .../clerezza/platform/content/webdav/LOCK.java  |    38 +
 .../clerezza/platform/content/webdav/MKCOL.java |    37 +
 .../clerezza/platform/content/webdav/MOVE.java  |    38 +
 .../platform/content/webdav/PROPFIND.java       |    37 +
 .../platform/content/webdav/PROPPATCH.java      |    37 +
 .../platform/content/webdav/UNLOCK.java         |    38 +
 .../main/resources/META-INF/documentation.nt    |    59 +
 .../platform/content/OrderedContent_naked.xhtml |     4 +
 .../clerezza/platform/content/Resource.xhtml    |    11 +
 .../platform/content/Resource_naked.xhtml       |     1 +
 .../platform/content/TitledContent.xhtml        |    15 +
 .../content/XHTML_InfoDiscoBit_naked.xhtml      |     1 +
 .../clerezza/platform/content/XmlLiteral.ssp    |    35 +
 .../clerezza/platform/content/collection.ssp    |    38 +
 .../platform/content/staticweb/disco.xhtml      |   171 +
 .../content/staticweb/discoscripts/identity.js  |   399 +
 .../content/staticweb/discoscripts/log.js       |   104 +
 .../content/staticweb/discoscripts/match.js     |   192 +
 .../staticweb/discoscripts/mozile/LICENSE.txt   |  1446 +
 .../staticweb/discoscripts/mozile/README        |   119 +
 .../discoscripts/mozile/images/Mozile-16.png    |   Bin 0 -> 920 bytes
 .../discoscripts/mozile/images/arrow-down.gif   |   Bin 0 -> 52 bytes
 .../discoscripts/mozile/images/arrow-right.gif  |   Bin 0 -> 57 bytes
 .../discoscripts/mozile/images/silk/COPYING     |     1 +
 .../mozile/images/silk/arrow_redo.png           |   Bin 0 -> 625 bytes
 .../mozile/images/silk/arrow_undo.png           |   Bin 0 -> 631 bytes
 .../discoscripts/mozile/images/silk/bug.png     |   Bin 0 -> 774 bytes
 .../discoscripts/mozile/images/silk/cut.png     |   Bin 0 -> 648 bytes
 .../discoscripts/mozile/images/silk/font.png    |   Bin 0 -> 567 bytes
 .../discoscripts/mozile/images/silk/help.png    |   Bin 0 -> 786 bytes
 .../discoscripts/mozile/images/silk/html.png    |   Bin 0 -> 578 bytes
 .../mozile/images/silk/information.png          |   Bin 0 -> 778 bytes
 .../mozile/images/silk/link_add.png             |   Bin 0 -> 570 bytes
 .../mozile/images/silk/link_break.png           |   Bin 0 -> 657 bytes
 .../mozile/images/silk/page_copy.png            |   Bin 0 -> 663 bytes
 .../mozile/images/silk/page_edit.png            |   Bin 0 -> 807 bytes
 .../mozile/images/silk/page_paste.png           |   Bin 0 -> 703 bytes
 .../mozile/images/silk/page_save.png            |   Bin 0 -> 774 bytes
 .../mozile/images/silk/paintbrush.png           |   Bin 0 -> 548 bytes
 .../mozile/images/silk/paintcan.png             |   Bin 0 -> 707 bytes
 .../mozile/images/silk/paste_plain.png          |   Bin 0 -> 605 bytes
 .../mozile/images/silk/photo_add.png            |   Bin 0 -> 707 bytes
 .../discoscripts/mozile/images/silk/pilcrow.png |   Bin 0 -> 361 bytes
 .../discoscripts/mozile/images/silk/style.png   |   Bin 0 -> 813 bytes
 .../mozile/images/silk/text_align_center.png    |   Bin 0 -> 234 bytes
 .../mozile/images/silk/text_align_justify.png   |   Bin 0 -> 209 bytes
 .../mozile/images/silk/text_align_left.png      |   Bin 0 -> 209 bytes
 .../mozile/images/silk/text_align_right.png     |   Bin 0 -> 209 bytes
 .../mozile/images/silk/text_bold.png            |   Bin 0 -> 304 bytes
 .../mozile/images/silk/text_heading_1.png       |   Bin 0 -> 276 bytes
 .../mozile/images/silk/text_heading_2.png       |   Bin 0 -> 304 bytes
 .../mozile/images/silk/text_heading_3.png       |   Bin 0 -> 306 bytes
 .../mozile/images/silk/text_heading_4.png       |   Bin 0 -> 293 bytes
 .../mozile/images/silk/text_heading_5.png       |   Bin 0 -> 304 bytes
 .../mozile/images/silk/text_heading_6.png       |   Bin 0 -> 310 bytes
 .../mozile/images/silk/text_horizontalrule.png  |   Bin 0 -> 317 bytes
 .../mozile/images/silk/text_indent.png          |   Bin 0 -> 353 bytes
 .../mozile/images/silk/text_indent_remove.png   |   Bin 0 -> 351 bytes
 .../mozile/images/silk/text_italic.png          |   Bin 0 -> 223 bytes
 .../mozile/images/silk/text_list_bullets.png    |   Bin 0 -> 344 bytes
 .../mozile/images/silk/text_list_numbers.png    |   Bin 0 -> 357 bytes
 .../mozile/images/silk/text_strikethrough.png   |   Bin 0 -> 269 bytes
 .../mozile/images/silk/text_subscript.png       |   Bin 0 -> 422 bytes
 .../mozile/images/silk/text_superscript.png     |   Bin 0 -> 421 bytes
 .../mozile/images/silk/text_underline.png       |   Bin 0 -> 273 bytes
 .../discoscripts/mozile/images/silk/tick.png    |   Bin 0 -> 537 bytes
 .../discoscripts/mozile/lib/docbook.rng         |   146 +
 .../discoscripts/mozile/lib/local.conf          |    25 +
 .../discoscripts/mozile/lib/xhtml-basic.rng     |   727 +
 .../staticweb/discoscripts/mozile/lib/xhtml.rng |   993 +
 .../mozile/lib/xhtml/exclude/basic-table.rng    |    56 +
 .../mozile/lib/xhtml/exclude/basic.rng          |   122 +
 .../mozile/lib/xhtml/exclude/form.rng           |   118 +
 .../discoscripts/mozile/lib/xhtml/index.html    |   129 +
 .../mozile/lib/xhtml/modules/applet.rng         |    47 +
 .../mozile/lib/xhtml/modules/attribs.rng        |    61 +
 .../mozile/lib/xhtml/modules/base.rng           |    23 +
 .../mozile/lib/xhtml/modules/basic-form.rng     |   200 +
 .../mozile/lib/xhtml/modules/basic-table.rng    |   146 +
 .../mozile/lib/xhtml/modules/bdo.rng            |    37 +
 .../mozile/lib/xhtml/modules/csismap.rng        |   102 +
 .../mozile/lib/xhtml/modules/datatypes.rng      |   120 +
 .../mozile/lib/xhtml/modules/edit.rng           |    55 +
 .../mozile/lib/xhtml/modules/events.rng         |   208 +
 .../mozile/lib/xhtml/modules/form.rng           |   209 +
 .../mozile/lib/xhtml/modules/frames.rng         |   111 +
 .../mozile/lib/xhtml/modules/hypertext.rng      |    61 +
 .../mozile/lib/xhtml/modules/iframe.rng         |    67 +
 .../mozile/lib/xhtml/modules/image.rng          |    40 +
 .../mozile/lib/xhtml/modules/inlstyle.rng       |    11 +
 .../mozile/lib/xhtml/modules/legacy.rng         |   502 +
 .../mozile/lib/xhtml/modules/link.rng           |    56 +
 .../mozile/lib/xhtml/modules/list.rng           |    92 +
 .../mozile/lib/xhtml/modules/meta.rng           |    37 +
 .../mozile/lib/xhtml/modules/nameident.rng      |    39 +
 .../mozile/lib/xhtml/modules/object.rng         |    82 +
 .../mozile/lib/xhtml/modules/param.rng          |    33 +
 .../mozile/lib/xhtml/modules/pres.rng           |   107 +
 .../mozile/lib/xhtml/modules/ruby.rng           |   102 +
 .../mozile/lib/xhtml/modules/script.rng         |    70 +
 .../mozile/lib/xhtml/modules/ssismap.rng        |    14 +
 .../mozile/lib/xhtml/modules/struct.rng         |    76 +
 .../mozile/lib/xhtml/modules/style.rng          |    36 +
 .../mozile/lib/xhtml/modules/table.rng          |   257 +
 .../mozile/lib/xhtml/modules/target.rng         |    31 +
 .../mozile/lib/xhtml/modules/text.rng           |   338 +
 .../mozile/lib/xhtml/xhtml-basic.rng            |    21 +
 .../mozile/lib/xhtml/xhtml-strict.rng           |    36 +
 .../discoscripts/mozile/lib/xhtml/xhtml.rng     |    39 +
 .../staticweb/discoscripts/mozile/mozile.js     |  1368 +
 .../discoscripts/mozile/src/gui/htmlToolbar.css |   162 +
 .../staticweb/discoscripts/parameters.js        |    72 +
 .../content/staticweb/discoscripts/rdfparser.js |   544 +
 .../staticweb/discoscripts/rdfxmlserializer.js  |   130 +
 .../content/staticweb/discoscripts/term.js      |   307 +
 .../content/staticweb/discoscripts/uri.js       |   123 +
 .../content/staticweb/discoscripts/util.js      |   174 +
 .../staticweb/discoscripts/widget-factory.js    |   995 +
 .../content/staticweb/scripts/tria-disco.js     |    56 +
 .../staticweb/style/disco-icon-round.png        |   Bin 0 -> 3798 bytes
 .../content/staticweb/style/disco-icon.png      |   Bin 0 -> 6734 bytes
 .../content/staticweb/style/discostyle.css      |    73 +
 .../content/staticweb/style/favicon.ico         |   Bin 0 -> 4286 bytes
 .../collections/CollectionsCreatorTest.java     |    54 +
 platform/cris/LICENSE                           |   201 +
 platform/cris/pom.xml                           |    95 +
 .../clerezza/platform/cris/IndexService.java    |   243 +
 platform/curieprefixmanager/LICENSE             |   201 +
 platform/curieprefixmanager/core/LICENSE        |   201 +
 platform/curieprefixmanager/core/pom.xml        |    89 +
 .../CuriePrefixRecommender.java                 |    36 +
 .../impl/CuriePrefixManager.java                |   237 +
 .../impl/curie-prefix-list-naked.ssp            |    46 +
 .../impl/curie-prefix-naked.ssp                 |    31 +
 platform/curieprefixmanager/ontologies/LICENSE  |   201 +
 platform/curieprefixmanager/ontologies/pom.xml  |    67 +
 .../curieprefixmanager/ontologies/curie.ttl     |    40 +
 platform/curieprefixmanager/pom.xml             |    59 +
 platform/dashboard.webinterface/LICENSE         |   201 +
 platform/dashboard.webinterface/pom.xml         |    91 +
 .../dashboard/webinterface/DashBoard.java       |   131 +
 .../webinterface/dashboard-template.ssp         |    41 +
 platform/dashboard/LICENSE                      |   201 +
 .../dashboard/platform.dashboard.core/LICENSE   |   201 +
 .../dashboard/platform.dashboard.core/pom.xml   |   114 +
 .../dashboard/ContextualMenuGenerator.java      |   207 +
 .../platform/dashboard/UserLoginNode.java       |    98 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 .../platform.dashboard.core/src/site/site.xml   |    30 +
 .../src/site/xsite/content/sitemap.xml          |    26 +
 .../src/site/xsite/content/usage.xhtml          |    70 +
 .../src/site/xsite/templates/skin.html          |    71 +
 .../platform.dashboard.ontologies/LICENSE       |   201 +
 .../platform.dashboard.ontologies/pom.xml       |    67 +
 .../platform/dashboard/ontologies/dashboard.rdf |    50 +
 .../dashboard/ontologies/globalmenu.rdf         |    87 +
 .../dashboard/platform.dashboard.tests/LICENSE  |   201 +
 .../dashboard/platform.dashboard.tests/pom.xml  |   257 +
 .../osgi/FelixContextualMenuGeneratorTest.java  |   195 +
 .../blackbox/osgi/GlobalMenuItemsProviderA.java |    52 +
 platform/dashboard/pom.xml                      |    42 +
 platform/documentation.viewer/LICENSE           |   201 +
 platform/documentation.viewer/pom.xml           |    65 +
 .../viewer/DocumentationViewer.java             |   238 +
 .../main/resources/META-INF/documentation.nt    |    26 +
 .../platform/documentation/viewer/SortTest.java |   143 +
 platform/documentation/LICENSE                  |   201 +
 platform/documentation/pom.xml                  |    75 +
 .../DocumentationInContentGraph.java            |    54 +
 .../documentation/DocumentationProvider.java    |   274 +
 .../documentation/UriMutatorIterator.java       |   176 +
 .../main/resources/META-INF/documentation.nt    |    47 +
 .../documentation/baseUriTransformation.xsl     |    47 +
 .../documentation/UriMutatorIteratorTest.java   |   113 +
 platform/editor/LICENSE                         |   201 +
 platform/editor/nbactions.xml                   |    11 +
 platform/editor/pom.xml                         |   191 +
 .../tools/editor/scripts/RDFa.1.3.0.js          |  3380 ++
 .../tools/editor/scripts/RDFaProcessor.1.3.0.js |  1644 +
 .../tools/editor/scripts/backbone-min.js        |     4 +
 .../tools/editor/scripts/backbone.stickit.js    |   468 +
 .../resources/tools/editor/scripts/etch.js      |   366 +
 .../tools/editor/scripts/greenrdfstore.js       |    78 +
 .../tools/editor/scripts/jquery.min.js          |     5 +
 .../resources/tools/editor/scripts/rdfstore.js  | 31836 +++++++++++++++++
 .../tools/editor/scripts/underscore-min.js      |     7 +
 .../resources/tools/editor/styles/etch.css      |    43 +
 .../tools/editor/styles/images/editor_icons.png |   Bin 0 -> 4893 bytes
 .../clerezza/platform/editor/Manager.scala      |    53 +
 .../renderlets/DiscobitsContentEtch.scala       |   277 +
 .../renderlets/HtmlInfoDicobitRDFaNaked.scala   |    34 +
 .../renderlets/OrderedContentRDFaNaked.scala    |    38 +
 .../renderlets/TitledContentRDFaNaked.scala     |    42 +
 platform/enrichment/LICENSE                     |   201 +
 platform/enrichment/pom.xml                     |    63 +
 .../rdf/enrichment/EnrichmentTcProvider.java    |   192 +
 platform/globalmenu.api/LICENSE                 |   201 +
 platform/globalmenu.api/pom.xml                 |    49 +
 .../platform/globalmenu/GlobalMenuItem.java     |   187 +
 .../globalmenu/GlobalMenuItemsProvider.java     |    39 +
 platform/graphnodeprovider/LICENSE              |   201 +
 platform/graphnodeprovider/pom.xml              |   141 +
 .../resources/OSGI-INF/serviceComponents.xml    |    42 +
 .../PlatformGraphNodeProvider.scala             |   245 +
 platform/graphprovider.content/LICENSE          |   201 +
 platform/graphprovider.content/pom.xml          |    64 +
 .../content/ContentGraphProvider.java           |   133 +
 .../content/GraphNameTransitioner.java          |    95 +
 .../TcPermissionDescriptionsProvider.java       |    58 +
 platform/language/LICENSE                       |   201 +
 .../language/platform.language.core/LICENSE     |   201 +
 .../language/platform.language.core/pom.xml     |    87 +
 .../platform/language/LanguageDescription.java  |   115 +
 .../platform/language/LanguageService.java      |   328 +
 .../platform/language/LanguageWidget.java       |   185 +
 .../platform/language/language-list.ssp         |    50 +
 .../clerezza/platform/language/lingvoj.rdf      | 20946 +++++++++++
 .../language/staticweb/scripts/language-list.js |    35 +
 .../platform.language.ontologies/LICENSE        |   201 +
 .../platform.language.ontologies/pom.xml        |    67 +
 .../platform/language/ontologies/language.rdf   |    52 +
 platform/language/pom.xml                       |    41 +
 platform/launcher.mulgara/LICENSE               |   202 +
 platform/launcher.mulgara/pom.xml               |   163 +
 .../src/main/appended-resources/META-INF/NOTICE |     6 +
 .../images/tut_1_class_diagram.png              |   Bin 0 -> 6985 bytes
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/launcher.mulgara/src/site/site.xml     |    26 +
 .../src/site/xsite/content/information.xhtml    |    41 +
 .../src/site/xsite/content/sitemap.xml          |    26 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/launcher.sesame/DISCLAIMER             |    11 +
 platform/launcher.sesame/LICENSE                |   202 +
 platform/launcher.sesame/README.txt             |    11 +
 platform/launcher.sesame/pom.xml                |   178 +
 .../src/main/appended-resources/META-INF/NOTICE |     6 +
 .../launcher.sesame/src/main/assembly/src.xml   |    69 +
 .../images/tut_1_class_diagram.png              |   Bin 0 -> 6985 bytes
 .../resources/documentation/style/style.css     |   419 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/launcher.sesame/src/site/site.xml      |    26 +
 .../src/site/xsite/content/information.xhtml    |    41 +
 .../src/site/xsite/content/sitemap.xml          |    26 +
 .../src/site/xsite/templates/skin.html          |    70 +
 platform/launcher.storageless.parent/LICENSE    |   201 +
 .../platform.launcher.storageless/LICENSE       |   471 +
 .../platform.launcher.storageless/pom.xml       |   417 +
 .../src/main/appended-resources/META-INF/NOTICE |    18 +
 .../platform/launcher/ClerezzaActivator.java    |    73 +
 .../clerezza/platform/launcher/ClerezzaApp.java |   479 +
 .../platform/launcher/LauncherArguments.java    |    70 +
 .../apache/clerezza/platform/launcher/Main.java |    48 +
 .../platform/launcher/MavenArtifactDesc.java    |   147 +
 .../platform/launcher/ShutdownListener.java     |    38 +
 .../images/tut_1_class_diagram.png              |   Bin 0 -> 6985 bytes
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 .../src/site/site.xml                           |    30 +
 .../src/site/xsite/content/sitemap.xml          |    28 +
 .../src/site/xsite/content/usage.xhtml          |   180 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/launcher.storageless.parent/pom.xml    |   927 +
 platform/launcher.tdb/DISCLAIMER                |    11 +
 platform/launcher.tdb/LICENSE                   |   471 +
 platform/launcher.tdb/README.txt                |    11 +
 platform/launcher.tdb/nb-configuration.xml      |    18 +
 platform/launcher.tdb/nbactions.xml             |    54 +
 platform/launcher.tdb/pom.xml                   |   229 +
 .../src/main/appended-resources/META-INF/NOTICE |    18 +
 platform/launcher.tdb/src/main/assembly/src.xml |    69 +
 .../images/tut_1_class_diagram.png              |   Bin 0 -> 6985 bytes
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/launcher.tdb/src/site/site.xml         |    26 +
 .../src/site/xsite/content/information.xhtml    |    41 +
 .../src/site/xsite/content/sitemap.xml          |    27 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/launcher.virtuoso/DISCLAIMER           |    11 +
 platform/launcher.virtuoso/LICENSE              |   471 +
 platform/launcher.virtuoso/README.txt           |    24 +
 platform/launcher.virtuoso/pom.xml              |   251 +
 .../src/main/appended-resources/META-INF/NOTICE |    18 +
 .../launcher.virtuoso/src/main/assembly/src.xml |    69 +
 .../images/tut_1_class_diagram.png              |   Bin 0 -> 6985 bytes
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/launcher.virtuoso/src/site/site.xml    |    26 +
 .../src/site/xsite/content/information.xhtml    |    41 +
 .../src/site/xsite/content/sitemap.xml          |    27 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/logging/LICENSE                        |   201 +
 platform/logging/core/LICENSE                   |   201 +
 platform/logging/core/pom.xml                   |    94 +
 .../platform/logging/LoggingManager.java        |   163 +
 .../logging/LoggingManagerAccessPermission.java |    71 +
 .../platform/logging/config-page-naked.ssp      |    32 +
 platform/logging/initializer/LICENSE            |   201 +
 platform/logging/initializer/pom.xml            |    68 +
 .../logging/initializer/Activator.scala         |    88 +
 platform/logging/ontologies/LICENSE             |   201 +
 platform/logging/ontologies/pom.xml             |    67 +
 .../platform/logging/ontologies/logging.ttl     |    32 +
 platform/logging/pom.xml                        |    49 +
 platform/mail/LICENSE                           |   201 +
 platform/mail/pom.xml                           |    75 +
 .../platform/mail/GraphNodeDataHandler.java     |   131 +
 .../apache/clerezza/platform/mail/MailMan.java  |   177 +
 .../clerezza/platform/mail/MailManImpl.java     |   291 +
 .../platform/mail/MailManPermission.java        |   135 +
 .../MailPermissionDescriptionsProvider.java     |    59 +
 .../platform/mail/MailSessionFactory.java       |    99 +
 .../platform/mail/MailManPermissionTest.java    |    94 +
 platform/platform.accountcontrolpanel/LICENSE   |   201 -
 .../platform.accountcontrolpanel.core/LICENSE   |   201 -
 .../platform.accountcontrolpanel.core/pom.xml   |   198 -
 .../account-control-panel/scripts/IEKeygen.js   |   287 -
 .../account-control-panel/scripts/profile.js    |    64 -
 .../account-control-panel/style/profile.css     |    51 -
 .../resources/OSGI-INF/serviceComponents.xml    |   101 -
 .../AcpPermissionDescriptionsProvider.scala     |    75 -
 .../accountcontrolpanel/MenuItemProvider.scala  |    71 -
 .../accountcontrolpanel/ProfilePanel.scala      |   466 -
 .../accountcontrolpanel/SettingsPanel.scala     |   646 -
 .../html/ContactConfirmRenderlet.scala          |   109 -
 .../accountcontrolpanel/html/PersonBox.scala    |    63 -
 .../accountcontrolpanel/html/ProfilePanel.scala |   295 -
 .../html/RenderingUtility.scala                 |    94 -
 .../html/SettingsPanel.scala                    |   163 -
 .../accountcontrolpanel/permissions.scala       |   103 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../src/site/site.xml                           |    30 -
 .../src/site/xsite/content/sitemap.xml          |    28 -
 .../src/site/xsite/content/usage.xhtml          |    49 -
 .../src/site/xsite/templates/skin.html          |    71 -
 .../LICENSE                                     |   201 -
 .../pom.xml                                     |    67 -
 .../ontologies/controlpanel.rdf                 |   120 -
 platform/platform.accountcontrolpanel/pom.xml   |    41 -
 platform/platform.concepts/LICENSE              |   201 -
 platform/platform.concepts/README.txt           |    18 -
 .../platform.concepts.core/LICENSE              |   201 -
 .../platform.concepts.core/pom.xml              |   111 -
 .../platform/concepts/core/ConceptCache.java    |   285 -
 .../concepts/core/ConceptManipulator.java       |   124 -
 .../platform/concepts/core/ConceptProvider.java |    40 -
 .../concepts/core/ConceptProviderManager.java   |    39 -
 .../ConceptProviderManagerAppPermission.java    |    66 -
 .../platform/concepts/core/ConceptsFinder.java  |   266 -
 .../concepts/core/GenericResourcePage.java      |   111 -
 .../concepts/core/LocalConceptProvider.java     |    90 -
 .../concepts/core/RemoteConceptProvider.java    |   134 -
 .../core/RemoteConceptsDescriptionManager.java  |   102 -
 .../platform/concepts/core/ResourceTagger.java  |   131 -
 .../core/SimpleConceptProviderManager.java      |   319 -
 .../concepts/scripts/concept-find-create.js     |    21 -
 .../scripts/concept-provider-manipulation.js    |    21 -
 .../concepts/scripts/selected-concepts.js       |    21 -
 .../META-INF/static-web/concepts/style/form.css |    21 -
 .../concepts/core/concept-existing-subjects.ssp |    29 -
 .../concepts/core/concept-find-create.ssp       |    61 -
 .../platform/concepts/core/concept-tagging.ssp  |    23 -
 .../concepts/core/generic-resource-page.ssp     |    43 -
 .../core/manage-concept-providers-page.ssp      |   128 -
 .../concepts/core/selected-concepts.ssp         |    41 -
 .../concepts/core/skos-collection-json.ssp      |    33 -
 .../staticweb/scripts/concept-find-create.js    |   217 -
 .../scripts/concept-provider-manipulation.js    |   213 -
 .../scripts/jquery.rdfquery.core-1.0.js         |  4040 ---
 .../core/staticweb/scripts/selected-concepts.js |    58 -
 .../concepts/core/staticweb/style/form.css      |    24 -
 .../core/ConceptProviderManagerTest.java        |   104 -
 .../concepts/core/ConceptsFinderTest.java       |   154 -
 .../platform.concepts.ontologies/LICENSE        |   201 -
 .../platform.concepts.ontologies/pom.xml        |    65 -
 .../platform/concepts/ontologies/concepts.rdf   |   191 -
 .../concepts/ontologies/queryresult.rdf         |    62 -
 platform/platform.concepts/pom.xml              |    38 -
 platform/platform.config.gui/LICENSE            |   201 -
 platform/platform.config.gui/pom.xml            |    92 -
 .../config/gui/ConfigGuiAccessPermission.java   |    66 -
 .../platform/config/gui/PlatformConfigGui.java  |   190 -
 .../clerezza/platform/config/gui/config.ssp     |    49 -
 .../config/gui/staticweb/js/platformconfig.js   |    52 -
 platform/platform.config/LICENSE                |   201 -
 platform/platform.config/pom.xml                |    79 -
 .../platform/config/PlatformConfig.java         |   191 -
 .../clerezza/platform/config/SystemConfig.java  |   186 -
 .../TcPermissionDescriptionsProvider.java       |    70 -
 .../platform/config/default-system-graph.rdf    |   103 -
 platform/platform.content.default404/LICENSE    |   201 -
 platform/platform.content.default404/pom.xml    |   100 -
 .../main/resources/META-INF/documentation.nt    |    35 -
 .../resources/OSGI-INF/serviceComponents.xml    |    30 -
 .../default404/DefaultPageNotFoundService.scala |    64 -
 platform/platform.content.fsadaptor/LICENSE     |   201 -
 platform/platform.content.fsadaptor/pom.xml     |   116 -
 .../resources/OSGI-INF/serviceComponents.xml    |    38 -
 .../content/fsadaptor/BundleFsLoader.scala      |   301 -
 .../content/fsadaptor/DirectoryOverlay.scala    |    86 -
 .../platform/content/fsadaptor/Logger.scala     |    30 -
 .../content/fsadaptor/PathNode2MGraph.scala     |   146 -
 platform/platform.content.imagemetadata/LICENSE |   201 -
 platform/platform.content.imagemetadata/pom.xml |    67 -
 .../imagemetadata/ImageMetaDataGenerator.java   |    64 -
 .../platform.content.representations/LICENSE    |   201 -
 .../LICENSE                                     |   201 -
 .../pom.xml                                     |    87 -
 .../AlternativeRepresentationGenerator.java     |   327 -
 .../representations/core/ThumbnailService.java  |   378 -
 .../LICENSE                                     |   201 -
 .../pom.xml                                     |    67 -
 .../ontologies/representations.rdf              |    52 -
 .../platform.content.representations/pom.xml    |    41 -
 platform/platform.content/LICENSE               |   201 -
 platform/platform.content/pom.xml               |   154 -
 .../content/AbstractDiscobitsHandler.java       |   151 -
 .../platform/content/CollectionTypeHandler.java |   164 -
 .../platform/content/ContentPostSupport.java    |    98 -
 .../platform/content/DiscobitTemplating.java    |    77 -
 .../platform/content/DiscobitsHandler.java      |    70 -
 .../platform/content/DiscobitsTypeHandler.java  |   556 -
 .../clerezza/platform/content/Editor.java       |   177 -
 .../clerezza/platform/content/InfoDiscobit.java |   105 -
 .../platform/content/InfoDiscobitWriter.java    |    67 -
 .../platform/content/PageNotFoundService.java   |    40 -
 .../content/SimpleDiscobitsHandler.java         |    49 -
 .../content/TitledContentRenderlet.java         |   142 -
 .../clerezza/platform/content/WebDavUtils.java  |   703 -
 .../content/collections/CollectionCreator.java  |    74 -
 .../GenericMetaDataGenerator.java               |    53 -
 .../clerezza/platform/content/webdav/COPY.java  |    38 -
 .../clerezza/platform/content/webdav/LOCK.java  |    38 -
 .../clerezza/platform/content/webdav/MKCOL.java |    37 -
 .../clerezza/platform/content/webdav/MOVE.java  |    38 -
 .../platform/content/webdav/PROPFIND.java       |    37 -
 .../platform/content/webdav/PROPPATCH.java      |    37 -
 .../platform/content/webdav/UNLOCK.java         |    38 -
 .../main/resources/META-INF/documentation.nt    |    59 -
 .../platform/content/OrderedContent_naked.xhtml |     4 -
 .../clerezza/platform/content/Resource.xhtml    |    11 -
 .../platform/content/Resource_naked.xhtml       |     1 -
 .../platform/content/TitledContent.xhtml        |    15 -
 .../content/XHTML_InfoDiscoBit_naked.xhtml      |     1 -
 .../clerezza/platform/content/XmlLiteral.ssp    |    35 -
 .../clerezza/platform/content/collection.ssp    |    38 -
 .../platform/content/staticweb/disco.xhtml      |   171 -
 .../content/staticweb/discoscripts/identity.js  |   399 -
 .../content/staticweb/discoscripts/log.js       |   104 -
 .../content/staticweb/discoscripts/match.js     |   192 -
 .../staticweb/discoscripts/mozile/LICENSE.txt   |  1446 -
 .../staticweb/discoscripts/mozile/README        |   119 -
 .../discoscripts/mozile/images/Mozile-16.png    |   Bin 920 -> 0 bytes
 .../discoscripts/mozile/images/arrow-down.gif   |   Bin 52 -> 0 bytes
 .../discoscripts/mozile/images/arrow-right.gif  |   Bin 57 -> 0 bytes
 .../discoscripts/mozile/images/silk/COPYING     |     1 -
 .../mozile/images/silk/arrow_redo.png           |   Bin 625 -> 0 bytes
 .../mozile/images/silk/arrow_undo.png           |   Bin 631 -> 0 bytes
 .../discoscripts/mozile/images/silk/bug.png     |   Bin 774 -> 0 bytes
 .../discoscripts/mozile/images/silk/cut.png     |   Bin 648 -> 0 bytes
 .../discoscripts/mozile/images/silk/font.png    |   Bin 567 -> 0 bytes
 .../discoscripts/mozile/images/silk/help.png    |   Bin 786 -> 0 bytes
 .../discoscripts/mozile/images/silk/html.png    |   Bin 578 -> 0 bytes
 .../mozile/images/silk/information.png          |   Bin 778 -> 0 bytes
 .../mozile/images/silk/link_add.png             |   Bin 570 -> 0 bytes
 .../mozile/images/silk/link_break.png           |   Bin 657 -> 0 bytes
 .../mozile/images/silk/page_copy.png            |   Bin 663 -> 0 bytes
 .../mozile/images/silk/page_edit.png            |   Bin 807 -> 0 bytes
 .../mozile/images/silk/page_paste.png           |   Bin 703 -> 0 bytes
 .../mozile/images/silk/page_save.png            |   Bin 774 -> 0 bytes
 .../mozile/images/silk/paintbrush.png           |   Bin 548 -> 0 bytes
 .../mozile/images/silk/paintcan.png             |   Bin 707 -> 0 bytes
 .../mozile/images/silk/paste_plain.png          |   Bin 605 -> 0 bytes
 .../mozile/images/silk/photo_add.png            |   Bin 707 -> 0 bytes
 .../discoscripts/mozile/images/silk/pilcrow.png |   Bin 361 -> 0 bytes
 .../discoscripts/mozile/images/silk/style.png   |   Bin 813 -> 0 bytes
 .../mozile/images/silk/text_align_center.png    |   Bin 234 -> 0 bytes
 .../mozile/images/silk/text_align_justify.png   |   Bin 209 -> 0 bytes
 .../mozile/images/silk/text_align_left.png      |   Bin 209 -> 0 bytes
 .../mozile/images/silk/text_align_right.png     |   Bin 209 -> 0 bytes
 .../mozile/images/silk/text_bold.png            |   Bin 304 -> 0 bytes
 .../mozile/images/silk/text_heading_1.png       |   Bin 276 -> 0 bytes
 .../mozile/images/silk/text_heading_2.png       |   Bin 304 -> 0 bytes
 .../mozile/images/silk/text_heading_3.png       |   Bin 306 -> 0 bytes
 .../mozile/images/silk/text_heading_4.png       |   Bin 293 -> 0 bytes
 .../mozile/images/silk/text_heading_5.png       |   Bin 304 -> 0 bytes
 .../mozile/images/silk/text_heading_6.png       |   Bin 310 -> 0 bytes
 .../mozile/images/silk/text_horizontalrule.png  |   Bin 317 -> 0 bytes
 .../mozile/images/silk/text_indent.png          |   Bin 353 -> 0 bytes
 .../mozile/images/silk/text_indent_remove.png   |   Bin 351 -> 0 bytes
 .../mozile/images/silk/text_italic.png          |   Bin 223 -> 0 bytes
 .../mozile/images/silk/text_list_bullets.png    |   Bin 344 -> 0 bytes
 .../mozile/images/silk/text_list_numbers.png    |   Bin 357 -> 0 bytes
 .../mozile/images/silk/text_strikethrough.png   |   Bin 269 -> 0 bytes
 .../mozile/images/silk/text_subscript.png       |   Bin 422 -> 0 bytes
 .../mozile/images/silk/text_superscript.png     |   Bin 421 -> 0 bytes
 .../mozile/images/silk/text_underline.png       |   Bin 273 -> 0 bytes
 .../discoscripts/mozile/images/silk/tick.png    |   Bin 537 -> 0 bytes
 .../discoscripts/mozile/lib/docbook.rng         |   146 -
 .../discoscripts/mozile/lib/local.conf          |    25 -
 .../discoscripts/mozile/lib/xhtml-basic.rng     |   727 -
 .../staticweb/discoscripts/mozile/lib/xhtml.rng |   993 -
 .../mozile/lib/xhtml/exclude/basic-table.rng    |    56 -
 .../mozile/lib/xhtml/exclude/basic.rng          |   122 -
 .../mozile/lib/xhtml/exclude/form.rng           |   118 -
 .../discoscripts/mozile/lib/xhtml/index.html    |   129 -
 .../mozile/lib/xhtml/modules/applet.rng         |    47 -
 .../mozile/lib/xhtml/modules/attribs.rng        |    61 -
 .../mozile/lib/xhtml/modules/base.rng           |    23 -
 .../mozile/lib/xhtml/modules/basic-form.rng     |   200 -
 .../mozile/lib/xhtml/modules/basic-table.rng    |   146 -
 .../mozile/lib/xhtml/modules/bdo.rng            |    37 -
 .../mozile/lib/xhtml/modules/csismap.rng        |   102 -
 .../mozile/lib/xhtml/modules/datatypes.rng      |   120 -
 .../mozile/lib/xhtml/modules/edit.rng           |    55 -
 .../mozile/lib/xhtml/modules/events.rng         |   208 -
 .../mozile/lib/xhtml/modules/form.rng           |   209 -
 .../mozile/lib/xhtml/modules/frames.rng         |   111 -
 .../mozile/lib/xhtml/modules/hypertext.rng      |    61 -
 .../mozile/lib/xhtml/modules/iframe.rng         |    67 -
 .../mozile/lib/xhtml/modules/image.rng          |    40 -
 .../mozile/lib/xhtml/modules/inlstyle.rng       |    11 -
 .../mozile/lib/xhtml/modules/legacy.rng         |   502 -
 .../mozile/lib/xhtml/modules/link.rng           |    56 -
 .../mozile/lib/xhtml/modules/list.rng           |    92 -
 .../mozile/lib/xhtml/modules/meta.rng           |    37 -
 .../mozile/lib/xhtml/modules/nameident.rng      |    39 -
 .../mozile/lib/xhtml/modules/object.rng         |    82 -
 .../mozile/lib/xhtml/modules/param.rng          |    33 -
 .../mozile/lib/xhtml/modules/pres.rng           |   107 -
 .../mozile/lib/xhtml/modules/ruby.rng           |   102 -
 .../mozile/lib/xhtml/modules/script.rng         |    70 -
 .../mozile/lib/xhtml/modules/ssismap.rng        |    14 -
 .../mozile/lib/xhtml/modules/struct.rng         |    76 -
 .../mozile/lib/xhtml/modules/style.rng          |    36 -
 .../mozile/lib/xhtml/modules/table.rng          |   257 -
 .../mozile/lib/xhtml/modules/target.rng         |    31 -
 .../mozile/lib/xhtml/modules/text.rng           |   338 -
 .../mozile/lib/xhtml/xhtml-basic.rng            |    21 -
 .../mozile/lib/xhtml/xhtml-strict.rng           |    36 -
 .../discoscripts/mozile/lib/xhtml/xhtml.rng     |    39 -
 .../staticweb/discoscripts/mozile/mozile.js     |  1368 -
 .../discoscripts/mozile/src/gui/htmlToolbar.css |   162 -
 .../staticweb/discoscripts/parameters.js        |    72 -
 .../content/staticweb/discoscripts/rdfparser.js |   544 -
 .../staticweb/discoscripts/rdfxmlserializer.js  |   130 -
 .../content/staticweb/discoscripts/term.js      |   307 -
 .../content/staticweb/discoscripts/uri.js       |   123 -
 .../content/staticweb/discoscripts/util.js      |   174 -
 .../staticweb/discoscripts/widget-factory.js    |   995 -
 .../content/staticweb/scripts/tria-disco.js     |    56 -
 .../staticweb/style/disco-icon-round.png        |   Bin 3798 -> 0 bytes
 .../content/staticweb/style/disco-icon.png      |   Bin 6734 -> 0 bytes
 .../content/staticweb/style/discostyle.css      |    73 -
 .../content/staticweb/style/favicon.ico         |   Bin 4286 -> 0 bytes
 .../collections/CollectionsCreatorTest.java     |    54 -
 platform/platform.cris/LICENSE                  |   201 -
 platform/platform.cris/pom.xml                  |    95 -
 .../clerezza/platform/cris/IndexService.java    |   243 -
 platform/platform.curieprefixmanager/LICENSE    |   201 -
 .../platform.curieprefixmanager/core/LICENSE    |   201 -
 .../platform.curieprefixmanager/core/pom.xml    |    89 -
 .../CuriePrefixRecommender.java                 |    36 -
 .../impl/CuriePrefixManager.java                |   237 -
 .../impl/curie-prefix-list-naked.ssp            |    46 -
 .../impl/curie-prefix-naked.ssp                 |    31 -
 .../ontologies/LICENSE                          |   201 -
 .../ontologies/pom.xml                          |    67 -
 .../curieprefixmanager/ontologies/curie.ttl     |    40 -
 platform/platform.curieprefixmanager/pom.xml    |    59 -
 .../platform.dashboard.webinterface/LICENSE     |   201 -
 .../platform.dashboard.webinterface/pom.xml     |    91 -
 .../dashboard/webinterface/DashBoard.java       |   131 -
 .../webinterface/dashboard-template.ssp         |    41 -
 platform/platform.dashboard/LICENSE             |   201 -
 .../platform.dashboard.core/LICENSE             |   201 -
 .../platform.dashboard.core/pom.xml             |   114 -
 .../dashboard/ContextualMenuGenerator.java      |   207 -
 .../platform/dashboard/UserLoginNode.java       |    98 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.dashboard.core/src/site/site.xml   |    30 -
 .../src/site/xsite/content/sitemap.xml          |    26 -
 .../src/site/xsite/content/usage.xhtml          |    70 -
 .../src/site/xsite/templates/skin.html          |    71 -
 .../platform.dashboard.ontologies/LICENSE       |   201 -
 .../platform.dashboard.ontologies/pom.xml       |    67 -
 .../platform/dashboard/ontologies/dashboard.rdf |    50 -
 .../dashboard/ontologies/globalmenu.rdf         |    87 -
 .../platform.dashboard.tests/LICENSE            |   201 -
 .../platform.dashboard.tests/pom.xml            |   257 -
 .../osgi/FelixContextualMenuGeneratorTest.java  |   195 -
 .../blackbox/osgi/GlobalMenuItemsProviderA.java |    52 -
 platform/platform.dashboard/pom.xml             |    42 -
 platform/platform.documentation.viewer/LICENSE  |   201 -
 platform/platform.documentation.viewer/pom.xml  |    65 -
 .../viewer/DocumentationViewer.java             |   238 -
 .../main/resources/META-INF/documentation.nt    |    26 -
 .../platform/documentation/viewer/SortTest.java |   143 -
 platform/platform.documentation/LICENSE         |   201 -
 platform/platform.documentation/pom.xml         |    75 -
 .../DocumentationInContentGraph.java            |    54 -
 .../documentation/DocumentationProvider.java    |   274 -
 .../documentation/UriMutatorIterator.java       |   176 -
 .../main/resources/META-INF/documentation.nt    |    47 -
 .../documentation/baseUriTransformation.xsl     |    47 -
 .../documentation/UriMutatorIteratorTest.java   |   113 -
 platform/platform.editor/LICENSE                |   201 -
 platform/platform.editor/nbactions.xml          |    11 -
 platform/platform.editor/pom.xml                |   191 -
 .../tools/editor/scripts/RDFa.1.3.0.js          |  3380 --
 .../tools/editor/scripts/RDFaProcessor.1.3.0.js |  1644 -
 .../tools/editor/scripts/backbone-min.js        |     4 -
 .../tools/editor/scripts/backbone.stickit.js    |   468 -
 .../resources/tools/editor/scripts/etch.js      |   366 -
 .../tools/editor/scripts/greenrdfstore.js       |    78 -
 .../tools/editor/scripts/jquery.min.js          |     5 -
 .../resources/tools/editor/scripts/rdfstore.js  | 31836 -----------------
 .../tools/editor/scripts/underscore-min.js      |     7 -
 .../resources/tools/editor/styles/etch.css      |    43 -
 .../tools/editor/styles/images/editor_icons.png |   Bin 4893 -> 0 bytes
 .../clerezza/platform/editor/Manager.scala      |    53 -
 .../renderlets/DiscobitsContentEtch.scala       |   277 -
 .../renderlets/HtmlInfoDicobitRDFaNaked.scala   |    34 -
 .../renderlets/OrderedContentRDFaNaked.scala    |    38 -
 .../renderlets/TitledContentRDFaNaked.scala     |    42 -
 platform/platform.enrichment/LICENSE            |   201 -
 platform/platform.enrichment/pom.xml            |    63 -
 .../rdf/enrichment/EnrichmentTcProvider.java    |   192 -
 platform/platform.globalmenu.api/LICENSE        |   201 -
 platform/platform.globalmenu.api/pom.xml        |    49 -
 .../platform/globalmenu/GlobalMenuItem.java     |   187 -
 .../globalmenu/GlobalMenuItemsProvider.java     |    39 -
 platform/platform.graphnodeprovider/LICENSE     |   201 -
 platform/platform.graphnodeprovider/pom.xml     |   141 -
 .../resources/OSGI-INF/serviceComponents.xml    |    42 -
 .../PlatformGraphNodeProvider.scala             |   245 -
 platform/platform.graphprovider.content/LICENSE |   201 -
 platform/platform.graphprovider.content/pom.xml |    64 -
 .../content/ContentGraphProvider.java           |   133 -
 .../content/GraphNameTransitioner.java          |    95 -
 .../TcPermissionDescriptionsProvider.java       |    58 -
 platform/platform.language/LICENSE              |   201 -
 .../platform.language.core/LICENSE              |   201 -
 .../platform.language.core/pom.xml              |    87 -
 .../platform/language/LanguageDescription.java  |   115 -
 .../platform/language/LanguageService.java      |   328 -
 .../platform/language/LanguageWidget.java       |   185 -
 .../platform/language/language-list.ssp         |    50 -
 .../clerezza/platform/language/lingvoj.rdf      | 20946 -----------
 .../language/staticweb/scripts/language-list.js |    35 -
 .../platform.language.ontologies/LICENSE        |   201 -
 .../platform.language.ontologies/pom.xml        |    67 -
 .../platform/language/ontologies/language.rdf   |    52 -
 platform/platform.language/pom.xml              |    41 -
 platform/platform.launcher.mulgara/LICENSE      |   202 -
 platform/platform.launcher.mulgara/pom.xml      |   163 -
 .../src/main/appended-resources/META-INF/NOTICE |     6 -
 .../images/tut_1_class_diagram.png              |   Bin 6985 -> 0 bytes
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.launcher.mulgara/src/site/site.xml |    26 -
 .../src/site/xsite/content/information.xhtml    |    41 -
 .../src/site/xsite/content/sitemap.xml          |    26 -
 .../src/site/xsite/templates/skin.html          |    71 -
 platform/platform.launcher.sesame/DISCLAIMER    |    11 -
 platform/platform.launcher.sesame/LICENSE       |   202 -
 platform/platform.launcher.sesame/README.txt    |    11 -
 platform/platform.launcher.sesame/pom.xml       |   178 -
 .../src/main/appended-resources/META-INF/NOTICE |     6 -
 .../src/main/assembly/src.xml                   |    69 -
 .../images/tut_1_class_diagram.png              |   Bin 6985 -> 0 bytes
 .../resources/documentation/style/style.css     |   419 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.launcher.sesame/src/site/site.xml  |    26 -
 .../src/site/xsite/content/information.xhtml    |    41 -
 .../src/site/xsite/content/sitemap.xml          |    26 -
 .../src/site/xsite/templates/skin.html          |    70 -
 .../LICENSE                                     |   201 -
 .../platform.launcher.storageless/LICENSE       |   471 -
 .../platform.launcher.storageless/pom.xml       |   417 -
 .../src/main/appended-resources/META-INF/NOTICE |    18 -
 .../platform/launcher/ClerezzaActivator.java    |    73 -
 .../clerezza/platform/launcher/ClerezzaApp.java |   479 -
 .../platform/launcher/LauncherArguments.java    |    70 -
 .../apache/clerezza/platform/launcher/Main.java |    48 -
 .../platform/launcher/MavenArtifactDesc.java    |   147 -
 .../platform/launcher/ShutdownListener.java     |    38 -
 .../images/tut_1_class_diagram.png              |   Bin 6985 -> 0 bytes
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../src/site/site.xml                           |    30 -
 .../src/site/xsite/content/sitemap.xml          |    28 -
 .../src/site/xsite/content/usage.xhtml          |   180 -
 .../src/site/xsite/templates/skin.html          |    71 -
 .../pom.xml                                     |   927 -
 platform/platform.launcher.tdb/DISCLAIMER       |    11 -
 platform/platform.launcher.tdb/LICENSE          |   471 -
 platform/platform.launcher.tdb/README.txt       |    11 -
 .../platform.launcher.tdb/nb-configuration.xml  |    18 -
 platform/platform.launcher.tdb/nbactions.xml    |    54 -
 platform/platform.launcher.tdb/pom.xml          |   229 -
 .../src/main/appended-resources/META-INF/NOTICE |    18 -
 .../src/main/assembly/src.xml                   |    69 -
 .../images/tut_1_class_diagram.png              |   Bin 6985 -> 0 bytes
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.launcher.tdb/src/site/site.xml     |    26 -
 .../src/site/xsite/content/information.xhtml    |    41 -
 .../src/site/xsite/content/sitemap.xml          |    27 -
 .../src/site/xsite/templates/skin.html          |    71 -
 platform/platform.launcher.virtuoso/DISCLAIMER  |    11 -
 platform/platform.launcher.virtuoso/LICENSE     |   471 -
 platform/platform.launcher.virtuoso/README.txt  |    24 -
 platform/platform.launcher.virtuoso/pom.xml     |   251 -
 .../src/main/appended-resources/META-INF/NOTICE |    18 -
 .../src/main/assembly/src.xml                   |    69 -
 .../images/tut_1_class_diagram.png              |   Bin 6985 -> 0 bytes
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../src/site/site.xml                           |    26 -
 .../src/site/xsite/content/information.xhtml    |    41 -
 .../src/site/xsite/content/sitemap.xml          |    27 -
 .../src/site/xsite/templates/skin.html          |    71 -
 platform/platform.logging/LICENSE               |   201 -
 platform/platform.logging/core/LICENSE          |   201 -
 platform/platform.logging/core/pom.xml          |    94 -
 .../platform/logging/LoggingManager.java        |   163 -
 .../logging/LoggingManagerAccessPermission.java |    71 -
 .../platform/logging/config-page-naked.ssp      |    32 -
 platform/platform.logging/initializer/LICENSE   |   201 -
 platform/platform.logging/initializer/pom.xml   |    68 -
 .../logging/initializer/Activator.scala         |    88 -
 platform/platform.logging/ontologies/LICENSE    |   201 -
 platform/platform.logging/ontologies/pom.xml    |    67 -
 .../platform/logging/ontologies/logging.ttl     |    32 -
 platform/platform.logging/pom.xml               |    49 -
 platform/platform.mail/LICENSE                  |   201 -
 platform/platform.mail/pom.xml                  |    75 -
 .../platform/mail/GraphNodeDataHandler.java     |   131 -
 .../apache/clerezza/platform/mail/MailMan.java  |   177 -
 .../clerezza/platform/mail/MailManImpl.java     |   291 -
 .../platform/mail/MailManPermission.java        |   135 -
 .../MailPermissionDescriptionsProvider.java     |    59 -
 .../platform/mail/MailSessionFactory.java       |    99 -
 .../platform/mail/MailManPermissionTest.java    |    94 -
 .../platform.scripting.scriptmanager/LICENSE    |   201 -
 .../platform.scripting.scriptmanager/pom.xml    |    99 -
 .../scripting/scriptmanager/ScriptManager.java  |   849 -
 .../ScriptManagerAppPermission.java             |    66 -
 .../scriptmanager/ontology/SCRIPTMANAGER.java   |    87 -
 .../main/resources/META-INF/documentation.nt    |   103 -
 .../scriptmanager/ontology/scriptmanager.rdf    |   150 -
 .../scriptmanager-execution-uri-list.xhtml      |    41 -
 .../scriptmanager-execution-uri-overview.ssp    |    50 -
 .../scriptmanager-script-information.xhtml      |    91 -
 .../scriptmanager-script-install.ssp            |    99 -
 .../scriptmanager-script-list.xhtml             |    31 -
 .../scriptmanager-script-overview.ssp           |    69 -
 .../staticweb/js/scriptmanager-execution-uri.js |    27 -
 .../staticweb/js/scriptmanager-overview.js      |    45 -
 .../scriptmanager/staticweb/js/scriptmanager.js |   170 -
 platform/platform.scripting/LICENSE             |   201 -
 platform/platform.scripting/pom.xml             |    75 -
 .../JRubyScriptEngineFactoryWrapper.java        |   100 -
 .../platform/scripting/NoEngineException.java   |    41 -
 .../scripting/ScriptEngineFactoryManager.java   |   183 -
 .../platform/scripting/ScriptExecution.java     |   315 -
 .../ScriptGeneratedResourceTypeHandler.java     |   128 -
 .../scripting/ScriptLanguageDescription.java    |    90 -
 platform/platform.security.conditions/LICENSE   |   201 -
 platform/platform.security.conditions/pom.xml   |    60 -
 .../conditions/NotBundleLocationCondition.java  |    47 -
 platform/platform.security.foafssl/LICENSE      |   201 -
 platform/platform.security.foafssl/core/LICENSE |   201 -
 platform/platform.security.foafssl/core/pom.xml |   139 -
 .../resources/OSGI-INF/serviceComponents.xml    |    47 -
 .../foafssl/auth/FoafSslAuthentication.scala    |   127 -
 .../clerezza/foafssl/auth/WebIDClaim.scala      |   216 -
 .../clerezza/foafssl/auth/X509Claim.scala       |   279 -
 .../apache/clerezza/foafssl/ssl/Activator.scala |   108 -
 .../ssl/X509TrustManagerWrapperService.scala    |    70 -
 .../ontologies/LICENSE                          |   201 -
 .../ontologies/pom.xml                          |    67 -
 .../clerezza/foafssl/ontologies/atomowl.rdf     |   653 -
 .../apache/clerezza/foafssl/ontologies/cert.n3  |   187 -
 .../apache/clerezza/foafssl/ontologies/earl.rdf |   245 -
 .../apache/clerezza/foafssl/ontologies/rsa.rdf  |   114 -
 .../apache/clerezza/foafssl/ontologies/test.n3  |   205 -
 platform/platform.security.foafssl/pom.xml      |    39 -
 platform/platform.security.foafssl/test/LICENSE |   201 -
 platform/platform.security.foafssl/test/pom.xml |   162 -
 .../main/resources/META-INF/documentation.nt    |     2 -
 .../resources/OSGI-INF/serviceComponents.xml    |    43 -
 .../clerezza/foafssl/test/WebIDTester.scala     |   757 -
 .../foafssl/test/pages/WebIDClaimPg.scala       |   240 -
 platform/platform.shellcustomizer/LICENSE       |   201 -
 platform/platform.shellcustomizer/pom.xml       |   112 -
 .../resources/OSGI-INF/serviceComponents.xml    |    33 -
 .../platform/shellcustomizer/PlatformDsl.scala  |    51 -
 .../PlatformShellCustomizer.scala               |    51 -
 .../LICENSE                                     |   201 -
 .../pom.xml                                     |    79 -
 .../web-resources/web-gui-examples/alert.xhtml  |    99 -
 .../web-gui-examples/buttons.xhtml              |   201 -
 .../web-resources/web-gui-examples/edit.xhtml   |   164 -
 .../web-resources/web-gui-examples/header.xhtml |   299 -
 .../web-gui-examples/overlay.xhtml              |   108 -
 .../web-gui-examples/panel-thumbnail.xhtml      |   351 -
 .../web-gui-examples/panel-tree.xhtml           |   324 -
 .../web-resources/web-gui-examples/panel.xhtml  |   235 -
 .../web-gui-examples/style/demo.css             |    64 -
 .../web-resources/web-gui-examples/table.xhtml  |   227 -
 .../web-gui-examples/temp/img/eye1.jpg          |   Bin 4517 -> 0 bytes
 .../web-gui-examples/temp/img/tiger1.jpg        |   Bin 4860 -> 0 bytes
 .../web-gui-examples/temp/img/tiger2.jpg        |   Bin 6321 -> 0 bytes
 .../web-gui-examples/thumbnail.xhtml            |   214 -
 .../web-gui-examples/tree-edit.xhtml            |   301 -
 .../web-gui-examples/tree-thumbnail.xhtml       |   320 -
 .../web-resources/web-gui-examples/tree.xhtml   |   207 -
 .../main/resources/META-INF/documentation.nt    |    13 -
 platform/platform.style.classic/LICENSE         |   201 -
 platform/platform.style.classic/README.txt      |    17 -
 platform/platform.style.classic/pom.xml         |    96 -
 .../style/classic/ClassicStyleConfig.java       |    50 -
 .../clerezza/platform/style/classic/Style.java  |    82 -
 .../CLEREZZA-INF/web-resources/favicon.ico      |   Bin 3638 -> 0 bytes
 .../web-resources/style/autocomplete.css        |    68 -
 .../CLEREZZA-INF/web-resources/style/button.css |    79 -
 .../web-resources/style/clearfix.css            |    58 -
 .../web-resources/style/discobits.css           |    26 -
 .../CLEREZZA-INF/web-resources/style/edit.css   |   210 -
 .../CLEREZZA-INF/web-resources/style/filter.css |    64 -
 .../CLEREZZA-INF/web-resources/style/form.css   |   100 -
 .../web-resources/style/general.css             |   100 -
 .../CLEREZZA-INF/web-resources/style/header.css |   192 -
 .../CLEREZZA-INF/web-resources/style/icon.css   |   326 -
 .../style/images/bg/fade-black.png              |   Bin 452 -> 0 bytes
 .../style/images/bg/fade-filter.png             |   Bin 736 -> 0 bytes
 .../style/images/bg/fade-header-module.png      |   Bin 694 -> 0 bytes
 .../style/images/bg/fade-header-system.png      |   Bin 512 -> 0 bytes
 .../style/images/bg/fade-header.png             |   Bin 1056 -> 0 bytes
 .../style/images/bg/fade-header1.png            |   Bin 512 -> 0 bytes
 .../style/images/bg/fade-header2.png            |   Bin 694 -> 0 bytes
 .../style/images/bg/fade-input.png              |   Bin 165 -> 0 bytes
 .../style/images/bg/fade-login.png              |   Bin 6960 -> 0 bytes
 .../web-resources/style/images/bg/fade-menu.png |   Bin 241 -> 0 bytes
 .../style/images/bg/fade-panel-search.png       |   Bin 397 -> 0 bytes
 .../style/images/bg/fade-panel.png              |   Bin 425 -> 0 bytes
 .../style/images/bg/fade-tab-edit.png           |   Bin 672 -> 0 bytes
 .../style/images/bg/fade-tab-off.png            |   Bin 556 -> 0 bytes
 .../style/images/bg/fade-tab-on.png             |   Bin 169 -> 0 bytes
 .../style/images/bg/fade-tab-status.png         |   Bin 323 -> 0 bytes
 .../style/images/bg/fade-th-off.png             |   Bin 161 -> 0 bytes
 .../style/images/bg/fade-th-on.png              |   Bin 170 -> 0 bytes
 .../style/images/bg/fade-window.png             |   Bin 3840 -> 0 bytes
 .../web-resources/style/images/bg/tooltip.png   |   Bin 2076 -> 0 bytes
 .../style/images/icons/anim-loading.gif         |   Bin 4714 -> 0 bytes
 .../style/images/icons/arr-down-inverse.png     |   Bin 179 -> 0 bytes
 .../style/images/icons/arr-down.png             |   Bin 183 -> 0 bytes
 .../style/images/icons/arr-left-inverse.png     |   Bin 171 -> 0 bytes
 .../style/images/icons/arr-left.png             |   Bin 198 -> 0 bytes
 .../style/images/icons/arr-right-inverse.png    |   Bin 166 -> 0 bytes
 .../style/images/icons/arr-right.png            |   Bin 197 -> 0 bytes
 .../style/images/icons/arr-up-inverse.png       |   Bin 177 -> 0 bytes
 .../web-resources/style/images/icons/arr-up.png |   Bin 185 -> 0 bytes
 .../style/images/icons/btn-alert.png            |   Bin 811 -> 0 bytes
 .../style/images/icons/btn-back.png             |   Bin 607 -> 0 bytes
 .../style/images/icons/btn-close.png            |   Bin 668 -> 0 bytes
 .../style/images/icons/btn-delete.gif           |   Bin 612 -> 0 bytes
 .../style/images/icons/btn-drag.png             |   Bin 138 -> 0 bytes
 .../style/images/icons/btn-forward.png          |   Bin 559 -> 0 bytes
 .../images/icons/btn-langauge-switch-x.png      |   Bin 625 -> 0 bytes
 .../style/images/icons/btn-langauge-switch.png  |   Bin 725 -> 0 bytes
 .../style/images/icons/btn-list-off.png         |   Bin 183 -> 0 bytes
 .../style/images/icons/btn-list-on.png          |   Bin 281 -> 0 bytes
 .../style/images/icons/btn-modify-x.png         |   Bin 886 -> 0 bytes
 .../style/images/icons/btn-modify.png           |   Bin 890 -> 0 bytes
 .../style/images/icons/btn-ok-x.png             |   Bin 774 -> 0 bytes
 .../web-resources/style/images/icons/btn-ok.png |   Bin 832 -> 0 bytes
 .../style/images/icons/btn-person.png           |   Bin 599 -> 0 bytes
 .../style/images/icons/btn-plus-x.png           |   Bin 690 -> 0 bytes
 .../style/images/icons/btn-plus.png             |   Bin 721 -> 0 bytes
 .../style/images/icons/btn-remove-x.png         |   Bin 676 -> 0 bytes
 .../style/images/icons/btn-remove.png           |   Bin 746 -> 0 bytes
 .../style/images/icons/btn-resize.png           |   Bin 225 -> 0 bytes
 .../style/images/icons/btn-search-x.png         |   Bin 590 -> 0 bytes
 .../style/images/icons/btn-search.png           |   Bin 717 -> 0 bytes
 .../style/images/icons/btn-sitechooser.png      |   Bin 839 -> 0 bytes
 .../style/images/icons/btn-size1-off.png        |   Bin 426 -> 0 bytes
 .../style/images/icons/btn-size1-on.png         |   Bin 503 -> 0 bytes
 .../style/images/icons/btn-size2-off.png        |   Bin 440 -> 0 bytes
 .../style/images/icons/btn-size2-on.png         |   Bin 492 -> 0 bytes
 .../style/images/icons/btn-size3-off.png        |   Bin 311 -> 0 bytes
 .../style/images/icons/btn-size3-on.png         |   Bin 351 -> 0 bytes
 .../style/images/icons/btn-thumb-off.png        |   Bin 177 -> 0 bytes
 .../style/images/icons/btn-thumb-on.png         |   Bin 283 -> 0 bytes
 .../style/images/icons/btn-toggle-list-off.png  |   Bin 452 -> 0 bytes
 .../style/images/icons/btn-toggle-list-on.png   |   Bin 624 -> 0 bytes
 .../style/images/icons/btn-toggle-size1-off.png |   Bin 583 -> 0 bytes
 .../style/images/icons/btn-toggle-size1-on.png  |   Bin 764 -> 0 bytes
 .../style/images/icons/btn-toggle-size2-off.png |   Bin 554 -> 0 bytes
 .../style/images/icons/btn-toggle-size2-on.png  |   Bin 740 -> 0 bytes
 .../style/images/icons/btn-toggle-size3-off.png |   Bin 508 -> 0 bytes
 .../style/images/icons/btn-toggle-size3-on.png  |   Bin 681 -> 0 bytes
 .../images/icons/btn-toggle-thumbnail-off.png   |   Bin 440 -> 0 bytes
 .../images/icons/btn-toggle-thumbnail-on.png    |   Bin 630 -> 0 bytes
 .../style/images/icons/btn-toggle-tree-off.png  |   Bin 490 -> 0 bytes
 .../style/images/icons/btn-toggle-tree-on.png   |   Bin 675 -> 0 bytes
 .../style/images/icons/btn-user.png             |   Bin 747 -> 0 bytes
 .../style/images/icons/btn-zoomin.png           |   Bin 787 -> 0 bytes
 .../style/images/icons/btn-zoomout.png          |   Bin 764 -> 0 bytes
 .../style/images/icons/d-arr-left-inverse.png   |   Bin 495 -> 0 bytes
 .../style/images/icons/d-arr-right-inverse.png  |   Bin 495 -> 0 bytes
 .../style/images/icons/fade-create.png          |   Bin 393 -> 0 bytes
 .../style/images/icons/fade-generic-on.png      |   Bin 165 -> 0 bytes
 .../style/images/icons/fade-generic.png         |   Bin 258 -> 0 bytes
 .../style/images/icons/fade-generic2.png        |   Bin 280 -> 0 bytes
 .../style/images/icons/fade-modify.png          |   Bin 404 -> 0 bytes
 .../style/images/icons/fade-remove.png          |   Bin 346 -> 0 bytes
 .../style/images/icons/mediatype/any.png        |   Bin 4381 -> 0 bytes
 .../icons/mediatype/application/msword.png      |   Bin 37681 -> 0 bytes
 .../mediatype/application/octet-stream.png      |   Bin 4381 -> 0 bytes
 .../images/icons/mediatype/application/pdf.png  |   Bin 11999 -> 0 bytes
 .../mediatype/application/vnd.ms-excel.png      |   Bin 49350 -> 0 bytes
 .../mediatype/application/vnd.ms-powerpoint.png |   Bin 15153 -> 0 bytes
 .../icons/mediatype/application/x-amf.png       |   Bin 14553 -> 0 bytes
 .../icons/mediatype/application/x-tar.png       |   Bin 13655 -> 0 bytes
 .../style/images/icons/mediatype/audio/any.png  |   Bin 16747 -> 0 bytes
 .../style/images/icons/mediatype/text/plain.png |   Bin 11461 -> 0 bytes
 .../web-resources/style/images/logo-big.png     |   Bin 4984 -> 0 bytes
 .../web-resources/style/images/logo.png         |   Bin 2144 -> 0 bytes
 .../web-resources/style/images/panel/bg-tab.png |   Bin 191 -> 0 bytes
 .../style/images/panel/tab-button-default.png   |   Bin 342 -> 0 bytes
 .../CLEREZZA-INF/web-resources/style/list.css   |   147 -
 .../CLEREZZA-INF/web-resources/style/loader.css |    47 -
 .../CLEREZZA-INF/web-resources/style/menu.css   |   163 -
 .../CLEREZZA-INF/web-resources/style/pager.css  |   100 -
 .../CLEREZZA-INF/web-resources/style/panel.css  |   385 -
 .../web-resources/style/scripts/login.js        |    26 -
 .../web-resources/style/scripts/panel.js        |    59 -
 .../CLEREZZA-INF/web-resources/style/style.css  |    49 -
 .../CLEREZZA-INF/web-resources/style/table.css  |   225 -
 .../CLEREZZA-INF/web-resources/style/tabs.css   |   116 -
 .../web-resources/style/tooltip.css             |    41 -
 .../CLEREZZA-INF/web-resources/style/tree.css   |   335 -
 .../CLEREZZA-INF/web-resources/style/window.css |   191 -
 .../CLEREZZA-INF/web-resources/style/yui.css    |   197 -
 .../platform/style/classic/globalmenu-naked.ssp |    86 -
 .../style/classic/headed-page-template.ssp      |    80 -
 .../style/classic/rdf-list-template.ssp         |    28 -
 platform/platform.style.default/LICENSE         |   201 -
 platform/platform.style.default/nbactions.xml   |    11 -
 platform/platform.style.default/pom.xml         |   123 -
 .../web-resources/images/feather.png            |   Bin 16890 -> 0 bytes
 .../web-resources/images/footer-logo.png        |   Bin 6539 -> 0 bytes
 .../CLEREZZA-INF/web-resources/images/logo.png  |   Bin 5834 -> 0 bytes
 .../web-resources/images/sw-vert-w3c.png        |   Bin 5979 -> 0 bytes
 .../style/fonts/TitilliumText25L001.otf         |   Bin 52736 -> 0 bytes
 .../style/fonts/TitilliumText25L003.otf         |   Bin 52064 -> 0 bytes
 .../style/fonts/TitilliumTitle20.otf            |   Bin 41144 -> 0 bytes
 .../web-resources/style/images/bg-bar.png       |   Bin 199 -> 0 bytes
 .../web-resources/style/images/bg-divider.gif   |   Bin 63 -> 0 bytes
 .../web-resources/style/images/icn-note.jpg     |   Bin 1636 -> 0 bytes
 .../web-resources/style/images/logo-big.png     |   Bin 5834 -> 0 bytes
 .../CLEREZZA-INF/web-resources/style/style.css  |   459 -
 .../src/main/scala/Activator.scala              |    46 -
 .../src/main/scala/CollectionHeader.scala       |    38 -
 .../src/main/scala/GlobalMenuRenderlet.scala    |    95 -
 .../src/main/scala/HeadedPageRenderlet.scala    |   160 -
 .../src/main/scala/RdfListRenderlet.scala       |    53 -
 .../platform.typehandlerspace.jaxrs2/LICENSE    |   201 -
 .../nbactions.xml                               |    11 -
 .../platform.typehandlerspace.jaxrs2/pom.xml    |    56 -
 .../jaxrs/TypeHandlerSpace.java                 |   137 -
 platform/platform.typehandlerspace.wink/LICENSE |   201 -
 platform/platform.typehandlerspace.wink/pom.xml |    65 -
 .../typehandlerspace/wink/TypeHandlerSpace.java |   188 -
 platform/platform.typehandlerspace/LICENSE      |   201 -
 platform/platform.typehandlerspace/pom.xml      |    95 -
 .../platform/typehandlerspace/OPTIONS.java      |    33 -
 .../typehandlerspace/SupportedTypes.java        |    49 -
 .../typehandlerspace/TypeHandlerDiscovery.java  |    46 -
 .../impl/TypeHandlerDiscoveryImpl.java          |   109 -
 .../documentation/style/documentation.css       |    34 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.typehandlerspace/src/site/site.xml |    30 -
 .../src/site/xsite/content/reference.xhtml      |    81 -
 .../src/site/xsite/content/sitemap.xml          |    28 -
 .../src/site/xsite/templates/skin.html          |    71 -
 .../typehandlerspace/GraphWriterDummy.java      |    65 -
 .../typehandlerspace/TypeHandlerSpaceTest.java  |   331 -
 platform/platform.typepriority/LICENSE          |   201 -
 platform/platform.typepriority/pom.xml          |   102 -
 .../platform/typepriority/TypePrioritizer.java  |   147 -
 .../documentation/style/documentation.css       |    34 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../platform.typepriority/src/site/site.xml     |    30 -
 .../src/site/xsite/content/reference.xhtml      |    81 -
 .../src/site/xsite/content/sitemap.xml          |    28 -
 .../src/site/xsite/templates/skin.html          |    71 -
 .../typepriority/TypePrioritizerTest.java       |    83 -
 platform/platform.typerendering.gui/LICENSE     |   201 -
 platform/platform.typerendering.gui/pom.xml     |   133 -
 .../web-resources/styles/renderlets/style.css   |    38 -
 .../src/main/scala/Activator.scala              |   126 -
 .../src/main/scala/Ontology.scala               |    39 -
 .../scala/RenderletDescriptionRenderlet.scala   |    59 -
 platform/platform.typerendering.scala/LICENSE   |   201 -
 .../platform.typerendering.scala/nbactions.xml  |    11 -
 platform/platform.typerendering.scala/pom.xml   |    86 -
 .../main/resources/META-INF/documentation.nt    |    25 -
 .../typerendering/scala/AbstractRenderlet.scala |    91 -
 .../typerendering/scala/PageRenderlet.scala     |    64 -
 .../typerendering/scala/RenderedPage.scala      |   176 -
 .../typerendering/scala/SRenderlet.scala        |    90 -
 .../typerendering/scala/XmlResult.scala         |   177 -
 .../LICENSE                                     |   201 -
 .../nbactions.xml                               |    11 -
 .../pom.xml                                     |    60 -
 .../ScalaServerPagesRenderlet.java              |   218 -
 .../ScalaServerPagesService.java                |    95 -
 .../scalaserverpages/SspTypeRenderlet.java      |   172 -
 .../main/resources/META-INF/documentation.nt    |   124 -
 .../scalaserverpages/implicit-header.txt        |    13 -
 .../scalaserverpages/typerenderlet-header.txt   |    16 -
 .../platform.typerendering.seedsnipe/LICENSE    |   201 -
 .../platform.typerendering.seedsnipe/pom.xml    |    69 -
 .../seedsnipe/SeedsnipeRenderlet.java           |    65 -
 .../seedsnipe/WebRenderingFunctions.java        |   333 -
 .../typerendering/seedsnipe/GenericTest.java    |    78 -
 .../seedsnipe/WebRenderingFunctionsTest.java    |   113 -
 .../typerendering/seedsnipe/data-1.turtle       |     8 -
 .../typerendering/seedsnipe/ifTest.seed         |     2 -
 .../typerendering/seedsnipe/ifTest.turtle       |     5 -
 .../platform/typerendering/seedsnipe/ifTest.txt |     2 -
 .../typerendering/seedsnipe/lexicalForm.seed    |     1 -
 .../typerendering/seedsnipe/lexicalForm.turtle  |     7 -
 .../typerendering/seedsnipe/lexicalForm.txt     |     1 -
 .../typerendering/seedsnipe/result-1.txt        |     1 -
 .../typerendering/seedsnipe/template-1.seed     |     1 -
 platform/platform.typerendering/LICENSE         |   201 -
 .../platform.typerendering.core/LICENSE         |   201 -
 .../platform.typerendering.core/pom.xml         |    91 -
 .../typerendering/CallbackRenderer.java         |    64 -
 .../typerendering/CallbackRendererImpl.java     |    85 -
 .../typerendering/GenericGraphNodeMBW.java      |   227 -
 .../platform/typerendering/Renderer.java        |    65 -
 .../platform/typerendering/RendererFactory.java |   224 -
 .../typerendering/RenderingException.java       |    69 -
 .../RenderingspecificationException.java        |   138 -
 .../platform/typerendering/Renderlet.java       |   131 -
 .../typerendering/RenderletManager.java         |    53 -
 .../typerendering/RenderletManagerImpl.java     |   328 -
 .../RenderletNotFoundException.java             |    31 -
 .../typerendering/RenderletRendererImpl.java    |    99 -
 .../typerendering/ResultDocModifier.java        |   282 -
 .../typerendering/TypeRenderingException.java   |    92 -
 .../TypeRenderingExceptionMapper.java           |    88 -
 .../platform/typerendering/TypeRenderlet.java   |   165 -
 .../TypeRenderletRendererImpl.java              |    84 -
 .../typerendering/UserContextProvider.java      |    48 -
 .../typerendering/WebRenderingService.java      |    34 -
 .../typerendering/utils/MediaTypeMap.java       |   142 -
 .../platform/typerendering/utils/RegexMap.java  |   170 -
 .../typerendering/exception-template.ssp        |    55 -
 .../typerendering/utils/RegexMapTest.java       |    37 -
 .../platform.typerendering.ontologies/LICENSE   |   201 -
 .../platform.typerendering.ontologies/pom.xml   |    67 -
 .../typerendering/ontologies/typerendering.rdf  |   106 -
 platform/platform.typerendering/pom.xml         |    41 -
 .../platform.usermanager.webinterface/LICENSE   |   201 -
 .../platform.usermanager.webinterface/pom.xml   |   146 -
 .../usermanager/webinterface/PasswordReset.java |   180 -
 .../PermissionManagerAccessPermission.java      |    66 -
 .../UserManagerAccessPermission.java            |    66 -
 .../webinterface/UserManagerWeb.java            |  1295 -
 .../webinterface/ontology/USERMANAGER.java      |   134 -
 .../webinterface/add-property-template.ssp      |   142 -
 .../webinterface/add-user-template.ssp          |   131 -
 .../webinterface/custom-property-template.ssp   |    87 -
 .../webinterface/custom-user-infos-template.ssp |    67 -
 .../webinterface/ontology/customfield.rdf       |    84 -
 .../webinterface/ontology/usermanager.rdf       |    94 -
 .../usermanager/webinterface/reset.xhtml        |    70 -
 .../usermanager/webinterface/reset_mail.txt     |    12 -
 .../webinterface/role-overview-template.ssp     |   111 -
 .../webinterface/role-permission-template.ssp   |   153 -
 .../webinterface/staticweb/add-role.xhtml       |    44 -
 .../staticweb/js/fancybox/fancy_closebox.png    |   Bin 1910 -> 0 bytes
 .../staticweb/js/fancybox/fancy_left.png        |   Bin 1623 -> 0 bytes
 .../staticweb/js/fancybox/fancy_progress.png    |   Bin 12412 -> 0 bytes
 .../staticweb/js/fancybox/fancy_right.png       |   Bin 1645 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_e.png    |   Bin 146 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_n.png    |   Bin 129 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_ne.png   |   Bin 245 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_nw.png   |   Bin 207 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_s.png    |   Bin 136 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_se.png   |   Bin 239 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_sw.png   |   Bin 221 -> 0 bytes
 .../staticweb/js/fancybox/fancy_shadow_w.png    |   Bin 140 -> 0 bytes
 .../staticweb/js/fancybox/fancy_title_left.png  |   Bin 556 -> 0 bytes
 .../staticweb/js/fancybox/fancy_title_main.png  |   Bin 149 -> 0 bytes
 .../staticweb/js/fancybox/fancy_title_right.png |   Bin 559 -> 0 bytes
 .../staticweb/js/fancybox/jquery.easing.1.3.js  |   226 -
 .../js/fancybox/jquery.fancybox-1.2.1.js        |   568 -
 .../js/fancybox/jquery.fancybox-1.2.1.pack.js   |    30 -
 .../staticweb/js/fancybox/jquery.fancybox.css   |   336 -
 .../webinterface/staticweb/js/reset.js          |    45 -
 .../staticweb/js/usermanager-custom-property.js |    77 -
 .../staticweb/js/usermanager-overview.js        |    93 -
 .../staticweb/js/usermanager-role-overview.js   |   102 -
 .../staticweb/js/usermanager-role-permission.js |    49 -
 .../staticweb/js/usermanager-user-permission.js |    49 -
 .../webinterface/staticweb/js/usermanager.js    |    40 -
 .../webinterface/update-user-template.ssp       |   141 -
 .../webinterface/user-overview-template.ssp     |   123 -
 .../webinterface/user-permission-template.ssp   |   179 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 .../src/site/site.xml                           |    32 -
 .../src/site/xsite/content/jaas.xhtml           |   109 -
 .../src/site/xsite/content/sitemap.xml          |    30 -
 .../src/site/xsite/content/usage-role.xhtml     |    52 -
 .../src/site/xsite/content/usage-user.xhtml     |    66 -
 .../src/site/xsite/templates/skin.html          |    71 -
 platform/platform.usermanager/LICENSE           |   201 -
 platform/platform.usermanager/pom.xml           |   102 -
 .../EmailAlreadyAssignedException.java          |    31 -
 .../usermanager/RoleUnavailableException.java   |    32 -
 .../usermanager/UserAlreadyExistsException.java |    30 -
 .../platform/usermanager/UserComparator.java    |    43 -
 .../usermanager/UserHasNoNameException.java     |    31 -
 .../platform/usermanager/UserManager.java       |   256 -
 .../platform/usermanager/UserManagerImpl.java   |   735 -
 .../usermanager/UserNotExistsException.java     |    31 -
 .../resources/documentation/style/style.css     |   421 -
 .../src/site/resources/images/clerezza.png      |   Bin 7113 -> 0 bytes
 platform/platform.usermanager/src/site/site.xml |    26 -
 .../src/site/xsite/content/sitemap.xml          |    28 -
 .../src/site/xsite/content/usage.xhtml          |    54 -
 .../src/site/xsite/templates/skin.html          |    71 -
 platform/platform.users/LICENSE                 |   201 -
 platform/platform.users/core/LICENSE            |   201 -
 platform/platform.users/core/pom.xml            |   128 -
 .../resources/OSGI-INF/serviceComponents.xml    |    45 -
 .../UserGraphAcessPermissionProvider.scala      |    39 -
 .../platform/users/WebIdGraphsService.scala     |   212 -
 .../clerezza/platform/users/WebIdInfo.scala     |    61 -
 platform/platform.users/ontologies/LICENSE      |   201 -
 platform/platform.users/ontologies/pom.xml      |    67 -
 platform/platform.users/pom.xml                 |    41 -
 platform/platform.xhtml2html/LICENSE            |   201 -
 platform/platform.xhtml2html/pom.xml            |    66 -
 .../platform/xhtml2html/AcceptHeader.java       |   180 -
 .../ContentLengthSettingOutputStream.java       |    86 -
 .../DocTypeFilteringOutputStream.java           |   140 -
 .../clerezza/platform/xhtml2html/MediaType.java |   100 -
 .../xhtml2html/MediaTypeComparator.java         |   169 -
 .../platform/xhtml2html/ResponseStatusInfo.java |    34 -
 .../SelfClosing2ClosingTagsOutputStream.java    |   183 -
 .../platform/xhtml2html/WrappedRequest.java     |    61 -
 .../platform/xhtml2html/WrappedResponse.java    |   160 -
 .../platform/xhtml2html/Xhtml2HtmlFilter.java   |   115 -
 .../DocTypeSettingByteChannelTest.java          |   185 -
 .../SelfClosing2ClosingTagsByteChannelTest.java |    82 -
 platform/pom.xml                                |    94 +-
 platform/scripting.scriptmanager/LICENSE        |   201 +
 platform/scripting.scriptmanager/pom.xml        |    99 +
 .../scripting/scriptmanager/ScriptManager.java  |   849 +
 .../ScriptManagerAppPermission.java             |    66 +
 .../scriptmanager/ontology/SCRIPTMANAGER.java   |    87 +
 .../main/resources/META-INF/documentation.nt    |   103 +
 .../scriptmanager/ontology/scriptmanager.rdf    |   150 +
 .../scriptmanager-execution-uri-list.xhtml      |    41 +
 .../scriptmanager-execution-uri-overview.ssp    |    50 +
 .../scriptmanager-script-information.xhtml      |    91 +
 .../scriptmanager-script-install.ssp            |    99 +
 .../scriptmanager-script-list.xhtml             |    31 +
 .../scriptmanager-script-overview.ssp           |    69 +
 .../staticweb/js/scriptmanager-execution-uri.js |    27 +
 .../staticweb/js/scriptmanager-overview.js      |    45 +
 .../scriptmanager/staticweb/js/scriptmanager.js |   170 +
 platform/scripting/LICENSE                      |   201 +
 platform/scripting/pom.xml                      |    75 +
 .../JRubyScriptEngineFactoryWrapper.java        |   100 +
 .../platform/scripting/NoEngineException.java   |    41 +
 .../scripting/ScriptEngineFactoryManager.java   |   183 +
 .../platform/scripting/ScriptExecution.java     |   315 +
 .../ScriptGeneratedResourceTypeHandler.java     |   128 +
 .../scripting/ScriptLanguageDescription.java    |    90 +
 platform/security.conditions/LICENSE            |   201 +
 platform/security.conditions/pom.xml            |    60 +
 .../conditions/NotBundleLocationCondition.java  |    47 +
 platform/security.foafssl/LICENSE               |   201 +
 platform/security.foafssl/core/LICENSE          |   201 +
 platform/security.foafssl/core/pom.xml          |   139 +
 .../resources/OSGI-INF/serviceComponents.xml    |    47 +
 .../foafssl/auth/FoafSslAuthentication.scala    |   127 +
 .../clerezza/foafssl/auth/WebIDClaim.scala      |   216 +
 .../clerezza/foafssl/auth/X509Claim.scala       |   279 +
 .../apache/clerezza/foafssl/ssl/Activator.scala |   108 +
 .../ssl/X509TrustManagerWrapperService.scala    |    70 +
 platform/security.foafssl/ontologies/LICENSE    |   201 +
 platform/security.foafssl/ontologies/pom.xml    |    67 +
 .../clerezza/foafssl/ontologies/atomowl.rdf     |   653 +
 .../apache/clerezza/foafssl/ontologies/cert.n3  |   187 +
 .../apache/clerezza/foafssl/ontologies/earl.rdf |   245 +
 .../apache/clerezza/foafssl/ontologies/rsa.rdf  |   114 +
 .../apache/clerezza/foafssl/ontologies/test.n3  |   205 +
 platform/security.foafssl/pom.xml               |    39 +
 platform/security.foafssl/test/LICENSE          |   201 +
 platform/security.foafssl/test/pom.xml          |   162 +
 .../main/resources/META-INF/documentation.nt    |     2 +
 .../resources/OSGI-INF/serviceComponents.xml    |    43 +
 .../clerezza/foafssl/test/WebIDTester.scala     |   757 +
 .../foafssl/test/pages/WebIDClaimPg.scala       |   240 +
 platform/shellcustomizer/LICENSE                |   201 +
 platform/shellcustomizer/pom.xml                |   112 +
 .../resources/OSGI-INF/serviceComponents.xml    |    33 +
 .../platform/shellcustomizer/PlatformDsl.scala  |    51 +
 .../PlatformShellCustomizer.scala               |    51 +
 platform/style.classic.webguiexamples/LICENSE   |   201 +
 platform/style.classic.webguiexamples/pom.xml   |    79 +
 .../web-resources/web-gui-examples/alert.xhtml  |    99 +
 .../web-gui-examples/buttons.xhtml              |   201 +
 .../web-resources/web-gui-examples/edit.xhtml   |   164 +
 .../web-resources/web-gui-examples/header.xhtml |   299 +
 .../web-gui-examples/overlay.xhtml              |   108 +
 .../web-gui-examples/panel-thumbnail.xhtml      |   351 +
 .../web-gui-examples/panel-tree.xhtml           |   324 +
 .../web-resources/web-gui-examples/panel.xhtml  |   235 +
 .../web-gui-examples/style/demo.css             |    64 +
 .../web-resources/web-gui-examples/table.xhtml  |   227 +
 .../web-gui-examples/temp/img/eye1.jpg          |   Bin 0 -> 4517 bytes
 .../web-gui-examples/temp/img/tiger1.jpg        |   Bin 0 -> 4860 bytes
 .../web-gui-examples/temp/img/tiger2.jpg        |   Bin 0 -> 6321 bytes
 .../web-gui-examples/thumbnail.xhtml            |   214 +
 .../web-gui-examples/tree-edit.xhtml            |   301 +
 .../web-gui-examples/tree-thumbnail.xhtml       |   320 +
 .../web-resources/web-gui-examples/tree.xhtml   |   207 +
 .../main/resources/META-INF/documentation.nt    |    13 +
 platform/style.classic/LICENSE                  |   201 +
 platform/style.classic/README.txt               |    17 +
 platform/style.classic/pom.xml                  |    96 +
 .../style/classic/ClassicStyleConfig.java       |    50 +
 .../clerezza/platform/style/classic/Style.java  |    82 +
 .../CLEREZZA-INF/web-resources/favicon.ico      |   Bin 0 -> 3638 bytes
 .../web-resources/style/autocomplete.css        |    68 +
 .../CLEREZZA-INF/web-resources/style/button.css |    79 +
 .../web-resources/style/clearfix.css            |    58 +
 .../web-resources/style/discobits.css           |    26 +
 .../CLEREZZA-INF/web-resources/style/edit.css   |   210 +
 .../CLEREZZA-INF/web-resources/style/filter.css |    64 +
 .../CLEREZZA-INF/web-resources/style/form.css   |   100 +
 .../web-resources/style/general.css             |   100 +
 .../CLEREZZA-INF/web-resources/style/header.css |   192 +
 .../CLEREZZA-INF/web-resources/style/icon.css   |   326 +
 .../style/images/bg/fade-black.png              |   Bin 0 -> 452 bytes
 .../style/images/bg/fade-filter.png             |   Bin 0 -> 736 bytes
 .../style/images/bg/fade-header-module.png      |   Bin 0 -> 694 bytes
 .../style/images/bg/fade-header-system.png      |   Bin 0 -> 512 bytes
 .../style/images/bg/fade-header.png             |   Bin 0 -> 1056 bytes
 .../style/images/bg/fade-header1.png            |   Bin 0 -> 512 bytes
 .../style/images/bg/fade-header2.png            |   Bin 0 -> 694 bytes
 .../style/images/bg/fade-input.png              |   Bin 0 -> 165 bytes
 .../style/images/bg/fade-login.png              |   Bin 0 -> 6960 bytes
 .../web-resources/style/images/bg/fade-menu.png |   Bin 0 -> 241 bytes
 .../style/images/bg/fade-panel-search.png       |   Bin 0 -> 397 bytes
 .../style/images/bg/fade-panel.png              |   Bin 0 -> 425 bytes
 .../style/images/bg/fade-tab-edit.png           |   Bin 0 -> 672 bytes
 .../style/images/bg/fade-tab-off.png            |   Bin 0 -> 556 bytes
 .../style/images/bg/fade-tab-on.png             |   Bin 0 -> 169 bytes
 .../style/images/bg/fade-tab-status.png         |   Bin 0 -> 323 bytes
 .../style/images/bg/fade-th-off.png             |   Bin 0 -> 161 bytes
 .../style/images/bg/fade-th-on.png              |   Bin 0 -> 170 bytes
 .../style/images/bg/fade-window.png             |   Bin 0 -> 3840 bytes
 .../web-resources/style/images/bg/tooltip.png   |   Bin 0 -> 2076 bytes
 .../style/images/icons/anim-loading.gif         |   Bin 0 -> 4714 bytes
 .../style/images/icons/arr-down-inverse.png     |   Bin 0 -> 179 bytes
 .../style/images/icons/arr-down.png             |   Bin 0 -> 183 bytes
 .../style/images/icons/arr-left-inverse.png     |   Bin 0 -> 171 bytes
 .../style/images/icons/arr-left.png             |   Bin 0 -> 198 bytes
 .../style/images/icons/arr-right-inverse.png    |   Bin 0 -> 166 bytes
 .../style/images/icons/arr-right.png            |   Bin 0 -> 197 bytes
 .../style/images/icons/arr-up-inverse.png       |   Bin 0 -> 177 bytes
 .../web-resources/style/images/icons/arr-up.png |   Bin 0 -> 185 bytes
 .../style/images/icons/btn-alert.png            |   Bin 0 -> 811 bytes
 .../style/images/icons/btn-back.png             |   Bin 0 -> 607 bytes
 .../style/images/icons/btn-close.png            |   Bin 0 -> 668 bytes
 .../style/images/icons/btn-delete.gif           |   Bin 0 -> 612 bytes
 .../style/images/icons/btn-drag.png             |   Bin 0 -> 138 bytes
 .../style/images/icons/btn-forward.png          |   Bin 0 -> 559 bytes
 .../images/icons/btn-langauge-switch-x.png      |   Bin 0 -> 625 bytes
 .../style/images/icons/btn-langauge-switch.png  |   Bin 0 -> 725 bytes
 .../style/images/icons/btn-list-off.png         |   Bin 0 -> 183 bytes
 .../style/images/icons/btn-list-on.png          |   Bin 0 -> 281 bytes
 .../style/images/icons/btn-modify-x.png         |   Bin 0 -> 886 bytes
 .../style/images/icons/btn-modify.png           |   Bin 0 -> 890 bytes
 .../style/images/icons/btn-ok-x.png             |   Bin 0 -> 774 bytes
 .../web-resources/style/images/icons/btn-ok.png |   Bin 0 -> 832 bytes
 .../style/images/icons/btn-person.png           |   Bin 0 -> 599 bytes
 .../style/images/icons/btn-plus-x.png           |   Bin 0 -> 690 bytes
 .../style/images/icons/btn-plus.png             |   Bin 0 -> 721 bytes
 .../style/images/icons/btn-remove-x.png         |   Bin 0 -> 676 bytes
 .../style/images/icons/btn-remove.png           |   Bin 0 -> 746 bytes
 .../style/images/icons/btn-resize.png           |   Bin 0 -> 225 bytes
 .../style/images/icons/btn-search-x.png         |   Bin 0 -> 590 bytes
 .../style/images/icons/btn-search.png           |   Bin 0 -> 717 bytes
 .../style/images/icons/btn-sitechooser.png      |   Bin 0 -> 839 bytes
 .../style/images/icons/btn-size1-off.png        |   Bin 0 -> 426 bytes
 .../style/images/icons/btn-size1-on.png         |   Bin 0 -> 503 bytes
 .../style/images/icons/btn-size2-off.png        |   Bin 0 -> 440 bytes
 .../style/images/icons/btn-size2-on.png         |   Bin 0 -> 492 bytes
 .../style/images/icons/btn-size3-off.png        |   Bin 0 -> 311 bytes
 .../style/images/icons/btn-size3-on.png         |   Bin 0 -> 351 bytes
 .../style/images/icons/btn-thumb-off.png        |   Bin 0 -> 177 bytes
 .../style/images/icons/btn-thumb-on.png         |   Bin 0 -> 283 bytes
 .../style/images/icons/btn-toggle-list-off.png  |   Bin 0 -> 452 bytes
 .../style/images/icons/btn-toggle-list-on.png   |   Bin 0 -> 624 bytes
 .../style/images/icons/btn-toggle-size1-off.png |   Bin 0 -> 583 bytes
 .../style/images/icons/btn-toggle-size1-on.png  |   Bin 0 -> 764 bytes
 .../style/images/icons/btn-toggle-size2-off.png |   Bin 0 -> 554 bytes
 .../style/images/icons/btn-toggle-size2-on.png  |   Bin 0 -> 740 bytes
 .../style/images/icons/btn-toggle-size3-off.png |   Bin 0 -> 508 bytes
 .../style/images/icons/btn-toggle-size3-on.png  |   Bin 0 -> 681 bytes
 .../images/icons/btn-toggle-thumbnail-off.png   |   Bin 0 -> 440 bytes
 .../images/icons/btn-toggle-thumbnail-on.png    |   Bin 0 -> 630 bytes
 .../style/images/icons/btn-toggle-tree-off.png  |   Bin 0 -> 490 bytes
 .../style/images/icons/btn-toggle-tree-on.png   |   Bin 0 -> 675 bytes
 .../style/images/icons/btn-user.png             |   Bin 0 -> 747 bytes
 .../style/images/icons/btn-zoomin.png           |   Bin 0 -> 787 bytes
 .../style/images/icons/btn-zoomout.png          |   Bin 0 -> 764 bytes
 .../style/images/icons/d-arr-left-inverse.png   |   Bin 0 -> 495 bytes
 .../style/images/icons/d-arr-right-inverse.png  |   Bin 0 -> 495 bytes
 .../style/images/icons/fade-create.png          |   Bin 0 -> 393 bytes
 .../style/images/icons/fade-generic-on.png      |   Bin 0 -> 165 bytes
 .../style/images/icons/fade-generic.png         |   Bin 0 -> 258 bytes
 .../style/images/icons/fade-generic2.png        |   Bin 0 -> 280 bytes
 .../style/images/icons/fade-modify.png          |   Bin 0 -> 404 bytes
 .../style/images/icons/fade-remove.png          |   Bin 0 -> 346 bytes
 .../style/images/icons/mediatype/any.png        |   Bin 0 -> 4381 bytes
 .../icons/mediatype/application/msword.png      |   Bin 0 -> 37681 bytes
 .../mediatype/application/octet-stream.png      |   Bin 0 -> 4381 bytes
 .../images/icons/mediatype/application/pdf.png  |   Bin 0 -> 11999 bytes
 .../mediatype/application/vnd.ms-excel.png      |   Bin 0 -> 49350 bytes
 .../mediatype/application/vnd.ms-powerpoint.png |   Bin 0 -> 15153 bytes
 .../icons/mediatype/application/x-amf.png       |   Bin 0 -> 14553 bytes
 .../icons/mediatype/application/x-tar.png       |   Bin 0 -> 13655 bytes
 .../style/images/icons/mediatype/audio/any.png  |   Bin 0 -> 16747 bytes
 .../style/images/icons/mediatype/text/plain.png |   Bin 0 -> 11461 bytes
 .../web-resources/style/images/logo-big.png     |   Bin 0 -> 4984 bytes
 .../web-resources/style/images/logo.png         |   Bin 0 -> 2144 bytes
 .../web-resources/style/images/panel/bg-tab.png |   Bin 0 -> 191 bytes
 .../style/images/panel/tab-button-default.png   |   Bin 0 -> 342 bytes
 .../CLEREZZA-INF/web-resources/style/list.css   |   147 +
 .../CLEREZZA-INF/web-resources/style/loader.css |    47 +
 .../CLEREZZA-INF/web-resources/style/menu.css   |   163 +
 .../CLEREZZA-INF/web-resources/style/pager.css  |   100 +
 .../CLEREZZA-INF/web-resources/style/panel.css  |   385 +
 .../web-resources/style/scripts/login.js        |    26 +
 .../web-resources/style/scripts/panel.js        |    59 +
 .../CLEREZZA-INF/web-resources/style/style.css  |    49 +
 .../CLEREZZA-INF/web-resources/style/table.css  |   225 +
 .../CLEREZZA-INF/web-resources/style/tabs.css   |   116 +
 .../web-resources/style/tooltip.css             |    41 +
 .../CLEREZZA-INF/web-resources/style/tree.css   |   335 +
 .../CLEREZZA-INF/web-resources/style/window.css |   191 +
 .../CLEREZZA-INF/web-resources/style/yui.css    |   197 +
 .../platform/style/classic/globalmenu-naked.ssp |    86 +
 .../style/classic/headed-page-template.ssp      |    80 +
 .../style/classic/rdf-list-template.ssp         |    28 +
 platform/style.default/LICENSE                  |   201 +
 platform/style.default/nbactions.xml            |    11 +
 platform/style.default/pom.xml                  |   123 +
 .../web-resources/images/feather.png            |   Bin 0 -> 16890 bytes
 .../web-resources/images/footer-logo.png        |   Bin 0 -> 6539 bytes
 .../CLEREZZA-INF/web-resources/images/logo.png  |   Bin 0 -> 5834 bytes
 .../web-resources/images/sw-vert-w3c.png        |   Bin 0 -> 5979 bytes
 .../style/fonts/TitilliumText25L001.otf         |   Bin 0 -> 52736 bytes
 .../style/fonts/TitilliumText25L003.otf         |   Bin 0 -> 52064 bytes
 .../style/fonts/TitilliumTitle20.otf            |   Bin 0 -> 41144 bytes
 .../web-resources/style/images/bg-bar.png       |   Bin 0 -> 199 bytes
 .../web-resources/style/images/bg-divider.gif   |   Bin 0 -> 63 bytes
 .../web-resources/style/images/icn-note.jpg     |   Bin 0 -> 1636 bytes
 .../web-resources/style/images/logo-big.png     |   Bin 0 -> 5834 bytes
 .../CLEREZZA-INF/web-resources/style/style.css  |   459 +
 .../src/main/scala/Activator.scala              |    46 +
 .../src/main/scala/CollectionHeader.scala       |    38 +
 .../src/main/scala/GlobalMenuRenderlet.scala    |    95 +
 .../src/main/scala/HeadedPageRenderlet.scala    |   160 +
 .../src/main/scala/RdfListRenderlet.scala       |    53 +
 platform/typehandlerspace.jaxrs2/LICENSE        |   201 +
 platform/typehandlerspace.jaxrs2/nbactions.xml  |    11 +
 platform/typehandlerspace.jaxrs2/pom.xml        |    56 +
 .../jaxrs/TypeHandlerSpace.java                 |   137 +
 platform/typehandlerspace.wink/LICENSE          |   201 +
 platform/typehandlerspace.wink/pom.xml          |    65 +
 .../typehandlerspace/wink/TypeHandlerSpace.java |   188 +
 platform/typehandlerspace/LICENSE               |   201 +
 platform/typehandlerspace/pom.xml               |    95 +
 .../platform/typehandlerspace/OPTIONS.java      |    33 +
 .../typehandlerspace/SupportedTypes.java        |    49 +
 .../typehandlerspace/TypeHandlerDiscovery.java  |    46 +
 .../impl/TypeHandlerDiscoveryImpl.java          |   109 +
 .../documentation/style/documentation.css       |    34 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/typehandlerspace/src/site/site.xml     |    30 +
 .../src/site/xsite/content/reference.xhtml      |    81 +
 .../src/site/xsite/content/sitemap.xml          |    28 +
 .../src/site/xsite/templates/skin.html          |    71 +
 .../typehandlerspace/GraphWriterDummy.java      |    65 +
 .../typehandlerspace/TypeHandlerSpaceTest.java  |   331 +
 platform/typepriority/LICENSE                   |   201 +
 platform/typepriority/pom.xml                   |   102 +
 .../platform/typepriority/TypePrioritizer.java  |   147 +
 .../documentation/style/documentation.css       |    34 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/typepriority/src/site/site.xml         |    30 +
 .../src/site/xsite/content/reference.xhtml      |    81 +
 .../src/site/xsite/content/sitemap.xml          |    28 +
 .../src/site/xsite/templates/skin.html          |    71 +
 .../typepriority/TypePrioritizerTest.java       |    83 +
 platform/typerendering.gui/LICENSE              |   201 +
 platform/typerendering.gui/pom.xml              |   133 +
 .../web-resources/styles/renderlets/style.css   |    38 +
 .../src/main/scala/Activator.scala              |   126 +
 .../src/main/scala/Ontology.scala               |    39 +
 .../scala/RenderletDescriptionRenderlet.scala   |    59 +
 platform/typerendering.scala/LICENSE            |   201 +
 platform/typerendering.scala/nbactions.xml      |    11 +
 platform/typerendering.scala/pom.xml            |    86 +
 .../main/resources/META-INF/documentation.nt    |    25 +
 .../typerendering/scala/AbstractRenderlet.scala |    91 +
 .../typerendering/scala/PageRenderlet.scala     |    64 +
 .../typerendering/scala/RenderedPage.scala      |   176 +
 .../typerendering/scala/SRenderlet.scala        |    90 +
 .../typerendering/scala/XmlResult.scala         |   177 +
 platform/typerendering.scalaserverpages/LICENSE |   201 +
 .../nbactions.xml                               |    11 +
 platform/typerendering.scalaserverpages/pom.xml |    60 +
 .../ScalaServerPagesRenderlet.java              |   218 +
 .../ScalaServerPagesService.java                |    95 +
 .../scalaserverpages/SspTypeRenderlet.java      |   172 +
 .../main/resources/META-INF/documentation.nt    |   124 +
 .../scalaserverpages/implicit-header.txt        |    13 +
 .../scalaserverpages/typerenderlet-header.txt   |    16 +
 platform/typerendering.seedsnipe/LICENSE        |   201 +
 platform/typerendering.seedsnipe/pom.xml        |    69 +
 .../seedsnipe/SeedsnipeRenderlet.java           |    65 +
 .../seedsnipe/WebRenderingFunctions.java        |   333 +
 .../typerendering/seedsnipe/GenericTest.java    |    78 +
 .../seedsnipe/WebRenderingFunctionsTest.java    |   113 +
 .../typerendering/seedsnipe/data-1.turtle       |     8 +
 .../typerendering/seedsnipe/ifTest.seed         |     2 +
 .../typerendering/seedsnipe/ifTest.turtle       |     5 +
 .../platform/typerendering/seedsnipe/ifTest.txt |     2 +
 .../typerendering/seedsnipe/lexicalForm.seed    |     1 +
 .../typerendering/seedsnipe/lexicalForm.turtle  |     7 +
 .../typerendering/seedsnipe/lexicalForm.txt     |     1 +
 .../typerendering/seedsnipe/result-1.txt        |     1 +
 .../typerendering/seedsnipe/template-1.seed     |     1 +
 platform/typerendering/LICENSE                  |   201 +
 .../platform.typerendering.core/LICENSE         |   201 +
 .../platform.typerendering.core/pom.xml         |    91 +
 .../typerendering/CallbackRenderer.java         |    64 +
 .../typerendering/CallbackRendererImpl.java     |    85 +
 .../typerendering/GenericGraphNodeMBW.java      |   227 +
 .../platform/typerendering/Renderer.java        |    65 +
 .../platform/typerendering/RendererFactory.java |   224 +
 .../typerendering/RenderingException.java       |    69 +
 .../RenderingspecificationException.java        |   138 +
 .../platform/typerendering/Renderlet.java       |   131 +
 .../typerendering/RenderletManager.java         |    53 +
 .../typerendering/RenderletManagerImpl.java     |   328 +
 .../RenderletNotFoundException.java             |    31 +
 .../typerendering/RenderletRendererImpl.java    |    99 +
 .../typerendering/ResultDocModifier.java        |   282 +
 .../typerendering/TypeRenderingException.java   |    92 +
 .../TypeRenderingExceptionMapper.java           |    88 +
 .../platform/typerendering/TypeRenderlet.java   |   165 +
 .../TypeRenderletRendererImpl.java              |    84 +
 .../typerendering/UserContextProvider.java      |    48 +
 .../typerendering/WebRenderingService.java      |    34 +
 .../typerendering/utils/MediaTypeMap.java       |   142 +
 .../platform/typerendering/utils/RegexMap.java  |   170 +
 .../typerendering/exception-template.ssp        |    55 +
 .../typerendering/utils/RegexMapTest.java       |    37 +
 .../platform.typerendering.ontologies/LICENSE   |   201 +
 .../platform.typerendering.ontologies/pom.xml   |    67 +
 .../typerendering/ontologies/typerendering.rdf  |   106 +
 platform/typerendering/pom.xml                  |    41 +
 platform/usermanager.webinterface/LICENSE       |   201 +
 platform/usermanager.webinterface/pom.xml       |   146 +
 .../usermanager/webinterface/PasswordReset.java |   180 +
 .../PermissionManagerAccessPermission.java      |    66 +
 .../UserManagerAccessPermission.java            |    66 +
 .../webinterface/UserManagerWeb.java            |  1295 +
 .../webinterface/ontology/USERMANAGER.java      |   134 +
 .../webinterface/add-property-template.ssp      |   142 +
 .../webinterface/add-user-template.ssp          |   131 +
 .../webinterface/custom-property-template.ssp   |    87 +
 .../webinterface/custom-user-infos-template.ssp |    67 +
 .../webinterface/ontology/customfield.rdf       |    84 +
 .../webinterface/ontology/usermanager.rdf       |    94 +
 .../usermanager/webinterface/reset.xhtml        |    70 +
 .../usermanager/webinterface/reset_mail.txt     |    12 +
 .../webinterface/role-overview-template.ssp     |   111 +
 .../webinterface/role-permission-template.ssp   |   153 +
 .../webinterface/staticweb/add-role.xhtml       |    44 +
 .../staticweb/js/fancybox/fancy_closebox.png    |   Bin 0 -> 1910 bytes
 .../staticweb/js/fancybox/fancy_left.png        |   Bin 0 -> 1623 bytes
 .../staticweb/js/fancybox/fancy_progress.png    |   Bin 0 -> 12412 bytes
 .../staticweb/js/fancybox/fancy_right.png       |   Bin 0 -> 1645 bytes
 .../staticweb/js/fancybox/fancy_shadow_e.png    |   Bin 0 -> 146 bytes
 .../staticweb/js/fancybox/fancy_shadow_n.png    |   Bin 0 -> 129 bytes
 .../staticweb/js/fancybox/fancy_shadow_ne.png   |   Bin 0 -> 245 bytes
 .../staticweb/js/fancybox/fancy_shadow_nw.png   |   Bin 0 -> 207 bytes
 .../staticweb/js/fancybox/fancy_shadow_s.png    |   Bin 0 -> 136 bytes
 .../staticweb/js/fancybox/fancy_shadow_se.png   |   Bin 0 -> 239 bytes
 .../staticweb/js/fancybox/fancy_shadow_sw.png   |   Bin 0 -> 221 bytes
 .../staticweb/js/fancybox/fancy_shadow_w.png    |   Bin 0 -> 140 bytes
 .../staticweb/js/fancybox/fancy_title_left.png  |   Bin 0 -> 556 bytes
 .../staticweb/js/fancybox/fancy_title_main.png  |   Bin 0 -> 149 bytes
 .../staticweb/js/fancybox/fancy_title_right.png |   Bin 0 -> 559 bytes
 .../staticweb/js/fancybox/jquery.easing.1.3.js  |   226 +
 .../js/fancybox/jquery.fancybox-1.2.1.js        |   568 +
 .../js/fancybox/jquery.fancybox-1.2.1.pack.js   |    30 +
 .../staticweb/js/fancybox/jquery.fancybox.css   |   336 +
 .../webinterface/staticweb/js/reset.js          |    45 +
 .../staticweb/js/usermanager-custom-property.js |    77 +
 .../staticweb/js/usermanager-overview.js        |    93 +
 .../staticweb/js/usermanager-role-overview.js   |   102 +
 .../staticweb/js/usermanager-role-permission.js |    49 +
 .../staticweb/js/usermanager-user-permission.js |    49 +
 .../webinterface/staticweb/js/usermanager.js    |    40 +
 .../webinterface/update-user-template.ssp       |   141 +
 .../webinterface/user-overview-template.ssp     |   123 +
 .../webinterface/user-permission-template.ssp   |   179 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 .../usermanager.webinterface/src/site/site.xml  |    32 +
 .../src/site/xsite/content/jaas.xhtml           |   109 +
 .../src/site/xsite/content/sitemap.xml          |    30 +
 .../src/site/xsite/content/usage-role.xhtml     |    52 +
 .../src/site/xsite/content/usage-user.xhtml     |    66 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/usermanager/LICENSE                    |   201 +
 platform/usermanager/pom.xml                    |   102 +
 .../EmailAlreadyAssignedException.java          |    31 +
 .../usermanager/RoleUnavailableException.java   |    32 +
 .../usermanager/UserAlreadyExistsException.java |    30 +
 .../platform/usermanager/UserComparator.java    |    43 +
 .../usermanager/UserHasNoNameException.java     |    31 +
 .../platform/usermanager/UserManager.java       |   256 +
 .../platform/usermanager/UserManagerImpl.java   |   735 +
 .../usermanager/UserNotExistsException.java     |    31 +
 .../resources/documentation/style/style.css     |   421 +
 .../src/site/resources/images/clerezza.png      |   Bin 0 -> 7113 bytes
 platform/usermanager/src/site/site.xml          |    26 +
 .../src/site/xsite/content/sitemap.xml          |    28 +
 .../src/site/xsite/content/usage.xhtml          |    54 +
 .../src/site/xsite/templates/skin.html          |    71 +
 platform/users/LICENSE                          |   201 +
 platform/users/core/LICENSE                     |   201 +
 platform/users/core/pom.xml                     |   128 +
 .../resources/OSGI-INF/serviceComponents.xml    |    45 +
 .../UserGraphAcessPermissionProvider.scala      |    39 +
 .../platform/users/WebIdGraphsService.scala     |   212 +
 .../clerezza/platform/users/WebIdInfo.scala     |    61 +
 platform/users/ontologies/LICENSE               |   201 +
 platform/users/ontologies/pom.xml               |    67 +
 platform/users/pom.xml                          |    41 +
 platform/xhtml2html/LICENSE                     |   201 +
 platform/xhtml2html/pom.xml                     |    66 +
 .../platform/xhtml2html/AcceptHeader.java       |   180 +
 .../ContentLengthSettingOutputStream.java       |    86 +
 .../DocTypeFilteringOutputStream.java           |   140 +
 .../clerezza/platform/xhtml2html/MediaType.java |   100 +
 .../xhtml2html/MediaTypeComparator.java         |   169 +
 .../platform/xhtml2html/ResponseStatusInfo.java |    34 +
 .../SelfClosing2ClosingTagsOutputStream.java    |   183 +
 .../platform/xhtml2html/WrappedRequest.java     |    61 +
 .../platform/xhtml2html/WrappedResponse.java    |   160 +
 .../platform/xhtml2html/Xhtml2HtmlFilter.java   |   115 +
 .../DocTypeSettingByteChannelTest.java          |   185 +
 .../SelfClosing2ClosingTagsByteChannelTest.java |    82 +
 1713 files changed, 152291 insertions(+), 152291 deletions(-)
----------------------------------------------------------------------



[24/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/jquery.min.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/jquery.min.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/jquery.min.js
new file mode 100644
index 0000000..006e953
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/jquery.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery.min.map
+*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e)
 {if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:funct
 ion(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:fun
 ction(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;r
 eturn!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},node
 Name:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r
 &&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEv
 entListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(
 ){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r
 ={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--
 i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,check
 On:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bub
 bles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1
 %;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;
 if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[
 b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data
 -"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>a
 rguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend(
 {attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&
 (n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==
 o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length|
 |(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",col
 span:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specif
 ied?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e
 ){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.eve
 nts={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort
 (),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)
 "+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c
 =b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,han
 dlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documen
 tElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.r
 emoveEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagati
 on()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
+return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add
 (this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r
 ,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===
 arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F
 +")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){re
 turn t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m
 =V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'><
 /a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!=
 =A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").leng
 th||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l
 =[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expressi
 on: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{
 },relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttr
 ibute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]
 ={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+
 e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},bu
 tton:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W,"
  ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r))
 ,i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),
 o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[
 1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++
 )b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var 
 n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentD
 ocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){retur
 n b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></tab
 le>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b
 .isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n
 )));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;
 n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return thi
 s}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&
 &(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.supp
 ort.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i
 =o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
+}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+
 ")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.
 length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"
 ),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle
 },Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parse
 Float(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":"
 "},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var
  r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArra
 y(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn
 .load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({
 url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML}
 ,flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.d
 one,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader(
 "Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="er
 ror",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"
 !==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readySta
 te))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0
 ]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.n
 oop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat
 (Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.tim
 er(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overfl
 ow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this
 .prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scroll
 Top=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].ele
 m!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacit

<TRUNCATED>

[49/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
new file mode 100644
index 0000000..3d8d929
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
@@ -0,0 +1,646 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.accountcontrolpanel
+
+import java.io.ByteArrayInputStream
+import java.io.IOException
+import java.io.InputStream
+import java.io.UnsupportedEncodingException
+import java.net.URL
+import java.security.AccessControlException
+import java.security.AccessController
+import java.security.MessageDigest
+import java.security.NoSuchAlgorithmException
+import java.security.PrivilegedAction
+import java.util.Dictionary
+import java.util.HashMap
+import java.util.HashSet
+import java.util.Hashtable
+import java.util.Iterator
+import java.util.Map
+import java.util.Set
+import javax.ws.rs.Consumes
+import javax.ws.rs.FormParam
+import javax.ws.rs.GET
+import javax.ws.rs.POST
+import javax.ws.rs.Path
+import javax.ws.rs.PathParam
+import javax.ws.rs.QueryParam
+import javax.ws.rs.WebApplicationException
+import javax.ws.rs.core.Context
+import javax.ws.rs.core.MediaType
+import javax.ws.rs.core.Response
+import javax.ws.rs.core.Response.ResponseBuilder
+import javax.ws.rs.core.UriInfo
+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.ReferenceCardinality
+import org.apache.felix.scr.annotations.ReferencePolicy
+import org.apache.felix.scr.annotations.Service
+import org.osgi.framework.Bundle
+import org.osgi.framework.BundleException
+import org.osgi.service.cm.Configuration
+import org.osgi.service.cm.ConfigurationAdmin
+import org.osgi.service.component.ComponentContext
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import org.apache.clerezza.jaxrs.utils.TrailingSlash
+import org.apache.clerezza.jaxrs.utils.RedirectUtil
+import org.apache.clerezza.jaxrs.utils.form.FormFile
+import org.apache.clerezza.jaxrs.utils.form.MultiPartBody
+import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
+import org.apache.clerezza.platform.config.SystemConfig
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
+import org.apache.clerezza.platform.typerendering.RenderletManager
+import org.apache.clerezza.platform.typerendering.scala.PageRenderlet
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet
+import org.apache.clerezza.rdf.core.BNode
+import org.apache.clerezza.rdf.core.Graph
+import org.apache.clerezza.rdf.core.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.impl.PlainLiteralImpl
+import org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph
+import org.apache.clerezza.rdf.core.impl.TripleImpl
+import org.apache.clerezza.rdf.ontologies.OSGI
+import org.apache.clerezza.rdf.ontologies.PERMISSION
+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
+
+object SettingPanel {
+  val logger: Logger = LoggerFactory.getLogger(classOf[SettingsPanel])
+}
+
+/**
+ *
+ * Account control panel
+ *
+ * @author mir, hasan
+ */
+@Path("/user/{id}/control-panel")
+class SettingsPanel {
+
+  import SettingPanel.logger
+
+  /**
+   * Mainpage
+   *
+   * @param id is the username as given in the URL
+   * @return an array of installed {@link Bundle}s to be managed
+   *
+   */
+  @GET
+  def settingsPage(@PathParam(value = "id") idP: String,
+              @QueryParam("changedPassword") changedPassword: String,
+              @Context uriInfo: UriInfo): GraphNode = {
+    TrailingSlash.enforceNotPresent(uriInfo)
+    val id: String = idP
+    var graphNode: GraphNode = null
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    try {
+      AccessController.checkPermission(new UserBundlePermission(id, ""))
+      graphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+        def run: GraphNode = {
+          var bundles: Array[Bundle] = userBundles(getAgent(id))
+          return asGraphNode(id, bundles)
+        }
+      })
+    }
+    catch {
+      case e: AccessControlException => {
+        graphNode = new GraphNode(new BNode, new SimpleMGraph)
+        graphNode.addProperty(CONTROLPANEL.userBundlePermission, LiteralFactory.getInstance.createTypedLiteral(false))
+      }
+    }
+    try {
+      AccessController.checkPermission(new ChangePasswordPermission(id, ""))
+      graphNode.addProperty(CONTROLPANEL.changePasswordPermission, LiteralFactory.getInstance.createTypedLiteral(true))
+    }
+    catch {
+      case e: AccessControlException => {
+        graphNode.addProperty(CONTROLPANEL.changePasswordPermission, LiteralFactory.getInstance.createTypedLiteral(false))
+      }
+    }
+    if (changedPassword != null && changedPassword.equals("false")) {
+      graphNode.addProperty(CONTROLPANEL.changedPassword, new PlainLiteralImpl("false"))
+    }
+    graphNode.addProperty(RDF.`type`, CONTROLPANEL.SettingsPage)
+    graphNode.addProperty(RDF.`type`, PLATFORM.HeadedPage)
+    return graphNode
+  }
+
+  private def addBundleDescriptionToGraph(responseGraph: MGraph, bundle: Bundle): Unit = {
+    var status: TypedLiteral = LiteralFactory.getInstance.createTypedLiteral(bundle.getState)
+    var bundleUri: UriRef = new UriRef(bundle.getLocation)
+    var triple: Triple = new TripleImpl(bundleUri, OSGI.status, status)
+    responseGraph.add(triple)
+    var bundleId: TypedLiteral = LiteralFactory.getInstance.createTypedLiteral(bundle.getBundleId)
+    triple = new TripleImpl(bundleUri, OSGI.bundle_id, bundleId)
+    responseGraph.add(triple)
+  }
+
+  private def asGraphNode(userId: String, bundles: Array[Bundle]): GraphNode = {
+    val responseGraph: MGraph = new SimpleMGraph
+    for (bundle <- bundles) {
+      addBundleDescriptionToGraph(responseGraph, bundle)
+    }
+    return AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+      def run: GraphNode = {
+        var userDescriptionGraph: Graph = new GraphNode(getAgent(userId), systemGraph).getNodeContext
+        var unionGraph: UnionMGraph = new UnionMGraph(responseGraph, userDescriptionGraph)
+        var graphNode: GraphNode = new GraphNode(getAgent(userId), unionGraph)
+        graphNode.addProperty(CONTROLPANEL.userBundlePermission, LiteralFactory.getInstance.createTypedLiteral(true))
+        return graphNode
+      }
+    })
+  }
+
+  /**
+   * Retrieves all bundles owned by a user represented by agent
+   *
+   * @param agent represents the user who owns bundles to be returned
+   * @return an array of {@link Bundle}s owned by the user
+   *
+   */
+  private def userBundles(agent: NonLiteral): Array[Bundle] = {
+    logger.debug("Retrieve all bundles from user: {}", agent)
+    var installedBundles: Array[Bundle] = componentContext.getBundleContext.getBundles
+    val locationMapper: Map[String, Long] = new HashMap[String, Long]
+    for (b <- installedBundles) {
+      locationMapper.put(b.getLocation, b.getBundleId)
+    }
+    return AccessController.doPrivileged(new PrivilegedAction[Array[Bundle]] {
+      def run: Array[Bundle] = {
+        var bundles: Set[Bundle] = new HashSet[Bundle]
+        var agentBundles: Iterator[Triple] = systemGraph.filter(null, OSGI.owner, agent)
+        while (agentBundles.hasNext) {
+          val location: String = (agentBundles.next.getSubject.asInstanceOf[UriRef]).getUnicodeString
+          try {
+            val id: Long = locationMapper.get(location)
+            bundles.add(componentContext.getBundleContext.getBundle(id))
+          } catch {
+            case _:NumberFormatException => None
+          }
+        }
+        return bundles.toArray(new Array[Bundle](bundles.size))
+      }
+    })
+  }
+
+  private def getAgent(id: String): NonLiteral = {
+    logger.debug("Get agent with id {}", id)
+    var agents: Iterator[Triple] = systemGraph.filter(null, PLATFORM.userName, new PlainLiteralImpl(id))
+    if (agents.hasNext) {
+      return agents.next.getSubject
+    }
+    else {
+      logger.debug("System graph does not contain user: {}", id)
+      var responseBuilder: Response.ResponseBuilder = Response.ok("<html><body>User does not exist</body></html>")
+      throw new WebApplicationException(responseBuilder.build)
+    }
+  }
+
+  private def getAgentPathPrefix(agent: NonLiteral): PlainLiteralImpl = {
+    return AccessController.doPrivileged(new PrivilegedAction[PlainLiteralImpl] {
+      def run: PlainLiteralImpl = {
+        var pathPrefixes: Iterator[Triple] = systemGraph.filter(agent, OSGI.agent_path_prefix, null)
+        if (pathPrefixes.hasNext) {
+          return pathPrefixes.next.getObject.asInstanceOf[PlainLiteralImpl]
+        }
+        return null
+      }
+    })
+  }
+
+  /**
+   * Installs a bundle from the specified location.
+   *
+   * @param id is the username as given in the URL
+   * @param location specifies the URL of the bundle to be installed
+   * @return an array of installed {@link Bundle}s to be managed
+   *
+   */
+  @POST
+  @Path("install-bundle")
+  @Consumes def installBundle(@PathParam(value = "id") id: String, multiForm: MultiPartBody, @Context uriInfo: UriInfo): Response = {
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.checkPermission(new UserBundlePermission(id, ""))
+    var formFiles: Array[FormFile] = multiForm.getFormFileParameterValues("bundle")
+    var filename: String = formFiles(0).getFileName
+    var bundleBytes: Array[Byte] = formFiles(0).getContent
+    if (bundleBytes.length == 0) {
+      var message: String = null
+      if (filename.equals("")) {
+        message = "No bundle specified"
+      }
+      else {
+        message = "Bundle has length 0"
+      }
+      var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message)
+      throw new WebApplicationException(responseBuilder.build)
+    }
+    val bundleInputStream: InputStream = new ByteArrayInputStream(bundleBytes)
+    val location: String = "userbundle:" + id + "/" + filename
+    logger.info("Install bundle {} to location {}", id, location)
+    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
+      def run: Array[Bundle] = {
+        val agent: NonLiteral = getAgent(id)
+        val triple: Triple = new TripleImpl(new UriRef(location), OSGI.owner, agent)
+        try {
+          systemGraph.add(triple)
+          var bundle: Bundle = componentContext.getBundleContext.installBundle(location, bundleInputStream)
+          var prefix: PlainLiteralImpl = getAgentPathPrefix(agent)
+          if (prefix != null) {
+            addBundlePrefix(bundle, prefix.getLexicalForm)
+          }
+          return null
+        }
+        catch {
+          case ex: BundleException => {
+            systemGraph.remove(triple)
+            logger.debug("Failed to install a bundle from: {}", location)
+            logger.error("Exception during install bundle: {}", ex)
+            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.getMessage)
+            throw new WebApplicationException(responseBuilder.build)
+          }
+        }
+      }
+    })
+    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+  }
+
+  private def addBundlePrefix(bundle: Bundle, prefix: String): Unit = {
+    var symbolicName: String = bundle.getSymbolicName
+    /*if (configAdmin != null) {
+      try {
+        var configuration: Configuration = configAdmin.getConfiguration(classOf[TriaxrsPrefixManager].getName)
+        val properties = configuration.getProperties match {
+          case null => new Hashtable[String, AnyRef]()
+          case dict: Dictionary[String, AnyRef] => dict
+        }
+        var mappings = TriaxrsPrefixManager.parseMappings(properties.get(TriaxrsPrefixManager.TRIAXRS_MAPPINGS).asInstanceOf[Array[String]])
+        logger.debug("Prefix {} added to bundle {}", prefix, symbolicName)
+        mappings.put(symbolicName, prefix)
+        var newMappings: Array[String] = TriaxrsPrefixManager.unparseMappings(mappings)
+        properties.put(TriaxrsPrefixManager.TRIAXRS_MAPPINGS, newMappings)
+        configuration.update(properties)
+      }
+      catch {
+        case e: IOException => {
+          logger.warn("Unable to update configuration: {}", e.toString)
+        }
+      }
+    }
+    else {
+      logger.warn("Cannot add prefix mapping. Configuration Admin is missing")
+    }*/
+  }
+
+  private[accountcontrolpanel] def removeBundlePrefix(bundle: Bundle): Unit = {
+    var symbolicName: String = bundle.getSymbolicName
+    /*if ((this.configAdmin != null) && (symbolicName != null)) {
+      try {
+        val configuration: Configuration = configAdmin.getConfiguration(classOf[TriaxrsPrefixManager].getName)
+        val properties = configuration.getProperties match {
+          case null => new Hashtable[String, AnyRef]()
+          case dict: Dictionary[String, AnyRef] => dict
+        }
+        val mappings = TriaxrsPrefixManager.parseMappings(properties.get(TriaxrsPrefixManager.TRIAXRS_MAPPINGS).asInstanceOf[Array[String]])
+        mappings.remove(symbolicName)
+        val newMappings: Array[String] = TriaxrsPrefixManager.unparseMappings(mappings)
+        properties.put(TriaxrsPrefixManager.TRIAXRS_MAPPINGS, newMappings)
+        configuration.update(properties)
+      }
+      catch {
+        case e: IOException => {
+          logger.warn("Unable to update configuration: {}", e.toString)
+        }
+      }
+    }
+    else {
+      logger.warn("Cannot add prefix mapping. Configuration Admin is missing")
+    }*/
+  }
+
+  /**
+   * Starts the bundle with the specified bundle id.
+   *
+   * @param id is the username as given in the URL
+   * @param bundleIdString specifies the id of the bundle to be started
+   * @return an array of installed {@link Bundle}s to be managed
+   *
+   */
+  @POST
+  @Path("start-bundle")
+  def startBundle(@PathParam(value = "id") idP: String,
+             @FormParam("bundleId") bundleIdStringP: String,
+             @Context uriInfo: UriInfo): Response = {
+    val id: String = idP
+    val bundleIdString: String = bundleIdStringP
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.checkPermission(new UserBundlePermission(id, ""))
+    logger.info("Start bundle {} ", id)
+    val bundleId: Long = bundleIdString.toLong
+    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
+      def run: Array[Bundle] = {
+        try {
+          val bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
+          bundle.start
+        }
+        catch {
+          case e: BundleException => {
+            logger.debug("Failed to start bundle {}", bundleIdString)
+            logger.error("Exception during start bundle: {}", e)
+            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
+            throw new WebApplicationException(responseBuilder.build)
+          }
+        }
+        return null
+      }
+    })
+    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+  }
+
+  /**
+   * Stops the bundle with the specified bundle id.
+   *
+   * @param id is the username as given in the URL
+   * @param bundleIdString specifies the id of the bundle to be stopped
+   * @return an array of installed {@link Bundle}s to be managed
+   *
+   */
+  @POST
+  @Path("stop-bundle") def stopBundle(@PathParam(value = "id") idP: String,
+                          @FormParam("bundleId") bundleIdStringP: String,
+                          @Context uriInfo: UriInfo): Response = {
+    val id: String = idP
+    val bundleIdString: String = bundleIdStringP
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.checkPermission(new UserBundlePermission(id, ""))
+    logger.info("Stop bundle {}", id)
+    val bundleId: Long = bundleIdString.toLong
+    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
+      def run: Array[Bundle] = {
+        try {
+          var bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
+          bundle.stop
+        }
+        catch {
+          case e: BundleException => {
+            logger.debug("Failed to stop bundle ", bundleIdString)
+            logger.error("Exception during stop bundle: {}", e)
+            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
+            throw new WebApplicationException(responseBuilder.build)
+          }
+        }
+        return null
+      }
+    })
+    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+  }
+
+  /**
+   * Uninstalls the bundle with the specified bundle id.
+   *
+   * @param id is the username as given in the URL
+   * @param bundleIdString specifies the id of the bundle to be uninstalled
+   * @return an array of installed {@link Bundle}s to be managed
+   *
+   */
+  @POST
+  @Path("uninstall-bundle")
+  def uninstallBundle(@PathParam(value = "id") idP: String,
+                @FormParam("bundleId") bundleIdStringP: String,
+                @Context uriInfo: UriInfo): Response = {
+    val id: String = idP
+    val bundleIdString: String = bundleIdStringP
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.checkPermission(new UserBundlePermission(id, ""))
+    logger.info("Uninstall bundle {}", id)
+    val bundleId: Long = bundleIdString.toLong
+    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
+      def run: Array[Bundle] = {
+        val agent: NonLiteral = getAgent(id)
+        try {
+          var bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
+          bundle.uninstall
+          val triple: Triple = new TripleImpl(new UriRef(bundle.getLocation), OSGI.owner, agent)
+          systemGraph.remove(triple)
+          removeBundlePrefix(bundle)
+        }
+        catch {
+          case e: BundleException => {
+            logger.debug("Failed to uninstall bundle {}", bundleIdString)
+            logger.error("Exception during uninstall bundle: {}", e)
+            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
+            throw new WebApplicationException(responseBuilder.build)
+          }
+        }
+        return null
+      }
+    })
+    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+  }
+
+  /**
+   * changes the password of an user
+   *
+   * @param idP id is the username as given in the URL
+   * @param lang represents the user's new standard language.
+   * @return
+   */
+  @POST
+  @Path("change-language")
+  def changeUserLanguage(@PathParam(value = "id") idP: String,
+                  @FormParam("availablelanguages") lang: String,
+                  @Context uriInfo: UriInfo): Response = {
+    val id: String = idP
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
+      def run: AnyRef = {
+        var userNode: GraphNode = new GraphNode(getAgent(id), systemGraph)
+        userNode.deleteProperties(PLATFORM.preferredLangInISOCode)
+        userNode.addProperty(PLATFORM.preferredLangInISOCode, LiteralFactory.getInstance.createTypedLiteral(lang))
+        return null
+      }
+    })
+    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+  }
+
+  /**
+   * changes the password of an user
+   *
+   * @param idP id is the username as given in the URL
+   * @param oldPW the current user password
+   * @param newPW the new password
+   * @param confirmNewPW the new password
+   * @return
+   */
+  @POST
+  @Path("change-password")
+  def changePassword(@PathParam(value = "id") idP: String,
+               @FormParam("oldPW") oldPW: String,
+               @FormParam("newPW") newPW: String,
+               @FormParam("confirmNewPW") confirmNewPW: String,
+               @Context uriInfo: UriInfo): Response = {
+    val id: String = idP
+    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
+    AccessController.checkPermission(new ChangePasswordPermission(id, ""))
+    var changedPassword: Boolean = false
+    if (newPW.trim.equals(confirmNewPW.trim) && checkPWStrings(oldPW, newPW)) {
+      changedPassword = AccessController.doPrivileged(new PrivilegedAction[Boolean] {
+        private def getCurrentPassword(agent: NonLiteral): String = {
+          var currentPassword: String = null
+          var oldPWTriple: Iterator[Triple] = systemGraph.filter(agent, PERMISSION.passwordSha1, null)
+          if (oldPWTriple.hasNext) {
+            var currentPWLiteral: Literal = oldPWTriple.next.getObject.asInstanceOf[Literal]
+            currentPassword = currentPWLiteral.getLexicalForm
+          }
+          return currentPassword
+        }
+
+        def run: Boolean = {
+          val agent: NonLiteral = getAgent(id)
+          var encodedOlpPW: String = getEncodedPW(oldPW)
+          var currentPassword: String = getCurrentPassword(agent)
+          if ((currentPassword != null) && !currentPassword.equals(encodedOlpPW)) {
+            logger.info("Typed wrong current password!")
+            return false
+          }
+          else {
+            removeOldPwAndAddNewPW(agent, currentPassword, newPW)
+            return true
+          }
+        }
+
+        private def removeOldPwAndAddNewPW(agent: NonLiteral, currentPassword: String, newPW: String): Unit = {
+          var newPWTriple: Triple = new TripleImpl(agent, PERMISSION.passwordSha1, new PlainLiteralImpl(getEncodedPW(newPW)))
+          if (currentPassword != null) {
+            var oldPWTriple: Triple = new TripleImpl(agent, PERMISSION.passwordSha1, new PlainLiteralImpl(currentPassword))
+            systemGraph.remove(oldPWTriple)
+            logger.debug("removed old password from systemgraph")
+          }
+          systemGraph.add(newPWTriple)
+          logger.debug("user " + id + " changed password")
+        }
+
+        private def getEncodedPW(password: String): String = {
+          if (password == null) {
+            return null
+          }
+          try {
+            return bytes2HexString(MessageDigest.getInstance("SHA1").digest(password.getBytes("UTF-8")))
+          }
+          catch {
+            case e: NoSuchAlgorithmException => {
+              throw new RuntimeException(e)
+            }
+            case e: UnsupportedEncodingException => {
+              throw new RuntimeException(e)
+            }
+          }
+        }
+
+        private def bytes2HexString(bytes: Array[Byte]): String = {
+          val HEXDIGITS: Array[Char] = "0123456789abcdef".toCharArray
+          val result = new Array[Char](bytes.length << 1)
+          var j: Int = 0
+          for (i <- 0 to bytes.length - 1) {
+            result(j) = HEXDIGITS(bytes(i) >> 4 & 0xF)
+            result(j + 1) = HEXDIGITS(bytes(i) & 0xF)
+            j += 2
+          }
+          return new String(result)
+        }
+      })
+    }
+    else {
+      logger.info("Changing password failed!")
+      changedPassword = false
+    }
+    if (changedPassword) {
+      return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
+    }
+    else {
+      return RedirectUtil.createSeeOtherResponse("../control-panel?changedPassword=false", uriInfo)
+    }
+  }
+
+  /**
+   * checks if the typed strings are valid
+   */
+  private def checkPWStrings(oldPW: String, newPW: String): Boolean = {
+    if (newPW.length == 0) {
+      return false
+    }
+    return true
+  }
+
+  /**
+   * The activate method is called when SCR activates the component configuration.
+   *
+   * @param componentContext
+   */
+  protected def activate(componentContext: ComponentContext): Unit = {
+    this.componentContext = componentContext
+  }
+
+  protected def bindConfigurationAdmin(configAdmin: ConfigurationAdmin): Unit = {
+    logger.debug("Binding configuration admin")
+    this.configAdmin = configAdmin
+  }
+
+  protected def unbindConfigurationAdmin(configAdmin: ConfigurationAdmin): Unit = {
+    logger.debug("Unbinding configuration admin")
+    this.configAdmin = null
+  }
+
+  protected def bindSystemGraph(mgraph: MGraph): Unit = {
+    systemGraph = mgraph
+  }
+
+  protected def unbindSystemGraph(mgraph: MGraph): Unit = {
+    if (systemGraph == mgraph) {
+      systemGraph = null
+    }
+  }
+
+  protected def bindCgProvider(contentgraphprovider: ContentGraphProvider): Unit = {
+    cgProvider = contentgraphprovider
+  }
+
+  protected def unbindCgProvider(contentgraphprovider: ContentGraphProvider): Unit = {
+    if (cgProvider == contentgraphprovider) {
+      cgProvider = null
+    }
+  }
+
+  private var componentContext: ComponentContext = null
+  private var systemGraph: MGraph = null
+  private var cgProvider: ContentGraphProvider = null
+  private var configAdmin: ConfigurationAdmin = null
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
new file mode 100644
index 0000000..bb306aa
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ContactConfirmRenderlet.scala
@@ -0,0 +1,109 @@
+package org.apache.clerezza.platform.accountcontrolpanel.html
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils._
+import org.apache.clerezza.rdf.ontologies.FOAF
+import org.apache.clerezza.rdf.ontologies.RDF
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.platform.typerendering.scala._
+
+
+
+/**
+ * Metadata class for the person panel
+ */
+class ContactConfirmRenderlet extends SRenderlet {
+  def getRdfType() = CONTROLPANEL.ContactConfirmPage
+
+
+  override def renderedPage(arguments: XmlResult.Arguments) = new XmlPerson(arguments)
+
+  /**
+   * Content class for the Person Panel
+   */
+  class XmlPerson(args: XmlResult.Arguments) extends XmlResult(args) {
+
+    import RenderingUtility._
+    
+    //
+    // the content itself.
+    // This is the piece that is closest to a pure ssp, though there is still too much code in it
+    //
+
+    override def content = {
+      val primarySubject = res/FOAF.primaryTopic
+      <div id="tx-content">
+        {
+        if (primarySubject.hasProperty(RDF.`type`, FOAF.Person)) {
+          <form action="addContact" method="post">
+            {render(primarySubject, "box-naked")}
+            <input type="hidden" name="webId" value={primarySubject*} />
+            <input type="submit" value="Add this contact" />
+          </form>
+        } else {
+          <div>
+          <span>The resource {primarySubject!} of type {primarySubject/RDF.`type`} is not known to be a Person</span>
+          {
+            import collection.JavaConversions._
+            val otherPersons = (for (t <- primarySubject.getNodeContext.filter(null, RDF.`type`, FOAF.Person))
+              yield t.getSubject).toList
+            val personsWithUri: List[UriRef] = for (otherPerson <- otherPersons;
+                if otherPerson.isInstanceOf[UriRef]) yield otherPerson.asInstanceOf[UriRef]
+            if (personsWithUri.isEmpty) {
+              <span>No person could be found</span>
+            } else {
+              <div>
+                Maybe you want to add {
+                  if (personsWithUri.size > 1) {
+                    "one of the following "+personsWithUri.size+" persons:"
+                  } else {
+                    "the person"
+                  }
+                }
+                {
+                  for (otherPerson <- personsWithUri) yield {
+                    <form action="addContact" method="post">
+                      <span>{otherPerson}</span>
+                      {render(otherPerson, "box-naked")}
+                      <input type="hidden" name="webId" value={otherPerson.getUnicodeString} />
+                      <input type="submit" value="Add this contact" />
+                    </form>
+                  }
+                }
+              </div>
+            }
+          }
+          {
+            <form action="addContact" method="post">
+            You can add {primarySubject} as contact even though it does not seem to be a person.
+            <input type="hidden" name="webId" value={primarySubject*} />
+            <input type="submit" value="Add anyway" />
+          </form>
+          } </div>
+        }
+      }
+      <a href="../profile" onclick="history.go(-1)">Cancel</a>
+      </div>
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
new file mode 100644
index 0000000..2b9913c
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/PersonBox.scala
@@ -0,0 +1,63 @@
+package org.apache.clerezza.platform.accountcontrolpanel.html
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils._
+import org.apache.clerezza.rdf.ontologies.FOAF
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.platform.typerendering.scala._
+import scala.xml.Text
+
+
+
+/**
+ * Metadata class for the person panel
+ */
+class PersonBox extends SRenderlet {
+  def getRdfType() = FOAF.Person
+
+  override def getModePattern = "box-naked"
+
+  override def renderedPage(arguments: XmlResult.Arguments) = new XmlPerson(arguments)
+
+  /**
+   * Content class for the Person Panel
+   */
+  class XmlPerson(args: XmlResult.Arguments) extends XmlResult(args) {
+
+    import RenderingUtility._
+    
+    //
+    // the content itself.
+    // This is the piece that is closest to a pure ssp, though there is still too much code in it
+    //
+
+    override def content = {
+      val pixml= getAgentPix(res)
+      <div class="personInABox">
+        <table><tr><td>{pixml}</td></tr>
+        <tr><td>{new Text(getName(res))}</td></tr>
+        </table>
+      </div>
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
new file mode 100644
index 0000000..7d65dff
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/ProfilePanel.scala
@@ -0,0 +1,295 @@
+package org.apache.clerezza.platform.accountcontrolpanel.html
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.foafssl.ontologies.CERT
+import org.apache.clerezza.foafssl.ontologies.RSA
+import org.apache.clerezza.platform.typerendering.scala._
+import java.math.BigInteger
+import java.util.Date
+import java.text._
+import org.apache.clerezza.rdf.core.UriRef
+import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
+import org.apache.clerezza.rdf.ontologies.{RDFS, DC, FOAF}
+
+class ProfilePanel extends SRenderlet {
+
+  override def getRdfType() = CONTROLPANEL.ProfilePage
+
+  override def renderedPage(arguments: XmlResult.Arguments) = new ProfilePanelXHTML(arguments)
+
+  class ProfilePanelXHTML(arguments: XmlResult.Arguments) extends XmlResult(arguments ) {
+
+    //set header properties
+
+    resultDocModifier.addStyleSheet("/account-control-panel/style/profile.css");
+    resultDocModifier.addScriptReference("/account-control-panel/scripts/profile.js");
+    resultDocModifier.addScriptReference("/account-control-panel/scripts/IEKeygen.js");
+    resultDocModifier.setTitle("Account Control Panel");
+    resultDocModifier.addNodes2Elem("tx-module", <h1>Account Control Panel</h1>);
+    resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Profile</a></li>);
+    resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li><a href="control-panel">Settings</a></li>);
+
+    //constants and variables
+
+    lazy val agent: RichGraphNode = res / FOAF.primaryTopic
+
+
+    // the content itself
+    // clearly in this case there is so much more in the the methods, that one could hesitate to call this an ssp
+
+    override def content = {
+      <div id="tx-content">
+        <h2>Personal Profile</h2>{agent ! match {
+          case _: BNode => createWebId()
+          case _: UriRef => existingWebId()
+         }}
+      </div>
+
+    }
+
+    //methods used to create content
+
+    def cp(s: Any) =  new UriRef("http://clerezza.org/2009/03/controlpanel#" + s)
+    def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#" + s)
+
+
+    def createWebId() = {
+      <h3>Associate Profile to WebID</h3>
+      <div id="newOrExistingSelection">
+      <p>Your profile is not currently associated to a WebID. A WebID allows you
+        to link your friends as well as to log-in to many sites (supporting foaf+ssl
+        or open-id).
+      </p>
+      <p>You may either create a new WebID or associate your account to an
+        existing WebID. Only creating a WebID here will allow you to manage your
+        profile here.
+      </p>
+      <form action="#" id="associateSelection">
+        <button type="button" id="newWebIdButton">Create a new Web-Id</button>
+        <button type="button" id="existingWebIdButton">I already have a Web-ID and want to use it</button>
+      </form>
+      </div>
+      <div id="createNewWebId">
+      <p>You have chosen to create a new Web-Id.</p>
+      <p>The Web-ID will be created as follows:
+        <br/>
+        <ol>
+        <li>Web-Id:
+          {var webId = res / cp("suggestedPPDUri") *;
+          webId += "#me";
+          webId}
+        </li>
+        <li>Personal-Profile Document: {res/cp("suggestedPPDUri")*}</li>
+        </ol>
+      </p>
+      <form method="post" action="profile/create-new-web-id">
+        <input value="Create it!" type="submit"/>
+      </form>
+      </div>
+      <div id="setExistingWebId">
+      <p>Please enter your Web-Id, if your Web-Id supports Foaf+SSL you will
+        be able to use it to log in to this site.</p>
+      <form method="post" action="profile/set-existing-webid">
+        <label for="webid">WebID</label> <input type="text" name="webid" size="80" title="Web-ID"/>
+        <br/>
+        <input value="Associate Profile to Web-Id" type="submit"/>
+        <p/>
+      </form>
+      </div>
+
+    }
+
+    def existingWebId() = {
+      if ((res / cp("isLocalProfile")).as[Boolean]) {
+      existingLocalWebId()
+      } else {
+      roamingUser()
+      }
+    }
+
+
+    def existingLocalWebId() = {
+      <h3>Manage your profile</h3>
+       <p>Here you can change your public profile.</p>
+
+      <form method="post" action="profile/modify">
+      <input type="hidden" name="webId" value={agent *}/>
+      <table>
+        <tr><td class="formlabel">Name:</td>
+        <td><input type="text" name="name" value={agent / FOAF.name *}/></td>
+        </tr>
+        <tr><td class="formlabel multiline">Description:</td>
+        <td><textarea name="description" rows="3" cols="80">{agent / DC.description *}</textarea></td>
+        </tr>
+        <tr><td class="formlabel"><input value="Modify" type="submit"/></td><td/></tr>
+      </table>
+
+      <p/>
+      </form>
+
+      <h3>Contacts</h3>
+      
+      <table>{ var i =0
+        val friends = for (friend <- agent/FOAF.knows) yield {
+          <td><form method="post" action="profile/deleteContact">
+            {
+              friend! match {
+                case webId: UriRef => render(webId, "box-naked")
+                case _ => render(friend, "box-naked")
+              }
+            }
+            <br/>
+            <input type="hidden" name="contactWebId" value={friend*}/>
+            <input type="submit" value="remove contact" />
+          </form></td>
+        /*render(friend!.asInstanceOf[UriRef])
+              import PersonPanel._
+        <td class="personInABox">{personInABox(friend)}</td>*/
+       }
+       for (row <- friends.grouped(5)) yield <tr>{row}</tr>
+      }</table>
+      <form id="addContact" method="get" action="profile/addContact">
+      <label for="contactWebId">Add contact bei WebId:<br/></label>
+      <input type="text" name="contactWebId" size="80"/><input type="submit" value="add contact" />
+      </form>
+
+      <h3>Key and Certificate Creation</h3>
+
+      <script type="text/javascript"> <![CDATA[$(document).ready(  function() { configurePage(); }   ); ]]> </script>
+
+      <div id="iehelptext" style="display: none;">
+      <p>Using Internet Explorer under Windows Vista or above or Windows
+        Server 2008, you need to configure the following for this to work:</p>
+      <ul>
+        <li>Add this site to the <i>Trusted Sites</i> list: in Internet
+        Options -&gt; Security -&gt; Trusted Sites -&gt; Sites -&gt; Add ...</li>
+        <li>You may need to configure the trust level (in this tab), using
+        <i>Custom Level...</i>: enable <i>Initialize and script ActiveX
+          controls not marked as safe for scripting</i>.</li>
+        <li>If you are using Windows Vista without SP1 or above, you will
+        probably need to install <a href="cacert.crt">this certificate</a> as a
+        Trusted Root Certification Authority Certificate for your own
+        certificate installation to succeed. You should probably remove that
+        trusted root CA certificate afterwards.</li>
+      </ul>
+      </div>
+      <form id="keygenform" method="post" action="profile/keygen">
+      <input name="webId" id="webId" type="hidden" value={agent*} />
+      <table>
+        <colgroup><col width="1*"/><col/></colgroup>
+        <tr>
+        <td class="formlabel">Certificate Name:</td>
+        <td>
+          <input alt="create a certificate name that will help you distinguish it from others you may have" name="cn"
+              size="35" id="cn" type="text" value={ ((agent/FOAF.name*)+"@clerezza")}/>
+        </td>
+        </tr>
+        <tr>
+        <td class="formlabel">Key strength:</td>
+        <td id="keystrenghtd">
+          <keygen id="spkac" name="spkac" challenge="TheChallenge1"/>
+        </td>
+        </tr>
+        <tr>
+        <td class="formlabel">Valid for:</td>
+        <td>
+          <input type="text" name="days" value="365" size="4"/>
+          days <input type="text" name="hours" value="0.0" size="4"/> hours</td>
+        </tr>
+        <tr>
+        <td class="formlabel">Comment:</td>
+        <td><input type="text" name="comment" value="" size="80"/></td>
+        </tr>
+        <tr><td class="formlabel"><input id="keygensubmit" type="submit" value="create certificate" /></td><td/></tr>
+      </table>
+      </form>
+      <h3>Existing Certificates</h3>
+      <form method="post" action="profile/deletekey">
+      <table>
+        <tr><th>Delete</th><th>Certificate Details</th></tr>
+        <input name="webId" id="webId" type="hidden" value={agent*} />
+        <tbody>{
+          for (key <- agent/-CERT.identity )
+          yield { val modulus = (key/RSA.modulus).as[BigInteger]
+              if (modulus == null)  <span/> //todo: broken public key, should delete it
+              else <tr><td><input type="checkbox" name="keyhash" value={modulus.hashCode().toString()}/></td>
+            <td><table>
+              <tr><td class="propvalue">Created:</td><td>{beautifyDate(key/DC.date )}</td></tr>
+              <tr><td class="propvalue">Comment:</td><td>{ key/RDFS.comment* }</td></tr>
+              <tr><td class="propvalue multiline">Modulus:</td><td><code>{ beautifyHex(key/RSA.modulus) }</code></td></tr>
+              <tr><td class="propvalue">Exponent:</td><td><code>{ beautifyInt(key/RSA.public_exponent) }</code></td></tr>
+              </table>
+            </td>
+                </tr>}
+        }</tbody>
+      </table>
+      <input type="submit" value="Disable Keys"/>
+      </form>
+      <p></p>
+
+    }
+
+    def roamingUser() = {
+      <h3>Using remote profile</h3>
+       <p>
+      {agent / FOAF.nick *}, you have accessed this site using your WebID
+        {"<" + (agent *) + ">"}
+        which has not been
+        created on this site.To edit your profile you should visit the site issuing the
+        profile.</p>
+    }
+
+
+
+
+    def beautifyDate(dtIt: CollectedIter[RichGraphNode]) {
+      if (0 == dtIt.size) return "_"
+      DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.FULL).format(dtIt.as[Date])
+    }
+
+
+    def beautifyHex(dtIt: CollectedIter[RichGraphNode]): String = {
+      if (0 == dtIt.size) return "warning! missing. Key invalid"
+      //this is a problem, it should always be here or it is invalid, and key should be removed
+      val bigint: BigInteger = dtIt.as[BigInteger]
+      val bstr = bigint.toString(16).toUpperCase;
+      val sbuf = new StringBuffer(bstr.size + (bstr.size/2)+10)
+      var cnt = 0
+      for (c <- bstr.toCharArray) {
+      if ((cnt % 2) == 0) sbuf.append(' ')
+      sbuf.append(c)
+      cnt += 1
+      }
+      sbuf.toString
+    }
+
+
+
+    def beautifyInt(dtIt: CollectedIter[RichGraphNode] ) :String = {
+      if (0 == dtIt.size) return "warning! missing. Key invalid"
+      else return dtIt.as[BigInteger].toString
+    }
+  }
+}
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
new file mode 100644
index 0000000..735aee0
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/RenderingUtility.scala
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.accountcontrolpanel.html
+
+
+import scala.xml.Node
+import scala.xml.NodeSeq
+import scala.xml.Text
+import java.net.URLEncoder
+import org.apache.clerezza._
+import org.apache.clerezza.rdf.core.UriRef
+import org.apache.clerezza.rdf.ontologies.FOAF
+import org.apache.clerezza.rdf.ontologies.RDFS
+import rdf.scala.utils.CollectedIter
+import rdf.scala.utils.RichGraphNode
+import rdf.scala.utils.Preamble._
+/**
+ * Some utility methods for the renderlets
+ */
+object RenderingUtility {
+  val emptyText = new Text("")
+
+  def ifE[T](arg:T)(template: T=>Node ):NodeSeq = {
+    def isEmpty(arg: Any): Boolean = {
+      arg match {
+        case prod: Product => prod.productIterator.forall(isEmpty(_))
+        case str: String => (str.size == 0)
+        case it: CollectedIter[RichGraphNode] => (it.size == 0)
+        case node: RichGraphNode => (null == node)
+        case other: AnyRef => (null == other)
+        case _ => false //literals can't be empty
+      }
+    }
+    if (isEmpty(arg)) return emptyText else template(arg)
+  }
+
+  def firstOf(node: RichGraphNode, uris: UriRef*):CollectedIter[RichGraphNode] = {
+    for (uri <- uris) {
+      val res : CollectedIter[RichGraphNode] = node/uri
+      if (res.size>0) return res
+    }
+    return new CollectedIter[RichGraphNode]()
+  }
+
+
+
+  /**
+   * Show a person: a picture, a link to their local profile and their name
+   * Different default icons should be shown if the agent is a person, company, group, robot...
+   *
+   * assumes the p is WebID node (can change later)
+   */
+  def getAgentPix(p: RichGraphNode) = {
+    val pix = firstOf(p, FOAF.depiction, FOAF.logo, FOAF.img).getNode match {
+      case uri: UriRef => uri.getUnicodeString
+      case _ => "http://upload.wikimedia.org/wikipedia/commons/0/0a/Gnome-stock_person.svg"
+    }
+    <a href={"/browse/person?uri="+encode(p*)}><img class="mugshot" src={pix}/></a>
+  }
+
+  private def encode(url: String): String =  URLEncoder.encode(url,"UTF8")
+
+  /**
+   * get a usable name from the properties available including nick
+   */
+  def getName(p: RichGraphNode): String =  {
+     val name = p/FOAF.name*;
+     if ("" != name ) { return name }
+     val firstNm: String = p/FOAF.firstName*;
+     val fmlyNm :String = firstOf(p, FOAF.family_name,FOAF.familyName)*;
+       if ("" != firstNm || "" != fmlyNm) { return firstNm+" "+fmlyNm }
+     return p*
+
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
new file mode 100644
index 0000000..a2a58e6
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/html/SettingsPanel.scala
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.accountcontrolpanel.html
+
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
+import org.apache.clerezza.platform.typerendering.scala._
+
+
+class SettingsPanel extends SRenderlet {
+
+  val getRdfType = CONTROLPANEL.SettingsPage
+
+    override def renderedPage(arguments: XmlResult.Arguments) = new XmlResult(arguments ) {
+    override def content = {
+import org.apache.clerezza.rdf.core.UriRef
+import scala.xml.NodeBuffer
+import scala.collection.mutable.ListBuffer
+def cp(s: Any) = new UriRef("http://clerezza.org/2009/03/controlpanel#"+s)
+def osgi(s: Any) = new UriRef("http://clerezza.org/2008/11/osgi#"+s)
+def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#" + s)
+val nodeBuff = new ListBuffer[NodeBuffer]
+resultDocModifier.setTitle("Account Control Panel");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Account Control Panel</h1>);
+resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li><a href="profile">Profile</a></li>);
+resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Settings</a></li>);
+
+if ((res/cp("userBundlePermission")*) == "true") {
+  nodeBuff +=(<h2>Bundle Control Panel</h2>
+  <h3>Install Bundle</h3>
+
+  <form method="post" action="control-panel/install-bundle" enctype="multipart/form-data">
+    <input type="file" class="FieldText" name="bundle" size="30" title="bundle path"/><br/><br/>
+    <input style="width: 5em;" value="Install" type="submit"/><p />
+  </form>
+  <br/><br/>
+  <h3>User Bundles</h3>
+  <table border="1">
+  <tbody>
+    <tr>
+      <th>Location</th>
+      <th>Status</th>
+      <th colspan="4">Action</th>
+    </tr>
+
+    {for (renderlet <- (res/-osgi("owner")).sort((a,b) => ((a*)<(b*)))) yield
+    <tr>
+      <td>{renderlet*}</td>
+      <td>{renderlet/osgi("status")* match {
+        case "2" => "Installed"
+        case "4" => "Resolved"
+        case "8" => "Starting"
+        case "16" => "Stopping"
+        case "32" => "Active"
+        }}
+      </td>
+      {if (((renderlet/osgi("bundle_id")).length) > 0)
+      <td>
+      <form method="post" action="control-panel/start-bundle">
+      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
+      <input value="start" type="submit"/>
+      </form>
+      </td>
+      <td>
+      <form method="post" action="control-panel/stop-bundle">
+      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
+      <input value="stop" type="submit"/>
+      </form>
+      </td>
+      <td>
+      <form method="post" action="control-panel/uninstall-bundle">
+      <input name="bundleId" value={(renderlet/osgi("bundle_id"))*} type="hidden"/>
+      <input value="uninstall" type="submit"/>
+      </form>
+      </td>
+      else
+      <td colspan="3">Not registered as bundle</td>}
+      </tr>
+      }
+    </tbody>
+  </table>
+  <br/>)
+}
+
+if((res/cp("changePasswordPermission")*) == "true") {
+  nodeBuff +=(<h2>Change Password</h2>
+
+
+  <form action="control-panel/change-password" method="post">
+    <fieldset>
+      <ol style="display: block;">
+        <li class="tx-line" style="background-image: none;">
+          <label>Current Password:</label>
+          <span class="tx-item">
+            <input type="password" name="oldPW"/>
+          </span>
+        </li>
+        <li class="tx-line" style="background-image: none;">
+          <label>New Password:</label>
+          <span class="tx-item">
+            <input type="password" name="newPW"/>
+          </span>
+        </li>
+        <li class="tx-line" style="background-image: none;">
+          <label>Confirm new Password:</label>
+          <span class="tx-item">
+            <input type="password" name="confirmNewPW"/>
+          </span>
+        </li>
+        <br />
+        <input style="width: 5em;" type="submit" name="submit" value="Submit"/>
+      </ol>
+      <br/>
+    </fieldset>
+  </form>)
+
+
+}
+
+if((res/cp("changedPassword")).length > 0) {
+  nodeBuff +=(<br /><span>Password has not changed, either wrong current password or the
+        new password and the confirmation didn't match!<br /><br /></span>)
+}
+
+
+nodeBuff +=(<h2>Change user's default language</h2>
+  <form method="post" action="control-panel/change-language">
+    {render(context/platform("instance")/platform("languages"), "naked")}
+    <br/><br/>
+    <script type="text/javascript">$("#availablelanguages").val({"'" + (context/platform("user")/platform("preferredLangInISOCode")*) + "'"})</script>
+    <input style="width: 5em;" type="submit" name="submit" value="Submit"/>
+    <br/><br/>
+  </form>)
+
+<div id="tx-content">
+  <div class="tx-edit" style="margin-left: 0.5em;">
+  {if(nodeBuff.isEmpty)
+    <span>There are no settings you can configure for this account!</span>
+  else
+    nodeBuff
+  }
+  </div>
+</div>
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
new file mode 100644
index 0000000..ae7953f
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/permissions.scala
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.accountcontrolpanel
+
+import java.security.Permission
+import org.slf4j.scala.Logging
+
+//note: file has lower class name, as it contains many classes
+
+
+/**
+ * superclass for the permission classes, to avoid a lot of boilerplate code
+ *
+ * @author bblfish, reto
+ */
+abstract
+class AbstractPermission(val accountName: String, val actions: String ="")
+  extends Permission(accountName) with Logging  {
+
+  if (actions != "") {
+    throw new RuntimeException(getClass.getName+": actions must be an empty String "+
+      "(second argument only in constructor for supporting building from canonical form")
+  }
+
+  def getActions: String = actions
+
+  /**
+   * A subclass implies another permission if and only if they are equals
+   */
+   override
+  def implies(permission: Permission): Boolean = {
+    logger.debug("checking for "+permission+" is implied by "+ this)
+    var result: Boolean = equals(permission)
+    return result
+  }
+
+  override
+  def equals(other: Any): Boolean =
+      other match {
+      case that:  AbstractPermission  =>  
+        (that eq this ) || ((this.getClass == that.getClass) && accountName == that.accountName )
+      case _ => false
+      }
+
+  /**
+   * For the hashCode the class and the accountName is considered
+   */
+  override
+  def hashCode: Int = {
+    return  getClass.hashCode + (if (accountName != null) accountName.hashCode else 0)
+  }
+}
+
+/**
+ * Permission to change the password
+ * @author ali
+ *
+ */
+class ChangePasswordPermission(accountName: String, actions: String ="")
+  extends AbstractPermission(accountName, actions) {
+
+}
+
+/**
+ * Permission to access the account control panel
+ *
+ * @author ali
+ *
+ */
+class AccountControlPanelAppPermission(accountName: String, actions: String ="")
+  extends AbstractPermission(accountName)  {
+
+
+}
+
+/**
+ * Permission for user to have own bundles
+ *
+ * @author mir
+ *
+ */
+class UserBundlePermission( accountName: String, actions: String ="")
+  extends AbstractPermission(accountName)  {
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
new file mode 100644
index 0000000..8d5a4cb
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/site.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Usage" href="documentation/usage.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..38be885
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>usage.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
new file mode 100644
index 0000000..6c22c93
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/content/usage.xhtml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Usage: How to use the Account Control Panel</title>
+	</head>
+	<body>
+		<h1>Usage: How to use the Account Control Panel</h1>
+		<p>Author: Tsuyoshi Ito - clerezza.org</p>
+		<p>Date: January 27, 2009</p>
+		<h2 id="list">1. List installed bundles</h2>
+		<p>
+			Each user can upload and install bundles into the platform. Users and permissions can be created via <a href="http://localhost:8282/admin/user-manager" target="_blank">http://localhost:8282/admin/user-manager</a> and <a href="http://localhost:8282/admin/role-manager" target="_blank">http://localhost:8282/admin/role-manager</a>. <br />
+			Enter the following URL: <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a> to list all bundles from the user "admin" (when asked to authenticate use username "admin" and password "admin). If you want to list installed bundles from another user, replace "admin" in the URL with the username of the other user.
+		</p>
+		<h2 id="install">2. Install a bundle</h2>
+		<p>
+            You can upload a bundle by clicking on the link <a href="http://localhost:8282/user/admin/control-panel/install-bundle-form">Install Bundle</a> on <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a>. Enter the URL of your bundle (e.g. Location: http://localhost/mybundle-1.0.jar) and click on the button "install". The uploaded and installed bundles have the same permission as you have. 
+        </p>
+		<h2 id="start">3. Start, Stop and Uninstall a bundle</h2>
+        <p>
+            A user can start, stop and  uninstall a bundle on <a href="http://localhost:8282/user/admin/control-panel" target="_blank">http://localhost:8282/user/admin/control-panel</a>, whereas "admin" can be replaced by another username. Click on the appropriate button for start , stop or uninstall a bundle.
+        </p>
+        <p>
+            That's all. Enjoy.
+        </p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..4b10edb
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>


[52/87] [abbrv] clerezza git commit: CLEREZZA-979: ported typerendering and a bunch of dependencies

Posted by re...@apache.org.
CLEREZZA-979: ported typerendering and a bunch of dependencies

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

Branch: refs/heads/master
Commit: 0e2097985bbdb2ddf5925e4bc1da56187de710a6
Parents: 7022023
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 17:58:25 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 17:58:25 2015 +0000

----------------------------------------------------------------------
 platform/config/pom.xml                         | 12 ++--
 .../platform/config/PlatformConfig.java         | 60 ++++++++++----------
 .../clerezza/platform/config/SystemConfig.java  | 39 +++++++------
 .../TcPermissionDescriptionsProvider.java       |  8 +--
 platform/platform/pom.xml                       |  4 +-
 .../apache/clerezza/platform/BootMonitor.java   | 18 +++---
 .../org/apache/clerezza/platform/Constants.java | 14 ++---
 platform/typepriority/pom.xml                   | 12 ++--
 .../platform/typepriority/TypePrioritizer.java  | 52 ++++++++---------
 .../typepriority/TypePrioritizerTest.java       | 32 +++--------
 platform/typerendering.gui/pom.xml              |  4 +-
 platform/typerendering.scala/pom.xml            |  8 +--
 .../platform.typerendering.core/pom.xml         | 20 +++----
 .../typerendering/CallbackRenderer.java         |  6 +-
 .../typerendering/CallbackRendererImpl.java     |  4 +-
 .../typerendering/GenericGraphNodeMBW.java      |  6 +-
 .../platform/typerendering/RendererFactory.java | 28 ++++-----
 .../typerendering/RenderingException.java       | 16 +++---
 .../RenderingspecificationException.java        | 12 ++--
 .../typerendering/RenderletManager.java         |  4 +-
 .../typerendering/RenderletManagerImpl.java     | 20 +++----
 .../typerendering/RenderletRendererImpl.java    |  4 +-
 .../TypeRenderingExceptionMapper.java           |  4 +-
 .../platform/typerendering/TypeRenderlet.java   |  4 +-
 .../platform.typerendering.ontologies/pom.xml   |  9 +--
 platform/typerendering/pom.xml                  |  4 +-
 26 files changed, 190 insertions(+), 214 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/config/pom.xml
----------------------------------------------------------------------
diff --git a/platform/config/pom.xml b/platform/config/pom.xml
index 111680c..e2251bc 100644
--- a/platform/config/pom.xml
+++ b/platform/config/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.config</artifactId>
@@ -44,17 +44,17 @@
         <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.ontologies</artifactId>
-            <version>0.12</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.felix</groupId>
@@ -63,7 +63,7 @@
         <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>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
index ebc0bf9..284acff 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
@@ -30,17 +30,17 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.commons.rdf.Graph;
 
 /**
  * This class provides a OSGi service for getting system properties from
@@ -53,7 +53,7 @@ import org.apache.clerezza.rdf.utils.GraphNode;
 public class PlatformConfig {
 
     @Reference(target = SystemConfig.SYSTEM_GRAPH_FILTER)
-    private LockableMGraph systemGraph;
+    private Graph systemGraph;
     private BundleContext context;
     private static String DEFAULT_PORT = "8080";
 
@@ -61,7 +61,7 @@ public class PlatformConfig {
      * @deprecated use org.apache.clerezza.platform.Contants instead
      */
     @Deprecated
-    public static final UriRef CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
+    public static final Iri CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
 
     /**
      * A filter that can be used to get the config graph as OSGi service,
@@ -78,27 +78,27 @@ public class PlatformConfig {
      * Returns the default base URI of the Clerezza platform instance.
      * @return the base URI of the Clerezza platform
      */
-    public UriRef getDefaultBaseUri() {
-        return AccessController.doPrivileged(new PrivilegedAction<UriRef>() {
+    public Iri getDefaultBaseUri() {
+        return AccessController.doPrivileged(new PrivilegedAction<Iri>() {
 
             @Override
-            public UriRef run() {
+            public Iri run() {
                 GraphNode platformInstance = getPlatformInstance();
                 Lock l = platformInstance.readLock();
                 l.lock();
                 try {
-                    Iterator<Resource> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
+                    Iterator<RdfTerm> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
                     if (triples.hasNext()) {
-                        return (UriRef) triples.next();
+                        return (Iri) triples.next();
                     } else {
                         String port = context.getProperty("org.osgi.service.http.port");
                         if (port == null) {
                             port = DEFAULT_PORT;
                         }
                         if (port.equals("80")) {
-                            return new UriRef("http://localhost/");
+                            return new Iri("http://localhost/");
                         }
-                        return new UriRef("http://localhost:" + port + "/");
+                        return new Iri("http://localhost:" + port + "/");
                     }
                 } finally {
                     l.unlock();
@@ -109,16 +109,16 @@ public class PlatformConfig {
 
     /**
      * Returns the platforminstance as <code>GraphNode</code> of the system
-     * graph (a LockableMGraph). Access controls applies to the system graph
+     * graph (a LockableGraph). Access controls applies to the system graph
      * instance underlying the <code>GraphNode</code>.
      *
      * @return
      */
     public GraphNode getPlatformInstance() {
-        return new GraphNode(getPlatformInstanceResource(), systemGraph);
+        return new GraphNode(getPlatformInstanceRdfTerm(), systemGraph);
     }
 
-    private NonLiteral getPlatformInstanceResource() {
+    private BlankNodeOrIri getPlatformInstanceRdfTerm() {
         Lock l = systemGraph.getLock().readLock();
         l.lock();
         try {
@@ -138,17 +138,17 @@ public class PlatformConfig {
      * @return the base URI of the Clerezza platform
      */
     //todo: if this is the only class that sets and reads base uris then getBaseURIs should keep a cache
-    public Set<UriRef> getBaseUris() {
+    public Set<Iri> getBaseUris() {
 
-        return AccessController.doPrivileged(new PrivilegedAction<Set<UriRef>>() {
+        return AccessController.doPrivileged(new PrivilegedAction<Set<Iri>>() {
 
             @Override
-            public Set<UriRef> run() {
-                Iterator<Resource> baseUrisIter = getPlatformInstance().
+            public Set<Iri> run() {
+                Iterator<RdfTerm> baseUrisIter = getPlatformInstance().
                         getObjects(PLATFORM.baseUri);
-                Set<UriRef> baseUris = new HashSet<UriRef>();
+                Set<Iri> baseUris = new HashSet<Iri>();
                 while (baseUrisIter.hasNext()) {
-                    UriRef baseUri = (UriRef) baseUrisIter.next();
+                    Iri baseUri = (Iri) baseUrisIter.next();
                     baseUris.add(baseUri);
                 }
                 baseUris.add(getDefaultBaseUri());
@@ -163,8 +163,8 @@ public class PlatformConfig {
      *
      * @param baseUri The base URI which will be added to the platform instance
      */
-    public void addBaseUri(UriRef baseUri) {
-        systemGraph.add(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
+    public void addBaseUri(Iri baseUri) {
+        systemGraph.add(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
     }
 
     /**
@@ -172,16 +172,16 @@ public class PlatformConfig {
      *
      * @param baseUri The base URI which will be removed from the platform instance
      */
-    public void removeBaseUri(UriRef baseUri) {
-        systemGraph.remove(new TripleImpl(getPlatformInstanceResource(), PLATFORM.baseUri, baseUri));
+    public void removeBaseUri(Iri baseUri) {
+        systemGraph.remove(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
     }
 
     protected void activate(ComponentContext componentContext) {
         this.context = componentContext.getBundleContext();
         try {
-            tcManager.getMGraph(Constants.CONFIG_GRAPH_URI);
+            tcManager.getGraph(Constants.CONFIG_GRAPH_URI);
         } catch (NoSuchEntityException nsee) {
-            tcManager.createMGraph(Constants.CONFIG_GRAPH_URI);            
+            tcManager.createGraph(Constants.CONFIG_GRAPH_URI);            
         }
     }
     

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
index 285300d..537733f 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
@@ -24,18 +24,17 @@ import java.net.URL;
 import java.util.Collections;
 import java.util.Set;
 import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.rdf.core.Graph;
+import org.apache.commons.rdf.ImmutableGraph;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.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;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.slf4j.Logger;
@@ -68,7 +67,7 @@ public class SystemConfig implements WeightedTcProvider {
      * @deprecated use org.apache.clerezza.platform.Contants instead
      */
     @Deprecated
-    public static final UriRef SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
+    public static final Iri SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
     /**
      * A filter that can be used to get the system graph as OSGi service, that
      * is provided by
@@ -87,14 +86,14 @@ public class SystemConfig implements WeightedTcProvider {
             "("+SupportedFormat.supportedFormat+"=" + SupportedFormat.N_TRIPLE + ")";
     @Reference(target = SERIALIZER_FILTER)
     private Serializer serializer;
-    private MGraph systemGraph;
+    private Graph systemGraph;
 
     @Activate
     protected void activate(ComponentContext componentContext) {
         final BundleContext bundleContext = componentContext.getBundleContext();
         File systemGraphFile = bundleContext.getDataFile(DATA_FILE_SYSTEM_GRAPH);
         boolean dataFileExisted = systemGraphFile.exists();
-        //yould be good to use IndexedMGraph to be faster
+        //yould be good to use IndexedGraph to be faster
         systemGraph = new FileMGraph(systemGraphFile, parser, serializer);
         if (!dataFileExisted) {
             readConfigGraphFile(systemGraph);
@@ -107,7 +106,7 @@ public class SystemConfig implements WeightedTcProvider {
         systemGraph = null;
     }
 
-    private void readConfigGraphFile(MGraph mGraph) {
+    private void readConfigGraphFile(Graph mGraph) {
         URL config = getClass().getResource(DEFAULT_SYSTEM_GRAPH);
         if (config == null) {
             throw new RuntimeException("no config file found");
@@ -123,7 +122,7 @@ public class SystemConfig implements WeightedTcProvider {
 
     /*
      * Reason to be high: don't allow overwriting of system graph (by accident or as an attack)
-     * Reason to be low: avoid that TcManager always first tries to create TripleCollections using this provider
+     * Reason to be low: avoid that TcManager always first tries to create Graphs using this provider
      */
     @Override
     public int getWeight() {
@@ -131,12 +130,12 @@ public class SystemConfig implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getMGraph(Iri name) throws NoSuchEntityException {
         if (name.equals(Constants.SYSTEM_GRAPH_URI)) {
             return systemGraph;
         } else {
@@ -145,42 +144,42 @@ public class SystemConfig implements WeightedTcProvider {
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         return getMGraph(name);
     }
 
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listImmutableGraphs() {
         return Collections.emptySet();
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
+    public Set<Iri> listMGraphs() {
         return Collections.singleton(Constants.SYSTEM_GRAPH_URI);
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listGraphs() {
         return listMGraphs();
     }
 
     @Override
-    public MGraph createMGraph(UriRef name) throws UnsupportedOperationException, EntityAlreadyExistsException {
+    public Graph createGraph(Iri name) throws UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
+    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported yet."); 
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
+    public void deleteGraph(Iri name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(ImmutableGraph graph) {
         return Collections.emptySet();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
index dd5199f..caa2009 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/TcPermissionDescriptionsProvider.java
@@ -46,19 +46,19 @@ public class TcPermissionDescriptionsProvider implements PermissionDescriptionsP
     private static final Set<PermissionDescripton> GRAPH_ACCESS_PERMISSION_DESCRIPTIONS =
             new HashSet<PermissionDescripton>();
     static {
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System ImmutableGraph Read Permission",
                 "Grants permission to the user to read the system graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"read\")"));
 
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System Graph Read/Write Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("System ImmutableGraph Read/Write Permission",
                 "Grants permission to the user to read and write the system graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/system.graph\" \"readwrite\")"));
 
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration ImmutableGraph Read Permission",
                 "Grants permission to the user to read the configuration graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"read\")"));
 
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration Graph Read/Write Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Configuration ImmutableGraph Read/Write Permission",
                 "Grants permission to the user to read and write the configuration graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/config.graph\" \"readwrite\")"));
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/platform/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform/pom.xml b/platform/platform/pom.xml
index 7b552c3..a690800 100644
--- a/platform/platform/pom.xml
+++ b/platform/platform/pom.xml
@@ -31,7 +31,7 @@
     <artifactId>platform</artifactId>
     <packaging>bundle</packaging>
     <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - Platform - Bootmonitor</name>
+    <name>Clerezza - Platform - Bootmonitor and Constants</name>
     <description>Artifact with dependencies to the clerezza platform components
     providing documentation and boot-status monitoring.</description>
     <dependencies>
@@ -51,7 +51,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
----------------------------------------------------------------------
diff --git a/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java b/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
index 88eb2f3..22d0e2d 100644
--- a/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
+++ b/platform/platform/src/main/java/org/apache/clerezza/platform/BootMonitor.java
@@ -51,7 +51,7 @@ import org.osgi.service.component.ComponentContext;
  * see thread starting at http://www.mail-archive.com/users@felix.apache.org/msg07647.html
  */
 @Component(enabled = true, immediate = true)
-@Reference(name = "jaxrsResource",
+@Reference(name = "jaxrsRdfTerm",
 cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE,
 policy = ReferencePolicy.DYNAMIC,
 referenceInterface = Object.class,
@@ -60,7 +60,7 @@ public class BootMonitor {
 
     @Reference(target = "(javax.script.language=scala)")
     private ScriptEngineFactory scalaScriptEngineFactory;
-    private Set<Object> rootResources =
+    private Set<Object> rootRdfTerms =
             Collections.synchronizedSet(new HashSet<Object>());
     /**
      * true when the user has been notified that clerezza started
@@ -86,23 +86,23 @@ public class BootMonitor {
         t.start();
     }
 
-    protected void bindJaxrsResource(Object p) {
-        rootResources.add(p);
-        if (!clerezzaStarted && (rootResources.size() == 35)) {
+    protected void bindJaxrsRdfTerm(Object p) {
+        rootRdfTerms.add(p);
+        if (!clerezzaStarted && (rootRdfTerms.size() == 35)) {
             Thread t = new Thread() {
 
                 @Override
                 public void run() {
                     int lastSize = 0;
                     for (int i = 0; i < 100; i++) {
-                        if (rootResources.size() == lastSize) {
+                        if (rootRdfTerms.size() == lastSize) {
                             clerezzaStarted = true;
                             if (activated) {
                                 logger.info("The Apache Clerezza Platform is now operational.");
                                 return;
                             }
                         }
-                        lastSize = rootResources.size();
+                        lastSize = rootRdfTerms.size();
                         try {
                             Thread.sleep(500);
                         } catch (InterruptedException ex) {
@@ -115,7 +115,7 @@ public class BootMonitor {
         }
     }
 
-    protected void unbindJaxrsResource(Object p) {
-        rootResources.remove(p);
+    protected void unbindJaxrsRdfTerm(Object p) {
+        rootRdfTerms.remove(p);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
----------------------------------------------------------------------
diff --git a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
index 68ff58a..8d412f8 100644
--- a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
+++ b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
@@ -17,7 +17,7 @@
 
 package org.apache.clerezza.platform;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * This class gropus some constant values used by the clerezza.platform components
@@ -40,8 +40,8 @@ public class Constants {
     /**
      * the uri of the system graph
      */
-    public static final UriRef SYSTEM_GRAPH_URI =
-            new UriRef(SYSTEM_GRAPH_URI_STRING);
+    public static final Iri SYSTEM_GRAPH_URI =
+            new Iri(SYSTEM_GRAPH_URI_STRING);
 
     /**
      * the uri of the config graph as string
@@ -51,8 +51,8 @@ public class Constants {
     /**
      * the uri of the config graph as string
      */
-    public static final UriRef CONFIG_GRAPH_URI =
-            new UriRef(CONFIG_GRAPH_URI_STRING);
+    public static final Iri CONFIG_GRAPH_URI =
+            new Iri(CONFIG_GRAPH_URI_STRING);
 
     /**
      * the uri of the content graph as string
@@ -62,8 +62,8 @@ public class Constants {
     /**
      * the uri of the content graph
      */
-    public static final UriRef CONTENT_GRAPH_URI =
-            new UriRef(CONTENT_GRAPH_URI_STRING);
+    public static final Iri CONTENT_GRAPH_URI =
+            new Iri(CONTENT_GRAPH_URI_STRING);
 
 
     /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typepriority/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typepriority/pom.xml b/platform/typepriority/pom.xml
index ae33845..519811a 100644
--- a/platform/typepriority/pom.xml
+++ b/platform/typepriority/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.typepriority</artifactId>
@@ -44,17 +44,17 @@
         <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.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.felix</groupId>
@@ -63,7 +63,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
index 36e6d97..73c4003 100644
--- a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
+++ b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
@@ -32,14 +32,12 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.References;
 import org.apache.felix.scr.annotations.Service;
-import org.osgi.service.component.ComponentContext;
 import org.apache.clerezza.platform.config.SystemConfig;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.RdfList;
+import org.apache.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,26 +49,26 @@ import org.slf4j.LoggerFactory;
 @References({
     @Reference(name="systemGraph",
         cardinality=ReferenceCardinality.MANDATORY_UNARY,
-        referenceInterface=LockableMGraph.class,
+        referenceInterface=Graph.class,
         target=SystemConfig.SYSTEM_GRAPH_FILTER)})
 public class TypePrioritizer {
-    public static final UriRef typePriorityListUri = new UriRef("urn:x-localinstance:/typePriorityList");
+    public static final Iri typePriorityListUri = new Iri("urn:x-localinstance:/typePriorityList");
 
-    private List<UriRef> typePriorityList;
+    private List<Iri> typePriorityList;
     private static final Logger log = LoggerFactory.getLogger(TypePrioritizer.class);
     
-    LockableMGraph systemGraph;
+    Graph systemGraph;
 
-    protected void bindSystemGraph(LockableMGraph systemGraph) {
+    protected void bindSystemGraph(Graph systemGraph) {
         Lock l = systemGraph.getLock().readLock();
         l.lock();
         try {
-            List<Resource> rdfTypePriorityList = new RdfList(
+            List<RdfTerm> rdfTypePriorityList = new RdfList(
                  typePriorityListUri, systemGraph);
-            typePriorityList  = new ArrayList<UriRef>(rdfTypePriorityList.size());
-            for (Resource resource : rdfTypePriorityList) {
-                if (resource instanceof UriRef) {
-                    typePriorityList.add((UriRef) resource);
+            typePriorityList  = new ArrayList<Iri>(rdfTypePriorityList.size());
+            for (RdfTerm resource : rdfTypePriorityList) {
+                if (resource instanceof Iri) {
+                    typePriorityList.add((Iri) resource);
                 } else {
                     log.warn("Type priority list contains a resource "
                             + "that is not a uri, skipping.");
@@ -79,10 +77,10 @@ public class TypePrioritizer {
         } finally {
             l.unlock();
         }
-        this.systemGraph = (LockableMGraph) systemGraph;
+        this.systemGraph = (Graph) systemGraph;
     }
 
-    protected void unbindSystemGraph(LockableMGraph systemGraph) {
+    protected void unbindSystemGraph(Graph systemGraph) {
         typePriorityList = null;
         this.systemGraph = null;
     }
@@ -92,17 +90,17 @@ public class TypePrioritizer {
      * @param rdfTypes the rdf types to be sorted
      * @return a sorted iterator of the types
      */
-    public Iterator<UriRef> iterate(final Collection<UriRef> rdfTypes) {
-        return new Iterator<UriRef>() {
-            final Set<UriRef> remaining = new HashSet<UriRef>(rdfTypes);
+    public Iterator<Iri> iterate(final Collection<Iri> rdfTypes) {
+        return new Iterator<Iri>() {
+            final Set<Iri> remaining = new HashSet<Iri>(rdfTypes);
             boolean rdfsResourceRemovedAndNotYetReturned = remaining.remove(RDFS.Resource);
-            final Iterator<UriRef> typePriorityIter = typePriorityList.iterator();
-            Iterator<UriRef> remainingIter = null;
-            UriRef next = prepareNext();
+            final Iterator<Iri> typePriorityIter = typePriorityList.iterator();
+            Iterator<Iri> remainingIter = null;
+            Iri next = prepareNext();
             
-            private UriRef prepareNext() {
+            private Iri prepareNext() {
                 while (typePriorityIter.hasNext()) {
-                    UriRef nextPriority = typePriorityIter.next();
+                    Iri nextPriority = typePriorityIter.next();
                     if (remaining.contains(nextPriority)) {
                         remaining.remove(nextPriority);
                         return nextPriority;
@@ -129,11 +127,11 @@ public class TypePrioritizer {
             }
 
             @Override
-            public UriRef next() {
+            public Iri next() {
                 if (next == null) {
                     throw new NoSuchElementException();
                 }
-                UriRef current = next;
+                Iri current = next;
                 next = prepareNext();
                 return current;
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
index 080bb14..fba8cc7 100644
--- a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
+++ b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
@@ -19,34 +19,17 @@
 package org.apache.clerezza.platform.typepriority;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.References;
-import org.apache.felix.scr.annotations.Service;
-import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.platform.config.SystemConfig;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.test.LockableMGraphWrapperForTesting;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.RdfList;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * @author rbn
@@ -58,22 +41,21 @@ public class TypePrioritizerTest {
     @Before
     public void before() {
         typePrioritizer = new TypePrioritizer();
-        MGraph mGraph = new SimpleMGraph();
+        Graph mGraph = new SimpleGraph();
         RdfList rdfList = new RdfList(TypePrioritizer.typePriorityListUri, mGraph);
         rdfList.add(FOAF.Person);
         rdfList.add(FOAF.Group);
         rdfList.add(FOAF.Agent);
-        final LockableMGraph systemGraph = new LockableMGraphWrapperForTesting(mGraph);
-        typePrioritizer.bindSystemGraph(systemGraph);
+        typePrioritizer.bindSystemGraph(mGraph);
     }
 
     @Test
     public void oderList() {
-        List<UriRef> l = new ArrayList<UriRef>();
+        List<Iri> l = new ArrayList<Iri>();
         l.add(FOAF.Agent);
         l.add(RDF.Bag);
         l.add(FOAF.Person);
-        Iterator<UriRef> iter = typePrioritizer.iterate(l);
+        Iterator<Iri> iter = typePrioritizer.iterate(l);
         Assert.assertEquals(FOAF.Person, iter.next());
         Assert.assertEquals(FOAF.Agent, iter.next());
         Assert.assertEquals(RDF.Bag, iter.next());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering.gui/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/pom.xml b/platform/typerendering.gui/pom.xml
index 7ab17c3..1215a5d 100644
--- a/platform/typerendering.gui/pom.xml
+++ b/platform/typerendering.gui/pom.xml
@@ -25,7 +25,7 @@
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
         <version>7-SNAPSHOT</version>
-        <relativePath>../parent</relativePath>
+        <relativePath />
     </parent>
     <artifactId>platform.typerendering.gui</artifactId>
     <version>1.0.0-SNAPSHOT</version>
@@ -53,7 +53,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.globalmenu.api</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>0.3</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering.scala/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/pom.xml b/platform/typerendering.scala/pom.xml
index 30917dd..e559ed7 100644
--- a/platform/typerendering.scala/pom.xml
+++ b/platform/typerendering.scala/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.typerendering.scala</artifactId>
@@ -42,12 +42,12 @@
         <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>platform.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.scala-lang</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/pom.xml b/platform/typerendering/platform.typerendering.core/pom.xml
index 609fe60..bc6f83f 100644
--- a/platform/typerendering/platform.typerendering.core/pom.xml
+++ b/platform/typerendering/platform.typerendering.core/pom.xml
@@ -23,8 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.typerendering</artifactId>
-        <version>0.7</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.typerendering.core</artifactId>
@@ -51,32 +52,27 @@
         <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.utils</artifactId>
-            <version>0.14</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.typepriority</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.ontologies</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
index 05c0784..1f8793e 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -48,7 +48,7 @@ public interface CallbackRenderer {
 
     /**
      * Renders a specified named resource using the GraphNode returned by
-     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.clerezza.rdf.core.UriRef)</code>.
+     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.commons.rdf.Iri)</code>.
      *
      * Otherwise same as render(GraphNode, .GraphNode, String, OutputStream)
      *
@@ -58,7 +58,7 @@ public interface CallbackRenderer {
      * @param os
      * @throws IOException
      */
-    public void render(UriRef resource, GraphNode context, String mode,
+    public void render(Iri resource, GraphNode context, String mode,
             OutputStream os) throws IOException;
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
index 0f0a82a..72df3c4 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 
@@ -71,7 +71,7 @@ public class CallbackRendererImpl implements CallbackRenderer {
     }
 
     @Override
-    public void render(final UriRef resource, GraphNode context, String mode,
+    public void render(final Iri resource, GraphNode context, String mode,
             OutputStream os) throws IOException {
         final GraphNode resourceNode = AccessController.doPrivileged( new PrivilegedAction<GraphNode>() {
                     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
index 6f06e64..957ff18 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/GenericGraphNodeMBW.java
@@ -59,8 +59,8 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 import org.apache.felix.scr.annotations.Service;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -214,7 +214,7 @@ public class GenericGraphNodeMBW implements MessageBodyWriter<GraphNode> {
     }
 
     private GraphNode getUserContext() {
-        GraphNode contextNode = new GraphNode(new BNode(), new SimpleMGraph());
+        GraphNode contextNode = new GraphNode(new BlankNode(), new SimpleGraph());
         synchronized(contextProviders) {
             Iterator<UserContextProvider> providersIter = contextProviders.iterator();
             while (providersIter.hasNext()) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
index ed3f372..489b88d 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
@@ -25,11 +25,11 @@ import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
 import org.apache.clerezza.platform.typerendering.utils.MediaTypeMap;
 import org.apache.clerezza.platform.typerendering.utils.RegexMap;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.ReferenceCardinality;
@@ -91,8 +91,8 @@ public class RendererFactory {
         }
     }
 
-    private Map<UriRef, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeRenderletMap =
-            Collections.synchronizedMap(new HashMap<UriRef, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>>());
+    private Map<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeRenderletMap =
+            Collections.synchronizedMap(new HashMap<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>>());
 
     private BundleContext bundleContext;
 
@@ -125,14 +125,14 @@ public class RendererFactory {
      */
     public Renderer createRenderer(GraphNode resource, String mode,
             List<MediaType> acceptableMediaTypes) {
-        Set<UriRef> types = new HashSet<UriRef>();
-        if (resource.getNode() instanceof TypedLiteral) {
-            types.add(((TypedLiteral) resource.getNode()).getDataType());
+        Set<Iri> types = new HashSet<Iri>();
+        if (resource.getNode() instanceof Literal) {
+            types.add(((Literal) resource.getNode()).getDataType());
         } else {
             // extract rdf types
-            Iterator<UriRef> it = resource.getUriRefObjects(RDF.type);
+            Iterator<Iri> it = resource.getIriObjects(RDF.type);
             while (it.hasNext()) {
-                final UriRef rdfType = it.next();
+                final Iri rdfType = it.next();
                 types.add(rdfType);
             }
             types.add(RDFS.Resource);
@@ -140,11 +140,11 @@ public class RendererFactory {
         return getRenderer(types, mode, acceptableMediaTypes);
     }
 
-    private Renderer getRenderer(Set<UriRef> types, String mode,
+    private Renderer getRenderer(Set<Iri> types, String mode,
             List<MediaType> acceptableMediaTypes) {
-        Iterator<UriRef> sortedTypes = typePrioritizer.iterate(types);
+        Iterator<Iri> sortedTypes = typePrioritizer.iterate(types);
         while (sortedTypes.hasNext()) {
-            final UriRef currentType = sortedTypes.next();
+            final Iri currentType = sortedTypes.next();
             final RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeRenderletMap.get(currentType);
             if (regexMap != null) {
                 Iterator<MediaTypeMap<TypeRenderletStartLevel>> mediaTypeMapIter = regexMap.getMatching(mode);
@@ -190,7 +190,7 @@ public class RendererFactory {
     }
 
     private void registerRenderlet(TypeRenderlet typeRenderlet, int startLevel) {
-        final UriRef rdfType = typeRenderlet.getRdfType();
+        final Iri rdfType = typeRenderlet.getRdfType();
         RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeRenderletMap.get(rdfType);
         if (regexMap == null) {
             regexMap = new RegexMap<MediaTypeMap<TypeRenderletStartLevel>>();
@@ -208,7 +208,7 @@ public class RendererFactory {
 
     protected void unbindTypeRenderlet(TypeRenderlet typeRenderlet) {
         TypeRenderletStartLevel typeRenderletStartLevel = new TypeRenderletStartLevel(typeRenderlet, 0);
-        for (Map.Entry<UriRef, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeEntry: typeRenderletMap.entrySet()) {
+        for (Map.Entry<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeEntry: typeRenderletMap.entrySet()) {
             final RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeEntry.getValue();
             for (Map.Entry<String, MediaTypeMap<TypeRenderletStartLevel>> regexEntry: regexMap.entrySet()) {
                 final MediaTypeMap<TypeRenderletStartLevel> mediaTypeMap = regexEntry.getValue();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
index aa48941..ae7ae42 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
@@ -22,13 +22,13 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.commons.rdf.Literal;
 
 /**
  * This exception is thrown when an exception occured while rendering a
@@ -51,15 +51,15 @@ public class RenderingException extends TypeRenderingException {
 
     @Override
     public GraphNode getExceptionGraphNode() {
-        GraphNode result = new GraphNode(new BNode(), new SimpleMGraph());
+        GraphNode result = new GraphNode(new BlankNode(), new SimpleGraph());
         result.addProperty(RDF.type, TYPERENDERING.Exception);
-        result.addProperty(TYPERENDERING.errorSource, new UriRef(renderingSpecification.toString()));
+        result.addProperty(TYPERENDERING.errorSource, new Iri(renderingSpecification.toString()));
         result.addProperty(TYPERENDERING.message, new PlainLiteralImpl(getMessage()));
         result.addProperty(TYPERENDERING.stackTrace, getStackTraceLiteral());
         return result;
     }
 
-    private PlainLiteral getStackTraceLiteral() {
+    private Literal getStackTraceLiteral() {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         cause.printStackTrace(pw);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
index c045815..e9f470b 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
@@ -20,11 +20,11 @@ package org.apache.clerezza.platform.typerendering;
 
 import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.clerezza.rdf.core.BNode;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
@@ -121,10 +121,10 @@ public class RenderingspecificationException extends TypeRenderingException{
 
     @Override
     public GraphNode getExceptionGraphNode() {
-        GraphNode result = new GraphNode(new BNode(), new SimpleMGraph());
+        GraphNode result = new GraphNode(new BlankNode(), new SimpleGraph());
         result.addProperty(RDF.type, TYPERENDERING.Exception);
         LiteralFactory factory = LiteralFactory.getInstance();
-        result.addProperty(TYPERENDERING.errorSource, new UriRef(renderingSpecification.toString()));
+        result.addProperty(TYPERENDERING.errorSource, new Iri(renderingSpecification.toString()));
         if (lineNumber != -1) {
             result.addProperty(TYPERENDERING.line, factory.createTypedLiteral(new Integer(lineNumber)));
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
index f4d940f..5da9436 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
@@ -18,7 +18,7 @@
 package org.apache.clerezza.platform.typerendering;
 
 import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * Over the RenderletManagerImpl renderlets can be registered.
@@ -48,6 +48,6 @@ public interface RenderletManager {
      * required.
      * @param mediaType The media type of the rendered
      * @param builtIn ignored
-     */ void registerRenderlet(String renderletServiceName, final UriRef renderingSpecification, final UriRef rdfType, final String mode, final MediaType mediaType, boolean builtIn);
+     */ void registerRenderlet(String renderletServiceName, final Iri renderingSpecification, final Iri rdfType, final String mode, final MediaType mediaType, boolean builtIn);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
index 0e98a80..a2ef2f0 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
@@ -33,7 +33,7 @@ import java.util.Set;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
@@ -67,12 +67,12 @@ public class RenderletManagerImpl implements RenderletManager {
     private static class RegistrationRequest {
 
         String renderletServiceName;
-        UriRef renderingSpecification;
-        UriRef rdfType;
+        Iri renderingSpecification;
+        Iri rdfType;
         String mode;
         MediaType mediaType;
 
-        public RegistrationRequest(String renderletServiceName, UriRef renderingSpecification, UriRef rdfType, String mode, MediaType mediaType) {
+        public RegistrationRequest(String renderletServiceName, Iri renderingSpecification, Iri rdfType, String mode, MediaType mediaType) {
             this.renderletServiceName = renderletServiceName;
             this.renderingSpecification = renderingSpecification;
             this.rdfType = rdfType;
@@ -112,8 +112,8 @@ public class RenderletManagerImpl implements RenderletManager {
      * @param builtIn ignored
      */
     public void registerRenderlet(String renderletServiceName,
-            final UriRef renderingSpecification,
-            final UriRef rdfType,
+            final Iri renderingSpecification,
+            final Iri rdfType,
             final String mode,
             final MediaType mediaType, boolean builtIn) {
         RegistrationRequest registrationRequest = new RegistrationRequest(renderletServiceName,
@@ -232,8 +232,8 @@ public class RenderletManagerImpl implements RenderletManager {
 
     private boolean attemptRegistration(RegistrationRequest registrationRequest) {
         final String renderletServiceName = registrationRequest.renderletServiceName;
-        UriRef renderingSpecification = registrationRequest.renderingSpecification;
-        final UriRef rdfType = registrationRequest.rdfType;
+        Iri renderingSpecification = registrationRequest.renderingSpecification;
+        final Iri rdfType = registrationRequest.rdfType;
         final String modePattern = registrationRequest.mode;
         final MediaType mediaType = registrationRequest.mediaType;
 
@@ -252,7 +252,7 @@ public class RenderletManagerImpl implements RenderletManager {
         TypeRenderlet typeRenderlet = new TypeRenderlet() {
 
             @Override
-            public UriRef getRdfType() {
+            public Iri getRdfType() {
                 return rdfType;
             }
 
@@ -304,7 +304,7 @@ public class RenderletManagerImpl implements RenderletManager {
         return true;
     }
 
-    private ServiceRegistration getAlreadyRegisteredServiceReg(UriRef rdfType, 
+    private ServiceRegistration getAlreadyRegisteredServiceReg(Iri rdfType, 
             MediaType mediaType, String modePattern) {
         
         for (ServiceRegistration serviceRegistration : registeredTypeRenderlets) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
index f984ddb..b3b57ed 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
@@ -28,7 +28,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
@@ -52,7 +52,7 @@ class RenderletRendererImpl implements Renderer {
     private GraphNodeProvider graphNodeProvider;
 
 
-    RenderletRendererImpl(UriRef renderingSpecification, org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider graphNodeProvider,
+    RenderletRendererImpl(Iri renderingSpecification, org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider graphNodeProvider,
             Renderlet renderlet, MediaType mediaType, 
             RendererFactory rendererFactory,
             BundleContext bundleContext) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
index d8de204..502b5ac 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderingExceptionMapper.java
@@ -29,7 +29,7 @@ import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
@@ -81,7 +81,7 @@ public class TypeRenderingExceptionMapper implements ExceptionMapper<TypeRenderi
         URL template = getClass().getResource("exception-template.ssp");
         renderletManager.registerRenderlet(
                 "org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet",
-                new UriRef(template.toURI().toString()),
+                new Iri(template.toURI().toString()),
                 TYPERENDERING.Exception, ".*",
                 MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
index 078bf2d..fcbf25f 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/TypeRenderlet.java
@@ -25,7 +25,7 @@ import java.security.PrivilegedAction;
 import java.util.Map;
 import javax.ws.rs.core.*;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -126,7 +126,7 @@ public interface TypeRenderlet {
     /**
      * @return the rdf type rendered by this renderlet
      */
-    UriRef getRdfType();
+    Iri getRdfType();
 
     /**
      * The renderer may render resources in different modes. Such a mode is

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/platform.typerendering.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.ontologies/pom.xml b/platform/typerendering/platform.typerendering.ontologies/pom.xml
index 600b11d..c38ad6d 100644
--- a/platform/typerendering/platform.typerendering.ontologies/pom.xml
+++ b/platform/typerendering/platform.typerendering.ontologies/pom.xml
@@ -23,8 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.typerendering</artifactId>
-        <version>0.7</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.typerendering.ontologies</artifactId>
@@ -38,7 +39,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
     <build>
@@ -60,7 +61,7 @@
                         </goals>
                     </execution>
                 </executions>
-                <version>0.4</version>
+                <version>1.0.0-SNAPSHOT</version>
         </plugin>
         </plugins>
     </build>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/0e209798/platform/typerendering/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering/pom.xml b/platform/typerendering/pom.xml
index 1167e73..65f9c35 100644
--- a/platform/typerendering/pom.xml
+++ b/platform/typerendering/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.typerendering</artifactId>


[84/87] [abbrv] clerezza git commit: CLEREZZA-984: introducing content-launcher, porting platform content, some porting related fixes.

Posted by re...@apache.org.
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 <re...@apache.org>
Authored: Sun Apr 12 16:56:46 2015 +0000
Committer: Reto Gmuer <re...@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());


[17/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/resources/documentation/style/style.css b/platform/launcher.sesame/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..f49a186
--- /dev/null
+++ b/platform/launcher.sesame/src/site/resources/documentation/style/style.css
@@ -0,0 +1,419 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/resources/images/clerezza.png b/platform/launcher.sesame/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/launcher.sesame/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/site.xml b/platform/launcher.sesame/src/site/site.xml
new file mode 100644
index 0000000..62c8fd3
--- /dev/null
+++ b/platform/launcher.sesame/src/site/site.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Information" href="documentation/information.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/xsite/content/information.xhtml
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/xsite/content/information.xhtml b/platform/launcher.sesame/src/site/xsite/content/information.xhtml
new file mode 100644
index 0000000..29649bf
--- /dev/null
+++ b/platform/launcher.sesame/src/site/xsite/content/information.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Clerezza platform launcher with Sesame storage</title>
+	</head>
+	<body>
+		<h1>Clerezza platform launcher with Sesame storage</h1>
+		<p>Author: Manuel Innerhofer - clerezza.org</p>
+		<p>Date: June 24, 2009</p>
+		<h2 id="information">Information</h2>
+		<p>
+			This is a launcher for the clerezza platform. It uses Sesame as
+			rdf storage. For further information on how to use this launcher read
+			the documentation of the storageless launcher under
+            <br />
+			<a href="http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/</a>
+		</p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/xsite/content/sitemap.xml b/platform/launcher.sesame/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..2c8f86d
--- /dev/null
+++ b/platform/launcher.sesame/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,26 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>information.xhtml</page>
+    </section>
+</sitemap>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/xsite/templates/skin.html b/platform/launcher.sesame/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..8dc930d
--- /dev/null
+++ b/platform/launcher.sesame/src/site/xsite/templates/skin.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/LICENSE b/platform/launcher.storageless.parent/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/launcher.storageless.parent/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/LICENSE b/platform/launcher.storageless.parent/platform.launcher.storageless/LICENSE
new file mode 100644
index 0000000..e8d41e4
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/LICENSE
@@ -0,0 +1,471 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+APACHE CLEREZZA TDB LAUNCHER SUBCOMPONENTS: 
+
+The Apache Clerezza TDB Launcher includes a number of subcomponents with
+separate copyright notices and license terms. Your use of the source
+code for the these subcomponents is subject to the terms and
+conditions of the following licenses. 
+
+For the yui javascript library:
+
+Copyright (c) 2009, Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+    * 	Redistributions of source code must retain the above copyright notice, this list of conditions and the
+     	following disclaimer.
+    * 	Redistributions in binary form must reproduce the above copyright notice, this 	list of conditions and the following disclaimer in the documentation and/or other 	materials provided with the distribution.
+    * 	Neither the name of Yahoo! Inc. nor the names of its contributors may be used 	to endorse or promote products derived from this software without specific prior written permission of Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For the jQuery javascript library:
+
+Copyright (c) 2011 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+For Asm:
+
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+For Bouncycastle:
+
+Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+For the RDFa parsing library:
+
+© Copyright 2009 University of Bristol
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS’’ AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+- For the jSSLutils library:
+  
+Copyright (c) 2008-2010, The University of Manchester, United Kingdom.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright 
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the The University of Manchester nor the names of 
+      its contributors may be used to endorse or promote products derived 
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGE.
+
+
+For Jetty:
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
 ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) 
 above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+- For scala:
+
+Copyright (c) 2002-2012 EPFL, Lausanne, unless otherwise specified.
+All rights reserved.
+
+This software was developed by the Programming Methods Laboratory of the
+Swiss Federal Institute of Technology (EPFL), Lausanne, Switzerland.
+
+Permission to use, copy, modify, and distribute this software in source
+or binary form for any purpose with or without fee is hereby granted,
+provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+   3. Neither the name of the EPFL nor the names of its contributors
+      may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/pom.xml b/platform/launcher.storageless.parent/platform.launcher.storageless/pom.xml
new file mode 100644
index 0000000..3ca6aa1
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/pom.xml
@@ -0,0 +1,417 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.launcher.storageless.parent</artifactId>
+        <version>0.9-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.storageless</artifactId>
+    <version>0.9-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Launcher Storageless</name>
+    <description>A standalone java application for launching the clerezza.org platform. It is also a bundle, but there is no OSGi container known to support this (we are working on it :-) ).
+    </description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.xsite</groupId>
+                <artifactId>xsite-maven-plugin</artifactId>
+                <configuration>
+                    <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                    <sitemapPath>content/sitemap.xml</sitemapPath>
+                    <skinPath>templates/skin.html</skinPath>
+                    <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>pre-site</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-scr-scrdescriptor</id>
+                        <phase>none</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <!-- Bundles to list in the installer properties file -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-shell</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-4</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <includeArtifactIds>shell</includeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-rdf-core</id>
+                        <!-- the tc-manager should be activated after the provider -->
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-4</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeArtifactIds>rdf.core</includeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-platform-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-3</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <excludeArtifactIds>rdf.core,slf4j-api,platform.security,platform.security.conditions,shell,org.apache.stanbol.commons.frameworkfragment</excludeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-framework-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-2</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <!-- <excludeScope>compile</excludeScope> -->
+                            <includeScope>provided</includeScope>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <!-- this is a temporary hack to make sure the system-graph gets created -->
+                        <id>copy-security-as-framework-bundles</id>
+                        <configuration>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-2</outputDirectory>
+                            <includeArtifactIds>platform.security</includeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <!-- After the security fragment is loaded other fragments 
+                        are no longer accepted, so having them here  -->
+                        <id>copy-extension-bundles</id>
+                        <configuration>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-1</outputDirectory>
+                            <includeArtifactIds>platform.security.conditions,org.apache.stanbol.commons.frameworkfragment</includeArtifactIds>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>inline-jars</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                commons-logging-api,wymiwyg-commons-core,org.apache.felix.main,org.apache.felix.framework.security
+                            </includeArtifactIds>
+                            <outputDirectory>target/extracted</outputDirectory>
+                            <includes>**</includes>
+                            <excludes>
+                                META-INF/**
+                            </excludes>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.clerezza.platform.launcher.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-Name>Clerezza - Platform Launcher</Bundle-Name>
+                            <Bundle-SymbolicName>org.apache.clerezza.platform.launcher.storageless</Bundle-SymbolicName>
+                            <Bundle-Activator>org.apache.clerezza.platform.launcher.ClerezzaActivator</Bundle-Activator>
+                            <Import-Package>org.osgi.framework,org.osgi.service.startlevel</Import-Package>
+                            <Private-Package>*</Private-Package>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <filtering>false</filtering>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>NOTICE.txt</include>
+                    <include>LICENSE.*</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <!-- the exclude rules are here because the maven-dependency-plugin
+            copies both -SNAPSHOT version as well as the one with the timestamp,
+            see http://jira.codehaus.org/browse/MDEP-209 -->
+            <resource>
+                <targetPath>bundles</targetPath>
+                <directory>target/bundles</directory>
+                <excludes>
+                    <exclude>**/*20*.*-*.jar</exclude>
+                </excludes>
+            </resource>
+            <resource>
+                <targetPath>org</targetPath>
+                <directory>target/extracted/org</directory>
+            </resource>
+            <resource>
+                <directory>target/extracted/</directory>
+                <includes>
+                    <include>default.properties</include>
+                </includes>
+            </resource>
+        </resources>
+    </build>
+    <dependencies>
+        <!-- the most important bundle after the framework: logging -->
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
+            <scope>provided</scope>
+            <version>1.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <scope>provided</scope>
+            <version>1.6.2</version>
+            <!-- <exclusions>
+                <exclusion>
+                    <artifactId>jmxri</artifactId>
+                    <groupId>com.sun.jmx</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>jmxtools</artifactId>
+                    <groupId>com.sun.jdmk</groupId>
+                </exclusion>
+            </exclusions> -->
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>slf4j-scala-api</artifactId>
+            <scope>provided</scope>
+            <version>1.6.3</version>
+        </dependency>
+          <!-- Core Felix. -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.main</artifactId>
+            <scope>provided</scope>
+            <version>4.4.1</version>
+        </dependency>
+        <!-- framework bundles -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.webconsole</artifactId>
+            <scope>provided</scope>
+            <version>4.0.0</version>
+        </dependency>
+        <!-- needed by webconsole -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.bundles</groupId>
+            <artifactId>json</artifactId>
+            <version>20090211_1</version>
+        </dependency>
+        <!-- <dependency>
+            <groupId>org.ops4j.pax.web</groupId>
+            <artifactId>pax-web-jetty-bundle</artifactId>
+            <scope>provided</scope>
+            <version>0.7.2</version>
+        </dependency> -->
+        <!-- <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>jetty-osgi-httpservice</artifactId>
+            <scope>provided</scope>
+            <version>0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.equinox.http</groupId>
+            <artifactId>servlet</artifactId>
+            <scope>provided</scope>
+            <version>1.0.0-v20070606</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-util</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-io</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-continuation</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-http</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-security</artifactId>
+            <scope>provided</scope>
+            <version>8.0.0.M2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+            <version>3.0.20100224</version>
+        </dependency> -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.jetty</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.whiteboard</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <!-- Apache Felix framework bundles -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.bundlerepository</artifactId>
+            <scope>provided</scope>
+            <version>1.6.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.eventadmin</artifactId>
+            <scope>provided</scope>
+            <version>1.3.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr</artifactId>
+            <scope>provided</scope>
+            <version>1.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <scope>provided</scope>
+            <version>1.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.metatype</artifactId>
+            <scope>provided</scope>
+            <version>1.0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.shell</artifactId>
+            <scope>provided</scope>
+            <version>1.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework.security</artifactId>
+            <scope>provided</scope>
+            <version>2.4.0</version>
+        </dependency>
+        <!-- support for parameterhandling, etc -->
+        <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>wymiwyg-commons-core</artifactId>
+            <!-- runtime only in parent -->
+        </dependency>
+
+        <!-- support for mvn URIs (to make updating easier -->
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-mvn</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/appended-resources/META-INF/NOTICE b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..7d1928c
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,18 @@
+
+- Mort Bay Jetty Project (http://www.mortbay.org/jetty/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- WYMIWYG (http://wymiwyg.org/)
+- HP Labs Semantic Web Research (http://www.hpl.hp.com/semweb/)
+- The OSGi Alliance (http://www.osgi.org/)
+- Yahoo! Inc. (http://yahoo.com/)
+- Eclipse Foundation (http://eclipse.org/)
+- INRIA, France Telecom (http://asm.ow2.org/)
+- The Legion Of The Bouncy Castle (http://www.bouncycastle.org)
+- University of Bristol (http://stars.ilrt.bris.ac.uk/)
+- The University of Manchester (http://www.manchester.ac.uk/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- EPFL, Lausanne (http://www.epfl.ch/)
+
+This product includes JQuery and other javascript 
+files Licensed under the MIT License, see the individual
+files for their copyright notice.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaActivator.java
----------------------------------------------------------------------
diff --git a/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaActivator.java b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaActivator.java
new file mode 100644
index 0000000..c6b529c
--- /dev/null
+++ b/platform/launcher.storageless.parent/platform.launcher.storageless/src/main/java/org/apache/clerezza/platform/launcher/ClerezzaActivator.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.launcher;
+
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.startlevel.StartLevel;
+
+/**
+ * OSGi Clerezza Launcher Bundle Activator.
+ *
+ * @author daniel
+ */
+public class ClerezzaActivator implements BundleActivator {
+
+    @Override
+    public void start(BundleContext context) throws Exception {
+        System.out.println("starting platform launcher");
+        ServiceReference startLevelRef =
+                context.getServiceReference(StartLevel.class.getName());
+        StartLevel startLevel = (StartLevel) context.getService(startLevelRef);
+        final int currentBundleStartLevel =
+                startLevel.getBundleStartLevel(context.getBundle());
+        startLevel.setStartLevel(currentBundleStartLevel);
+        final int originalStartLevel = startLevel.getStartLevel();
+        int nextLevel = currentBundleStartLevel + 1;
+        Enumeration<URL> bundleJars =
+                context.getBundle().findEntries("platform-bundles", "*.jar", true);
+        Set<MavenArtifactDesc> artDescs = new HashSet<MavenArtifactDesc>();
+
+        while (bundleJars.hasMoreElements()) {
+            MavenArtifactDesc artDesc =
+                    MavenArtifactDesc.parseFromURL(bundleJars.nextElement());
+            artDescs.add(artDesc);
+        }
+        ClerezzaApp.installBundles(context, artDescs, nextLevel);
+
+        final int newStartLevel =
+                originalStartLevel > nextLevel + 1 ? originalStartLevel : nextLevel + 1;
+        startLevel.setStartLevel(newStartLevel);
+        if (startLevel.getInitialBundleStartLevel() < nextLevel + 1) {
+            startLevel.setInitialBundleStartLevel(nextLevel + 1);
+        }
+        System.out.println("uninstalling platform launcher");
+        context.getBundle().uninstall();
+    }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+    }
+}


[85/87] [abbrv] clerezza git commit: CLEREZZA-984: fixing classes using old scr annotations

Posted by re...@apache.org.
CLEREZZA-984: fixing classes using old scr annotations

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

Branch: refs/heads/master
Commit: 878dd9b3a9dc0d3ef58695639d98285a50ccd7a7
Parents: 36b8bdf
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Apr 13 18:11:14 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Apr 13 18:11:14 2015 +0000

----------------------------------------------------------------------
 .../clerezza/platform/content/InfoDiscobitWriter.java       | 9 ++++++---
 .../clerezza/platform/content/TitledContentRenderlet.java   | 7 +++++--
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/878dd9b3/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
index e3a2aa4..1c99a02 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
@@ -29,16 +29,19 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+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("*/*")
 public class InfoDiscobitWriter implements MessageBodyWriter<InfoDiscobit> {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/878dd9b3/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 02d36a0..aa1fab0 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
@@ -37,6 +37,9 @@ 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;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 
 /**
  * A renderlet for rendering TitledContent. The contained elements are rendered
@@ -47,9 +50,9 @@ import org.apache.clerezza.rdf.utils.GraphNode;
  *
  * @author rbn, mir
  *
- * @scr.component
- * @scr.service interface="org.apache.clerezza.platform.typerendering.Renderlet"
  */
+@Component
+@Service(Renderlet.class)
 public class TitledContentRenderlet implements Renderlet {
 
     private static ThreadLocal<Integer> headingLevel  = new ThreadLocal<Integer>() {


[75/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
index 40c29f2..1382189 100644
--- a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
@@ -35,7 +35,7 @@ import java.util.logging.Logger;
 import org.osgi.service.component.ComponentContext;
 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;
@@ -47,7 +47,7 @@ import org.apache.clerezza.rdf.core.serializedform.Serializer;
  * The <code>FileTcProvider</code> is a <code>WeightedTcProvider</code> that
  * stores <code>Graph</code>S in the file system. <code>ImmutableGraph</code>S are not
  * supported.
- * The <code>Iri</code> of a Graph is location of the file in the file system
+ * The <code>IRI</code> of a Graph is location of the file in the file system
  * (e.g. "file:///home/user/myGraph.rdf"). The format of the rdf data in the file
  * depends on the file ending, for example ".rdf" or ".ttl".
  * <code>FileTcProvider</code> uses
@@ -74,8 +74,8 @@ public class FileTcProvider implements WeightedTcProvider {
      */
     private Serializer serializer;
     
-    private Map<Iri, FileGraph> uriRef2GraphMap =
-            new HashMap<Iri, FileGraph>();
+    private Map<IRI, FileGraph> uriRef2GraphMap =
+            new HashMap<IRI, FileGraph>();
 
     protected static File dataFile = new File("data");
 
@@ -101,7 +101,7 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
@@ -116,7 +116,7 @@ public class FileTcProvider implements WeightedTcProvider {
      *         with the specified name or the file didn't exist.
      */
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         initialize();
         Graph mGraph = uriRef2GraphMap.get(name);
         if (mGraph == null) {
@@ -135,29 +135,29 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getMGraph(name);
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         initialize();
         return uriRef2GraphMap.keySet();
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return listMGraphs();
     }
 
 
     @Override
-    public Graph createGraph(Iri name) throws 
+    public Graph createGraph(IRI name) throws 
             UnsupportedOperationException, EntityAlreadyExistsException {
         initialize();
         if (uriRef2GraphMap.containsKey(name)) {
@@ -170,13 +170,13 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) throws
             UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
-    public void deleteGraph(Iri name) throws 
+    public void deleteGraph(IRI name) throws 
             UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
         initialize();
         FileGraph mGraph = (FileGraph)getGraph(name);
@@ -186,7 +186,7 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
+    public Set<IRI> getNames(ImmutableGraph graph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -205,7 +205,7 @@ public class FileTcProvider implements WeightedTcProvider {
                 BufferedReader br = new BufferedReader(new InputStreamReader(in));
                 String strLine;
                 while ((strLine = br.readLine()) != null) {
-                    Iri uriRef = new Iri(strLine);
+                    IRI uriRef = new IRI(strLine);
                     uriRef2GraphMap.put(uriRef, new FileGraph(uriRef, parser, serializer));
                 }
                 in.close();
@@ -221,7 +221,7 @@ public class FileTcProvider implements WeightedTcProvider {
         FileOutputStream fout = null;
         try {
             fout = new FileOutputStream(dataFile);
-            for (Iri uri : uriRef2GraphMap.keySet()) {
+            for (IRI uri : uriRef2GraphMap.keySet()) {
                 fout.write((uri.getUnicodeString() + "\n").getBytes());
             }
         } catch (FileNotFoundException ex) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
index 86f4a41..048e976 100644
--- a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
@@ -29,7 +29,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 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.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
@@ -48,9 +48,9 @@ public class FileGraphTest {
     protected static final String RDF_FILE_NAME = "test-04.rdf";
     protected static final String TURTLE_FILE_NAME = "test-04.ttl";
 
-    private static final Iri uriA = new Iri("http://example.com/a");
-    private static final Iri uriB = new Iri("http://example.com/b");
-    private static final Iri uriC = new Iri("http://example.com/c");
+    private static final IRI uriA = new IRI("http://example.com/a");
+    private static final IRI uriB = new IRI("http://example.com/b");
+    private static final IRI uriC = new IRI("http://example.com/c");
 
 
     @BeforeClass
@@ -91,15 +91,15 @@ public class FileGraphTest {
     
     @Test
     public void testReadingFromFile() {
-        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(RDF_FILE_NAME)),
+        FileGraph mGraph = new FileGraph(new IRI(getTempFileUri(RDF_FILE_NAME)),
                 Parser.getInstance(), Serializer.getInstance());
         assertEquals(2, mGraph.size());
 
-        mGraph = new FileGraph(new Iri(getTempFileUri(TURTLE_FILE_NAME)),
+        mGraph = new FileGraph(new IRI(getTempFileUri(TURTLE_FILE_NAME)),
                 Parser.getInstance(), Serializer.getInstance());
         assertEquals(2, mGraph.size());
 
-        mGraph = new FileGraph(new Iri(getTempFileUri(NT_FILE_NAME)),
+        mGraph = new FileGraph(new IRI(getTempFileUri(NT_FILE_NAME)),
                 Parser.getInstance(), Serializer.getInstance());
         assertEquals(2, mGraph.size());
     }
@@ -107,13 +107,13 @@ public class FileGraphTest {
     @Test
     public void testFilter() throws IOException {
         String fileName = "filter.rdf";
-        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+        FileGraph mGraph = new FileGraph(new IRI(getTempFileUri(fileName)),
                 Parser.getInstance(), Serializer.getInstance());
 
         mGraph.add(new TripleImpl(uriA, uriB, uriC));
         mGraph.add(new TripleImpl(uriC, uriB, uriA));
 
-        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+        mGraph = new FileGraph(new IRI(getTempFileUri(fileName)),
                 Parser.getInstance(), Serializer.getInstance());
         
         
@@ -124,7 +124,7 @@ public class FileGraphTest {
         iterator.remove();
         assertEquals(1, mGraph.size());
 
-        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+        mGraph = new FileGraph(new IRI(getTempFileUri(fileName)),
                 Parser.getInstance(), Serializer.getInstance());
         assertEquals(1, mGraph.size());
         deleteTempFile(fileName);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
index 7d9c9c4..6eb60c2 100644
--- a/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
+++ b/rdf/file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
@@ -34,7 +34,7 @@ import org.junit.Test;
 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.IRI;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 
 import org.apache.clerezza.rdf.core.access.TcProvider;
@@ -54,10 +54,10 @@ public class FileTcProviderTest extends TcProviderTest {
     
     
     @Override
-    protected Iri generateUri(String name) {
+    protected IRI generateUri(String name) {
             String prefix = testDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
         String path =  prefix + testDir.replace('\\', '/') + "/";
-        return new Iri(path + name + ".rdf");
+        return new IRI(path + name + ".rdf");
     }
 
     @Before
@@ -208,7 +208,7 @@ public class FileTcProviderTest extends TcProviderTest {
     public void testAutoGraphCreationFromExistingFile() throws Exception{
         FileGraphTest.setup();
         TcProvider provider = getInstance();
-        Graph mGraph = provider.getGraph(new Iri(
+        Graph mGraph = provider.getGraph(new IRI(
                 FileGraphTest.getTempFileUri(FileGraphTest.RDF_FILE_NAME)));
         assertEquals(2 ,mGraph.size());
         FileGraphTest.cleanUp();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
index 9a94c75..1be13fe 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Jena2TriaUtil.java
@@ -21,11 +21,11 @@ package org.apache.clerezza.rdf.jena.commons;
 import com.hp.hpl.jena.graph.Node;
 import java.util.Map;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+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.Triple;
 import org.apache.clerezza.commons.rdf.impl.utils.LiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -64,33 +64,33 @@ public class Jena2TriaUtil {
         if ((languageTag != null) && !languageTag.equals("")) {
              language = new Language(languageTag);
         }
-        Iri dataType = null;
+        IRI dataType = null;
         if (datatypeString != null) {
-            dataType = new Iri(datatypeString);
+            dataType = new IRI(datatypeString);
         } else {
-            dataType = new Iri("http://www.w3.org/2001/XMLSchema#string");
+            dataType = new IRI("http://www.w3.org/2001/XMLSchema#string");
         }
         return new LiteralImpl(lexicalForm, dataType, language);
     }
 
     /**
-     * Converts a URI in jena node to a Iri
+     * Converts a URI in jena node to a IRI
      * @param node
-     * @return Iri
+     * @return IRI
      */
-    public Iri convertJenaUri2UriRef(Node node) {
+    public IRI convertJenaUri2UriRef(Node node) {
         if (node == null) {
             throw new IllegalArgumentException("null argument not allowed");
         }
-        return new Iri(node.getURI());
+        return new IRI(node.getURI());
     }
 
     /**
      * Converts a jena node to a resource
      * @param node
-     * @return BlankNode if it is a Blank Node, Iri if it is a URI and Literal if it is a literal.
+     * @return BlankNode if it is a Blank Node, IRI if it is a URI and Literal if it is a literal.
      */
-    public RdfTerm convertJenaNode2Resource(Node node) {
+    public RDFTerm convertJenaNode2Resource(Node node) {
         if (node == null) {
             throw new IllegalArgumentException("null argument not allowed");
         }
@@ -107,14 +107,14 @@ public class Jena2TriaUtil {
     }
 
     /**
-     * Converts a node to a BlankNode if it is a Blank Node otherwise to a Iri.
+     * Converts a node to a BlankNode if it is a Blank Node otherwise to a IRI.
      * If node is a BlankNode and no mapping to a Blank Node exists, then null is
      * returned, otherwise the existing mapping.
      *
      * @param node
-     * @return BlankNode if it is a Blank Node otherwise a Iri
+     * @return BlankNode if it is a Blank Node otherwise a IRI
      */
-    public BlankNodeOrIri convertNonLiteral(Node node) {
+    public BlankNodeOrIRI convertNonLiteral(Node node) {
         if (node == null) {
             throw new IllegalArgumentException("null argument not allowed");
         }
@@ -128,9 +128,9 @@ public class Jena2TriaUtil {
     }
 
     public Triple convertTriple(com.hp.hpl.jena.graph.Triple triple) {
-        BlankNodeOrIri subject = convertNonLiteral(triple.getSubject());
-        Iri predicate = convertJenaUri2UriRef(triple.getPredicate());
-        RdfTerm object = convertJenaNode2Resource(triple.getObject());
+        BlankNodeOrIRI subject = convertNonLiteral(triple.getSubject());
+        IRI predicate = convertJenaUri2UriRef(triple.getPredicate());
+        RDFTerm object = convertJenaNode2Resource(triple.getObject());
         if (subject == null || object == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
----------------------------------------------------------------------
diff --git a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
index c84a1a8..7031e02 100644
--- a/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
+++ b/rdf/jena/commons/src/main/java/org/apache/clerezza/rdf/jena/commons/Tria2JenaUtil.java
@@ -22,10 +22,10 @@ import com.hp.hpl.jena.datatypes.TypeMapper;
 import com.hp.hpl.jena.graph.Node;
 import java.util.Map;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+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;
 
 
@@ -40,9 +40,9 @@ public class Tria2JenaUtil {
         this.tria2JenaBNodes = tria2JenaBNodes;
     }
 
-    public Node convert2JenaNode(BlankNodeOrIri nonLiteral, boolean createBlankNode) {
-        if (nonLiteral instanceof Iri) {
-            return convert2JenaNode((Iri)nonLiteral);
+    public Node convert2JenaNode(BlankNodeOrIRI nonLiteral, boolean createBlankNode) {
+        if (nonLiteral instanceof IRI) {
+            return convert2JenaNode((IRI)nonLiteral);
         } else {
             return convert2JenaNode((BlankNode)nonLiteral, createBlankNode);
         }
@@ -60,18 +60,18 @@ public class Tria2JenaUtil {
                             literal.getDataType().getUnicodeString()));
     }
 
-    public Node convert2JenaNode(RdfTerm resource) {
+    public Node convert2JenaNode(RDFTerm resource) {
         return convert2JenaNode(resource, false);
     }
 
-    public Node convert2JenaNode(RdfTerm resource, boolean createBlankNode) {
-        if (resource instanceof BlankNodeOrIri) {
-            return convert2JenaNode((BlankNodeOrIri)resource, createBlankNode);
+    public Node convert2JenaNode(RDFTerm resource, boolean createBlankNode) {
+        if (resource instanceof BlankNodeOrIRI) {
+            return convert2JenaNode((BlankNodeOrIRI)resource, createBlankNode);
         }
         return convert2JenaNode((Literal)resource);
     }
 
-    public Node convert2JenaNode(Iri uriRef) {
+    public Node convert2JenaNode(IRI uriRef) {
         if (uriRef == null) {
             throw new IllegalArgumentException("null argument not allowed");
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java b/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
index f59342c..8403004 100644
--- a/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
+++ b/rdf/jena/facade/src/main/java/org/apache/clerezza/rdf/jena/facade/JenaGraph.java
@@ -28,9 +28,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
-import org.apache.clerezza.commons.rdf.Iri;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
+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.rdf.jena.commons.Jena2TriaUtil;
 import org.apache.clerezza.rdf.jena.commons.Tria2JenaUtil;
@@ -113,9 +113,9 @@ public class JenaGraph extends GraphBase implements com.hp.hpl.jena.graph.Graph
      * @return TripleCollection
      */
     private Iterator<Triple> filter(TripleMatch m) {
-        BlankNodeOrIri subject = null;
-        Iri predicate = null;
-        RdfTerm object = null;
+        BlankNodeOrIRI subject = null;
+        IRI predicate = null;
+        RDFTerm object = null;
         if (m.getMatchSubject() != null) {
             if (m.getMatchSubject().isLiteral()) {
                 return Collections.EMPTY_SET.iterator();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
----------------------------------------------------------------------
diff --git a/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java b/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
index 7896aa6..73914b3 100644
--- a/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
+++ b/rdf/jena/facade/src/test/java/org/apache/clerezza/rdf/facade/blackbox/TestBasics.java
@@ -34,7 +34,7 @@ import com.hp.hpl.jena.vocabulary.RDF;
 import com.hp.hpl.jena.vocabulary.RDFS;
 import java.io.StringWriter;
 import org.junit.Test;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.jena.facade.JenaGraph;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
@@ -50,7 +50,7 @@ public class TestBasics {
     @Test
     public void serializeGraph() {
         final String uriString = "http://example.org/foo#bar";
-        Iri uri = new Iri(uriString);
+        IRI uri = new IRI(uriString);
         Graph mGraph = new SimpleGraph();
         mGraph.add(new TripleImpl(uri, uri, new PlainLiteralImpl("bla bla")));
         com.hp.hpl.jena.graph.Graph graph = new JenaGraph(mGraph);
@@ -62,7 +62,7 @@ public class TestBasics {
     
     @Test
     public void graphSize() {
-        Iri uri = new Iri("http://example.org/foo#bar");
+        IRI uri = new IRI("http://example.org/foo#bar");
         Graph mGraph = new SimpleGraph();
         mGraph.add(new TripleImpl(uri, uri, new PlainLiteralImpl("bla bla")));
         com.hp.hpl.jena.graph.Graph graph = new JenaGraph(mGraph);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java b/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
index 6adfc8b..7ca6c45 100644
--- a/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
+++ b/rdf/jena/parser/src/main/java/org/apache/clerezza/rdf/jena/parser/JenaParserProvider.java
@@ -30,12 +30,11 @@ import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedParsingFormatException;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 /**
  * A {@link org.apache.clerezza.rdf.core.serializedform.ParsingProvider} based on Jena
  *
  * @author reto, mir
- */
 
 /*
  * see http://jena.sourceforge.net/IO/iohowto.html
@@ -51,7 +50,7 @@ import org.apache.clerezza.commons.rdf.Iri;
 public class JenaParserProvider implements ParsingProvider {
 
     @Override
-    public void parse(org.apache.clerezza.commons.rdf.Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
+    public void parse(org.apache.clerezza.commons.rdf.Graph target, InputStream serializedGraph, String formatIdentifier, IRI baseUri) {
         String jenaFormat = getJenaFormat(formatIdentifier);
         com.hp.hpl.jena.graph.Graph graph = new JenaGraph(target);
         Model model = ModelFactory.createModelForGraph(graph);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java b/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
index 6c48057..219c54e 100644
--- a/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
+++ b/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
 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.simple.SimpleGraph;
 
 
@@ -73,7 +73,7 @@ public class JenaParserProviderTest {
         Assert.assertEquals(graphFromNTriples, graphFromTurtle);
     }
 
-    private ImmutableGraph parse(ParsingProvider parsingProvider, InputStream in, String type, Iri base) {
+    private ImmutableGraph parse(ParsingProvider parsingProvider, InputStream in, String type, IRI base) {
         Graph simpleMGraph = new SimpleGraph();
         parsingProvider.parse(simpleMGraph, in, type, base);
         return simpleMGraph.getImmutableGraph();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java b/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
index 6bf0f75..67f2efa 100644
--- a/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
+++ b/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
@@ -35,7 +35,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.commons.rdf.BlankNode;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
@@ -60,15 +60,15 @@ public class TestJenaSerializerProvider {
                 model.createResource().addProperty(
                         model.createProperty(URI + "E"), "F").addProperty(
                         model.createProperty(URI + "G"), "H"));
-        mGraph.add(new TripleImpl(new Iri("http://foo/bar"),
-                new Iri("http://foo/bar"),
+        mGraph.add(new TripleImpl(new IRI("http://foo/bar"),
+                new IRI("http://foo/bar"),
                 LiteralFactory.getInstance().createTypedLiteral("foo")));
-        mGraph.add(new TripleImpl(new Iri("http://foo/bar"),
-                new Iri("http://foo/bar"),
+        mGraph.add(new TripleImpl(new IRI("http://foo/bar"),
+                new IRI("http://foo/bar"),
                 LiteralFactory.getInstance().createTypedLiteral(54675)));
         mGraph.add(new TripleImpl(new BlankNode(),
-                new Iri("http://foo/bar"),
-                new Iri("http://foo/bar")));
+                new IRI("http://foo/bar"),
+                new IRI("http://foo/bar")));
     }
 
     /*

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
index f43b596..f7d4431 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
@@ -24,7 +24,7 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
 import java.util.HashMap;
 import java.util.Iterator;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import org.apache.clerezza.rdf.jena.commons.Jena2TriaUtil;
@@ -33,7 +33,7 @@ import org.apache.clerezza.rdf.jena.commons.Jena2TriaUtil;
  *
  * @author rbn
  */
-class HashMapSolutionMapping extends HashMap<Variable, RdfTerm> implements SolutionMapping {
+class HashMapSolutionMapping extends HashMap<Variable, RDFTerm> implements SolutionMapping {
 
     transient Jena2TriaUtil convertor = new Jena2TriaUtil(new HashMap<Node,BlankNode>());
     public HashMapSolutionMapping(QuerySolution querySolution) {
@@ -44,11 +44,11 @@ class HashMapSolutionMapping extends HashMap<Variable, RdfTerm> implements Solut
         }
     }
     @Override
-    public RdfTerm get(String name) {
+    public RDFTerm get(String name) {
         return get(new Variable(name));
     }
 
-    private RdfTerm toRdfTerm(RDFNode node) {
+    private RDFTerm toRdfTerm(RDFNode node) {
         return convertor.convertJenaNode2Resource(node.asNode());
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
index 96ddf7d..4e3eb8c 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
@@ -43,7 +43,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.locks.Lock;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.sparql.ParseException;
 import org.apache.clerezza.rdf.core.sparql.SparqlPreParser;
 import org.apache.clerezza.commons.rdf.Graph;
@@ -67,14 +67,14 @@ public class JenaSparqlEngine implements QueryEngine {
     public Object execute(TcManager tcManager, Graph defaultGraph,
             final String query) {
         final SparqlPreParser sparqlPreParser = new SparqlPreParser(tcManager);
-        final Iri defaultGraphName = new Iri("http://fake-default.uri/879872");
-        Set<Iri> referencedGraphs;
+        final IRI defaultGraphName = new IRI("http://fake-default.uri/879872");
+        Set<IRI> referencedGraphs;
         try {
             referencedGraphs = sparqlPreParser.getReferredGraphs(query, defaultGraphName);
         } catch (ParseException ex) {
             throw new RuntimeException(ex);
         }
-        Set<Iri> graphsToLock = referencedGraphs != null ? referencedGraphs : tcManager.listGraphs();
+        Set<IRI> graphsToLock = referencedGraphs != null ? referencedGraphs : tcManager.listGraphs();
         final DatasetGraph datasetGraph = new TcDatasetGraph(tcManager, defaultGraph);
         final Dataset dataset = DatasetFactory.create(datasetGraph);
 
@@ -108,7 +108,7 @@ public class JenaSparqlEngine implements QueryEngine {
             return executeUpdate(dataset, query);
         }
         List<Lock> locks = new ArrayList<Lock>(graphsToLock.size());
-        for (Iri uriRef : graphsToLock) {
+        for (IRI uriRef : graphsToLock) {
             Graph tc;
             if (uriRef.equals(defaultGraphName)) {
                 tc = defaultGraph;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
index e56b7ae..59a0a24 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
@@ -26,7 +26,7 @@ import com.hp.hpl.jena.sparql.core.Quad;
 import com.hp.hpl.jena.sparql.util.Context;
 import java.util.Iterator;
 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.jena.facade.JenaGraph;
@@ -55,14 +55,14 @@ class TcDatasetGraph implements DatasetGraph {
     @Override
     public com.hp.hpl.jena.graph.Graph getGraph(Node node) {
         final JenaGraph jenaGraph = new JenaGraph(
-                tcManager.getGraph(new Iri(node.getURI())));
+                tcManager.getGraph(new IRI(node.getURI())));
         return jenaGraph;
     }
 
     @Override
     public boolean containsGraph(Node node) {
         try {
-            tcManager.getGraph(new Iri(node.getURI()));
+            tcManager.getGraph(new IRI(node.getURI()));
             return true;
         } catch (NoSuchEntityException e) {
             return false;
@@ -71,7 +71,7 @@ class TcDatasetGraph implements DatasetGraph {
 
     @Override
     public Iterator<Node> listGraphNodes() {
-        final Iterator<Iri> graphsIter = tcManager.listGraphs().iterator();
+        final Iterator<IRI> graphsIter = tcManager.listGraphs().iterator();
         return new Iterator<Node>() {
 
             @Override
@@ -81,7 +81,7 @@ class TcDatasetGraph implements DatasetGraph {
 
             @Override
             public Node next() {
-                Iri uriRef = graphsIter.next();
+                IRI uriRef = graphsIter.next();
                 if (uriRef == null) {
                     return null;
                 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java b/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
index 76d762b..e02b730 100644
--- a/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
+++ b/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
@@ -24,7 +24,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
@@ -44,7 +44,7 @@ public class SimpleTest {
 	public void simpleStringQuery() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
 		String query = "SELECT ?title WHERE" + "{"
 				+ "    <http://example.org/book/book1> <"
@@ -63,7 +63,7 @@ public class SimpleTest {
 	public void simpleSelectQuery() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
 		String query = "SELECT ?title WHERE" + "{"
 				+ "    <http://example.org/book/book1> <"
@@ -79,7 +79,7 @@ public class SimpleTest {
 	public void simpleAskQuery() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
 		String query = "ASK WHERE" + "{"
 				+ "    <http://example.org/book/book1> <"
@@ -96,7 +96,7 @@ public class SimpleTest {
 	public void simpleDescribe() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
 		String query = "DESCRIBE " + "    <http://example.org/book/book1>";
 		Assert.assertEquals(
@@ -109,7 +109,7 @@ public class SimpleTest {
 	public void simpleConstruct() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
 		String query = "PREFIX foaf:   <http://xmlns.com/foaf/0.1/> "
 				+ "CONSTRUCT { <http://foo/bar> foaf:name ?title } WHERE" + "{"
@@ -126,7 +126,7 @@ public class SimpleTest {
 	public void simpleInsert() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
         
 		String query = "PREFIX foaf:   <http://xmlns.com/foaf/0.1/> "
@@ -139,7 +139,7 @@ public class SimpleTest {
 	public void simpleDrop() throws ParseException {
 		SimpleGraph data = new SimpleGraph();
 		final String titleValue = "SPARQL Tutorial";
-		data.add(new TripleImpl(new Iri("http://example.org/book/book1"),
+		data.add(new TripleImpl(new IRI("http://example.org/book/book1"),
 				DC.title, new PlainLiteralImpl(titleValue)));
         
 		String query = "DROP ALL";

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
----------------------------------------------------------------------
diff --git a/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java b/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
index bf40c66..3f782e5 100644
--- a/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
+++ b/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
@@ -26,10 +26,10 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
 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.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.jena.commons.Jena2TriaUtil;
 import org.apache.clerezza.rdf.jena.commons.Tria2JenaUtil;
 import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph;
@@ -75,7 +75,7 @@ public class JenaGraphAdaptor extends AbstractGraph {
     }
 
     @Override
-    public Iterator<Triple> performFilter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    public Iterator<Triple> performFilter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         Node jenaSubject = null;
         Node jenaPredicate = null;
         Node jenaObject = null;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
index 5f23953..3e5b2a2 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
@@ -4,18 +4,18 @@ import java.util.AbstractSet;
 import java.util.Iterator;
 
 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.RDF;
 
 /**
  * Represents a set of uri ref Set<Iri>
  * @author Minto van der Sluis
  */
-public class IriSet extends AbstractSet<Iri> {
+public class IriSet extends AbstractSet<IRI> {
     private ModelGraph graphNameIndex;
-    private Iri graphType;
+    private IRI graphType;
 
-    public IriSet(ModelGraph index, Iri object) {
+    public IriSet(ModelGraph index, IRI object) {
         graphNameIndex = index;
         graphType = object;
     }
@@ -27,17 +27,17 @@ public class IriSet extends AbstractSet<Iri> {
     }
   
     @Override
-    public Iterator<Iri> iterator() {
+    public Iterator<IRI> iterator() {
         final Iterator<Triple> indexIter = graphNameIndex.getGraph().filter( null, RDF.type, graphType );
-        return new Iterator<Iri>() {
+        return new Iterator<IRI>() {
             @Override
             public boolean hasNext() {
                 return indexIter.hasNext();
             }
   
             @Override
-            public Iri next() {
-                return Iri.class.cast(indexIter.next().getSubject());
+            public IRI next() {
+                return IRI.class.cast(indexIter.next().getSubject());
             }
   
             @Override
@@ -48,14 +48,14 @@ public class IriSet extends AbstractSet<Iri> {
     }
     
     @Override
-    public boolean add(Iri o) {
+    public boolean add(IRI o) {
         throw new UnsupportedOperationException();
     }
   
     @Override
     public boolean contains(Object o) {
-        if (o instanceof Iri) {
-            return graphNameIndex.getGraph().filter(Iri.class.cast(o), RDF.type, graphType).hasNext();
+        if (o instanceof IRI) {
+            return graphNameIndex.getGraph().filter(IRI.class.cast(o), RDF.type, graphType).hasNext();
         }
         return false;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
index 80a5210..4a8258d 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
@@ -5,7 +5,7 @@ import java.util.concurrent.locks.ReadWriteLock;
 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.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper;
 import org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
index 0afa3fa..cd882a2 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
@@ -1,6 +1,6 @@
 package org.apache.clerezza.rdf.jena.tdb.internals;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * Provides static methods in order to represent classes used to
@@ -11,12 +11,12 @@ import org.apache.clerezza.commons.rdf.Iri;
  */
 public class Symbols {
 
-    public static Iri Index = new Iri("http://clerezza.apache.org/storage/Index");
+    public static IRI Index = new IRI("http://clerezza.apache.org/storage/Index");
 
-    public static Iri Default = new Iri("http://clerezza.apache.org/storage/Default");
+    public static IRI Default = new IRI("http://clerezza.apache.org/storage/Default");
     
-    public static Iri ImmutableGraph = new Iri("http://clerezza.apache.org/storage/ImmutableGraph");
+    public static IRI ImmutableGraph = new IRI("http://clerezza.apache.org/storage/ImmutableGraph");
 
-    public static Iri Graph = new Iri("http://clerezza.apache.org/storage/Graph");
+    public static IRI Graph = new IRI("http://clerezza.apache.org/storage/Graph");
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
index 8c05d7b..5f3e0bc 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
@@ -18,7 +18,7 @@ import com.hp.hpl.jena.query.QueryFactory;
 import com.hp.hpl.jena.update.GraphStore;
 import com.hp.hpl.jena.update.GraphStoreFactory;
 import com.hp.hpl.jena.update.UpdateAction;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 abstract class BaseTdbTcProvider implements QueryableTcProvider{
 
@@ -33,7 +33,7 @@ abstract class BaseTdbTcProvider implements QueryableTcProvider{
 	// ------------------------------------------------------------------------
 
     @Override
-    public Object executeSparqlQuery(final String query, Iri defaultGraph) {
+    public Object executeSparqlQuery(final String query, IRI defaultGraph) {
 		// Missing permission (java.lang.RuntimePermission getClassLoader)
 		// when calling QueryFactory.create causes ExceptionInInitializerError
 		// to be thrown.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
index 4264c2d..0e84390 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
@@ -17,7 +17,7 @@ import org.apache.clerezza.commons.rdf.ImmutableGraph;
 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.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;
@@ -109,10 +109,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     private SyncThread syncThread;
 
     private final ReadWriteLock datasetLock = new ReentrantReadWriteLock();;
-    private Iri defaultGraphName;
+    private IRI defaultGraphName;
 
     // Ensure that models not yet garbage collected get properly synced.
-    private final ConcurrentMap<Iri, ModelGraph> syncModels = new MapMaker().weakValues().makeMap();
+    private final ConcurrentMap<IRI, ModelGraph> syncModels = new MapMaker().weakValues().makeMap();
     
     /**
      * This background thread ensures that changes to {@link Model}s are
@@ -167,7 +167,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * <li> {@link #TDB_DIR} (required): The directory used by Jena TDB. Property
      * substitution "${property-name}" with {@link System#getProperties()} is
      * supported.
-     * <li> {@link #DEFAULT_GRAPH_NAME}: The name ({@link Iri}) of the
+     * <li> {@link #DEFAULT_GRAPH_NAME}: The name ({@link IRI}) of the
      * {@link ImmutableGraph} that exports the union graph. This graph allows to query
      * triples in any named model managed by this {@link TcProvider}.
      * <li> {@link #SYNC_INTERVAL}: The sync interval that
@@ -257,7 +257,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
         if(value != null && !value.toString().isEmpty()){
             try {
                 new URI(value.toString());
-                defaultGraphName = new Iri(value.toString());
+                defaultGraphName = new IRI(value.toString());
             } catch (URISyntaxException e) {
                 throw new ConfigurationException(DEFAULT_GRAPH_NAME, "The parsed name '"
                         + value + "'for the default graph (union over all "
@@ -368,7 +368,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @throws NoSuchEntityException If <code>create == false</code> and no
      * {@link Model} for the parsed <code>name</code> exists.
      */
-    private ModelGraph getModelGraph(Iri name, boolean readWrite,boolean create) throws NoSuchEntityException {
+    private ModelGraph getModelGraph(IRI name, boolean readWrite,boolean create) throws NoSuchEntityException {
         ModelGraph modelGraph = null;
         datasetLock.readLock().lock();
         try {
@@ -396,10 +396,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.IRI)
      */
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
             throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
         }
@@ -417,10 +417,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.IRI)
      */
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
             throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
         }
@@ -438,10 +438,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getTriples(org.apache.clerezza.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getTriples(org.apache.clerezza.commons.rdf.IRI)
      */
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         if(name == null){
             throw new IllegalArgumentException("The parsed ImmutableGraph Iri MUST NOT be NULL!");
         }
@@ -464,7 +464,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @see org.apache.clerezza.rdf.core.access.TcProvider#listGraphs()
      */
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         datasetLock.readLock().lock();
         try {
             return new HashSet(new IriSet( graphNameIndex, Symbols.ImmutableGraph ));
@@ -478,7 +478,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @see org.apache.clerezza.rdf.core.access.TcProvider#listGraphs()
      */
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         datasetLock.readLock().lock();
         try {
             return  new HashSet(new IriSet( graphNameIndex, Symbols.Graph ));
@@ -492,7 +492,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @see org.apache.clerezza.rdf.core.access.TcProvider#listGraphs()
      */
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         datasetLock.readLock().lock();
         try {
             return  new HashSet(new IriSet( graphNameIndex, null ));
@@ -503,10 +503,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
 
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.IRI)
      */
     @Override
-    public Graph createGraph(Iri name) throws UnsupportedOperationException,
+    public Graph createGraph(IRI name) throws UnsupportedOperationException,
                                            EntityAlreadyExistsException {
         if(name == null){
             throw new IllegalArgumentException("The parsed MGrpah name MUST NOT be NULL!");
@@ -526,10 +526,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.Iri, org.apache.clerezza.commons.rdf.Graph)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.IRI, org.apache.clerezza.commons.rdf.Graph)
      */
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws UnsupportedOperationException,
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) throws UnsupportedOperationException,
                                                                    EntityAlreadyExistsException {
         if(name == null){
             throw new IllegalArgumentException("The parsed Grpah name MUST NOT be NULL!");
@@ -556,10 +556,10 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#deleteGraph(org.apache.clerezza.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#deleteGraph(org.apache.clerezza.commons.rdf.IRI)
      */
     @Override
-    public void deleteGraph(Iri name) throws UnsupportedOperationException,
+    public void deleteGraph(IRI name) throws UnsupportedOperationException,
                                                    NoSuchEntityException,
                                                    EntityUndeletableException {
         if(name == null){
@@ -590,13 +590,13 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @see org.apache.clerezza.rdf.core.access.TcProvider#getNames(org.apache.clerezza.commons.rdf.ImmutableGraph)
      */
     @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
+    public Set<IRI> getNames(ImmutableGraph graph) {
         //TODO: this method would require to compare the triples within the graph
         //      because an equals check will not work with BlankNodes. 
-        Set<Iri> graphNames = new HashSet<Iri>();
+        Set<IRI> graphNames = new HashSet<IRI>();
         for( Iterator<Triple> iterator = graphNameIndex.getGraph().iterator(); iterator.hasNext(); ) {
             Triple triple = iterator.next();
-            Iri graphName = new Iri(triple.getSubject().toString());
+            IRI graphName = new IRI(triple.getSubject().toString());
             ImmutableGraph currentGraph = getModelGraph(graphName, false, false).getImmutableGraph();
             if(graph.equals(currentGraph)){
                 graphNames.add(graphName);
@@ -666,7 +666,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @param graphType the resource type
      * @return true if a resource with the given name and type already exists, false otherwise.
      */
-    private boolean isExistingGraphName(Iri graphName, Iri graphType) {
+    private boolean isExistingGraphName(IRI graphName, IRI graphType) {
         return graphNameIndex.getGraph().filter(graphName, RDF.type, graphType).hasNext();
     }
 
@@ -675,7 +675,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @param graphName the graph name
      * @return true if a graph or mgraph with the given name already exists, false otherwise.
      */
-    private boolean isExistingGraphName(Iri graphName) {
+    private boolean isExistingGraphName(IRI graphName) {
         return isExistingGraphName(graphName, null);
     }
     
@@ -684,7 +684,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @param graphName name of the graph
      * @param graphType resourcetype for the graph to add.
      */
-    private void addToIndex(Iri graphName, Iri graphType) {
+    private void addToIndex(IRI graphName, IRI graphType) {
         graphNameIndex.getGraph().add(new TripleImpl(graphName, RDF.type, graphType));
         graphNameIndex.sync();
     }
@@ -694,7 +694,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
      * @param graphName name of the graph to remove
      * @param graphType resource type of the graph to remove.
      */
-    private void removeFromIndex(Iri graphName, Iri graphType) {
+    private void removeFromIndex(IRI graphName, IRI graphType) {
         Graph index = graphNameIndex.getGraph();
         Iterator<Triple> triplesToRemove = index.filter(graphName, RDF.type, graphType);
         for( ; triplesToRemove.hasNext(); ) {
@@ -710,7 +710,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
       for( ; triplesToRemove.hasNext(); ) {
           Triple triple = triplesToRemove.next();
           triplesToRemove.remove();
-          removeFromIndex( Iri.class.cast(triple.getSubject()), Symbols.ImmutableGraph );
+          removeFromIndex(IRI.class.cast(triple.getSubject()), Symbols.ImmutableGraph );
       }
       graphNameIndex.sync();
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
index 6c7578b..5ae3a2e 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
@@ -40,7 +40,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 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;
@@ -86,8 +86,8 @@ public class TdbTcProvider implements WeightedTcProvider {
      */
     private static final String DATA_PATH_NAME = "tdb-data/";
     private String dataPathString = DATA_PATH_NAME;
-    private Map<Iri, Graph> mGraphMap = new HashMap<Iri, Graph>();
-    private Map<Iri, ImmutableGraph> graphMap = new HashMap<Iri, ImmutableGraph>();
+    private Map<IRI, Graph> mGraphMap = new HashMap<IRI, Graph>();
+    private Map<IRI, ImmutableGraph> graphMap = new HashMap<IRI, ImmutableGraph>();
     private Map<File, com.hp.hpl.jena.graph.Graph> dir2JenaGraphMap = new HashMap<File, com.hp.hpl.jena.graph.Graph>();
     private Map<File, Lock> dir2Lock = new HashMap<File, Lock>();
     private final Map<File, Dataset> dir2Dataset = new HashMap<File, Dataset>();
@@ -160,7 +160,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if (!graphMap.containsKey(name)) {
             throw new NoSuchEntityException(name);
         }
@@ -168,7 +168,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public synchronized Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public synchronized Graph getMGraph(IRI name) throws NoSuchEntityException {
         if (!mGraphMap.containsKey(name)) {
             throw new NoSuchEntityException(name);
         }
@@ -176,7 +176,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         try {
             return getMGraph(name);
         } catch (NoSuchEntityException e) {
@@ -185,7 +185,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public synchronized Graph createGraph(Iri name)
+    public synchronized Graph createGraph(IRI name)
             throws UnsupportedOperationException, EntityAlreadyExistsException {
         File tcDir = getGraphDir(name);
         if (tcDir.exists()) {
@@ -205,7 +205,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples)
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples)
             throws UnsupportedOperationException, EntityAlreadyExistsException {
         File tcDir = getImmutableGraphDir(name);
         if (tcDir.exists()) {
@@ -231,7 +231,7 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public void deleteGraph(Iri name)
+    public void deleteGraph(IRI name)
             throws UnsupportedOperationException, NoSuchEntityException,
             EntityUndeletableException {
         syncWithFileSystem();
@@ -309,11 +309,11 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
+    public Set<IRI> getNames(ImmutableGraph graph) {
         //this could be done more efficiently with an index, could be done with
         //a MultiBidiMap (BidiMap allowing multiple keys for the same value)
-        Set<Iri> result = new HashSet<Iri>();
-        for (Iri name : listGraphs()) {
+        Set<IRI> result = new HashSet<IRI>();
+        for (IRI name : listGraphs()) {
             if (getGraph(name).equals(graph)) {
                 result.add(name);
             }
@@ -322,20 +322,20 @@ public class TdbTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> listGraphs() {
-        Set<Iri> result = new HashSet<Iri>();
+    public Set<IRI> listGraphs() {
+        Set<IRI> result = new HashSet<IRI>();
         result.addAll(listMGraphs());
         result.addAll(listImmutableGraphs());
         return result;
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         return graphMap.keySet();
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         return mGraphMap.keySet();
     }
 
@@ -343,7 +343,7 @@ public class TdbTcProvider implements WeightedTcProvider {
         return getGraph(tcDir).getImmutableGraph();
     }
 
-    private File getImmutableGraphDir(Iri name) {
+    private File getImmutableGraphDir(IRI name) {
         File base = new File(dataPathString);
         return getTcDir(new File(base, "graph"), name);
     }
@@ -361,12 +361,12 @@ public class TdbTcProvider implements WeightedTcProvider {
         return new PrivilegedGraphWrapper(new JenaGraphAdaptor(jenaGraph));
     }
 
-    private File getGraphDir(Iri name) {
+    private File getGraphDir(IRI name) {
         File base = new File(dataPathString);
         return getTcDir(new File(base, "mgraph"), name);
     }
 
-    private File getTcDir(File directory, Iri name) {
+    private File getTcDir(File directory, IRI name) {
         try {
             String subDirName = URLEncoder.encode(name.getUnicodeString(), "utf-8");
             return new File(directory, subDirName);
@@ -380,7 +380,7 @@ public class TdbTcProvider implements WeightedTcProvider {
         if (graphsDir.exists()) {
             for (String graphDirName : graphsDir.list()) {
                 try {
-                    Iri uri = new Iri(URLDecoder.decode(graphDirName, "utf-8"));
+                    IRI uri = new IRI(URLDecoder.decode(graphDirName, "utf-8"));
                     log.info("loading: " + graphDirName);
                     graphMap.put(uri, getImmutableGraph(new File(graphsDir, graphDirName)));
                 } catch (UnsupportedEncodingException ex) {
@@ -397,7 +397,7 @@ public class TdbTcProvider implements WeightedTcProvider {
         if (mGraphsDir.exists()) {
             for (String mGraphDirName : mGraphsDir.list()) {
                 try {
-                    Iri uri = new Iri(URLDecoder.decode(mGraphDirName, "utf-8"));
+                    IRI uri = new IRI(URLDecoder.decode(mGraphDirName, "utf-8"));
                     log.info("loading: " + mGraphDirName);
                     final File tcDir = new File(mGraphsDir, mGraphDirName);
                     final Graph lockableGraph = getGraph(tcDir);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
index d348532..98d467a 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
@@ -37,7 +37,7 @@ import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 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.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.junit.AfterClass;
@@ -101,7 +101,7 @@ public class MultiThreadedSingleTdbDatasetTest {
                         num = graphNum[0];
                         graphNum[0]++;
                     }
-                    graph = provider.createGraph(new Iri(TEST_GRAPH_URI_PREFIX+num));
+                    graph = provider.createGraph(new IRI(TEST_GRAPH_URI_PREFIX+num));
                     log.info(" ... creating the {}. Grpah", num+1);
                     testTriples = new HashSet<Triple>();
                     synchronized (mGraphs) {
@@ -116,7 +116,7 @@ public class MultiThreadedSingleTdbDatasetTest {
                     }
                 }
                 Literal randomLiteral = new PlainLiteralImpl(Util.createRandomString(22));
-                Triple triple = new TripleImpl(new BlankNode(), new Iri("http://example.com/property"), randomLiteral);
+                Triple triple = new TripleImpl(new BlankNode(), new IRI("http://example.com/property"), randomLiteral);
                 graph.add(triple);
                 addedTripleCount++;
                 if ((addedTripleCount % 100) == 0) {
@@ -201,10 +201,10 @@ public class MultiThreadedSingleTdbDatasetTest {
     }
     @Before
     public void createGraphs(){
-        mGraphs.add(provider.createGraph(new Iri(TEST_GRAPH_URI_PREFIX+graphNum[0])));
+        mGraphs.add(provider.createGraph(new IRI(TEST_GRAPH_URI_PREFIX+graphNum[0])));
         testTriplesList.add(new HashSet<Triple>());
         graphNum[0]++;
-        mGraphs.add(provider.createGraph(new Iri(TEST_GRAPH_URI_PREFIX+graphNum[0])));
+        mGraphs.add(provider.createGraph(new IRI(TEST_GRAPH_URI_PREFIX+graphNum[0])));
         testTriplesList.add(new HashSet<Triple>());
         graphNum[0]++;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
index 00ec289..141dc8e 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
@@ -31,9 +31,9 @@ import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.clerezza.commons.rdf.Graph;
-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.Iri;
+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.felix.scr.annotations.Activate;
@@ -81,7 +81,7 @@ public class MultiThreadedTest {
             while (!stopRequested) {
                 try {
                     Literal randomLiteral = new PlainLiteralImpl(Util.createRandomString(22));
-                    Triple triple = new TripleImpl(new BlankNode(), new Iri("http://example.com/property"), randomLiteral);
+                    Triple triple = new TripleImpl(new BlankNode(), new IRI("http://example.com/property"), randomLiteral);
                     mGraph.add(triple);
                     addedTripleCount++;
                     if ((addedTripleCount % 100) == 0) {
@@ -104,7 +104,7 @@ public class MultiThreadedTest {
     @Before
     public void setUp() throws IOException {
         File tempFile;
-        Iri MGRAPHNAME = new Iri("http://text.example.org/");
+        IRI MGRAPHNAME = new IRI("http://text.example.org/");
         TdbTcProvider tdbTcProvider;
         tempFile = File.createTempFile("tdbtest", null);
         tempFile.delete();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
index b76f676..8e7dde5 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
@@ -34,9 +34,9 @@ import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.clerezza.commons.rdf.Graph;
-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.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -86,7 +86,7 @@ public class MultiThreadedTestSingleTdb {
             while (!stopRequested) {
                 try {
                     Literal randomLiteral = new PlainLiteralImpl(Util.createRandomString(22));
-                    Triple triple = new TripleImpl(new BlankNode(), new Iri("http://example.com/property"), randomLiteral);
+                    Triple triple = new TripleImpl(new BlankNode(), new IRI("http://example.com/property"), randomLiteral);
                     mGraph.add(triple);
                     addedTripleCount++;
                     if ((addedTripleCount % 100) == 0) {
@@ -109,7 +109,7 @@ public class MultiThreadedTestSingleTdb {
     @Before
     public void setUp() throws IOException, ConfigurationException {
         File tempFile;
-        Iri MGRAPHNAME = new Iri("http://text.example.org/");
+        IRI MGRAPHNAME = new IRI("http://text.example.org/");
         TcProvider tdbTcProvider;
         tempFile = File.createTempFile("tdbtest", null);
         tempFile.delete();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
index 1a5b78a..d1f1a81 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
@@ -6,7 +6,7 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 
 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.test.GraphTest;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -15,7 +15,7 @@ import org.osgi.service.cm.ConfigurationException;
 public class SingleTdbDatasetGraphTest extends GraphTest {
 
     private static final String MGRAPHNAME_PREFIX = "http://text.example.org/testGraph";
-    private static Iri UNION_GRAPH_NAME = new Iri("http://www.example.org/unionGraph");
+    private static IRI UNION_GRAPH_NAME = new IRI("http://www.example.org/unionGraph");
     private static int testGraphCounter = 0;
 
     private static File tempFile;
@@ -36,7 +36,7 @@ public class SingleTdbDatasetGraphTest extends GraphTest {
     @AfterClass
     public static void cleanUpDirectory() throws IOException {
         for(int i = 0; i < testGraphCounter;i++){
-            provider.deleteGraph(new Iri(MGRAPHNAME_PREFIX+i));
+            provider.deleteGraph(new IRI(MGRAPHNAME_PREFIX+i));
         }
         provider.deactivate(null);
         try {
@@ -48,7 +48,7 @@ public class SingleTdbDatasetGraphTest extends GraphTest {
 
     @Override
     protected Graph getEmptyGraph() {
-        Graph graph = provider.createGraph(new Iri(MGRAPHNAME_PREFIX+testGraphCounter));
+        Graph graph = provider.createGraph(new IRI(MGRAPHNAME_PREFIX+testGraphCounter));
         testGraphCounter++;
         return graph;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
index b90cfed..199cdfc 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
@@ -11,9 +11,9 @@ import java.util.Set;
 
 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.BlankNodeOrIRI;
 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.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
@@ -31,7 +31,7 @@ public class SingleTdbDatasetTcProviderTest extends TcProviderTest {
     private static File tempFile;
     private static Dictionary<String,Object> config;
     private static SingleTdbDatasetTcProvider provider;
-    private static Iri UNION_GRAPH_NAME = new Iri("http://www.example.org/unionGraph");
+    private static IRI UNION_GRAPH_NAME = new IRI("http://www.example.org/unionGraph");
     
     @Before
     public void setup() throws IOException, ConfigurationException {
@@ -100,29 +100,29 @@ public class SingleTdbDatasetTcProviderTest extends TcProviderTest {
     @Test
     public void testUnionGraph() throws Exception{
         TcProvider provider = getInstance();
-        Iri type = new Iri("http://www.w3.org/2000/01/rdf-schema#type");
-        Iri name = new Iri("http://schema.org/name");
-        Iri personType = new Iri("http://schema.org/Person");
-        Iri companyType = new Iri("http://schema.org/Company");
-        Iri worksFor = new Iri("http://schema.org/works-for");
+        IRI type = new IRI("http://www.w3.org/2000/01/rdf-schema#type");
+        IRI name = new IRI("http://schema.org/name");
+        IRI personType = new IRI("http://schema.org/Person");
+        IRI companyType = new IRI("http://schema.org/Company");
+        IRI worksFor = new IRI("http://schema.org/works-for");
 
         //create a graph with persons
         Graph persons = new SimpleGraph();
-        Iri tim = new Iri("http://people.org/tim.johnson");
+        IRI tim = new IRI("http://people.org/tim.johnson");
         persons.add(new TripleImpl(tim, type, personType));
         persons.add(new TripleImpl(tim, name, new PlainLiteralImpl("Tim Johnson")));
-        Iri john = new Iri("http://people.org/john.swenson");
+        IRI john = new IRI("http://people.org/john.swenson");
         persons.add(new TripleImpl(john, type, personType));
         persons.add(new TripleImpl(john, name, new PlainLiteralImpl("John Swenson")));
-        provider.createImmutableGraph(new Iri("urn:persons"), persons);
+        provider.createImmutableGraph(new IRI("urn:persons"), persons);
         
         //create a Graph with data about persons
-        Graph orgdata = provider.createGraph(new Iri("urn:orgdata"));
-        Iri talinor = new Iri("http://company.org/talinor");
+        Graph orgdata = provider.createGraph(new IRI("urn:orgdata"));
+        IRI talinor = new IRI("http://company.org/talinor");
         orgdata.add(new TripleImpl(talinor, type, companyType));
         orgdata.add(new TripleImpl(talinor, name, new PlainLiteralImpl("Talinor Inc.")));
         orgdata.add(new TripleImpl(john, worksFor, talinor));
-        Iri kondalor = new Iri("http://company.org/kondalor");
+        IRI kondalor = new IRI("http://company.org/kondalor");
         orgdata.add(new TripleImpl(kondalor, type, companyType));
         orgdata.add(new TripleImpl(kondalor, name, new PlainLiteralImpl("Kondalor Ges.m.b.H.")));
         orgdata.add(new TripleImpl(tim, worksFor, kondalor));
@@ -139,17 +139,17 @@ public class SingleTdbDatasetTcProviderTest extends TcProviderTest {
 //            +" triples (expected "+expectedTripleCount+")",
 //            expectedTripleCount, data.size());
         Iterator<Triple> it = data.filter(null, type, companyType);
-        Set<Iri> expected = new HashSet<Iri>(Arrays.asList(talinor,kondalor));
+        Set<IRI> expected = new HashSet<IRI>(Arrays.asList(talinor,kondalor));
         while(it.hasNext()){
-            BlankNodeOrIri subject = it.next().getSubject();
+            BlankNodeOrIRI subject = it.next().getSubject();
             Assert.assertTrue("Unexpected "+subject, expected.remove(subject));
         }
         Assert.assertTrue("Missing "+expected, expected.isEmpty());
 
         it = data.filter(null, type, personType);
-        expected = new HashSet<Iri>(Arrays.asList(john,tim));
+        expected = new HashSet<IRI>(Arrays.asList(john,tim));
         while(it.hasNext()){
-            BlankNodeOrIri subject = it.next().getSubject();
+            BlankNodeOrIRI subject = it.next().getSubject();
             Assert.assertTrue("Unexpected "+subject, expected.remove(subject));
         }
         Assert.assertTrue("Missing "+expected, expected.isEmpty());
@@ -159,10 +159,10 @@ public class SingleTdbDatasetTcProviderTest extends TcProviderTest {
     public void testListGraph(){
     	TcProvider provider = getInstance();
     	//No union graph in listGraphs
-    	Set<Iri> mgl = provider.listMGraphs();
+    	Set<IRI> mgl = provider.listMGraphs();
         Assert.assertFalse("Mgraph contains the read-only union-graph", mgl.contains(UNION_GRAPH_NAME));
         //Union graph in listGraphs
-        Set<Iri> gl = provider.listGraphs();
+        Set<IRI> gl = provider.listGraphs();
         Assert.assertTrue("ImmutableGraph does not contain the read-only union-graph", gl.contains(UNION_GRAPH_NAME));
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
index 4dbaceb..8aa58ee 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
@@ -29,7 +29,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 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.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.test.GraphTest;
 import org.apache.clerezza.commons.rdf.Literal;
@@ -42,7 +42,7 @@ import org.junit.Test;
  */
 public class TdbGraphTest extends GraphTest {
     private static File tempFile;
-    final private Iri MGRAPHNAME = new Iri("http://text.example.org/");
+    final private IRI MGRAPHNAME = new IRI("http://text.example.org/");
     static private TdbTcProvider tdbTcProvider;
 
     @BeforeClass
@@ -78,7 +78,7 @@ public class TdbGraphTest extends GraphTest {
         Date date = new Date(0);
         LiteralFactory literalFactory = LiteralFactory.getInstance();
         Literal dateLiteral = literalFactory.createTypedLiteral(date);
-        Triple triple = new TripleImpl(new BlankNode(), new Iri("http://example.com/property"), dateLiteral);
+        Triple triple = new TripleImpl(new BlankNode(), new IRI("http://example.com/property"), dateLiteral);
         graph.add(triple);
         Assert.assertTrue(graph.contains(triple));
     }
@@ -90,7 +90,7 @@ public class TdbGraphTest extends GraphTest {
         LiteralFactory literalFactory = LiteralFactory.getInstance();
         Literal dateLiteral = literalFactory.createTypedLiteral(date);
         System.out.println(dateLiteral);
-        Iri property = new Iri("http://example.com/property");
+        IRI property = new IRI("http://example.com/property");
         Triple triple = new TripleImpl(new BlankNode(), property, dateLiteral);
         graph.add(triple);
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
----------------------------------------------------------------------
diff --git a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
index d68173b..9be020f 100644
--- a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
+++ b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
 
 import net.rootdev.javardfa.Parser;
 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.serializedform.ParsingProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -41,7 +41,7 @@ public abstract class ClerezzaRDFaParser implements ParsingProvider {
 
 
     @Override
-    public void parse(Graph target, InputStream in, String formatIdentifier, Iri baseUri) {
+    public void parse(Graph target, InputStream in, String formatIdentifier, IRI baseUri) {
         try {
             parse(target, new InputSource(in), baseUri);
         } catch (IOException e) {
@@ -49,7 +49,7 @@ public abstract class ClerezzaRDFaParser implements ParsingProvider {
         }
     }
 
-    private void parse(Graph target, InputSource in, Iri baseURI) throws IOException {
+    private void parse(Graph target, InputSource in, IRI baseURI) throws IOException {
         Parser parser = new Parser(new ClerezzaStatementSink(target));
         if (baseURI != null) {
             parser.setBase(baseURI.getUnicodeString());


[56/87] [abbrv] clerezza git commit: CLEREZZA-975: All bundle dependencies in typerendering laucnher satisfied, however some exceptions probably because of scala-compiler version mismatch

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
index 228c327..648e0ba 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
@@ -19,8 +19,6 @@
 
 package org.apache.clerezza.platform.users
 
-import org.apache.clerezza.rdf.core.{MGraph, TripleCollection, UriRef}
-import org.apache.clerezza.rdf.core.access.LockableMGraph
 
 
 /*
@@ -29,24 +27,27 @@ import org.apache.clerezza.rdf.core.access.LockableMGraph
  * many things are easier for user with URIs.
  *
  */
+import org.apache.commons.rdf.Graph
+import org.apache.commons.rdf.Iri
+
 trait WebIdInfo {
 
   /**
    * The WebID this instance is about
    */
-  def webId: UriRef
+  def webId: Iri
 
   /**
    * The WebId profile graph, for remote users this is immutable
    */
-  def publicProfile: TripleCollection
+  def publicProfile: Graph
 
   /**
-   * An MGraph used to store public information about the user. For local
+   * An Graph used to store public information about the user. For local
    * users this is the same as publicProfile. In any case this contains the
    * triples of the publicProfile.
    */
-  def localPublicUserData: LockableMGraph
+  def localPublicUserData: Graph
 
   /**
    * indicates if this WebId is local.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/provisioning/launchers/typerendering-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/typerendering-launcher/pom.xml b/provisioning/launchers/typerendering-launcher/pom.xml
index 88c7dd7..f2ce3ea 100644
--- a/provisioning/launchers/typerendering-launcher/pom.xml
+++ b/provisioning/launchers/typerendering-launcher/pom.xml
@@ -20,7 +20,7 @@
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
         <version>7-SNAPSHOT</version>
-        <relativePath>../../../parent</relativePath>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza.provisioning</groupId>
     <artifactId>typerendering-launcher</artifactId>
@@ -239,7 +239,7 @@
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>platform.graphnodeprovider</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
         <dependency>
@@ -251,7 +251,7 @@
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>typerendering</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/provisioning/platform.graphnodeprovider/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/platform.graphnodeprovider/pom.xml b/provisioning/platform.graphnodeprovider/pom.xml
index 4252f83..550eef0 100644
--- a/provisioning/platform.graphnodeprovider/pom.xml
+++ b/provisioning/platform.graphnodeprovider/pom.xml
@@ -61,43 +61,43 @@
         <dependency> <!-- dependency of platform.user.core (implementation of WebIdInfo.forceCacheUpdate() ) -->
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.storage.web</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
  
         <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>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
                     
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.users.core</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency> 	
  
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.usermanager</artifactId>
-            <version>0.14</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> 	
  
     </dependencies>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/provisioning/rdf.tdb/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf.tdb/pom.xml b/provisioning/rdf.tdb/pom.xml
index aa2ea8d..28787f5 100644
--- a/provisioning/rdf.tdb/pom.xml
+++ b/provisioning/rdf.tdb/pom.xml
@@ -26,7 +26,7 @@
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
         <version>7-SNAPSHOT</version>
-        <relativePath>../../parent</relativePath>
+        <relativePath />
     </parent>
     
     <groupId>org.apache.clerezza.provisioning</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/provisioning/rdf/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf/pom.xml b/provisioning/rdf/pom.xml
index d5acc70..2d97a87 100644
--- a/provisioning/rdf/pom.xml
+++ b/provisioning/rdf/pom.xml
@@ -25,8 +25,8 @@
     <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     
     <groupId>org.apache.clerezza.provisioning</groupId>
@@ -130,11 +130,13 @@
             <artifactId>rdf.jena.facade</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <!-- requirws an older version jena-iri
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.rdfa</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        -->
         <!-- <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.rdfjson</artifactId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/provisioning/typerendering/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/typerendering/pom.xml b/provisioning/typerendering/pom.xml
index 0d7c4a5..48a290d 100644
--- a/provisioning/typerendering/pom.xml
+++ b/provisioning/typerendering/pom.xml
@@ -25,8 +25,8 @@
     <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
 
     <groupId>org.apache.clerezza.provisioning</groupId>
@@ -63,6 +63,11 @@
             <groupId>org.scala-lang</groupId>
             <artifactId>scala-reflect</artifactId>
         </dependency>
+        
+        <dependency>
+            <groupId>org.scala-lang.modules</groupId>
+            <artifactId>scala-xml_2.11</artifactId>
+        </dependency>
        
         <dependency>
             <groupId>org.apache.clerezza.ext</groupId>
@@ -73,7 +78,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typepriority</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <!-- required by platform.config -->
@@ -86,62 +91,62 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <!-- provides system graph as required by typepriority -->
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.ontologies</artifactId>
-            <version>0.3</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>
             <artifactId>templating</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>templating.seedsnipe</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </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>platform.typerendering.scala</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.gui</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>
@@ -153,7 +158,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.style.default</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <!-- needed by default style -->
@@ -167,7 +172,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.scala.utils</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         
         <dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.file.storage/pom.xml b/rdf.file.storage/pom.xml
index 18e2214..4932a7c 100644
--- a/rdf.file.storage/pom.xml
+++ b/rdf.file.storage/pom.xml
@@ -24,14 +24,14 @@
      <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>rdf.file.storage</artifactId>
     <packaging>bundle</packaging>
     <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - SCB File Storage Provider</name>
+    <name>Clerezza - RDF File Storage Provider</name>
     <description>A file base storage provider</description>
     <dependencies>
         <dependency>
@@ -46,25 +46,25 @@
         <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.core.test</artifactId>
             <scope>test</scope>
-            <version>0.15</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.parser</artifactId>
             <scope>test</scope>
-            <version>0.12</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.serializer</artifactId>
             <scope>test</scope>
-            <version>0.11</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
new file mode 100644
index 0000000..e9143f9
--- /dev/null
+++ b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Collection;
+
+import java.util.Iterator;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+
+/**
+ *
+ * @author mir
+ */
+public class FileGraph extends SimpleGraph {
+
+    private Serializer serializer;
+    private File file;
+    private String fileType;
+
+    FileGraph(Iri uri, Parser parser,
+            Serializer serializer) {
+        this(new File(URI.create(uri.getUnicodeString())), parser, serializer);    
+    }
+
+    public FileGraph(File file, Parser parser, Serializer serializer) {
+        this.file = file;
+        String fileEnding = extractFileEnding(file.getPath());
+        fileType = getMediaTypeForFileEnding(fileEnding);
+        this.serializer = serializer;
+        try {
+            if (file.exists() && file.length() != 0) {
+                InputStream fio = new FileInputStream(file);
+                ImmutableGraph graph = parser.parse(fio, fileType);
+                addAllNoFileAccess(graph);
+            } else {
+                file.createNewFile();
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    @Override
+    public boolean add(Triple e) {
+        boolean result = super.add(e);
+        writeToFile();
+        return result;
+    }
+    
+    @Override
+    public boolean addAll(Collection<? extends Triple> c) {
+        boolean modified = addAllNoFileAccess(c);
+        writeToFile();
+        return modified;
+    }
+
+    @Override
+    public boolean remove(Object o) {
+        Iterator<Triple> e = super.filter(null, null, null);
+        while (e.hasNext()) {
+            if (o.equals(e.next())) {
+                e.remove();
+                writeToFile();
+                return true;
+            }
+        }        
+        return false;
+    }
+
+    @Override
+    public boolean removeAll(Collection<?> c) {
+        boolean modified = false;
+        Iterator<Triple> e = super.filter(null, null, null);
+        while (e.hasNext()) {
+            if (c.contains(e.next())) {
+                e.remove();
+                modified = true;
+            }            
+        }
+        writeToFile();
+        return modified;
+    }
+
+    @Override
+    public boolean retainAll(Collection<?> c) {
+        boolean result = super.retainAll(c);
+        writeToFile();
+        return result;
+    }
+    
+    @Override
+    public Iterator<Triple> filter(final BlankNodeOrIri subject,
+            final Iri predicate,
+            final RdfTerm object) {
+        final Iterator<Triple> baseIter = super.filter(subject, predicate, object);
+        Iterator<Triple> iterator = new Iterator<Triple>() {
+
+            @Override
+            public boolean hasNext() {
+                return baseIter.hasNext();
+            }
+
+            @Override
+            public Triple next() {
+                return baseIter.next();
+            }
+
+            @Override
+            public void remove() {
+                baseIter.remove();
+                writeToFile();
+            }
+
+        };
+        return iterator;
+    }
+
+    private boolean addAllNoFileAccess(Collection<? extends Triple> c) {
+        boolean modified = false;
+        Iterator<? extends Triple> e = c.iterator();
+        while (e.hasNext()) {
+            if (super.add(e.next())) {
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+    private String extractFileEnding(String uriString) {
+        String fileEnding = uriString.substring(uriString.lastIndexOf(".") + 1, uriString.length());
+        return fileEnding;
+    }
+
+    private String getMediaTypeForFileEnding(String fileEnding) {
+        if (fileEnding.equals("rdf")) {
+            return SupportedFormat.RDF_XML;
+        }
+        if (fileEnding.equals("nt")) {
+            return SupportedFormat.N_TRIPLE;
+        }
+        if (fileEnding.equals("ttl")) {
+            return SupportedFormat.TURTLE;
+        }
+        if (fileEnding.equals("n3")) {
+            return SupportedFormat.N3;
+        }
+        return null;
+    }
+
+    private void writeToFile() {
+        synchronized(this) {
+            OutputStream out;
+            try {
+                out = new FileOutputStream(file);
+            } catch (FileNotFoundException ex) {
+                throw new RuntimeException(ex);
+            }
+            try {
+                serializer.serialize(out, this, fileType);
+            } finally {
+                try {
+                    out.close();
+                } catch (IOException ex) {
+                    throw new RuntimeException(ex);
+                }
+            }
+        }
+    }
+
+    public void delete() {
+        file.delete();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileMGraph.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileMGraph.java b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileMGraph.java
deleted file mode 100644
index 46083a2..0000000
--- a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileMGraph.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Collection;
-
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-
-/**
- *
- * @author mir
- */
-public class FileMGraph extends SimpleMGraph {
-
-    private Serializer serializer;
-    private File file;
-    private String fileType;
-
-    FileMGraph(UriRef uri, Parser parser,
-            Serializer serializer) {
-        this(new File(URI.create(uri.getUnicodeString())), parser, serializer);    
-    }
-
-    public FileMGraph(File file, Parser parser, Serializer serializer) {
-        this.file = file;
-        String fileEnding = extractFileEnding(file.getPath());
-        fileType = getMediaTypeForFileEnding(fileEnding);
-        this.serializer = serializer;
-        try {
-            if (file.exists() && file.length() != 0) {
-                InputStream fio = new FileInputStream(file);
-                Graph graph = parser.parse(fio, fileType);
-                addAllNoFileAccess(graph);
-            } else {
-                file.createNewFile();
-            }
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    @Override
-    public boolean add(Triple e) {
-        boolean result = super.add(e);
-        writeToFile();
-        return result;
-    }
-    
-    @Override
-    public boolean addAll(Collection<? extends Triple> c) {
-        boolean modified = addAllNoFileAccess(c);
-        writeToFile();
-        return modified;
-    }
-
-    @Override
-    public boolean remove(Object o) {
-        Iterator<Triple> e = super.filter(null, null, null);
-        while (e.hasNext()) {
-            if (o.equals(e.next())) {
-                e.remove();
-                writeToFile();
-                return true;
-            }
-        }        
-        return false;
-    }
-
-    @Override
-    public boolean removeAll(Collection<?> c) {
-        boolean modified = false;
-        Iterator<Triple> e = super.filter(null, null, null);
-        while (e.hasNext()) {
-            if (c.contains(e.next())) {
-                e.remove();
-                modified = true;
-            }            
-        }
-        writeToFile();
-        return modified;
-    }
-
-    @Override
-    public boolean retainAll(Collection<?> c) {
-        boolean result = super.retainAll(c);
-        writeToFile();
-        return result;
-    }
-    
-    @Override
-    public Iterator<Triple> filter(final NonLiteral subject,
-            final UriRef predicate,
-            final Resource object) {
-        final Iterator<Triple> baseIter = super.filter(subject, predicate, object);
-        Iterator<Triple> iterator = new Iterator<Triple>() {
-
-            @Override
-            public boolean hasNext() {
-                return baseIter.hasNext();
-            }
-
-            @Override
-            public Triple next() {
-                return baseIter.next();
-            }
-
-            @Override
-            public void remove() {
-                baseIter.remove();
-                writeToFile();
-            }
-
-        };
-        return iterator;
-    }
-
-    private boolean addAllNoFileAccess(Collection<? extends Triple> c) {
-        boolean modified = false;
-        Iterator<? extends Triple> e = c.iterator();
-        while (e.hasNext()) {
-            if (super.add(e.next())) {
-                modified = true;
-            }
-        }
-        return modified;
-    }
-
-    private String extractFileEnding(String uriString) {
-        String fileEnding = uriString.substring(uriString.lastIndexOf(".") + 1, uriString.length());
-        return fileEnding;
-    }
-
-    private String getMediaTypeForFileEnding(String fileEnding) {
-        if (fileEnding.equals("rdf")) {
-            return SupportedFormat.RDF_XML;
-        }
-        if (fileEnding.equals("nt")) {
-            return SupportedFormat.N_TRIPLE;
-        }
-        if (fileEnding.equals("ttl")) {
-            return SupportedFormat.TURTLE;
-        }
-        if (fileEnding.equals("n3")) {
-            return SupportedFormat.N3;
-        }
-        return null;
-    }
-
-    private void writeToFile() {
-        synchronized(this) {
-            OutputStream out;
-            try {
-                out = new FileOutputStream(file);
-            } catch (FileNotFoundException ex) {
-                throw new RuntimeException(ex);
-            }
-            try {
-                serializer.serialize(out, this, fileType);
-            } finally {
-                try {
-                    out.close();
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
-            }
-        }
-    }
-
-    public void delete() {
-        file.delete();
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
index cfcb831..0b4fd33 100644
--- a/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
+++ b/rdf.file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
@@ -33,10 +33,9 @@ import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
@@ -46,9 +45,9 @@ import org.apache.clerezza.rdf.core.serializedform.Serializer;
 
 /**
  * The <code>FileTcProvider</code> is a <code>WeightedTcProvider</code> that
- * stores <code>MGraph</code>S in the file system. <code>Graph</code>S are not
+ * stores <code>Graph</code>S in the file system. <code>ImmutableGraph</code>S are not
  * supported.
- * The <code>UriRef</code> of a MGraph is location of the file in the file system
+ * The <code>Iri</code> of a Graph is location of the file in the file system
  * (e.g. "file:///home/user/myGraph.rdf"). The format of the rdf data in the file
  * depends on the file ending, for example ".rdf" or ".ttl".
  * <code>FileTcProvider</code> uses
@@ -75,8 +74,8 @@ public class FileTcProvider implements WeightedTcProvider {
      */
     private Serializer serializer;
     
-    private Map<UriRef, FileMGraph> uriRef2MGraphMap =
-            new HashMap<UriRef, FileMGraph>();
+    private Map<Iri, FileGraph> uriRef2GraphMap =
+            new HashMap<Iri, FileGraph>();
 
     protected static File dataFile = new File("data");
 
@@ -102,24 +101,24 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     /**
-     * Get an <code>MGraph</code> by its name. If the file at the specified
-     * location already exists, then a MGraph is returned even though it was not
-     * created with createMGraph().
+     * Get an <code>Graph</code> by its name. If the file at the specified
+     * location already exists, then a Graph is returned even though it was not
+     * created with createGraph().
      *
-     * @param the name of the <code>MGraph</code>
-     * @return name the <code>MGraph</code> with the specified name
-     * @throws NoSuchEntityException if there is no <code>MGraph</code>
+     * @param the name of the <code>Graph</code>
+     * @return name the <code>Graph</code> with the specified name
+     * @throws NoSuchEntityException if there is no <code>Graph</code>
      *         with the specified name or the file didn't exist.
      */
     @Override
-    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+    public Graph getMGraph(Iri name) throws NoSuchEntityException {
         initialize();
-        MGraph mGraph = uriRef2MGraphMap.get(name);
+        Graph mGraph = uriRef2GraphMap.get(name);
         if (mGraph == null) {
             final String uriString = name.getUnicodeString();
             if (!uriString.startsWith("file:")) {
@@ -127,7 +126,7 @@ public class FileTcProvider implements WeightedTcProvider {
             }
             File file = new File(URI.create(uriString));
             if (file.exists()) {
-                return createMGraph(name);
+                return createGraph(name);
             } else {
                 throw new NoSuchEntityException(name);
             }            
@@ -136,58 +135,58 @@ public class FileTcProvider implements WeightedTcProvider {
     }
 
     @Override
-    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+    public Graph getGraph(Iri name) throws NoSuchEntityException {
         return getMGraph(name);
     }
 
     @Override
-    public Set<UriRef> listGraphs() {
+    public Set<Iri> listImmutableGraphs() {
         throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
-    public Set<UriRef> listMGraphs() {
+    public Set<Iri> listMGraphs() {
         initialize();
-        return uriRef2MGraphMap.keySet();
+        return uriRef2GraphMap.keySet();
     }
 
     @Override
-    public Set<UriRef> listTripleCollections() {
+    public Set<Iri> listGraphs() {
         return listMGraphs();
     }
 
 
     @Override
-    public MGraph createMGraph(UriRef name) throws 
+    public Graph createGraph(Iri name) throws 
             UnsupportedOperationException, EntityAlreadyExistsException {
         initialize();
-        if (uriRef2MGraphMap.containsKey(name)) {
+        if (uriRef2GraphMap.containsKey(name)) {
             throw new EntityAlreadyExistsException(name);
         }
-        FileMGraph mGraph = new FileMGraph(name, parser, serializer);
-        uriRef2MGraphMap.put(name, mGraph);
+        FileGraph mGraph = new FileGraph(name, parser, serializer);
+        uriRef2GraphMap.put(name, mGraph);
         writeDataFile();
         return mGraph;
     }
 
     @Override
-    public Graph createGraph(UriRef name, TripleCollection triples) throws
+    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws
             UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
-    public void deleteTripleCollection(UriRef name) throws 
+    public void deleteGraph(Iri name) throws 
             UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
         initialize();
-        FileMGraph mGraph = (FileMGraph)getMGraph(name);
+        FileGraph mGraph = (FileGraph)getGraph(name);
         mGraph.delete();
-        uriRef2MGraphMap.remove(name);
+        uriRef2GraphMap.remove(name);
         writeDataFile();
     }
 
     @Override
-    public Set<UriRef> getNames(Graph graph) {
+    public Set<Iri> getNames(ImmutableGraph graph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -206,8 +205,8 @@ public class FileTcProvider implements WeightedTcProvider {
                 BufferedReader br = new BufferedReader(new InputStreamReader(in));
                 String strLine;
                 while ((strLine = br.readLine()) != null) {
-                    UriRef uriRef = new UriRef(strLine);
-                    uriRef2MGraphMap.put(uriRef, new FileMGraph(uriRef, parser, serializer));
+                    Iri uriRef = new Iri(strLine);
+                    uriRef2GraphMap.put(uriRef, new FileGraph(uriRef, parser, serializer));
                 }
                 in.close();
             } else {
@@ -222,7 +221,7 @@ public class FileTcProvider implements WeightedTcProvider {
         FileOutputStream fout = null;
         try {
             fout = new FileOutputStream(dataFile);
-            for (UriRef uri : uriRef2MGraphMap.keySet()) {
+            for (Iri uri : uriRef2GraphMap.keySet()) {
                 fout.write((uri.getUnicodeString() + "\n").getBytes());
             }
         } catch (FileNotFoundException ex) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
new file mode 100644
index 0000000..e24edb9
--- /dev/null
+++ b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileGraphTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.file.storage;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Iterator;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author mir
+ */
+public class FileGraphTest {
+
+    private static String tempDir = System.getProperty("java.io.tmpdir");
+    private static final String FILE_PROTOCOL = "file://";
+
+    protected static final String NT_FILE_NAME = "test-04.nt";
+    protected static final String RDF_FILE_NAME = "test-04.rdf";
+    protected static final String TURTLE_FILE_NAME = "test-04.ttl";
+
+    private static final Iri uriA = new Iri("http://example.com/a");
+    private static final Iri uriB = new Iri("http://example.com/b");
+    private static final Iri uriC = new Iri("http://example.com/c");
+
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        createTempFileFromRdfTerm(NT_FILE_NAME);
+        createTempFileFromRdfTerm(RDF_FILE_NAME);
+        createTempFileFromRdfTerm(TURTLE_FILE_NAME);
+    }
+
+    @AfterClass
+    public static void cleanUp() throws Exception {
+        deleteTempFile(NT_FILE_NAME);
+        deleteTempFile(RDF_FILE_NAME);
+        deleteTempFile(TURTLE_FILE_NAME);
+    }
+
+    private static void createTempFileFromRdfTerm(String resourceName) 
+            throws FileNotFoundException, IOException {
+        InputStream in = FileTcProviderTest.class.getResourceAsStream(resourceName);
+        File file = new File(URI.create(getTempFileUri(resourceName)));
+        FileOutputStream fout = new FileOutputStream(file);
+        int inByte;
+        while ((inByte = in.read()) != -1) {
+            fout.write(inByte);
+        }
+    }
+    
+    protected static String getTempFileUri(String name) {
+                String prefix = tempDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
+        return prefix + tempDir.replace(File.separatorChar, '/') + "/" + name;
+    }
+
+    private static void deleteTempFile(String name)
+            throws FileNotFoundException, IOException {
+        File file = new File(tempDir + "/" + name);
+        file.delete();
+    }
+    
+    @Test
+    public void testReadingFromFile() {
+        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(RDF_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(TURTLE_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(NT_FILE_NAME)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(2, mGraph.size());
+    }
+    
+    @Test
+    public void testFilter() throws IOException {
+        String fileName = "filter.rdf";
+        FileGraph mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+
+        mGraph.add(new TripleImpl(uriA, uriB, uriC));
+        mGraph.add(new TripleImpl(uriC, uriB, uriA));
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+        
+        
+        assertEquals(2, mGraph.size());
+        Iterator<Triple> iterator = mGraph.filter(null, null, null);
+
+        iterator.next();
+        iterator.remove();
+        assertEquals(1, mGraph.size());
+
+        mGraph = new FileGraph(new Iri(getTempFileUri(fileName)),
+                Parser.getInstance(), Serializer.getInstance());
+        assertEquals(1, mGraph.size());
+        deleteTempFile(fileName);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
deleted file mode 100644
index b236025..0000000
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileMGraphTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.file.storage;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Iterator;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import static org.junit.Assert.*;
-
-/**
- *
- * @author mir
- */
-public class FileMGraphTest {
-
-    private static String tempDir = System.getProperty("java.io.tmpdir");
-    private static final String FILE_PROTOCOL = "file://";
-
-    protected static final String NT_FILE_NAME = "test-04.nt";
-    protected static final String RDF_FILE_NAME = "test-04.rdf";
-    protected static final String TURTLE_FILE_NAME = "test-04.ttl";
-
-    private static final UriRef uriA = new UriRef("http://example.com/a");
-    private static final UriRef uriB = new UriRef("http://example.com/b");
-    private static final UriRef uriC = new UriRef("http://example.com/c");
-
-
-    @BeforeClass
-    public static void setup() throws Exception {
-        createTempFileFromResource(NT_FILE_NAME);
-        createTempFileFromResource(RDF_FILE_NAME);
-        createTempFileFromResource(TURTLE_FILE_NAME);
-    }
-
-    @AfterClass
-    public static void cleanUp() throws Exception {
-        deleteTempFile(NT_FILE_NAME);
-        deleteTempFile(RDF_FILE_NAME);
-        deleteTempFile(TURTLE_FILE_NAME);
-    }
-
-    private static void createTempFileFromResource(String resourceName) 
-            throws FileNotFoundException, IOException {
-        InputStream in = FileTcProviderTest.class.getResourceAsStream(resourceName);
-        File file = new File(URI.create(getTempFileUri(resourceName)));
-        FileOutputStream fout = new FileOutputStream(file);
-        int inByte;
-        while ((inByte = in.read()) != -1) {
-            fout.write(inByte);
-        }
-    }
-    
-    protected static String getTempFileUri(String name) {
-                String prefix = tempDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
-        return prefix + tempDir.replace(File.separatorChar, '/') + "/" + name;
-    }
-
-    private static void deleteTempFile(String name)
-            throws FileNotFoundException, IOException {
-        File file = new File(tempDir + "/" + name);
-        file.delete();
-    }
-    
-    @Test
-    public void testReadingFromFile() {
-        FileMGraph mGraph = new FileMGraph(new UriRef(getTempFileUri(RDF_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-
-        mGraph = new FileMGraph(new UriRef(getTempFileUri(TURTLE_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-
-        mGraph = new FileMGraph(new UriRef(getTempFileUri(NT_FILE_NAME)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(2, mGraph.size());
-    }
-    
-    @Test
-    public void testFilter() throws IOException {
-        String fileName = "filter.rdf";
-        FileMGraph mGraph = new FileMGraph(new UriRef(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-
-        mGraph.add(new TripleImpl(uriA, uriB, uriC));
-        mGraph.add(new TripleImpl(uriC, uriB, uriA));
-
-        mGraph = new FileMGraph(new UriRef(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-        
-        
-        assertEquals(2, mGraph.size());
-        Iterator<Triple> iterator = mGraph.filter(null, null, null);
-
-        iterator.next();
-        iterator.remove();
-        assertEquals(1, mGraph.size());
-
-        mGraph = new FileMGraph(new UriRef(getTempFileUri(fileName)),
-                Parser.getInstance(), Serializer.getInstance());
-        assertEquals(1, mGraph.size());
-        deleteTempFile(fileName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
index afbd46e..aeff78d 100644
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
+++ b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileTcProviderTest.java
@@ -31,15 +31,15 @@ import java.util.Set;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 
 import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.test.TcProviderTest;
 import static org.junit.Assert.*;
 
@@ -54,10 +54,10 @@ public class FileTcProviderTest extends TcProviderTest {
     
     
     @Override
-    protected UriRef generateUri(String name) {
+    protected Iri generateUri(String name) {
             String prefix = testDir.startsWith("/") ? FILE_PROTOCOL : FILE_PROTOCOL +"/";
         String path =  prefix + testDir.replace('\\', '/') + "/";
-        return new UriRef(path + name + ".rdf");
+        return new Iri(path + name + ".rdf");
     }
 
     @Before
@@ -72,14 +72,20 @@ public class FileTcProviderTest extends TcProviderTest {
     
     @Test(expected=UnsupportedOperationException.class)
     @Override
-    public void testCreateGraph() {
-        super.testCreateGraph();
+    public void testCreateImmutableGraph() {
+        super.testCreateImmutableGraph();
+    }
+    
+    @Test(expected=UnsupportedOperationException.class)
+    @Override
+    public void testCreateImmutableGraphExtended() throws Exception {
+        super.testCreateImmutableGraphExtended();
     }
 
     @Test(expected=UnsupportedOperationException.class)
     @Override
-    public void testGetGraph() {
-        super.testGetGraph();
+    public void testGetImmutableGraph() {
+        super.testGetImmutableGraph();
     }
 
     
@@ -88,15 +94,15 @@ public class FileTcProviderTest extends TcProviderTest {
     public void testGetTriples() {
         TcProvider fileTcProvider = getInstance();
         // add Graphs
-        MGraph mGraph = new SimpleMGraph();
-        // add MGraphs
-        mGraph = fileTcProvider.createMGraph(uriRefA1);
+        Graph mGraph = new SimpleGraph();
+        // add Graphs
+        mGraph = fileTcProvider.createGraph(uriRefA1);
         mGraph.add(new TripleImpl(uriRefA1, uriRefA1, uriRefA1));
-        mGraph = fileTcProvider.createMGraph(uriRefB1);
+        mGraph = fileTcProvider.createGraph(uriRefB1);
         mGraph.add(new TripleImpl(uriRefB1, uriRefB1, uriRefB1));
 
-        // get a MGraph
-        TripleCollection tripleCollection2 = fileTcProvider.getTriples(uriRefB1);
+        // get a Graph
+        Graph tripleCollection2 = fileTcProvider.getGraph(uriRefB1);
 
         Iterator<Triple> iterator = tripleCollection2.iterator();
         assertEquals(new TripleImpl(uriRefB1, uriRefB1, uriRefB1), iterator.next());
@@ -107,18 +113,18 @@ public class FileTcProviderTest extends TcProviderTest {
     @Override
     public void testDeleteEntity() {
         TcProvider fileTcProvider = getInstance();
-        MGraph mGraph = fileTcProvider.createMGraph(uriRefA);
+        Graph mGraph = fileTcProvider.createGraph(uriRefA);
         mGraph.add(new TripleImpl(uriRefA, uriRefA, uriRefA));
-        fileTcProvider.deleteTripleCollection(uriRefA);
+        fileTcProvider.deleteGraph(uriRefA);
         try {
-            fileTcProvider.getMGraph(uriRefA);
+            fileTcProvider.getGraph(uriRefA);
             assertTrue(false);
         } catch (NoSuchEntityException e) {
             assertTrue(true);
         }
         fileTcProvider = getInstance();
         try {
-            fileTcProvider.getMGraph(uriRefA);
+            fileTcProvider.getGraph(uriRefA);
             assertTrue(false);
         } catch (NoSuchEntityException e) {
             assertTrue(true);
@@ -134,15 +140,15 @@ public class FileTcProviderTest extends TcProviderTest {
     @Test(expected=UnsupportedOperationException.class)
     public void testGetNames() {
         //super.testGetNames();
-        getInstance().getNames(new SimpleMGraph().getGraph());
+        getInstance().getNames(new SimpleGraph().getImmutableGraph());
     }
 
     
-    @Test(expected=UnsupportedOperationException.class)
+    /*@Test(expected=UnsupportedOperationException.class)
     @Override
     public void testCreateGraphExtended() throws Exception {
         super.testCreateGraphExtended();
-    }
+    }*/
 
     @Test(expected=UnsupportedOperationException.class)
     @Override
@@ -177,7 +183,7 @@ public class FileTcProviderTest extends TcProviderTest {
     @Test
     public void testDataFile() {
         TcProvider provider = getInstance();
-        provider.createMGraph(uriRefA);
+        provider.createGraph(uriRefA);
         File dataFile = new File("data");
         assertTrue(dataFile.exists());
 
@@ -185,27 +191,27 @@ public class FileTcProviderTest extends TcProviderTest {
         expected.add(uriRefA.getUnicodeString());
         assertTrue(expected.equals(getLinesFromFile(dataFile)));
 
-        provider.createMGraph(uriRefB);
+        provider.createGraph(uriRefB);
         expected.add(uriRefB.getUnicodeString());
         assertTrue(expected.equals(getLinesFromFile(dataFile)));
     
-        provider.deleteTripleCollection(uriRefA);
+        provider.deleteGraph(uriRefA);
         expected.remove(uriRefA.getUnicodeString());
         assertTrue(expected.equals(getLinesFromFile(dataFile)));
         
-        provider.deleteTripleCollection(uriRefB);
+        provider.deleteGraph(uriRefB);
         expected.remove(uriRefB.getUnicodeString());
         assertTrue(expected.equals(getLinesFromFile(dataFile)));
     }
 
     @Test
-    public void testAutoMGraphCreationFromExistingFile() throws Exception{
-        FileMGraphTest.setup();
+    public void testAutoGraphCreationFromExistingFile() throws Exception{
+        FileGraphTest.setup();
         TcProvider provider = getInstance();
-        MGraph mGraph = provider.getMGraph(new UriRef(
-                FileMGraphTest.getTempFileUri(FileMGraphTest.RDF_FILE_NAME)));
+        Graph mGraph = provider.getGraph(new Iri(
+                FileGraphTest.getTempFileUri(FileGraphTest.RDF_FILE_NAME)));
         assertEquals(2 ,mGraph.size());
-        FileMGraphTest.cleanUp();
+        FileGraphTest.cleanUp();
     }
     
     private Set<String> getLinesFromFile(File file) throws RuntimeException {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
----------------------------------------------------------------------
diff --git a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
index 6b2adf4..e163f8a 100644
--- a/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
+++ b/rdf.file.storage/src/test/java/org/apache/clerezza/rdf/file/storage/FileUtil.java
@@ -27,7 +27,7 @@ import java.io.File;
 public class FileUtil {
 
      /**
-     * Sets up a new <code>SesameMGraph</code>.
+     * Sets up a new <code>SesameGraph</code>.
      * @param testName  Name of the test to support.
      * @throws RepositoryException  If it failed to activate the graph.
      */

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.storage.web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.storage.web/pom.xml b/rdf.storage.web/pom.xml
index ab32443..4315683 100644
--- a/rdf.storage.web/pom.xml
+++ b/rdf.storage.web/pom.xml
@@ -24,13 +24,13 @@
     <parent>
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <artifactId>rdf.storage.web</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
-    <name>Clerezza - SCB Caching Web Storage Provider</name>
+    <name>Clerezza - RDF Storage Web (Caching Web Storage Provider)</name>
     <description>A (currently read-only) storage provider retrieving graphs from the web. It
         implements a caching proxy, relying on another provider for storing triples.</description>
     <dependencies>
@@ -45,17 +45,17 @@
         <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>rdf.utils</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>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf.storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf.storage.web/src/main/scala/WebProxy.scala b/rdf.storage.web/src/main/scala/WebProxy.scala
index c482dd2..8c8ec54 100644
--- a/rdf.storage.web/src/main/scala/WebProxy.scala
+++ b/rdf.storage.web/src/main/scala/WebProxy.scala
@@ -20,6 +20,10 @@
 package org.apache.clerezza.rdf.storage.web
 
 
+import org.apache.commons.rdf.ImmutableGraph
+import org.apache.commons.rdf.Iri
+import org.apache.commons.rdf._
+import org.apache.commons.rdf.impl.utils.AbstractGraph
 import org.osgi.service.component.ComponentContext
 import java.io.IOException
 import java.net.{HttpURLConnection, URL}
@@ -29,7 +33,6 @@ import java.security.{PrivilegedExceptionAction, PrivilegedActionException, Acce
 
 import org.slf4j.scala._
 import org.apache.clerezza.rdf.core.access._
-import org.apache.clerezza.rdf.core.impl.AbstractMGraph
 import org.apache.clerezza.rdf.core._
 import java.sql.Time
 
@@ -87,24 +90,24 @@ class WebProxy extends WeightedTcProvider with Logging {
   }
 
   /**
-   * Any TripleCollection is available as Graph as well as immutable MGraph
+   * Any Graph is available as ImmutableGraph as well as immutable Graph
    *
    * @param name
    * @return
    * @throws NoSuchEntityException
    */
-  def getMGraph(name: UriRef): MGraph = {
-    val graph = getGraph(name)
-    return new AbstractMGraph() {
-      protected def performFilter(subject: NonLiteral, predicate: UriRef, `object` : Resource): java.util.Iterator[Triple] = {
+  def getMGraph(name: Iri): Graph = {
+    val graph = getImmutableGraph(name)
+    return new AbstractGraph() {
+      protected def performFilter(subject: BlankNodeOrIri, predicate: Iri, `object` : RdfTerm): java.util.Iterator[Triple] = {
         graph.filter(subject, predicate, `object`)
       }
 
-      def size = graph.size
+      def performSize = graph.size
     }
   }
 
-  def getGraph(name: UriRef): Graph = {
+  def getImmutableGraph(name: Iri): ImmutableGraph = {
     try {
       getGraph(name, Cache.Fetch)
     } catch {
@@ -116,54 +119,54 @@ class WebProxy extends WeightedTcProvider with Logging {
     }
   }
 
-  def getTriples(name: UriRef): TripleCollection = {
+  def getGraph(name: Iri): Graph = {
     return getMGraph(name)
   }
 
-  def createMGraph(name: UriRef): MGraph = {
+  def createGraph(name: Iri): Graph = {
     throw new UnsupportedOperationException
   }
 
-  def createGraph(name: UriRef, triples: TripleCollection): Graph = {
+  def createImmutableGraph(name: Iri, triples: Graph): ImmutableGraph = {
     throw new UnsupportedOperationException
   }
 
-  def deleteTripleCollection(name: UriRef): Unit = {
+  def deleteGraph(name: Iri): Unit = {
     throw new UnsupportedOperationException
   }
 
-  def getNames(graph: Graph): java.util.Set[UriRef] = {
-    var result: java.util.Set[UriRef] = new java.util.HashSet[UriRef]
+  def getNames(graph: ImmutableGraph): java.util.Set[Iri] = {
+    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
     import collection.JavaConversions._
     for (name <- listGraphs) {
-      if (getGraph(name).equals(graph)) {
+      if (getImmutableGraph(name).equals(graph)) {
         result.add(name)
       }
     }
     return result
   }
 
-  def listTripleCollections: java.util.Set[UriRef] = {
-    var result: java.util.Set[UriRef] = new java.util.HashSet[UriRef]
+  def listGraphs: java.util.Set[Iri] = {
+    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
+    result.addAll(listGraphs)
     result.addAll(listGraphs)
-    result.addAll(listMGraphs)
     return result
   }
 
-  def listGraphs: java.util.Set[UriRef] = {
+  def listMGraphs: java.util.Set[Iri] = {
     //or should we list graphs for which we have a cached version?
-    return java.util.Collections.emptySet[UriRef]
+    return java.util.Collections.emptySet[Iri]
   }
 
-  def listMGraphs: java.util.Set[UriRef] = {
-    return java.util.Collections.emptySet[UriRef]
+  def listImmutableGraphs: java.util.Set[Iri] = {
+    return java.util.Collections.emptySet[Iri]
   }
 
   /**
    * The semantics of this resource
    * @param update if a remote URI, update information on the resource first
    */
-  def getGraph(name: UriRef, updatePolicy: Cache.Value): Graph = {
+  def getGraph(name: Iri, updatePolicy: Cache.Value): ImmutableGraph = {
     logger.debug("getting graph " + name)
     if (name.getUnicodeString.indexOf('#') != -1) {
       logger.debug("not dereferencing URI with hash sign. Please see CLEREZZA-533 for debate.")
@@ -173,7 +176,7 @@ class WebProxy extends WeightedTcProvider with Logging {
       //these are not dereferenceable
       throw new NoSuchEntityException(name)
     }
-    val cacheGraphName = new UriRef("urn:x-localinstance:/cache/" + name.getUnicodeString)
+    val cacheGraphName = new Iri("urn:x-localinstance:/cache/" + name.getUnicodeString)
     //todo: follow redirects and keep track of them
     //todo: keep track of headers especially date and etag. test for etag similarity
     //todo: for https connection allow user to specify his webid and send his key: ie allow web server to be an agent
@@ -195,23 +198,23 @@ class WebProxy extends WeightedTcProvider with Logging {
       val remoteTriples = parser.parse(in, mediaType, name)
       tcProvider.synchronized {
         try {
-          tcProvider.deleteTripleCollection(cacheGraphName)
+          tcProvider.deleteGraph(cacheGraphName)
         } catch {
           case e: NoSuchEntityException =>;
         }
-        tcProvider.createGraph(cacheGraphName, remoteTriples)
+        tcProvider.createImmutableGraph(cacheGraphName, remoteTriples)
       }
     }
     try {
       //the logic here is not quite right, as we don't look at time of previous fetch.
       updatePolicy match {
         case Cache.Fetch => try {
-          tcProvider.getGraph(cacheGraphName)
+          tcProvider.getImmutableGraph(cacheGraphName)
         } catch {
-          case e: NoSuchEntityException => updateGraph(); tcProvider.getGraph(cacheGraphName)
+          case e: NoSuchEntityException => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
         }
-        case Cache.ForceUpdate => updateGraph(); tcProvider.getGraph(cacheGraphName)
-        case Cache.CacheOnly => tcProvider.getGraph(cacheGraphName)
+        case Cache.ForceUpdate => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
+        case Cache.CacheOnly => tcProvider.getImmutableGraph(cacheGraphName)
       }
     } catch {
       case ex: PrivilegedActionException => {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/rdf/rdfa/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/rdfa/pom.xml b/rdf/rdfa/pom.xml
index 0d1c185..68525f9 100644
--- a/rdf/rdfa/pom.xml
+++ b/rdf/rdfa/pom.xml
@@ -67,6 +67,10 @@
                     <artifactId>log4j</artifactId>
                     <groupId>log4j</groupId>
                 </exclusion>
+                <exclusion>
+                    <groupId>com.hp.hpl.jena</groupId>
+                    <artifactId>iri</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/templating.seedsnipe/pom.xml
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/pom.xml b/templating.seedsnipe/pom.xml
index 962a324..25bb3ff 100644
--- a/templating.seedsnipe/pom.xml
+++ b/templating.seedsnipe/pom.xml
@@ -24,8 +24,8 @@
      <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>templating.seedsnipe</artifactId>
@@ -42,22 +42,22 @@
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.parser</artifactId>
             <scope>test</scope>
-            <version>0.12</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>templating</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
     <build>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
index 2366230..a40ecf2 100644
--- a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
+++ b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
@@ -26,10 +26,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-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.UriRef;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -41,6 +40,7 @@ import org.apache.clerezza.templating.seedsnipe.datastructure.FieldDoesNotHaveDi
 import org.apache.clerezza.templating.seedsnipe.datastructure.FieldIndexOutOfBoundsException;
 import org.apache.clerezza.templating.seedsnipe.datastructure.InvalidElementException;
 import org.apache.clerezza.templating.seedsnipe.simpleparser.DefaultParser;
+import org.apache.commons.rdf.Graph;
 
 /**
  * Data Model for {@link GraphNode} to be used with {@link DefaultParser}.
@@ -61,10 +61,10 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
     }
 
     public static class PropertyKey {
-        private UriRef property;
+        private Iri property;
         private boolean reverse;
         
-        public PropertyKey(UriRef property, boolean reverse) {
+        public PropertyKey(Iri property, boolean reverse) {
             super();
             this.property = property;
             this.reverse = reverse;
@@ -101,7 +101,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
 
         
     }
-    private static final UriRef RDF_NIL = new UriRef(
+    private static final Iri RDF_NIL = new Iri(
             "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
     private RenderingFunctions renderingFunctions;
 
@@ -134,17 +134,17 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
     private class ExpandedNode {
 
         private GraphNode node;
-        private Resource value;
+        private RdfTerm value;
         private Map<PropertyKey, List<ExpandedNode>> children;
-        private List<Resource> list = null;
+        private List<RdfTerm> list = null;
 
-        private ExpandedNode(Resource value) {
+        private ExpandedNode(RdfTerm value) {
             this.value = value;
-            final TripleCollection tc = expandedNode.node.getGraph();
+            final Graph tc = expandedNode.node.getGraph();
             doListInitialization(tc);
         }
 
-        private ExpandedNode(GraphNode node, Resource value) {
+        private ExpandedNode(GraphNode node, RdfTerm value) {
             this.value = value;
             this.node = node;
             doListInitialization(node.getGraph());
@@ -153,12 +153,12 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
         /** if value id an rdf:list in tc, initialize list
          * @param tc
          */
-        private void doListInitialization(TripleCollection tc) {
-            if (value instanceof NonLiteral) {        
-                if ((tc.filter((NonLiteral) value, RDF.rest, null).hasNext())
+        private void doListInitialization(Graph tc) {
+            if (value instanceof BlankNodeOrIri) {        
+                if ((tc.filter((BlankNodeOrIri) value, RDF.rest, null).hasNext())
                         || (tc.filter(
-                        (NonLiteral) value, OWL.sameAs, RDF_NIL).hasNext())) {
-                    list = new RdfList((NonLiteral) value, tc);
+                        (BlankNodeOrIri) value, OWL.sameAs, RDF_NIL).hasNext())) {
+                    list = new RdfList((BlankNodeOrIri) value, tc);
                 }
             }
         }
@@ -207,7 +207,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
                 inverseResolve = false;
             }
             String uriString = getUriFromCuri(fieldName);
-            UriRef property = new UriRef(uriString);
+            Iri property = new Iri(uriString);
             List<ExpandedNode> childList = getChildList(property, inverseResolve);
             if (arrayPos.length == 0) {
                 arrayPos = new int[1];
@@ -226,7 +226,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
 
         }
 
-        private List<ExpandedNode> getChildList(UriRef property, boolean inverseResolve) {
+        private List<ExpandedNode> getChildList(Iri property, boolean inverseResolve) {
             PropertyKey propertyKey = new PropertyKey(property, inverseResolve); 
             List<ExpandedNode> result;
             if (children == null) {
@@ -238,16 +238,16 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
             if (result == null) {
                 result = new ArrayList<ExpandedNode>();
                 if (node == null) {
-                    node = new GraphNode((NonLiteral) value, expandedNode.node.getGraph());
+                    node = new GraphNode((BlankNodeOrIri) value, expandedNode.node.getGraph());
                 }
                 if (inverseResolve) {
-                    Iterator<NonLiteral> subjects = node.getSubjects(property);
+                    Iterator<BlankNodeOrIri> subjects = node.getSubjects(property);
                     while (subjects.hasNext()) {
                         ExpandedNode childNode = new ExpandedNode(subjects.next());
                         result.add(childNode);
                     }
                 } else {
-                    Iterator<Resource> objects = node.getObjects(property);
+                    Iterator<RdfTerm> objects = node.getObjects(property);
                     while (objects.hasNext()) {
                         ExpandedNode childNode = new ExpandedNode(objects.next());
                         result.add(childNode);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
index 12adfbe..0a74afe 100644
--- a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
+++ b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
@@ -27,16 +27,14 @@ import java.util.Map;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -48,6 +46,8 @@ import org.apache.clerezza.templating.RenderingFunctions;
 import org.apache.clerezza.templating.seedsnipe.datastructure.DataFieldResolver;
 import org.apache.clerezza.templating.seedsnipe.graphnodeadapter.GraphNodeDataFieldResolver;
 import org.apache.clerezza.templating.seedsnipe.simpleparser.DefaultParser;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Literal;
 
 /**
  * Unit Test for RDF Templating.
@@ -99,8 +99,8 @@ public class GraphNodeTest {
 
     @Test
     public void simple() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -116,9 +116,9 @@ public class GraphNodeTest {
 
     @Test
     public void inverse() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral subject = new UriRef("http://example.org/subject");
-        UriRef object = new UriRef("http://example.org/object");
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri subject = new Iri("http://example.org/subject");
+        Iri object = new Iri("http://example.org/object");
         mGraph.add(new TripleImpl(subject, RDFS.comment, object));
         GraphNode node = new GraphNode(object, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -133,8 +133,8 @@ public class GraphNodeTest {
 
     @Test
     public void defaultFunction() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -166,9 +166,9 @@ public class GraphNodeTest {
     }
 
     @Test
-    public void simpleUriRefRoot() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new UriRef("http://example.org/");
+    public void simpleIriRoot() throws IOException {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new Iri("http://example.org/");
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -183,8 +183,8 @@ public class GraphNodeTest {
 
     @Test
     public void simpleWithNoOp() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -200,8 +200,8 @@ public class GraphNodeTest {
 
     @Test
     public void simpleWithUppercase() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -217,8 +217,8 @@ public class GraphNodeTest {
 
     @Test
     public void simpleWithLiteralUppercase() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -234,8 +234,8 @@ public class GraphNodeTest {
 
     @Test
     public void simpleWithCombinedFunctions() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -251,8 +251,8 @@ public class GraphNodeTest {
 
     @Test
     public void multiple() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("another resource")));
@@ -269,8 +269,8 @@ public class GraphNodeTest {
 
     @Test
     public void fieldTest() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -286,8 +286,8 @@ public class GraphNodeTest {
 
     @Test
     public void fieldTest2() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -304,13 +304,13 @@ public class GraphNodeTest {
 
     @Test
     public void foaf() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
+        Graph mGraph = new SimpleGraph();
         final Parser parser = Parser.getInstance();
 
         try {
-            Graph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
+            ImmutableGraph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
             mGraph.addAll(deserializedGraph);
-            UriRef document = new UriRef("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
+            Iri document = new Iri("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
 
             Assert.assertTrue((mGraph.size() > 0));
 
@@ -340,13 +340,13 @@ public class GraphNodeTest {
 
     @Test
     public void foafSorted() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
+        Graph mGraph = new SimpleGraph();
         final Parser parser = Parser.getInstance();
 
         try {
-            Graph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
+            ImmutableGraph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
             mGraph.addAll(deserializedGraph);
-            UriRef document = new UriRef("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
+            Iri document = new Iri("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
 
             Assert.assertTrue((mGraph.size() > 0));
 
@@ -380,13 +380,13 @@ public class GraphNodeTest {
 
     @Test
     public void rdfListAsPropertyValue() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
-        NonLiteral listNode = new BNode() {
+        BlankNodeOrIri listNode = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode));
-        List<Resource> list = new RdfList(listNode, mGraph);
+        List<RdfTerm> list = new RdfList(listNode, mGraph);
         list.add(new PlainLiteralImpl("first"));
         list.add(new PlainLiteralImpl("second"));
         list.add(new PlainLiteralImpl("third"));
@@ -404,10 +404,10 @@ public class GraphNodeTest {
 
     @Test
     public void rdfListAsRoot() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
-        List<Resource> list = new RdfList(resource, mGraph);
+        List<RdfTerm> list = new RdfList(resource, mGraph);
         list.add(new PlainLiteralImpl("first"));
         list.add(new PlainLiteralImpl("second"));
         list.add(new PlainLiteralImpl("third"));
@@ -424,10 +424,10 @@ public class GraphNodeTest {
 
     @Test
     public void rdfListAsRootElementProperties() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
-        List<Resource> list = new RdfList(resource, mGraph);
+        List<RdfTerm> list = new RdfList(resource, mGraph);
         list.add(createLabeledRes("first", mGraph));
         list.add(createLabeledRes("second", mGraph));
         list.add(createLabeledRes("third", mGraph));
@@ -445,10 +445,10 @@ public class GraphNodeTest {
 
     @Test
     public void rdfListAsRootElementPropertiesWithPresenceTest() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
-        List<Resource> list = new RdfList(resource, mGraph);
+        List<RdfTerm> list = new RdfList(resource, mGraph);
         list.add(createLabeledRes("first", mGraph));
         list.add(createLabeledRes("second", mGraph));
         list.add(createLabeledRes("third", mGraph));
@@ -466,8 +466,8 @@ public class GraphNodeTest {
 
     @Test
     public void compareFunctionResultInIf() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode();
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode();
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -483,19 +483,19 @@ public class GraphNodeTest {
 
     @Test
     public void loopWithEmptyList() throws IOException {
-        TripleCollection mGraph = new SimpleMGraph();
-        NonLiteral resource = new BNode() {
+        Graph mGraph = new SimpleGraph();
+        BlankNodeOrIri resource = new BlankNode() {
         };
 
-        NonLiteral listNode1 = new BNode() {
+        BlankNodeOrIri listNode1 = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode1));
-        List<Resource> list1 = new RdfList(listNode1, mGraph);
+        List<RdfTerm> list1 = new RdfList(listNode1, mGraph);
         list1.add(new PlainLiteralImpl("first"));
         list1.add(new PlainLiteralImpl("second"));
         list1.add(new PlainLiteralImpl("third"));
 
-        NonLiteral listNode2 = new BNode() {
+        BlankNodeOrIri listNode2 = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode2));
         RdfList.createEmptyList(listNode2, mGraph);
@@ -513,9 +513,9 @@ public class GraphNodeTest {
         Assert.assertEquals("\"first\"\"second\"\"third\"", writer.toString());
     }
 
-    private NonLiteral createLabeledRes(String label, TripleCollection mGraph) {
-        BNode bNode = new BNode();
-        PlainLiteral lit = new PlainLiteralImpl(label);
+    private BlankNodeOrIri createLabeledRes(String label, Graph mGraph) {
+        BlankNode bNode = new BlankNode();
+        Literal lit = new PlainLiteralImpl(label);
         mGraph.add(new TripleImpl(bNode, RDFS.label, lit));
         return bNode;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/templating/pom.xml
----------------------------------------------------------------------
diff --git a/templating/pom.xml b/templating/pom.xml
index 261c1b2..e224ddf 100644
--- a/templating/pom.xml
+++ b/templating/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>
@@ -36,7 +36,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file


[73/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
index 59911c4..aba1626 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
@@ -24,10 +24,10 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
 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.rdf.ontologies.OWL;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -56,36 +56,36 @@ public class SameAsSmusher extends BaseSmusher {
     	log.info("Starting smushing");
         
     	// This hashmap contains a uri (key) and the set of equivalent uris (value)
-    	final Map<BlankNodeOrIri, Set<BlankNodeOrIri>> node2EquivalenceSet = new HashMap<BlankNodeOrIri, Set<BlankNodeOrIri>>();
+    	final Map<BlankNodeOrIRI, Set<BlankNodeOrIRI>> node2EquivalenceSet = new HashMap<BlankNodeOrIRI, Set<BlankNodeOrIRI>>();
     	
     	log.info("Creating the sets of equivalent uris of each subject or object in the owl:sameAs statements");
     	// Determines for each subject and object in all the owl:sameAs statements the set of ewquivalent uris 
     	for (Iterator<Triple> it = owlSameStatements.iterator(); it.hasNext();) {            
     		final Triple triple = it.next();
-            final Iri predicate = triple.getPredicate();
+            final IRI predicate = triple.getPredicate();
             if (!predicate.equals(OWL.sameAs)) {
                 throw new RuntimeException("Statements must use only <http://www.w3.org/2002/07/owl#sameAs> predicate.");
             }
-            final BlankNodeOrIri subject = triple.getSubject();
+            final BlankNodeOrIRI subject = triple.getSubject();
             //literals not yet supported
-            final BlankNodeOrIri object = (BlankNodeOrIri)triple.getObject();
+            final BlankNodeOrIRI object = (BlankNodeOrIRI)triple.getObject();
             
-            Set<BlankNodeOrIri> equivalentNodes = node2EquivalenceSet.get(subject);
+            Set<BlankNodeOrIRI> equivalentNodes = node2EquivalenceSet.get(subject);
             
             // if there is not a set of equivalent uris then create a new set
             if (equivalentNodes == null) {
             	equivalentNodes = node2EquivalenceSet.get(object);
             	if (equivalentNodes == null) {
-                    equivalentNodes = new HashSet<BlankNodeOrIri>();
+                    equivalentNodes = new HashSet<BlankNodeOrIRI>();
                 }
             } else {
-                Set<BlankNodeOrIri> objectSet = node2EquivalenceSet.get(object);
+                Set<BlankNodeOrIRI> objectSet = node2EquivalenceSet.get(object);
                 if ((objectSet != null) && (objectSet != equivalentNodes)) {
                     //merge two sets
-                    for (BlankNodeOrIri res : objectSet) {
+                    for (BlankNodeOrIRI res : objectSet) {
                         node2EquivalenceSet.remove(res);
                     }
-                    for (BlankNodeOrIri res : objectSet) {
+                    for (BlankNodeOrIRI res : objectSet) {
                         node2EquivalenceSet.put(res,equivalentNodes);
                     }
                     equivalentNodes.addAll(objectSet);
@@ -105,7 +105,7 @@ public class SameAsSmusher extends BaseSmusher {
     	}
     	
     	// This set contains the sets of equivalent uris
-    	Set<Set<BlankNodeOrIri>> unitedEquivalenceSets = new HashSet<Set<BlankNodeOrIri>>(node2EquivalenceSet.values());
+    	Set<Set<BlankNodeOrIRI>> unitedEquivalenceSets = new HashSet<Set<BlankNodeOrIRI>>(node2EquivalenceSet.values());
         smush(mGraph, unitedEquivalenceSets, addCanonicalSameAsStatements);
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
index 3b78422..2ec8af8 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.utils;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
 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.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.utils.GraphUtils.NoSuchSubGraphException;
@@ -34,9 +34,9 @@ import org.junit.Test;
  */
 public class GraphUtilsTest {
 
-    final Iri u1 = new Iri("http://ex.org/1");
-    final Iri u2 = new Iri("http://ex.org/2");
-    final Iri u3 = new Iri("http://ex.org/3");
+    final IRI u1 = new IRI("http://ex.org/1");
+    final IRI u2 = new IRI("http://ex.org/2");
+    final IRI u3 = new IRI("http://ex.org/3");
 
     @Test
     public void removeSubGraph() throws NoSuchSubGraphException {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
index 58b377e..c9a8f0a 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.utils;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
 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.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -45,7 +45,7 @@ public class IfpSmushTest {
     @Test
     public void simpleBlankNode()  {
         Graph mGraph = new SimpleGraph();
-        Iri mbox1 = new Iri("mailto:foo@example.org");
+        IRI mbox1 = new IRI("mailto:foo@example.org");
         final BlankNode bNode1 = new BlankNode();
         mGraph.add(new TripleImpl(bNode1, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(bNode1, RDFS.comment, 
@@ -61,13 +61,13 @@ public class IfpSmushTest {
     @Test
     public void overlappingEquivalenceClasses()  {
         Graph mGraph = new SimpleGraph();
-        Iri mbox1 = new Iri("mailto:foo@example.org");
+        IRI mbox1 = new IRI("mailto:foo@example.org");
         final BlankNode bNode1 = new BlankNode();
         mGraph.add(new TripleImpl(bNode1, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(bNode1, RDFS.comment,
                 new PlainLiteralImpl("a comment")));
         final BlankNode bNode2 = new BlankNode();
-        Iri mbox2 = new Iri("mailto:bar@example.org");
+        IRI mbox2 = new IRI("mailto:bar@example.org");
         mGraph.add(new TripleImpl(bNode2, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(bNode2, FOAF.mbox, mbox2));
         mGraph.add(new TripleImpl(bNode2, RDFS.comment,
@@ -83,8 +83,8 @@ public class IfpSmushTest {
     @Test
     public void oneIri()  {
         Graph mGraph = new SimpleGraph();
-        Iri mbox1 = new Iri("mailto:foo@example.org");
-        final Iri resource = new Iri("http://example.org/");
+        IRI mbox1 = new IRI("mailto:foo@example.org");
+        final IRI resource = new IRI("http://example.org/");
         mGraph.add(new TripleImpl(resource, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(resource, RDFS.comment,
                 new PlainLiteralImpl("a comment")));
@@ -99,12 +99,12 @@ public class IfpSmushTest {
     @Test
     public void twoIris()  {
         Graph mGraph = new SimpleGraph();
-        Iri mbox1 = new Iri("mailto:foo@example.org");
-        final Iri resource1 = new Iri("http://example.org/");
+        IRI mbox1 = new IRI("mailto:foo@example.org");
+        final IRI resource1 = new IRI("http://example.org/");
         mGraph.add(new TripleImpl(resource1, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(resource1, RDFS.comment,
                 new PlainLiteralImpl("a comment")));
-        final Iri resource2 = new Iri("http://2.example.org/");
+        final IRI resource2 = new IRI("http://2.example.org/");
         mGraph.add(new TripleImpl(resource2, FOAF.mbox, mbox1));
         mGraph.add(new TripleImpl(resource2, RDFS.comment,
                 new PlainLiteralImpl("another comment")));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
index 1e62180..c81547d 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
@@ -25,10 +25,10 @@ import junit.framework.Assert;
 
 import org.junit.Test;
 import org.apache.clerezza.commons.rdf.BlankNode;
-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.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import static org.junit.Assert.*;
@@ -42,7 +42,7 @@ public class RdfListTest {
     @Test
     public void listCreationAndAccess() {
         Graph tc = new SimpleGraph();
-        List<RdfTerm> list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        List<RDFTerm> list = new RdfList(new IRI("http://example.org/mytest"), tc);
         assertEquals(0, list.size());
         list.add(new PlainLiteralImpl("hello"));
         list.add(new PlainLiteralImpl("world"));
@@ -61,7 +61,7 @@ public class RdfListTest {
         assertEquals(5, list.size());
         assertEquals(new PlainLiteralImpl("hello"), list.get(1));
         assertEquals(new PlainLiteralImpl("interesting"), list.get(2));
-        List<RdfTerm> list2 = new RdfList(new Iri("http://example.org/mytest"), tc);
+        List<RDFTerm> list2 = new RdfList(new IRI("http://example.org/mytest"), tc);
         assertEquals(5, list2.size());
         assertEquals(new PlainLiteralImpl("hello"), list2.get(1));
         assertEquals(new PlainLiteralImpl("interesting"), list2.get(2));
@@ -87,12 +87,12 @@ public class RdfListTest {
     @Test
     public void listCreationAndAccess2() {
         Graph tc = new SimpleGraph();
-        List<RdfTerm> list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        List<RDFTerm> list = new RdfList(new IRI("http://example.org/mytest"), tc);
         assertEquals(0, list.size());
         list.add(0,new PlainLiteralImpl("world"));
-        list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        list = new RdfList(new IRI("http://example.org/mytest"), tc);
         list.add(0,new PlainLiteralImpl("beautifuly"));
-        list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        list = new RdfList(new IRI("http://example.org/mytest"), tc);
         list.add(0,new PlainLiteralImpl("hello"));
         assertEquals(new PlainLiteralImpl("hello"), list.get(0));
         assertEquals(new PlainLiteralImpl("beautifuly"), list.get(1));
@@ -102,7 +102,7 @@ public class RdfListTest {
     @Test
     public void listCreationAndAccess3() {
         Graph tc = new SimpleGraph();
-        List<RdfTerm> list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        List<RDFTerm> list = new RdfList(new IRI("http://example.org/mytest"), tc);
         assertEquals(0, list.size());
         BlankNode node0 = new BlankNode() {};
         BlankNode node1 = new BlankNode() {};
@@ -118,7 +118,7 @@ public class RdfListTest {
     @Test
     public void secondButLastElementAccessTest() {
         Graph tc = new SimpleGraph();
-        List<RdfTerm> list = new RdfList(new Iri("http://example.org/mytest2"), tc);
+        List<RDFTerm> list = new RdfList(new IRI("http://example.org/mytest2"), tc);
         list.add(new PlainLiteralImpl("hello"));
         list.add(new PlainLiteralImpl("world"));
         list.remove(1);
@@ -128,7 +128,7 @@ public class RdfListTest {
     @Test
     public void cleanGraphAfterRemoval() {
         Graph tc = new SimpleGraph();
-        List<RdfTerm> list = new RdfList(new Iri("http://example.org/mytest"), tc);
+        List<RDFTerm> list = new RdfList(new IRI("http://example.org/mytest"), tc);
         list.add(new PlainLiteralImpl("hello"));
         list.add(new PlainLiteralImpl("world"));
         list.remove(1);
@@ -139,8 +139,8 @@ public class RdfListTest {
     @Test
     public void findContainingListNodesAndfindContainingListsTest() {
         Graph tc = new SimpleGraph();
-        GraphNode listA = new GraphNode(new Iri("http:///listA"), tc);
-        GraphNode listB = new GraphNode(new Iri("http:///listB"), tc);
+        GraphNode listA = new GraphNode(new IRI("http:///listA"), tc);
+        GraphNode listB = new GraphNode(new IRI("http:///listB"), tc);
         BlankNode element1 = new BlankNode();
         BlankNode element2 = new BlankNode();
         BlankNode element3 = new BlankNode();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
index 8512695..fc44ec2 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
@@ -23,7 +23,7 @@ import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 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.commons.rdf.IRI;
 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.TripleImpl;
@@ -40,8 +40,8 @@ import org.junit.Test;
  */
 public class SameAsSmushTest {
     
-    private final Iri uriA = new Iri("http://example.org/A");
-    private final Iri uriB = new Iri("http://example.org/B");
+    private final IRI uriA = new IRI("http://example.org/A");
+    private final IRI uriB = new IRI("http://example.org/B");
     private final Literal lit = new PlainLiteralImpl("That's me (and you)");
 
     private Graph sameAsStatements = new SimpleGraph();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
index 45e2547..4386039 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
@@ -28,9 +28,9 @@ import org.junit.Test;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 import org.apache.clerezza.commons.rdf.Graph;
-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.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 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.TripleImpl;
@@ -47,8 +47,8 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
-        Iri property2 = new Iri("http://example.org/property2");
+        IRI property1 = new IRI("http://example.org/property1");
+        IRI property2 = new IRI("http://example.org/property2");
         g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("literal")));
         g.add(new TripleImpl(bNode1, property2, property1));
         g.add(new TripleImpl(bNode2, property2, bNode1));
@@ -66,7 +66,7 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
+        IRI property1 = new IRI("http://example.org/property1");
         GraphNode n = new GraphNode(bNode1, g);
         n.addProperty(property1, bNode2);
         Assert.assertEquals(1, g.size());
@@ -78,10 +78,10 @@ public class TestGraphNode {
         for (int j = 0; j < 200; j++) {
             Triple randomTriple = graph.getRandomTriple();
             GraphNode node = new GraphNode(randomTriple.getSubject(), graph);
-            Iterator<Iri> properties = node.getProperties();
+            Iterator<IRI> properties = node.getProperties();
             while (properties.hasNext()) {
-                Iri property = properties.next();
-                Set<RdfTerm> objects = createSet(node.getObjects(property));
+                IRI property = properties.next();
+                Set<RDFTerm> objects = createSet(node.getObjects(property));
                 Iterator<GraphNode> objectNodes = node.getObjectNodes(property);
                 while (objectNodes.hasNext()) {
                     GraphNode graphNode = objectNodes.next();
@@ -93,10 +93,10 @@ public class TestGraphNode {
         for (int j = 0; j < 200; j++) {
             Triple randomTriple = graph.getRandomTriple();
             GraphNode node = new GraphNode(randomTriple.getObject(), graph);
-            Iterator<Iri> properties = node.getProperties();
+            Iterator<IRI> properties = node.getProperties();
             while (properties.hasNext()) {
-                Iri property = properties.next();
-                Set<RdfTerm> subjects = createSet(node.getSubjects(property));
+                IRI property = properties.next();
+                Set<RDFTerm> subjects = createSet(node.getSubjects(property));
                 Iterator<GraphNode> subjectNodes = node.getSubjectNodes(property);
                 while (subjectNodes.hasNext()) {
                     GraphNode graphNode = subjectNodes.next();
@@ -111,11 +111,11 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
-        Iri property2 = new Iri("http://example.org/property2");
-        Iri property3 = new Iri("http://example.org/property3");
-        Iri property4 = new Iri("http://example.org/property4");
-        ArrayList<Iri> props = new ArrayList<Iri>();
+        IRI property1 = new IRI("http://example.org/property1");
+        IRI property2 = new IRI("http://example.org/property2");
+        IRI property3 = new IRI("http://example.org/property3");
+        IRI property4 = new IRI("http://example.org/property4");
+        ArrayList<IRI> props = new ArrayList<IRI>();
         props.add(property1);
         props.add(property2);
         props.add(property3);
@@ -125,11 +125,11 @@ public class TestGraphNode {
         n.addProperty(property2, bNode2);
         n.addProperty(property3, bNode2);
         n.addProperty(property4, bNode2);
-        Iterator<Iri> properties = n.getProperties();
+        Iterator<IRI> properties = n.getProperties();
         int i = 0;
         while(properties.hasNext()){
             i++;
-            Iri prop = properties.next();
+            IRI prop = properties.next();
             Assert.assertTrue(props.contains(prop));
             props.remove(prop);
         }
@@ -143,8 +143,8 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
-        Iri property2 = new Iri("http://example.org/property2");
+        IRI property1 = new IRI("http://example.org/property1");
+        IRI property2 = new IRI("http://example.org/property2");
         //the two properties two be deleted
         g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("literal")));
         g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("bla bla")));
@@ -162,8 +162,8 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
-        Iri property2 = new Iri("http://example.org/property2");
+        IRI property1 = new IRI("http://example.org/property1");
+        IRI property2 = new IRI("http://example.org/property2");
         //the properties two be deleted
         g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("literal")));
         //this 4 properties should stay
@@ -182,9 +182,9 @@ public class TestGraphNode {
         BlankNode bNode1 = new BlankNode();
         BlankNode bNode2 = new BlankNode();
         BlankNode newBnode = new BlankNode();
-        Iri property1 = new Iri("http://example.org/property1");
-        Iri property2 = new Iri("http://example.org/property2");
-        Iri newIri = new Iri("http://example.org/newName");
+        IRI property1 = new IRI("http://example.org/property1");
+        IRI property2 = new IRI("http://example.org/property2");
+        IRI newIri = new IRI("http://example.org/newName");
         Literal literal1 = new PlainLiteralImpl("literal");
         Literal literal2 = new PlainLiteralImpl("bla bla");
 
@@ -250,7 +250,7 @@ public class TestGraphNode {
         Graph g = new SimpleGraph();
         BlankNode bNode1 = new BlankNode() {};
         BlankNode bNode2 = new BlankNode() {};
-        Iri property1 = new Iri("http://example.org/property1");
+        IRI property1 = new IRI("http://example.org/property1");
         GraphNode n = new GraphNode(bNode1, g);
         n.addProperty(property1, bNode2);
         Assert.assertTrue(n.equals(new GraphNode(bNode1, g)));
@@ -259,10 +259,10 @@ public class TestGraphNode {
         Assert.assertFalse(n.equals(n2));
     }
 
-    private Set<RdfTerm> createSet(Iterator<? extends RdfTerm> resources) {
-        Set<RdfTerm> set = new HashSet<RdfTerm>();
+    private Set<RDFTerm> createSet(Iterator<? extends RDFTerm> resources) {
+        Set<RDFTerm> set = new HashSet<RDFTerm>();
         while (resources.hasNext()) {
-            RdfTerm resource = resources.next();
+            RDFTerm resource = resources.next();
             set.add(resource);
         }
         return set;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
index 8069438..53173f4 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
 import org.apache.clerezza.commons.rdf.BlankNode;
 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.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.junit.Assert;
@@ -34,14 +34,14 @@ import org.junit.Assert;
  */
 public class UnionGraphTest {
 
-    private final Iri uriRef1 =
-            new Iri("http://example.org/ontology#res1");
-    private final Iri uriRef2 =
-            new Iri("http://example.org/ontology#res2");
-    private final Iri uriRef3 =
-            new Iri("http://example.org/ontology#res3");
-    private final Iri uriRef4 =
-            new Iri("http://example.org/ontology#res4");
+    private final IRI uriRef1 =
+            new IRI("http://example.org/ontology#res1");
+    private final IRI uriRef2 =
+            new IRI("http://example.org/ontology#res2");
+    private final IRI uriRef3 =
+            new IRI("http://example.org/ontology#res3");
+    private final IRI uriRef4 =
+            new IRI("http://example.org/ontology#res4");
 
     @Test
     public void readAccess() {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
index 22a5385..f2d2539 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
@@ -24,7 +24,7 @@ import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Literal;
 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.commons.rdf.IRI;
 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.TripleImpl;
@@ -41,9 +41,9 @@ import org.junit.Test;
  */
 public class SameAsSmushTest {
     
-    private final Iri uriA = new Iri("http://example.org/A");
-    private final Iri uriB = new Iri("http://example.org/B");
-    private final Iri uriC = new Iri("http://example.org/C");
+    private final IRI uriA = new IRI("http://example.org/A");
+    private final IRI uriB = new IRI("http://example.org/B");
+    private final IRI uriC = new IRI("http://example.org/C");
     
     private final Literal lit = new PlainLiteralImpl("That's me (and you)");
 
@@ -64,7 +64,7 @@ public class SameAsSmushTest {
         SameAsSmusher smusher = new SameAsSmusher() {
 
             @Override
-            protected Iri getPreferedIri(Set<Iri> uriRefs) {
+            protected IRI getPreferedIri(Set<IRI> uriRefs) {
                 if (!uriRefs.contains(uriA)) throw new RuntimeException("not the set we excpect");
                 if (!uriRefs.contains(uriB)) throw new RuntimeException("not the set we excpect");
                 return uriC;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
index 2619e14..ea34a4f 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
@@ -47,7 +47,7 @@ import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 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.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -105,7 +105,7 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
         }
     }
 
-    private String getTcFileName(Iri tcUri, String extension,
+    private String getTcFileName(IRI tcUri, String extension,
             Map<String, Integer> fileNameCount) {
         String fileName = tcUri.getUnicodeString();
         fileName = fileName.substring(fileName.lastIndexOf("/")+1);
@@ -128,10 +128,10 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
 
             compressedTcs.putNextEntry(new ZipEntry(folder));
 
-            Set<Iri> tripleCollections = tcManager.listGraphs();
-            Iterator<Iri> tcIris = tripleCollections.iterator();
+            Set<IRI> tripleCollections = tcManager.listGraphs();
+            Iterator<IRI> tcIris = tripleCollections.iterator();
             while (tcIris.hasNext()) {
-                Iri tcUri = tcIris.next();
+                IRI tcUri = tcIris.next();
                 String fileName = folder + getTcFileName(tcUri, ".nt",
                         fileNameCount);
                 Graph tripleCollection = tcManager.getGraph(tcUri);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
index 7f3d8f5..98e1aee 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
@@ -32,7 +32,7 @@ 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;
-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.commons.rdf.impl.utils.simple.SimpleGraph;
@@ -60,7 +60,7 @@ public class Delete {
 
     
     @POST
-    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") IRI graphName) {
         tcManager.deleteGraph(graphName);
         return RedirectUtil.createSeeOtherResponse("./", uriInfo);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
index 4ae100b..fadd9be 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
@@ -41,7 +41,7 @@ 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;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -74,7 +74,7 @@ public class GraphManagement implements GlobalMenuItemsProvider {
     protected void activate(ComponentContext componentContext) {
         URL templateURL = getClass().getResource("graph-management.ssp");
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new Iri(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
+                new IRI(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
                 "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }
 
@@ -84,8 +84,8 @@ public class GraphManagement implements GlobalMenuItemsProvider {
         TrailingSlash.enforcePresent(uriInfo);
         final SimpleGraph resultGraph = new SimpleGraph();
         GraphNode graphNode = new GraphNode(new BlankNode(), resultGraph);
-        Set<Iri> tripleCollections = tcManager.listGraphs();
-        for (Iri uriRef : tripleCollections) {
+        Set<IRI> tripleCollections = tcManager.listGraphs();
+        for (IRI uriRef : tripleCollections) {
             graphNode.addProperty(GRAPHMANAGEMENT.tripleCollection, uriRef);
             final Graph tripleCollection = tcManager.getGraph(uriRef);
             resultGraph.add(new TripleImpl(uriRef,GRAPHMANAGEMENT.size,

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
index a5c4a33..728be7a 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
@@ -38,7 +38,7 @@ import org.apache.clerezza.commons.rdf.Literal;
 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.IRI;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
@@ -130,7 +130,7 @@ public class Restorer {
                 Graph mGraph;
                 boolean created = false;
                 try {
-                    mGraph = target.getGraph((Iri)graphGN.getNode());
+                    mGraph = target.getGraph((IRI)graphGN.getNode());
                     try {
                         mGraph.clear();
                     } catch (UnsupportedOperationException ex) {
@@ -139,7 +139,7 @@ public class Restorer {
                         continue;
                     }
                 } catch (NoSuchEntityException ex) {
-                    mGraph = target.createGraph((Iri)graphGN.getNode());
+                    mGraph = target.createGraph((IRI)graphGN.getNode());
                     created = true;
                 }
                 try {
@@ -158,7 +158,7 @@ public class Restorer {
                 String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
                 Graph extracted = extractedTc.get(fileName);
                 try {
-                    target.deleteGraph((Iri)graphGN.getNode());
+                    target.deleteGraph((IRI)graphGN.getNode());
                 } catch (UnsupportedOperationException ex) {
                     log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
                             + "collection could not be deleted");
@@ -166,7 +166,7 @@ public class Restorer {
                 } catch (NoSuchEntityException ex) {
                     log.debug("could not remove "+graphGN.getNode()+", no such entity");
                 }
-                target.createImmutableGraph((Iri)graphGN.getNode(), extracted);
+                target.createImmutableGraph((IRI)graphGN.getNode(), extracted);
             }
         }
         for (Map.Entry<String, Graph> pathTcPair : extractedTc.entrySet()) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
index e596520..475f6f2 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
@@ -47,8 +47,8 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Language;
-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.IRI;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
@@ -153,15 +153,15 @@ public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet>
 
 
     /**
-     * Helper: creates value element from {@link RdfTerm} depending on its
+     * Helper: creates value element from {@link RDFTerm} depending on its
      * class
      *
      */
-    private Element createValueElement(RdfTerm resource, Document doc) {
+    private Element createValueElement(RDFTerm resource, Document doc) {
         Element value = null;
-        if (resource instanceof Iri) {
+        if (resource instanceof IRI) {
             value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((Iri) resource)
+            value.appendChild(doc.createTextNode(((IRI) resource)
                     .getUnicodeString()));
         } else if (resource instanceof Literal) {
             value = doc.createElement("literal");
@@ -191,8 +191,7 @@ public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet>
         for (Variable key : keys) {
             Element bindingElement = doc.createElement("binding");
             bindingElement.setAttribute("name", key.getName());
-            bindingElement.appendChild(createValueElement(
-                    (RdfTerm) solutionMap.get(key), doc));
+            bindingElement.appendChild(createValueElement((RDFTerm) solutionMap.get(key), doc));
             result.appendChild(bindingElement);
         }
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
index 6194ca8..a6877bf 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
@@ -31,7 +31,7 @@ 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;
-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.commons.rdf.impl.utils.simple.SimpleGraph;
@@ -53,7 +53,7 @@ import org.osgi.service.component.ComponentContext;
 @Property(name="javax.ws.rs", boolValue=true)
 @Path("/admin/graphs/smush")
 public class Smush {
-    private final Iri tBoxName = new Iri("urn:x-localinstance:/tbox.graph");
+    private final IRI tBoxName = new IRI("urn:x-localinstance:/tbox.graph");
 
     @Reference
     private TcManager tcManager;
@@ -80,7 +80,7 @@ public class Smush {
 
     
     @POST
-    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") IRI graphName) {
         Graph mGraph = tcManager.getGraph(graphName);
         Smusher.smush(mGraph, tBox);
         return RedirectUtil.createSeeOtherResponse("./", uriInfo);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
index e63e018..0ddc042 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
@@ -65,9 +65,9 @@ import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.Language;
 import org.apache.clerezza.commons.rdf.Graph;
-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.commons.rdf.impl.utils.simple.SimpleGraph;
@@ -114,7 +114,7 @@ public class SparqlEndpoint {
     protected void activate(ComponentContext componentContext) {
         URL templateURL = getClass().getResource("sparql-endpoint.ssp");
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new Iri(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
+                new IRI(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
                 null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }
 
@@ -124,8 +124,8 @@ public class SparqlEndpoint {
         AccessController.checkPermission(new SparqlEndpointAccessPermission());
         TrailingSlash.enforceNotPresent(uriInfo);
         GraphNode graphNode = new GraphNode(new BlankNode(), new SimpleGraph());
-        Set<Iri> tripleCollections = tcManager.listGraphs();
-        for (Iri uriRef : tripleCollections) {
+        Set<IRI> tripleCollections = tcManager.listGraphs();
+        for (IRI uriRef : tripleCollections) {
             graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
         }
         graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
@@ -143,7 +143,7 @@ public class SparqlEndpoint {
      * @param queryString
      *            URL encoded sparql query
      * @param defaultGraphUri
-     *            URI of the default graph, an {@link Iri} is expected
+     *            URI of the default graph, an {@link IRI} is expected
      * @param applyStyleSheet
      * @param serverSide
      * @param styleSheetUri 
@@ -151,7 +151,7 @@ public class SparqlEndpoint {
      */
     @POST
     public Object runFormQuery(@FormParam("query") String queryString,
-            @FormParam("default-graph-uri") Iri defaultGraphUri,
+            @FormParam("default-graph-uri") IRI defaultGraphUri,
             @FormParam("apply-style-sheet") String applyStyleSheet,
             @FormParam("server-side") String serverSide,
             @FormParam("style-sheet-uri") String styleSheetUri) {
@@ -174,7 +174,7 @@ public class SparqlEndpoint {
         try {
             if (defaultGraphUri == null
                     || defaultGraphUri.getUnicodeString().equals("")) {
-                defaultGraphUri = new Iri(Constants.CONTENT_GRAPH_URI_STRING);
+                defaultGraphUri = new IRI(Constants.CONTENT_GRAPH_URI_STRING);
                 //defaultGraph = contentGraph;
             } else {
                 //defaultGraph = tcManager.getTriples(defaultGraphUri);
@@ -224,7 +224,7 @@ public class SparqlEndpoint {
      */
     @GET
     public Object runGetQuery(@QueryParam("query") String queryString,
-            @QueryParam("default-graph-uri") Iri defaultGraphUri,
+            @QueryParam("default-graph-uri") IRI defaultGraphUri,
             @QueryParam("style-sheet-uri") String styleSheetUri,
             @QueryParam("server-side") String serverSide) {
         AccessController.checkPermission(new SparqlEndpointAccessPermission());
@@ -373,8 +373,7 @@ public class SparqlEndpoint {
             for (Variable key : keys) {
                 Element bindingElement = doc.createElement("binding");
                 bindingElement.setAttribute("name", key.getName());
-                bindingElement.appendChild(createValueElement(
-                        (RdfTerm) solutionMap.get(key), doc));
+                bindingElement.appendChild(createValueElement((RDFTerm) solutionMap.get(key), doc));
                 result.appendChild(bindingElement);
             }
         }
@@ -382,15 +381,15 @@ public class SparqlEndpoint {
     }
 
     /**
-     * Helper: creates value element from {@link RdfTerm} depending on its
+     * Helper: creates value element from {@link RDFTerm} depending on its
      * class
      * 
      */
-    private Element createValueElement(RdfTerm resource, Document doc) {
+    private Element createValueElement(RDFTerm resource, Document doc) {
         Element value = null;
-        if (resource instanceof Iri) {
+        if (resource instanceof IRI) {
             value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((Iri) resource)
+            value.appendChild(doc.createTextNode(((IRI) resource)
                     .getUnicodeString()));
         } else if (resource instanceof Literal) {
             value = doc.createElement("literal");

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
index 1369db8..eee056f 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
@@ -49,7 +49,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
@@ -82,7 +82,7 @@ public class WebAccess {
      * @return
      */
     @GET
-    public Graph getTriples(@QueryParam("name") Iri name) {
+    public Graph getTriples(@QueryParam("name") IRI name) {
         AccessController.checkPermission(new WebAccessPermission());
         if (name == null) {
             Response r = Response.status(Response.Status.BAD_REQUEST)
@@ -112,7 +112,7 @@ public class WebAccess {
      * @param triples
      */
     @PUT
-    public void putTriples(@QueryParam("name") Iri name, Graph triples) {
+    public void putTriples(@QueryParam("name") IRI name, Graph triples) {
         AccessController.checkPermission(new WebAccessPermission());
         Graph mGraph;
         try {
@@ -193,7 +193,7 @@ public class WebAccess {
         }
         InputStream is = new ByteArrayInputStream(graph);
         ImmutableGraph parsedGraph = parser.parse(is, mediaType.toString());
-        Iri graphUri = new Iri(graphName);
+        IRI graphUri = new IRI(graphName);
         Graph mGraph;
         boolean newGraph = false;
         try {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
index dbe5117..ca785be 100644
--- a/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
+++ b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
@@ -33,7 +33,7 @@ import org.apache.clerezza.commons.rdf.ImmutableGraph;
 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.IRI;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.access.TcProvider;
@@ -63,24 +63,24 @@ public class BackupAndRestoreTest {
     private static String testGraphFileName = "test.graph";
 
     private static Graph testGraph0 = new SimpleGraph();
-    private static Iri testGraphUri0 = // the URI of testGraph0
-            new Iri("http://localhost/test0/"+testGraphFileName);
+    private static IRI testGraphUri0 = // the URI of testGraph0
+            new IRI("http://localhost/test0/"+testGraphFileName);
     // a resource in testGraph0
-    private    static Iri uri0 = new Iri("http://localhost/test0/testuri");
+    private    static IRI uri0 = new IRI("http://localhost/test0/testuri");
 
     private static Graph testGraph1 = new SimpleGraph();
-    private static Iri testGraphUri1 = // the URI of testGraph1
-            new Iri("http://localhost/test1/"+testGraphFileName);
+    private static IRI testGraphUri1 = // the URI of testGraph1
+            new IRI("http://localhost/test1/"+testGraphFileName);
 
     // a resource in testGraph1
-    private    static Iri uri1 = new Iri("http://localhost/test1/testuri");
+    private    static IRI uri1 = new IRI("http://localhost/test1/testuri");
 
     private static ImmutableGraph testGraphA;
-    private static Iri testGraphUriA = // the URI of testGraphA
-            new Iri("http://localhost/testA/"+testGraphFileName);
+    private static IRI testGraphUriA = // the URI of testGraphA
+            new IRI("http://localhost/testA/"+testGraphFileName);
 
     // a resource in testGraphA
-    private    static Iri uriA = new Iri("http://localhost/testA/testuri");
+    private    static IRI uriA = new IRI("http://localhost/testA/testuri");
     
 
     private static String backupContentFileName = "triplecollections.nt";
@@ -227,7 +227,7 @@ public class BackupAndRestoreTest {
 
         // Associates testGraphUri0 with testGraph0 and testGraphUri1 with testGraph1
         @Override
-        public Graph getGraph(Iri name) throws NoSuchEntityException {
+        public Graph getGraph(IRI name) throws NoSuchEntityException {
             if (name.equals(testGraphUri0)) {
                 return testGraph0;
             } else if (name.equals(testGraphUri1)) {
@@ -239,8 +239,8 @@ public class BackupAndRestoreTest {
         }
 
         @Override
-        public Set<Iri> listGraphs() {
-            Set<Iri> result = new HashSet<Iri>();
+        public Set<IRI> listGraphs() {
+            Set<IRI> result = new HashSet<IRI>();
             result.add(testGraphUri0);
             result.add(testGraphUri1);
             result.add(testGraphUriA);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
index 883bcd1..e505452 100644
--- a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
+++ b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
@@ -26,9 +26,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-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.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -61,10 +61,10 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
     }
 
     public static class PropertyKey {
-        private Iri property;
+        private IRI property;
         private boolean reverse;
         
-        public PropertyKey(Iri property, boolean reverse) {
+        public PropertyKey(IRI property, boolean reverse) {
             super();
             this.property = property;
             this.reverse = reverse;
@@ -101,7 +101,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
 
         
     }
-    private static final Iri RDF_NIL = new Iri(
+    private static final IRI RDF_NIL = new IRI(
             "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
     private RenderingFunctions renderingFunctions;
 
@@ -134,17 +134,17 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
     private class ExpandedNode {
 
         private GraphNode node;
-        private RdfTerm value;
+        private RDFTerm value;
         private Map<PropertyKey, List<ExpandedNode>> children;
-        private List<RdfTerm> list = null;
+        private List<RDFTerm> list = null;
 
-        private ExpandedNode(RdfTerm value) {
+        private ExpandedNode(RDFTerm value) {
             this.value = value;
             final Graph tc = expandedNode.node.getGraph();
             doListInitialization(tc);
         }
 
-        private ExpandedNode(GraphNode node, RdfTerm value) {
+        private ExpandedNode(GraphNode node, RDFTerm value) {
             this.value = value;
             this.node = node;
             doListInitialization(node.getGraph());
@@ -154,11 +154,10 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
          * @param tc
          */
         private void doListInitialization(Graph tc) {
-            if (value instanceof BlankNodeOrIri) {        
-                if ((tc.filter((BlankNodeOrIri) value, RDF.rest, null).hasNext())
-                        || (tc.filter(
-                        (BlankNodeOrIri) value, OWL.sameAs, RDF_NIL).hasNext())) {
-                    list = new RdfList((BlankNodeOrIri) value, tc);
+            if (value instanceof BlankNodeOrIRI) {        
+                if ((tc.filter((BlankNodeOrIRI) value, RDF.rest, null).hasNext())
+                        || (tc.filter((BlankNodeOrIRI) value, OWL.sameAs, RDF_NIL).hasNext())) {
+                    list = new RdfList((BlankNodeOrIRI) value, tc);
                 }
             }
         }
@@ -207,7 +206,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
                 inverseResolve = false;
             }
             String uriString = getUriFromCuri(fieldName);
-            Iri property = new Iri(uriString);
+            IRI property = new IRI(uriString);
             List<ExpandedNode> childList = getChildList(property, inverseResolve);
             if (arrayPos.length == 0) {
                 arrayPos = new int[1];
@@ -226,7 +225,7 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
 
         }
 
-        private List<ExpandedNode> getChildList(Iri property, boolean inverseResolve) {
+        private List<ExpandedNode> getChildList(IRI property, boolean inverseResolve) {
             PropertyKey propertyKey = new PropertyKey(property, inverseResolve); 
             List<ExpandedNode> result;
             if (children == null) {
@@ -238,16 +237,16 @@ public class GraphNodeDataFieldResolver extends DataFieldResolver {
             if (result == null) {
                 result = new ArrayList<ExpandedNode>();
                 if (node == null) {
-                    node = new GraphNode((BlankNodeOrIri) value, expandedNode.node.getGraph());
+                    node = new GraphNode((BlankNodeOrIRI) value, expandedNode.node.getGraph());
                 }
                 if (inverseResolve) {
-                    Iterator<BlankNodeOrIri> subjects = node.getSubjects(property);
+                    Iterator<BlankNodeOrIRI> subjects = node.getSubjects(property);
                     while (subjects.hasNext()) {
                         ExpandedNode childNode = new ExpandedNode(subjects.next());
                         result.add(childNode);
                     }
                 } else {
-                    Iterator<RdfTerm> objects = node.getObjects(property);
+                    Iterator<RDFTerm> objects = node.getObjects(property);
                     while (objects.hasNext()) {
                         ExpandedNode childNode = new ExpandedNode(objects.next());
                         result.add(childNode);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
index c2903ef..c4b8fba 100644
--- a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
+++ b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
@@ -29,9 +29,9 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
-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.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -100,7 +100,7 @@ public class GraphNodeTest {
     @Test
     public void simple() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -117,8 +117,8 @@ public class GraphNodeTest {
     @Test
     public void inverse() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri subject = new Iri("http://example.org/subject");
-        Iri object = new Iri("http://example.org/object");
+        BlankNodeOrIRI subject = new IRI("http://example.org/subject");
+        IRI object = new IRI("http://example.org/object");
         mGraph.add(new TripleImpl(subject, RDFS.comment, object));
         GraphNode node = new GraphNode(object, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -134,7 +134,7 @@ public class GraphNodeTest {
     @Test
     public void defaultFunction() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -168,7 +168,7 @@ public class GraphNodeTest {
     @Test
     public void simpleIriRoot() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new Iri("http://example.org/");
+        BlankNodeOrIRI resource = new IRI("http://example.org/");
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -184,7 +184,7 @@ public class GraphNodeTest {
     @Test
     public void simpleWithNoOp() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -201,7 +201,7 @@ public class GraphNodeTest {
     @Test
     public void simpleWithUppercase() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -218,7 +218,7 @@ public class GraphNodeTest {
     @Test
     public void simpleWithLiteralUppercase() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -235,7 +235,7 @@ public class GraphNodeTest {
     @Test
     public void simpleWithCombinedFunctions() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -252,7 +252,7 @@ public class GraphNodeTest {
     @Test
     public void multiple() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("another resource")));
@@ -270,7 +270,7 @@ public class GraphNodeTest {
     @Test
     public void fieldTest() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -287,7 +287,7 @@ public class GraphNodeTest {
     @Test
     public void fieldTest2() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
@@ -310,7 +310,7 @@ public class GraphNodeTest {
         try {
             ImmutableGraph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
             mGraph.addAll(deserializedGraph);
-            Iri document = new Iri("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
+            IRI document = new IRI("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
 
             Assert.assertTrue((mGraph.size() > 0));
 
@@ -346,7 +346,7 @@ public class GraphNodeTest {
         try {
             ImmutableGraph deserializedGraph = parser.parse(getClass().getResourceAsStream("libby-foaf.rdf"), "application/rdf+xml");
             mGraph.addAll(deserializedGraph);
-            Iri document = new Iri("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
+            IRI document = new IRI("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");
 
             Assert.assertTrue((mGraph.size() > 0));
 
@@ -381,12 +381,12 @@ public class GraphNodeTest {
     @Test
     public void rdfListAsPropertyValue() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
-        BlankNodeOrIri listNode = new BlankNode() {
+        BlankNodeOrIRI listNode = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode));
-        List<RdfTerm> list = new RdfList(listNode, mGraph);
+        List<RDFTerm> list = new RdfList(listNode, mGraph);
         list.add(new PlainLiteralImpl("first"));
         list.add(new PlainLiteralImpl("second"));
         list.add(new PlainLiteralImpl("third"));
@@ -405,9 +405,9 @@ public class GraphNodeTest {
     @Test
     public void rdfListAsRoot() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
-        List<RdfTerm> list = new RdfList(resource, mGraph);
+        List<RDFTerm> list = new RdfList(resource, mGraph);
         list.add(new PlainLiteralImpl("first"));
         list.add(new PlainLiteralImpl("second"));
         list.add(new PlainLiteralImpl("third"));
@@ -425,9 +425,9 @@ public class GraphNodeTest {
     @Test
     public void rdfListAsRootElementProperties() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
-        List<RdfTerm> list = new RdfList(resource, mGraph);
+        List<RDFTerm> list = new RdfList(resource, mGraph);
         list.add(createLabeledRes("first", mGraph));
         list.add(createLabeledRes("second", mGraph));
         list.add(createLabeledRes("third", mGraph));
@@ -446,9 +446,9 @@ public class GraphNodeTest {
     @Test
     public void rdfListAsRootElementPropertiesWithPresenceTest() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
-        List<RdfTerm> list = new RdfList(resource, mGraph);
+        List<RDFTerm> list = new RdfList(resource, mGraph);
         list.add(createLabeledRes("first", mGraph));
         list.add(createLabeledRes("second", mGraph));
         list.add(createLabeledRes("third", mGraph));
@@ -467,7 +467,7 @@ public class GraphNodeTest {
     @Test
     public void compareFunctionResultInIf() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode();
+        BlankNodeOrIRI resource = new BlankNode();
         mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
         GraphNode node = new GraphNode(resource, mGraph);
         DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
@@ -484,18 +484,18 @@ public class GraphNodeTest {
     @Test
     public void loopWithEmptyList() throws IOException {
         Graph mGraph = new SimpleGraph();
-        BlankNodeOrIri resource = new BlankNode() {
+        BlankNodeOrIRI resource = new BlankNode() {
         };
 
-        BlankNodeOrIri listNode1 = new BlankNode() {
+        BlankNodeOrIRI listNode1 = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode1));
-        List<RdfTerm> list1 = new RdfList(listNode1, mGraph);
+        List<RDFTerm> list1 = new RdfList(listNode1, mGraph);
         list1.add(new PlainLiteralImpl("first"));
         list1.add(new PlainLiteralImpl("second"));
         list1.add(new PlainLiteralImpl("third"));
 
-        BlankNodeOrIri listNode2 = new BlankNode() {
+        BlankNodeOrIRI listNode2 = new BlankNode() {
         };
         mGraph.add(new TripleImpl(resource, RDF.value, listNode2));
         RdfList.createEmptyList(listNode2, mGraph);
@@ -513,7 +513,7 @@ public class GraphNodeTest {
         Assert.assertEquals("\"first\"\"second\"\"third\"", writer.toString());
     }
 
-    private BlankNodeOrIri createLabeledRes(String label, Graph mGraph) {
+    private BlankNodeOrIRI createLabeledRes(String label, Graph mGraph) {
         BlankNode bNode = new BlankNode();
         Literal lit = new PlainLiteralImpl(label);
         mGraph.add(new TripleImpl(bNode, RDFS.label, lit));


[47/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
new file mode 100644
index 0000000..f3ac14e
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
@@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.clerezza.platform.concepts.ontologies.QUERYRESULT;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.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.Resource;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.OWL;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.ontologies.SKOS;
+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;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This JAX-RS resource can be used to search concepts accessible through
+ * registered {@link ConceptProvider}s. If no {@link LocalConceptProvider} is
+ * registered for {@link ConceptManipulator.FREE_CONCEPT_SCHEME}, then one is
+ * created to find free concepts in the content graph.
+ * Concept providers are prioritized.
+ * The URI, SKOS:prefLabel and RDFS:comment of a concept from a provider of a 
+ * higher priority will be used instead of those concepts having an OWL:sameAs
+ * relation with this concept, but from a provider of lower priority.
+ * Implicitly created {@link LocalConceptProvider} for free concepts has the
+ * lowest priority.
+ * 
+ * The URI path of this service is /concepts/find.
+ * 
+ * @author hasan
+ */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/concepts/find")
+public class ConceptsFinder {
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    @Reference
+    protected ConceptProviderManager conceptProviderManager;
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    private ContentGraphProvider cgProvider;
+
+    @Reference
+    private PlatformConfig platformConfig;
+
+    private LocalConceptProvider freeConceptProvider = null;
+
+    private UriRef freeConceptScheme = null;
+
+    protected void activate(ComponentContext context) throws URISyntaxException {
+        URL template = getClass().getResource("skos-collection-json.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(template.toURI().toString()),
+                SKOS.Collection, null,
+                MediaType.APPLICATION_JSON_TYPE, true);
+
+        freeConceptScheme =
+                new UriRef(platformConfig.getDefaultBaseUri().getUnicodeString()
+                + ConceptManipulator.FREE_CONCEPT_SCHEME);
+        freeConceptProvider = new LocalConceptProvider(tcManager, cgProvider,
+                freeConceptScheme);
+    }
+
+    /**
+     * Searches concepts for a specified search term. The actual search task
+     * is delegated to each {@link ConceptProvider} instance. The results from
+     * each {@link ConceptProvider} are merged into a single result graph.
+     * However, concepts from providers of lower priority are only considered if
+     * they are not staying in an OWL:sameAs relation with concepts from
+     * providers of higher priority.
+     * 
+     * @param searchTerm
+     *            The search term in form of a String.
+     * @return
+     *        A GraphNode containing the search results.
+     */
+    @GET
+    @Produces("application/rdf+json")
+    public GraphNode findConcepts(@QueryParam(value="searchTerm")
+            String searchTerm) {
+
+        boolean freeConceptProviderFound = false;
+
+        List<ConceptProvider> conceptProviderList = conceptProviderManager
+                .getConceptProviders();
+
+        MGraph resultMGraph = new SimpleMGraph();
+        GraphNode resultNode = new GraphNode(new BNode(), resultMGraph);
+        boolean first = true;
+        for (ConceptProvider cp : conceptProviderList) {
+            if (!freeConceptProviderFound) {
+                if (cp instanceof LocalConceptProvider) {
+                    if (((LocalConceptProvider) cp).getSelectedScheme().equals(
+                            freeConceptScheme)) {
+                        freeConceptProviderFound = true;
+                    }
+                }
+            }
+            retrieveConcepts(cp, first, resultNode, searchTerm);
+            if (first) {
+                first = false;
+            }
+        }
+        if (!freeConceptProviderFound && freeConceptProvider != null) {
+            retrieveConcepts(freeConceptProvider, first, resultNode, searchTerm);
+        }
+        addCreationOfNewFreeConceptSuggested(resultNode, searchTerm);
+        resultNode.addProperty(RDF.type, QUERYRESULT.QueryResult);
+        return resultNode;
+    }
+
+    /**
+     * Adds a boolean value that answers whether the UI shall suggest to create
+     * a new free concept. A new free concept may not be added if the has the
+     * same base uri and search term. Therefore the consumer shall be suggested
+     * not to propose creation.
+     * 
+     * @param resultNode
+     *            the result node to add the property to
+     * @param searchTerm
+     *            the search term the data was searched for
+     */
+    private void addCreationOfNewFreeConceptSuggested(GraphNode resultNode,
+            String searchTerm) {
+        UriRef conceptUriRef = ConceptManipulator.getConceptUriRef(
+                platformConfig, searchTerm);
+        resultNode.addProperty(QUERYRESULT.creationOfNewFreeConceptSuggested,
+                LiteralFactory.getInstance().createTypedLiteral(
+                        !cgProvider.getContentGraph().contains(
+                                new TripleImpl(conceptUriRef, RDF.type,
+                                        SKOS.Concept))));
+    }
+
+    /**
+     * Retrieve concepts for the given search term.
+     * 
+     * @param conceptProvider
+     *            the provider delivers concepts
+     * @param first
+     *            is this the first execution
+     * @param resultNode
+     *            the node to attach the concepts to
+     * @param searchTerm
+     *            the search term that the concepts have to match against
+     */
+    private void retrieveConcepts(ConceptProvider conceptProvider,
+            boolean first, GraphNode resultNode, String searchTerm) {
+        MGraph resultMGraph = (MGraph) resultNode.getGraph();
+        Graph graph = conceptProvider.retrieveConcepts(searchTerm);
+        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
+        if (first) {
+            while (concepts.hasNext()) {
+                resultNode.addProperty(QUERYRESULT.concept, concepts.next()
+                        .getSubject());
+            }
+            resultMGraph.addAll(graph);
+        } else {
+            while (concepts.hasNext()) {
+                NonLiteral concept = concepts.next().getSubject();
+                GraphNode conceptGraphNode = new GraphNode(concept, graph);
+                Iterator<Resource> sameAsConcepts = conceptGraphNode
+                        .getObjects(OWL.sameAs);
+                if (!(hasSameAs(resultMGraph, concept) || hasAnyConcept(
+                        resultMGraph, sameAsConcepts))) {
+                    resultNode.addProperty(QUERYRESULT.concept, concept);
+                    addConceptToResultMGraph(resultMGraph, conceptGraphNode);
+                }
+
+            }
+        }
+    }
+
+    private boolean hasSameAs(MGraph graph, NonLiteral sameAsConcept) {
+        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
+        while (concepts.hasNext()) {
+            NonLiteral concept = concepts.next().getSubject();
+            if (graph.filter(concept, OWL.sameAs, sameAsConcept).hasNext()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean hasAnyConcept(MGraph graph, Iterator<Resource> concepts) {
+        while (concepts.hasNext()) {
+            NonLiteral concept = (NonLiteral) concepts.next();
+            if (graph.filter(concept, RDF.type, SKOS.Concept).hasNext()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void addConceptToResultMGraph(MGraph resultMGraph,
+            GraphNode graphNode) {
+        NonLiteral concept = (NonLiteral) graphNode.getNode();
+        resultMGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
+
+        Iterator<Literal> prefLabelStatements = graphNode.getLiterals(SKOS.prefLabel);
+        while (prefLabelStatements.hasNext()) {
+            resultMGraph.add(new TripleImpl(concept, SKOS.prefLabel,
+                    prefLabelStatements.next()));
+        }
+        Iterator<Literal> commentStatements = graphNode.getLiterals(RDFS.comment);
+        while (commentStatements.hasNext()) {
+            resultMGraph.add(new TripleImpl(concept, RDFS.comment,
+                    commentStatements.next()));
+        }
+        Iterator<UriRef> sameAsStatements = graphNode.getUriRefObjects(OWL.sameAs);
+        while (sameAsStatements.hasNext()) {
+            resultMGraph.add(new TripleImpl(concept, OWL.sameAs,
+                    sameAsStatements.next()));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
new file mode 100644
index 0000000..e96069e
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+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.utils.UriException;
+import org.apache.clerezza.web.fileserver.FileServer;
+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;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This JAX-RS resource can be used to show selected concepts of a resource.
+ * The URI path of this service is /concepts/generic-resource.
+ * 
+ * @author tio
+ */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/concepts/generic-resource")
+public class GenericResourcePage extends FileServer {
+
+    @Reference
+    protected ContentGraphProvider cgProvider;
+    @Reference
+    private RenderletManager renderletManager;
+
+    private RemoteConceptsDescriptionManager remoteConceptsDescriptionManager = null;
+
+    protected void activate(ComponentContext context)
+            throws URISyntaxException {
+        
+        configure(context.getBundleContext());
+        
+        URL template = getClass().getResource("generic-resource-page.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(template.toURI().toString()),
+                CONCEPTS.GenericResourcePage, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        remoteConceptsDescriptionManager = new RemoteConceptsDescriptionManager();
+    }
+
+    /**
+     * Retrieves a resource and its associated concepts to be rendered with a template
+     * registered for CONCEPTS.GenericResourcePage.
+     * 
+     * @param uri specifies the uri of a resource
+     * 
+     * @return GraphNode
+     */
+    @GET
+    public GraphNode GenericResourcePage(@QueryParam("uri") UriRef uri,
+            @Context UriInfo uriInfo) {
+
+        GraphNode node = new GraphNode(new BNode(), new UnionMGraph(new SimpleMGraph(),
+                cgProvider.getContentGraph(),
+                remoteConceptsDescriptionManager.getRemoteConceptsDescriptionMGraph()));
+        node.addProperty(RDF.type, PLATFORM.HeadedPage);
+        node.addProperty(RDF.type, CONCEPTS.GenericResourcePage);
+        if (uri != null) {
+            node.addProperty(CONCEPTS.resource, uri);
+        } else {
+            throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
+                    .entity("No resource uri defined.").build());
+        }
+        return node;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
new file mode 100644
index 0000000..4b96110
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+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.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.sparql.ParseException;
+import org.apache.clerezza.rdf.core.sparql.QueryParser;
+import org.apache.clerezza.rdf.core.sparql.query.ConstructQuery;
+
+/**
+ * This {@link ConceptProvider} operates on concepts available in the localhost.
+ *
+ * @author tio, hasan
+ */
+public class LocalConceptProvider implements ConceptProvider {
+
+    private TcManager tcManager = null;
+    private ContentGraphProvider contentGraphProvider = null;
+    private UriRef selectedScheme = null;
+
+    /**
+     * Constructs a {@link LocalConceptProvider} with the specified parameters.
+     *
+     * @param tcManager
+     *        Reference to the {@link TcManager}
+     * @param contentGraphProvider
+     *        Reference to a {@link ContentGraphProvider}
+     * @param selectedScheme
+     *        The scheme in which concepts are to be searched.
+     */
+    public LocalConceptProvider(TcManager tcManager,
+            ContentGraphProvider contentGraphProvider, UriRef selectedScheme) {
+        this.tcManager = tcManager;
+        this.contentGraphProvider = contentGraphProvider;
+        this.selectedScheme = selectedScheme;
+    }
+
+    public UriRef getSelectedScheme() {
+        return this.selectedScheme;
+    }
+
+    @Override
+    public Graph retrieveConcepts(String searchTerm) {
+        QueryParser queryParser = QueryParser.getInstance();
+
+        String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> " +
+                "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
+                "PREFIX skos: <http://www.w3.org/2008/05/skos#> " +
+                "CONSTRUCT {?concept a skos:Concept; skos:prefLabel ?prefLabel; " +
+                "rdfs:comment ?comment; owl:sameAs ?sameConcept .} " +
+                "WHERE {?concept skos:inScheme " + selectedScheme.toString() +
+                "; skos:prefLabel ?prefLabel . " +
+                "OPTIONAL { ?concept skos:altLabel ?altLabel .} " +
+                "OPTIONAL { ?concept rdfs:comment ?comment .} " +
+                "OPTIONAL { ?concept owl:sameAs ?sameConcept .} " +
+                "FILTER (REGEX(STR(?prefLabel), '" +
+                searchTerm + "', 'i') || REGEX(STR(?altLabel), '" +
+                searchTerm + "', 'i'))}";
+
+        ConstructQuery constructQuery;
+        try {
+            constructQuery = (ConstructQuery) queryParser.parse(query);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex);
+        }
+
+        MGraph defaultGraph = contentGraphProvider.getContentGraph();
+        return tcManager.executeSparqlQuery(constructQuery, defaultGraph);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
new file mode 100644
index 0000000..f933a53
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.ProtocolException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.Calendar;
+import java.util.Date;
+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.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+
+/**
+ * This implementation of {@link ConceptProvider} provides a functionality
+ * to query a SPARQL End Point for a given search term. The query is to be
+ * generated from a template by replacing the place holder for the search term
+ * with the specified search term.
+ *
+ * @author tio, hasan
+ */
+public class RemoteConceptProvider implements ConceptProvider {
+
+    private UriRef sparqlEndPoint = null;
+    private UriRef defaultGraph = null;
+    private String queryTemplate = null;
+    private ConceptCache conceptCache = null;
+    private RemoteConceptsDescriptionManager remoteConceptsDescriptionManager = null;
+
+    /**
+     * Constructs a {@link RemoteConceptProvider} with the specified parameters.
+     * 
+     * @param sparqlEndPoint
+     *        the SPARQL End Point to connect to
+     * @param defaultGraph
+     *        the Graph to query for concepts
+     * @param queryTemplate
+     *        the template for query containing place holders for the search term.
+     */
+    public RemoteConceptProvider(
+            UriRef sparqlEndPoint, UriRef defaultGraph, String queryTemplate) {
+        this.sparqlEndPoint = sparqlEndPoint;
+        this.defaultGraph = defaultGraph;
+        this.queryTemplate = queryTemplate;
+        this.conceptCache = new ConceptCache(sparqlEndPoint, defaultGraph);
+        this.remoteConceptsDescriptionManager = new RemoteConceptsDescriptionManager();
+    }
+
+    @Override
+    public Graph retrieveConcepts(String searchTerm) {
+
+        Calendar calendar = Calendar.getInstance();
+        calendar.add(Calendar.DAY_OF_MONTH, -30);
+        Date acceptableOldestCachingDate = calendar.getTime();
+        MGraph cachedConcepts = conceptCache.retrieve(searchTerm.toLowerCase(),
+                acceptableOldestCachingDate);
+        if (cachedConcepts != null) {
+            return cachedConcepts.getGraph();
+        } else {
+            final int connectionTimeout = 4000;
+            String query = queryTemplate.replace("${searchTerm}", searchTerm);
+            try {
+                String param = "query=" + URLEncoder.encode(query, "UTF-8");
+                if (defaultGraph != null) {
+                    param += "&default-graph-uri=" + defaultGraph.getUnicodeString();
+                }
+                final URL url = new URL(sparqlEndPoint.getUnicodeString());
+                final HttpURLConnection con =
+                        (HttpURLConnection) url.openConnection();
+                con.setRequestProperty("Accept", "application/rdf+xml");
+                con.setRequestMethod("POST");
+                con.setDoOutput(true);
+                con.setDoInput(true);
+                con.setUseCaches(false);
+                con.setConnectTimeout(connectionTimeout);
+
+                final OutputStream os = con.getOutputStream();
+                os.write(param.getBytes());
+                os.close();
+
+                if (con.getResponseCode() < 400) {
+                    final InputStream is = con.getInputStream();
+                    Graph parsedGraph = Parser.getInstance().parse(is,
+                            SupportedFormat.RDF_XML);
+                    is.close();
+                    conceptCache.cache(searchTerm.toLowerCase(), parsedGraph);
+                    remoteConceptsDescriptionManager.storeConceptsDescription(parsedGraph);
+                    return parsedGraph;
+                } else {
+                    final InputStream es = con.getErrorStream();
+                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                    for (int ch = es.read(); ch != -1; ch = es.read()) {
+                        baos.write(ch);
+                    }
+                    es.close();
+                    throw new RuntimeException(baos.toString());
+                }
+            } catch (ProtocolException ex) {
+                throw new RuntimeException(ex);
+            } catch (MalformedURLException ex) {
+                throw new RuntimeException(ex);
+            } catch (UnsupportedEncodingException ex) {
+                throw new RuntimeException(ex);
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
new file mode 100644
index 0000000..7932829
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptsDescriptionManager.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.util.Iterator;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.ontologies.SKOS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * This class stores description of concepts resulted from searches
+ * performed by {@link RemoteConceptProvider}s.
+ *
+ * @author hasan
+ */
+public class RemoteConceptsDescriptionManager {
+
+    private UriRef REMOTE_CONCEPTS_DESCRIPTION_MGRAPH =
+            new UriRef("urn:x-localinstance:/remote.concepts.description");
+
+    /**
+     * Stores SKOS:prefLabel and RDFS.comment of concepts available in the
+     * specified Graph.
+     *
+     * @param graph
+     *        the Graph which contains concepts and their descriptions.
+     */
+    void storeConceptsDescription(Graph graph) {
+        MGraph remoteConceptsDescriptionMGraph =
+                getRemoteConceptsDescriptionMGraph();
+
+        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
+        while (concepts.hasNext()) {
+            UriRef concept = (UriRef) concepts.next().getSubject();
+            copyConceptDescription(new GraphNode(concept, graph),
+                    new GraphNode(concept, remoteConceptsDescriptionMGraph));
+        }
+    }
+
+    /**
+     * This method creates an {@link MGraph} to store concepts' descriptions
+     * if this graph does not already exist.
+     *
+     * @return
+     *        an {@link MGraph}
+     */
+    public MGraph getRemoteConceptsDescriptionMGraph() {
+        MGraph remoteConceptsDescriptionMGraph = null;
+        TcManager tcManager = TcManager.getInstance();
+        try {
+            remoteConceptsDescriptionMGraph =
+                    tcManager.getMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
+        } catch (NoSuchEntityException nsee) {
+            remoteConceptsDescriptionMGraph =
+                    tcManager.createMGraph(REMOTE_CONCEPTS_DESCRIPTION_MGRAPH);
+        }
+        return remoteConceptsDescriptionMGraph;
+    }
+
+    private void copyConceptDescription(GraphNode sourceGraphNode,
+            GraphNode destinationGraphNode) {
+
+        destinationGraphNode.deleteNodeContext();
+
+        Iterator<Literal> prefLabelStatements =
+                sourceGraphNode.getLiterals(SKOS.prefLabel);
+        if (prefLabelStatements.hasNext()) {
+            destinationGraphNode.addProperty(SKOS.prefLabel,
+                    prefLabelStatements.next());
+        }
+        Iterator<Literal> commentStatements =
+                sourceGraphNode.getLiterals(RDFS.comment);
+        while (commentStatements.hasNext()) {
+            destinationGraphNode.addProperty(RDFS.comment,
+                    commentStatements.next());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
new file mode 100644
index 0000000..3bff348
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ResourceTagger.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.List;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.ontologies.DCTERMS;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+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;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This JAX-RS resource can be used for adding concepts to a resource.
+ *
+ * The URI path of this service is /concepts/tagger.
+ *
+ * @author tio
+ */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/concepts/tagger/")
+public class ResourceTagger {
+
+    @Reference
+    protected ContentGraphProvider cgProvider;
+    @Reference
+    private ScalaServerPagesService scalaServerPagesService;
+
+    protected void activate(ComponentContext context)
+            throws URISyntaxException {
+
+        BundleContext bundleContext = context.getBundleContext();
+        URL template = getClass().getResource("concept-existing-subjects.ssp");
+
+        scalaServerPagesService.registerScalaServerPage(
+                template,
+                RDFS.Resource, "concept-existing-subjects-naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
+
+        template = getClass().getResource("concept-tagging.ssp");
+        scalaServerPagesService.registerScalaServerPage(
+                template,
+                RDFS.Resource, "concept-tagging-naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
+
+        template = getClass().getResource("concept-find-create.ssp");
+        scalaServerPagesService.registerScalaServerPage(
+                template,
+                RDFS.Resource, "concept-find-create-naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
+
+        template = getClass().getResource("selected-concepts.ssp");
+        scalaServerPagesService.registerScalaServerPage(
+                template,
+                RDFS.Resource, "selectedconcepts-naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, bundleContext);
+    }
+
+    /**
+     * Adds concepts to a resource. If parameters uri and
+     * concepts are not defined a response with code BAD_REQUEST is returned. If
+     * the relation is succefully added a redirect to /concepts/generic-resource with
+     * the UriRef of the resource as parameter.
+     *
+     * @param uri specifies the uri of a resource
+     * @param concepts specifies a list of concept uris.
+     *
+     * @return
+     *        A Response
+     */
+    @POST
+    @Path("set")
+    public Response updateConcepts(@FormParam("uri") UriRef uri,
+            @FormParam("concepts") List<String> concepts,
+            @Context UriInfo uriInfo) {
+
+        
+        if (uri != null) {
+            GraphNode node = new GraphNode(uri, cgProvider.getContentGraph());
+            node.deleteProperties(DCTERMS.subject);
+            if(concepts != null) {
+                for (String subject : concepts) {
+                    node.addProperty(DCTERMS.subject, new UriRef(subject));
+                }
+            }
+        } else {
+            throw new WebApplicationException(Response.status(
+                    Status.BAD_REQUEST).entity("No resource uri defined.").build());
+        }
+        return RedirectUtil.createSeeOtherResponse("/concepts/generic-resource?uri=" +
+                uri.getUnicodeString(), uriInfo);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
new file mode 100644
index 0000000..98ee7cc
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
@@ -0,0 +1,319 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+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;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+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.TcManager;
+import org.apache.clerezza.rdf.core.access.security.TcPermission;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+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.RdfList;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This service manages concept providers. Concept providers are prioritized.
+ *
+ * The URI path of this service is /concepts/provider-manager.
+ *
+ * @author hasan, tio
+ */
+@Component
+@Services({
+    @Service(Object.class),
+    @Service(ConceptProviderManager.class),
+    @Service(GlobalMenuItemsProvider.class)
+})
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/concepts/provider-manager")
+public class SimpleConceptProviderManager implements ConceptProviderManager,
+        GlobalMenuItemsProvider {
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    protected ContentGraphProvider cgProvider;
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    private List<ConceptProvider> conceptProviderList =
+            new ArrayList<ConceptProvider>();
+
+    /**
+     * The activate method is called when SCR activates the component
+     * configuration. 
+     * 
+     * @param context
+     * @throws IOException
+     * @throws URISyntaxException
+     */
+    protected void activate(ComponentContext context)
+            throws IOException,
+            URISyntaxException {
+
+        URL template = getClass().getResource("manage-concept-providers-page.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(template.toURI().toString()),
+                CONCEPTS.ManageConceptProvidersPage, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        instantiateConceptProviders();
+    }
+
+    protected void deactivate(ComponentContext context) {
+        conceptProviderList.clear();
+    }
+
+    private void instantiateConceptProviders() {
+        conceptProviderList.clear();
+        MGraph contentGraph = cgProvider.getContentGraph();
+
+        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
+        RdfList cpl = new RdfList(cplNode, contentGraph);
+        for (int i = 0; i < cpl.size(); i++) {
+            NonLiteral conceptProvider = (NonLiteral) cpl.get(i);
+            Iterator<Triple> conceptProviderTypes = contentGraph.filter(
+                    conceptProvider, RDF.type, null);
+            if (conceptProviderTypes.hasNext()) {
+                UriRef conceptProviderType = (UriRef) conceptProviderTypes.next().getObject();
+                if (conceptProviderType.equals(CONCEPTS.LocalConceptProvider)) {
+                    instantiateLocalConceptProvider(contentGraph, conceptProvider);
+                } else {
+                    instantiateRemoteConceptProvider(contentGraph, conceptProvider);
+                }
+            }
+        }
+    }
+
+    private NonLiteral getConceptProviderListNode(MGraph contentGraph) {
+        Iterator<Triple> triples = contentGraph.filter(null, RDF.type,
+                CONCEPTS.ConceptProviderList);
+        if (triples.hasNext()) {
+            return triples.next().getSubject();
+        }
+        NonLiteral cplNode = new BNode();
+        new RdfList(cplNode, contentGraph);
+        contentGraph.add(new TripleImpl(cplNode, RDF.type,
+                CONCEPTS.ConceptProviderList));
+        return cplNode;
+    }
+
+    private void instantiateLocalConceptProvider(MGraph contentGraph,
+            NonLiteral conceptProvider) {
+        Iterator<Triple> selectedSchemes = contentGraph.filter(
+                conceptProvider, CONCEPTS.selectedScheme, null);
+        if (selectedSchemes.hasNext()) {
+            UriRef selectedScheme = (UriRef) selectedSchemes.next().getObject();
+            conceptProviderList.add(new LocalConceptProvider(tcManager,
+                    cgProvider, selectedScheme));
+        }
+    }
+
+    private void instantiateRemoteConceptProvider(MGraph contentGraph,
+            NonLiteral conceptProvider) {
+        Iterator<Triple> endPoints = contentGraph.filter(
+                conceptProvider, CONCEPTS.sparqlEndPoint, null);
+        if (endPoints.hasNext()) {
+            UriRef sparqlEndPoint = (UriRef) endPoints.next().getObject();
+            Iterator<Triple> defaultGraphs = contentGraph.filter(
+                    conceptProvider, CONCEPTS.defaultGraph, null);
+            UriRef defaultGraph = null;
+            if (defaultGraphs.hasNext()) {
+                defaultGraph = (UriRef) defaultGraphs.next().getObject();
+            }
+            Iterator<Triple> queryTemplates = contentGraph.filter(
+                    conceptProvider, CONCEPTS.queryTemplate, null);
+            if (queryTemplates.hasNext()) {
+                TypedLiteral queryTemplate =
+                        (TypedLiteral) queryTemplates.next().getObject();
+                conceptProviderList.add(
+                        new RemoteConceptProvider(sparqlEndPoint,
+                        defaultGraph, queryTemplate.getLexicalForm()));
+            }
+        }
+    }
+
+    /**
+     * Returns a GraphNode containing a list of {@link ConceptProvider}s stored
+     * in the content graph to be managed. The order in the list represents
+     * the priority of the providers.
+     * This resource is accessible through a GET request on the URI sub-path
+     * "edit-concept-provider-list".
+     *
+     */
+    @GET
+    @Path("edit-concept-provider-list")
+    public GraphNode getProviderList(@Context UriInfo uriInfo) {
+        AccessController.checkPermission(
+                new ConceptProviderManagerAppPermission());
+        TrailingSlash.enforceNotPresent(uriInfo);
+        MGraph contentGraph = cgProvider.getContentGraph();
+        MGraph resultGraph = new SimpleMGraph();
+
+        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
+        GraphNode resultNode = new GraphNode(cplNode, resultGraph);
+
+        resultNode.addProperty(RDF.type, CONCEPTS.ManageConceptProvidersPage);
+        resultNode.addProperty(RDF.type, PLATFORM.HeadedPage);
+        return new GraphNode(resultNode.getNode(),
+                new UnionMGraph(resultGraph, contentGraph));
+    }
+
+    /**
+     * Allows the list of {@link ConceptProvider}s stored in the content graph
+     * to be updated with the list POSTed via the URI sub-path
+     * "update-concept-provider-list".
+     * The order in the list represents the priority of the providers.
+     *
+     * @param types
+     *        specify the type of each ConceptProvider: either a
+     *        LocalConceptProvider or a RemoteConceptProvider.
+     * @param sparqlEndPoints
+     *        the SPARQL EndPoint to connect to in case of a RemoteConceptProvider.
+     * @param defaultGraphs
+     *        the Graph to be queried in case of a RemoteConceptProvider.
+     * @param queryTemplates
+     *        the template for the query to be used in case of a RemoteConceptProvider.
+     * @param conceptSchemes
+     *        the concept scheme within which concepts are to be searched,
+     *        in case of a LocalConceptProvider.
+     * @return
+     *        - a 200 (OK) response if everything is fine.
+     *        - a 400 (BAD REQUEST) response if types parameter is undefined.
+     */
+    @POST
+    @Path("update-concept-provider-list")
+    public Response updateConceptProviders(
+            @FormParam("types") List<String> types,
+            @FormParam("sparqlEndPoints") List<String> sparqlEndPoints,
+            @FormParam("defaultGraphs") List<String> defaultGraphs,
+            @FormParam("queryTemplates") List<String> queryTemplates,
+            @FormParam("conceptSchemes") List<String> conceptSchemes) {
+
+        if (types == null) {
+            //types is null when all provider have been removed, processing empty list
+            types = new ArrayList<String>();
+        }
+        MGraph contentGraph = cgProvider.getContentGraph();
+        NonLiteral cplNode = getConceptProviderListNode(contentGraph);
+        GraphNode cplGraphNode = new GraphNode(cplNode, contentGraph);
+        cplGraphNode.deleteNodeContext();
+
+        cplNode = getConceptProviderListNode(contentGraph);
+        RdfList cpl = new RdfList(cplNode, contentGraph);
+
+        int length = types.size();
+        for (int i=0; i<length; i++) {
+            UriRef conceptProviderType = new UriRef(types.get(i));
+            BNode conceptProvider = new BNode();
+            contentGraph.add(new TripleImpl(conceptProvider, RDF.type,
+                    conceptProviderType));
+            if (conceptProviderType.equals(CONCEPTS.LocalConceptProvider)) {
+                contentGraph.add(new TripleImpl(conceptProvider,
+                        CONCEPTS.selectedScheme,
+                        new UriRef(conceptSchemes.get(i))));
+            } else {
+                contentGraph.add(new TripleImpl(conceptProvider,
+                        CONCEPTS.sparqlEndPoint,
+                        new UriRef(sparqlEndPoints.get(i))));
+                String defaultGraph = defaultGraphs.get(i);
+                if (!defaultGraph.trim().isEmpty()) {
+                    contentGraph.add(new TripleImpl(conceptProvider,
+                            CONCEPTS.defaultGraph,
+                            new UriRef(defaultGraph)));
+                }
+                contentGraph.add(new TripleImpl(conceptProvider,
+                        CONCEPTS.queryTemplate,
+                        LiteralFactory.getInstance().createTypedLiteral(
+                        queryTemplates.get(i))));
+            }
+            cpl.add(i, conceptProvider);
+        }
+        instantiateConceptProviders();
+        return Response.status(Status.OK).build();
+    }
+
+    @Override
+    public List<ConceptProvider> getConceptProviders() {
+        return conceptProviderList;
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        try {
+            AccessController.checkPermission(
+                    new TcPermission("urn:x-localinstance:/content.graph",
+                    TcPermission.READWRITE));
+        } catch (AccessControlException e) {
+            return items;
+        }
+        try {
+            AccessController.checkPermission(
+                    new ConceptProviderManagerAppPermission());
+        } catch (AccessControlException e) {
+            return items;
+        }
+        items.add(new GlobalMenuItem("/concepts/provider-manager/edit-concept-provider-list",
+                "CPM", "Concept Providers", 5, "Administration"));
+        return items;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
new file mode 100644
index 0000000..67c4ee4
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-find-create.js
@@ -0,0 +1,21 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
new file mode 100644
index 0000000..67c4ee4
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/concept-provider-manipulation.js
@@ -0,0 +1,21 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
new file mode 100644
index 0000000..67c4ee4
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/scripts/selected-concepts.js
@@ -0,0 +1,21 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
new file mode 100644
index 0000000..67c4ee4
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/META-INF/static-web/concepts/style/form.css
@@ -0,0 +1,21 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
new file mode 100644
index 0000000..823cb97
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-existing-subjects.ssp
@@ -0,0 +1,29 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
+def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
+def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s);
+
+<form method="post" action="/concepts/tagger/set" id="selected-concepts-form">
+	<input type="hidden" name="uri" value={res/cpt("resource")*}></input>
+	{render(res/cpt("resource"), "selectedconcepts-naked")}
+</form>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
new file mode 100644
index 0000000..c0436d8
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-find-create.ssp
@@ -0,0 +1,61 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
+resultDocModifier.addScriptReference("/scripts/ajax-options.js");
+//resultDocModifier.addScriptReference("/scripts/modification-status.js");
+resultDocModifier.addScriptReference("/scripts/status-message.js");
+
+resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/concept-find-create.js");
+resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/jquery.rdfquery.core-1.0.js");
+
+resultDocModifier.addScriptReference("/scripts/alert-message.js");
+resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
+resultDocModifier.addScriptReference("/yui/2/element/element-min.js");
+resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
+resultDocModifier.addStyleSheet("/yui/2/container/assets/container-core.css");
+
+
+<div>Add Concepts</div>
+<form onsubmit="return ConceptFinder.search()" id="search-form">
+	<br/>
+	<input type="text" value="" name="search-term"/>
+	<a href="#" id="go-button" class="tx-icon tx-icon-search">Go</a>
+	<br/>
+	<br/>
+	<div id="system-found-concepts-area">
+		<div id="label-for-search-results">
+			Found Concepts:
+		</div>
+		<br/>
+		<div id="system-found-concepts"></div>
+	</div>
+	<br/>
+	<div id="user-defined-concept-area">
+		<div id="add-button-label"></div>
+		<div>Description (optional):</div>
+		<textarea rows="8" id="concept-description" name="comment"/>
+		<input type="hidden" value="en" name="lang"/>
+		<div>
+			<a href="#" class="tx-icon tx-icon-plus" id="add-user-defined-concept">Add</a>
+		</div>
+	</div>
+</form>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
new file mode 100644
index 0000000..a81d5a2
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/concept-tagging.ssp
@@ -0,0 +1,23 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+<div class="concept-tagging">{render(res,"concept-existing-subjects-naked")}
+{render(res,"concept-find-create-naked")}</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
new file mode 100644
index 0000000..e27759b
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/generic-resource-page.ssp
@@ -0,0 +1,43 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
+def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
+def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s);
+
+resultDocModifier.setTitle("Generic Resource Page");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Generic Resource Page</h1>);
+resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Resource</a></li>);
+resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="addButton" class="tx-button tx-button-create" href="#">Save</a></li>);
+
+<div id="tx-content">
+	<script type="text/javascript">
+		$(document).ready(function() {{
+			$("#addButton").click(function() {{
+				$("#selected-concepts-form").submit();
+			}});
+		}});
+	</script>
+	<h4>About: {res/cpt("resource")*}</h4>
+	<div><object width="80%" data={res/cpt("resource")*}></object></div>
+	<br/>
+	{render(res,"concept-tagging-naked")}
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
new file mode 100644
index 0000000..e0ef754
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/manage-concept-providers-page.ssp
@@ -0,0 +1,128 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
+def cpt(s: Any) = new UriRef("http://clerezza.org/2010/01/concepts#"+s)
+def lingvoj(s: Any) = new UriRef("http://www.lingvoj.org/ontology#"+s)
+def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
+def rdf(s: Any) = new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
+
+def createProvider(rdfType: String, selectedScheme: String, sparqlEndPoint: String, defaultGraph: String, query: String) =
+						<tr>
+							<td>
+								<input type="checkbox" value={rdfType}/>
+							</td>
+							<td>
+							<div>Provider:
+							</div>
+								{createSelection(!selectedScheme.equals(""))}
+							<br/>
+							<div>Concept Scheme:</div>
+							<input type="text" value={selectedScheme} name="conceptSchemes"/>
+							<div>SPARQL Endpoint:</div>
+							<input type="text" value={sparqlEndPoint} name="sparqlEndPoints"/>
+							<div>Default Graph:</div>
+							<input type="text" value={defaultGraph} name="defaultGraphs"/>
+							<div>Query Template:</div>
+							<textarea rows="8" name="queryTemplates">{query}</textarea>
+							<br/>
+							<br/>
+							</td>
+						</tr>
+
+
+def createSelection(isLocal: Boolean) = <select name="types">
+									{if(isLocal) {
+										<option value={cpt("LocalConceptProvider").getUnicodeString()} selected="selected">LocalConceptProvider</option>
+										<option value={cpt("RemoteConceptProvider").getUnicodeString()} >RemoteConceptProvider</option>
+									} else {
+										<option value={cpt("LocalConceptProvider").getUnicodeString()}>LocalConceptProvider</option>
+										<option value={cpt("RemoteConceptProvider").getUnicodeString()} selected="selected">RemoteConceptProvider</option>
+									}}
+						</select>
+
+resultDocModifier.addStyleSheet("/static/concepts/style/form.css");
+resultDocModifier.addScriptReference("/jquery/jquery.tooltip.pack.js");
+resultDocModifier.addScriptReference("/jquery/jquery.ajaxQueue.js");
+resultDocModifier.addScriptReference("/jquery/jquery.autocomplete.min.js");
+resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
+/*resultDocModifier.addScriptReference("/yui/2/container/assets/container-core.css");*/
+resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
+resultDocModifier.addScriptReference("/scripts/alert-message.js");
+resultDocModifier.addScriptReference("/scripts/ajax-options.js");
+resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/concept-provider-manipulation.js");
+resultDocModifier.setTitle("Resource Tagging");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Resource Tagging</h1>);
+
+resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="">Concept Providers Manager</a></li>);
+
+resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="deleteButton" class="tx-button tx-button-remove" href="#">Remove</a></li>);
+resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="addButton" class="tx-button tx-button-create" href="#">Save</a></li>);
+
+<div id="tx-content">
+	<div  class="tx-tree">
+		<form action="" id="providers" method="post">
+			<fieldset>
+				<table>
+					<thead>
+						<tr>
+							<th><a href="#"></a></th>
+							<th style="width: 95%"><a href="#"></a>Concept Providers</th>
+						</tr>
+					</thead>
+					<tbody>
+						{	for (provider <- (res!!)) yield {
+								if((provider/rdf("type")*).indexOf("LocalConceptProvider") != -1) {
+									createProvider((provider/rdf("type")*), provider/cpt("selectedScheme")*, "", "", "")
+								} else {
+									createProvider((provider/rdf("type")*), "", provider/cpt("sparqlEndPoint")*, provider/cpt("defaultGraph")*, provider/cpt("queryTemplate")*)
+								}
+							}
+						}
+						<tr id="last">
+							<td></td>
+							<td>
+								<div>Add Concept Provider:</div>
+								<select id="type">
+									<option value={cpt("LocalConceptProvider").getUnicodeString()}>LocalConceptProvider</option>
+									<option value={cpt("RemoteConceptProvider").getUnicodeString()}>RemoteConceptProvider</option>
+								</select>
+								<div>Concept Scheme:</div>
+								<input type="text" name="conceptScheme" id="conceptScheme"/>
+								<div>SPARQL Endpoint</div>
+								<input type="text" name="sparqlEndPoint" id="sparqlEndPoint" />
+								<div>Default Graph:</div>
+								<input type="text" name="defaultGraph" id="defaultGraph"/>
+								<div>Query Template:</div>
+								<textarea rows="8" id="query"/>
+								<br/>
+								<br/>
+								<div>
+									<a href="#" class="tx-icon tx-icon-ok" id="addProvider">Add</a>
+								</div>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</fieldset>
+		</form>
+	</div>
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
new file mode 100644
index 0000000..707c11a
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/selected-concepts.ssp
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
+def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
+
+resultDocModifier.addScriptReference("/concepts/generic-resource/scripts/selected-concepts.js");
+
+<div>
+	<div id="selected-concepts">
+		{for (concept <- (res/dct("subject"))) yield {
+		<div>
+			<div>PrefLabel: {concept/skos("prefLabel")*}</div>
+			<div>Uri: {concept*}</div>
+			<input type="hidden" name="concepts" value={concept*}></input>
+			<a href="#" class="tx-icon tx-icon-delete" >Remove</a>
+			<br />
+			<br />
+		</div>
+		}
+		}
+	</div>
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
new file mode 100644
index 0000000..5ee4663
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/skos-collection-json.ssp
@@ -0,0 +1,33 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+import org.json.simple.JSONObject
+
+def skos(s: Any) = new UriRef("http://www.w3.org/2008/05/skos#"+s)
+
+"{\"concepts\":" +
+	(for (concept <- (res/skos("member"))) yield {
+		"{" +
+			"\"prefLabel\":\"" + JSONObject.escape(concept/skos("prefLabel")*) + "\"," +
+			"\"uri\":\"" + JSONObject.escape(concept*) + "\"" +
+		"}"
+	}).mkString("[", ",", "]") +
+"}";

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
new file mode 100644
index 0000000..e31bd88
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/concept-find-create.js
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ * @author hasan, andre
+ */
+function ConceptFinder(){
+};
+
+ConceptFinder.callback;
+
+ConceptFinder.setAddConceptCallback = function(callback){
+	this.callback = callback;
+}
+
+/**
+ * Request the server concepts that match the search term in the input field "search-term"
+ */
+ConceptFinder.search = function(){
+	$("#system-found-concepts").empty();
+	var queryResult = null;
+	var searchTerm = $(":text[name=\"search-term\"]").val();
+	if (searchTerm.length > 0) {
+		var options = new AjaxOptions("find-concepts", "finding concepts", function(data){
+			var databank = $.rdf.databank();
+			var store = databank.load(data, {});
+			var query = $.rdf({
+				databank: store
+			});
+			query.prefix('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
+			query.prefix('concepts', 'http://clerezza.org/2010/01/concepts#');
+			query.prefix('rdfs', 'http://www.w3.org/2000/01/rdf-schema#');
+			query.prefix('qr', 'http://clerezza.org/2010/04/queryresult#');
+			var resultSet = query.where('?subject rdf:type qr:QueryResult');
+			if (resultSet.size() != 1) {
+				AlertMessage.show(function(){
+				}, "The query results did not match what's expected: exactly 1 result");
+			}
+			var queryResult = query.node(resultSet.get(0).subject);
+			var conceptProperty = $.rdf.resource("<http://clerezza.org/2010/04/queryresult#concept>");
+			var conceptProperties = queryResult.get(conceptProperty);
+			if (conceptProperties) {
+				ConceptFinder.addFoundConcepts(conceptProperties);
+			}
+			$("#add-button-label").html("<div>Add '" + searchTerm + "' as new Free Concept</div>");
+			$("#system-found-concepts-area").show();
+			var newFreeConceptProperty = $.rdf.resource("<http://clerezza.org/2010/04/queryresult#creationOfNewFreeConceptSuggested>");
+			var creationOfNewFreeConceptSuggested = queryResult.get(newFreeConceptProperty)[0].value.toString() == "true";
+			if (creationOfNewFreeConceptSuggested) {
+				$("#user-defined-concept-area").show();
+			} else {
+				$("#user-defined-concept-area").hide();
+			}
+		});
+		options.url = "/concepts/find";
+		options.data = "searchTerm=" + encodeURIComponent(searchTerm) + "&xPropObj=http://clerezza.org/2010/04/queryresult%23concept";
+		options.dataType = "json";
+		options.beforeSend = function(req){
+			req.setRequestHeader("Accept", "application/rdf+json");
+		};
+		
+		$.ajax(options);
+	}
+	return false;
+}
+
+/**
+ * Adds the given (array of) concepts to the UI (that's currently being displayed). Displays them by a 
+ * +-button and labels (for each of them)
+ *
+ * @param Json array of concepts
+ */
+ConceptFinder.addFoundConcepts = function(concepts){
+	var selectedConceptsExists = false;
+	if (typeof(SelectedConcepts) != "undefined") {
+		selectedConceptsExists = true;
+	}
+	var added = false;
+	for (var i = 0; i < concepts.length; i++) {
+		var concept = concepts[i];
+		if (!selectedConceptsExists || !SelectedConcepts.exists(concept.value)) {
+			added = true;
+			var prefLabelProperty = $.rdf.resource("<http://www.w3.org/2008/05/skos#prefLabel>"); 
+			var prefLabel = concept.get(prefLabelProperty).value;
+			var uri = concept.value;
+			ConceptFinder.createSystemFoundConcept(prefLabel, uri);
+		}
+	}
+	if (added) {
+		$("#label-for-search-results").text("Concepts found:");
+	}
+	else {
+		$("#label-for-search-results").text("No additional concepts found.");
+	}
+}
+
+/**
+ * Creates the widget that show the user a concept that was found on the backend. Shows prefLabel, 
+ * uri and a button to add the concept to the backend
+ * 
+ * @param {Object} prefLabel
+ * @param {Object} uri
+ */
+ConceptFinder.createSystemFoundConcept = function(prefLabel, uri) {
+	var div = $("<div/>");
+	ConceptFinder.createConceptWidgets(prefLabel, uri).appendTo(div)
+	$("<a/>").addClass("tx-icon tx-icon-plus").attr({
+		href: "#"
+	}).text("Add").click(ConceptFinder.onAddClicked(prefLabel, uri)).appendTo(div);
+	$("<br/>").appendTo(div);
+	$("<br/>").appendTo(div);
+	div.appendTo("#system-found-concepts")
+}
+
+ConceptFinder.onAddClicked = function(prefLabel, uri){
+	return function(){
+		if (typeof(SelectedConcepts) != "undefined") {
+			SelectedConcepts.addConcept(prefLabel, uri);
+		}
+		if (typeof(ConceptFinder.callback) == "function") {
+			ConceptFinder.callback(prefLabel, uri);
+		}
+		$(this).parent().remove();
+	};
+}
+
+/**
+ * Creates html elements that show the given pref label and uri. Appends them to the given div.
+ * 
+ * @param {Object} prefLabel
+ * @param {Object} uri
+ * @param {Object} div
+ */
+ConceptFinder.createConceptWidgets = function(prefLabel, uri) {
+	var div = $("<div/>");
+	if (prefLabel.substr(0,1) == "\"") {
+		prefLabel = prefLabel.substring(1, prefLabel.length - 1);
+	}
+	$("<div/>").text("PrefLabel: " + prefLabel).appendTo(div);
+	$("<div/>").text("Uri: " + uri).appendTo(div);
+	$("<input/>").attr({
+		"type": "hidden",
+		"name": "concepts"
+	}).val(uri).appendTo(div);
+	return div;
+}
+
+/**
+ * Checks if a concept with the given uri already exists
+ * @param {Object} uri
+ */
+ConceptFinder.exists = function(uri){
+
+};
+
+function ConceptManipulator(){
+};
+
+ConceptManipulator.callback;
+
+ConceptManipulator.setAddConceptCallback = function(callback){
+	this.callback = callback;
+}
+
+/**
+ * sends a new concept to the backend for addition. Uses the search term entered by the user (in the same form).
+ */
+ConceptManipulator.addConcept = function(){
+	var searchTerm = $(":text[name='search-term']").val();
+	if (searchTerm.length > 0) {
+		var options = new AjaxOptions("add-concepts", "adding concepts", function(uri){
+			$("#concept-description").val("");
+			if (typeof(SelectedConcepts) != "undefined") {
+				SelectedConcepts.addConcept(searchTerm, uri);
+			}
+			if (typeof(this.callback) == "function") {
+				this.callback(searchTerm, uri);
+			}
+		});
+		options.type = "POST";
+		options.url = "/concepts/manipulator/add-concept";
+		options.data = {
+			"pref-label": searchTerm,
+			lang: $(":input[name='lang']").val(),
+			comment: $(":textarea[name='comment']").val()
+		}
+		
+		$.ajax(options);
+	}
+	return false;
+}
+
+$(document).ready(function(){
+	$("#go-button").click(function(){
+		ConceptFinder.search();
+	});
+	$("#add-user-defined-concept").click(function(){
+		ConceptManipulator.addConcept();
+		$("#user-defined-concept-area").hide();
+	});
+	$("#system-found-concepts-area").hide();
+	$("#user-defined-concept-area").hide();
+});


[77/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
index 1079a9d..274b7e5 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
@@ -33,10 +33,10 @@ import java.util.NoSuchElementException;
 import java.util.concurrent.locks.Lock;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 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.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.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -59,24 +59,24 @@ import org.apache.clerezza.commons.rdf.Literal;
 public abstract class TcAccessController {
 
     private final TcManager tcManager;
-    private final Iri permissionGraphName = new Iri("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph");
+    private final IRI permissionGraphName = new IRI("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph");
     //we can't rely on ontology plugin in rdf core
     private String ontologyNamespace = "http://clerezza.apache.org/2010/07/10/graphpermssions#";
-    private final Iri readPermissionListProperty = new Iri(ontologyNamespace + "readPermissionList");
-    private final Iri readWritePermissionListProperty = new Iri(ontologyNamespace + "readWritePermissionList");
+    private final IRI readPermissionListProperty = new IRI(ontologyNamespace + "readPermissionList");
+    private final IRI readWritePermissionListProperty = new IRI(ontologyNamespace + "readWritePermissionList");
     /**
      * The first item in the subject RDF list.
      */
-    public static final Iri first = new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
+    public static final IRI first = new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
     /**
      * The rest of the subject RDF list after the first item.
      */
-    public static final Iri rest = new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
-    public static final Iri rdfNil = new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
-    private final Map<Iri, Collection<Permission>> readPermissionCache =
-            Collections.synchronizedMap(new HashMap<Iri, Collection<Permission>>());
-    private final Map<Iri, Collection<Permission>> readWritePermissionCache =
-            Collections.synchronizedMap(new HashMap<Iri, Collection<Permission>>());
+    public static final IRI rest = new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
+    public static final IRI rdfNil = new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+    private final Map<IRI, Collection<Permission>> readPermissionCache =
+            Collections.synchronizedMap(new HashMap<IRI, Collection<Permission>>());
+    private final Map<IRI, Collection<Permission>> readWritePermissionCache =
+            Collections.synchronizedMap(new HashMap<IRI, Collection<Permission>>());
 
     /**
      *
@@ -86,7 +86,7 @@ public abstract class TcAccessController {
         this.tcManager = getTcManager();
     }
 
-    public void checkReadPermission(Iri GraphUri) {
+    public void checkReadPermission(IRI GraphUri) {
         if (GraphUri.equals(permissionGraphName)) {
             //This is world readable, as this prevents as from doingf things as
             //priviledged during verfification
@@ -111,7 +111,7 @@ public abstract class TcAccessController {
         }
     }
 
-    public void checkReadWritePermission(Iri GraphUri) {
+    public void checkReadWritePermission(IRI GraphUri) {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
             //will AllPermissions the rest is obsolete
@@ -143,7 +143,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @param permissionDescriptions
      */
-    public void setRequiredReadPermissionStrings(Iri GraphUri,
+    public void setRequiredReadPermissionStrings(IRI GraphUri,
             Collection<String> permissionDescriptions) {
         readPermissionCache.remove(GraphUri);
         final Graph permissionMGraph = getOrCreatePermisionGraph();
@@ -151,7 +151,7 @@ public abstract class TcAccessController {
         l.lock();
         try {
             removeExistingRequiredReadPermissions(GraphUri, permissionMGraph);
-            final BlankNodeOrIri permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
+            final BlankNodeOrIRI permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
             permissionMGraph.add(new TripleImpl(GraphUri,
                     readPermissionListProperty, permissionList));
         } finally {
@@ -166,7 +166,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @param permissionDescriptions
      */
-    public void setRequiredReadPermissions(Iri GraphUri,
+    public void setRequiredReadPermissions(IRI GraphUri,
             Collection<Permission> permissions) {
         Collection<String> permissionStrings = new ArrayList<String>();
         for (Permission permission : permissions) {
@@ -183,7 +183,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @param permissionDescriptions
      */
-    public void setRequiredReadWritePermissionStrings(Iri GraphUri,
+    public void setRequiredReadWritePermissionStrings(IRI GraphUri,
             Collection<String> permissionDescriptions) {
         readWritePermissionCache.remove(GraphUri);
         final Graph permissionMGraph = getOrCreatePermisionGraph();
@@ -191,7 +191,7 @@ public abstract class TcAccessController {
         l.lock();
         try {
             removeExistingRequiredReadPermissions(GraphUri, permissionMGraph);
-            final BlankNodeOrIri permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
+            final BlankNodeOrIRI permissionList = createList(permissionDescriptions.iterator(), permissionMGraph);
             permissionMGraph.add(new TripleImpl(GraphUri,
                     readWritePermissionListProperty, permissionList));
         } finally {
@@ -207,7 +207,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @param permissionDescriptions
      */
-    public void setRequiredReadWritePermissions(Iri GraphUri,
+    public void setRequiredReadWritePermissions(IRI GraphUri,
             Collection<Permission> permissions) {
         Collection<String> permissionStrings = new ArrayList<String>();
         for (Permission permission : permissions) {
@@ -224,7 +224,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @return the collection of permissions
      */
-    public Collection<Permission> getRequiredReadPermissions(Iri GraphUri) {
+    public Collection<Permission> getRequiredReadPermissions(IRI GraphUri) {
         Collection<Permission> result = readPermissionCache.get(GraphUri);
         if (result == null) {
             result = new ArrayList<Permission>();
@@ -245,7 +245,7 @@ public abstract class TcAccessController {
      * @param GraphUri
      * @return the collection of permissions
      */
-    public Collection<Permission> getRequiredReadWritePermissions(Iri GraphUri) {
+    public Collection<Permission> getRequiredReadWritePermissions(IRI GraphUri) {
         Collection<Permission> result = readWritePermissionCache.get(GraphUri);
         if (result == null) {
             result = new ArrayList<Permission>();
@@ -258,7 +258,7 @@ public abstract class TcAccessController {
         return result;
     }
 
-    private BlankNodeOrIri createList(Iterator<String> iterator, Graph permissionMGraph) {
+    private BlankNodeOrIRI createList(Iterator<String> iterator, Graph permissionMGraph) {
         if (!iterator.hasNext()) {
             return rdfNil;
         }
@@ -272,23 +272,23 @@ public abstract class TcAccessController {
     }
 
     //called withiong write-lock
-    private void removeExistingRequiredReadPermissions(Iri GraphUri,
+    private void removeExistingRequiredReadPermissions(IRI GraphUri,
             Graph permissionMGraph) {
         try {
             Triple t = permissionMGraph.filter(GraphUri, readPermissionListProperty, null).next();
-            RdfTerm list = t.getObject();
-            removeList((BlankNodeOrIri) list, permissionMGraph);
+            RDFTerm list = t.getObject();
+            removeList((BlankNodeOrIRI) list, permissionMGraph);
             permissionMGraph.remove(t);
         } catch (NoSuchElementException e) {
             //There was no existing to remove
         }
     }
 
-    private void removeList(BlankNodeOrIri list, Graph permissionMGraph) {
+    private void removeList(BlankNodeOrIRI list, Graph permissionMGraph) {
         try {
             Triple t = permissionMGraph.filter(list, rest, null).next();
-            RdfTerm restList = t.getObject();
-            removeList((BlankNodeOrIri) restList, permissionMGraph);
+            RDFTerm restList = t.getObject();
+            removeList((BlankNodeOrIRI) restList, permissionMGraph);
             permissionMGraph.remove(t);
             Iterator<Triple> iter = permissionMGraph.filter(list, first, null);
             iter.next();
@@ -298,20 +298,20 @@ public abstract class TcAccessController {
         }
     }
 
-    private Collection<String> getRequiredReadWritePermissionStrings(final Iri GraphUri) {
+    private Collection<String> getRequiredReadWritePermissionStrings(final IRI GraphUri) {
         return getRequiredPermissionStrings(GraphUri, readWritePermissionListProperty);
     }
-    private Collection<String> getRequiredReadPermissionStrings(final Iri GraphUri) {
+    private Collection<String> getRequiredReadPermissionStrings(final IRI GraphUri) {
         return getRequiredPermissionStrings(GraphUri, readPermissionListProperty);
     }
-    private Collection<String> getRequiredPermissionStrings(final Iri GraphUri, Iri property) {
+    private Collection<String> getRequiredPermissionStrings(final IRI GraphUri, IRI property) {
         try {
             final Graph permissionMGraph = tcManager.getMGraph(permissionGraphName);
             Lock l = permissionMGraph.getLock().readLock();
             l.lock();
             try {
                 Triple t = permissionMGraph.filter(GraphUri, property, null).next();
-                BlankNodeOrIri list = (BlankNodeOrIri) t.getObject();
+                BlankNodeOrIRI list = (BlankNodeOrIRI) t.getObject();
                 LinkedList<String> result = new LinkedList<String>();
                 readList(list, permissionMGraph, result);
                 return result;
@@ -325,12 +325,12 @@ public abstract class TcAccessController {
         }
     }
 
-    private void readList(BlankNodeOrIri list, Graph permissionMGraph, LinkedList<String> target) {
+    private void readList(BlankNodeOrIRI list, Graph permissionMGraph, LinkedList<String> target) {
         if (list.equals(rdfNil)) {
             return;
         }
         Triple restTriple = permissionMGraph.filter(list, rest, null).next();
-        BlankNodeOrIri restList = (BlankNodeOrIri) restTriple.getObject();
+        BlankNodeOrIRI restList = (BlankNodeOrIRI) restTriple.getObject();
         readList(restList, permissionMGraph, target);
         Triple firstTriple = permissionMGraph.filter(list, first, null).next();
         Literal firstValue = (Literal) firstTriple.getObject();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
index 76a8b79..542215d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/WriteBlockedGraph.java
@@ -22,11 +22,11 @@ import java.util.AbstractCollection;
 import java.util.Collection;
 import java.util.Iterator;
 
-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.rdf.core.access.ReadOnlyException;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.commons.rdf.event.FilterTriple;
@@ -57,7 +57,7 @@ public class WriteBlockedGraph extends AbstractGraph
     }
 
     @Override
-    protected Iterator<Triple> performFilter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    protected Iterator<Triple> performFilter(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         final Iterator<Triple> baseIter = triples.filter(subject, predicate, object);
         return new Iterator<Triple>() {
             

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
index 5e1968c..72e42cd 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/PrivilegedGraphWrapper.java
@@ -24,12 +24,12 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
-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.event.FilterTriple;
 import org.apache.clerezza.commons.rdf.event.GraphListener;
 
@@ -49,8 +49,8 @@ public class PrivilegedGraphWrapper implements Graph {
     }
 
     @Override
-    public Iterator<Triple> filter(final BlankNodeOrIri subject, final Iri predicate,
-            final RdfTerm object) {
+    public Iterator<Triple> filter(final BlankNodeOrIRI subject, final IRI predicate,
+            final RDFTerm object) {
         return AccessController.doPrivileged(new PrivilegedAction<Iterator<Triple>>() {
 
             @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
index 9ee6979..c96207a 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactory.java
@@ -31,7 +31,7 @@ import java.util.Set;
 import org.apache.clerezza.rdf.core.InvalidLiteralTypeException;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.rdf.core.NoConvertorException;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.impl.util.Base64;
 import org.apache.clerezza.rdf.core.impl.util.W3CDateFormat;
 import org.apache.clerezza.commons.rdf.Literal;
@@ -46,14 +46,14 @@ import org.apache.clerezza.commons.rdf.Literal;
 public class SimpleLiteralFactory extends LiteralFactory {
 
     private static final String XSD = "http://www.w3.org/2001/XMLSchema#";
-    final private static Iri xsdInteger = xsd("integer");
-    final private static Iri xsdInt = xsd("int");
-    final private static Iri xsdShort = xsd("short");
-    final private static Iri xsdByte = xsd("byte");
-    final private static Iri xsdLong = xsd("long");
+    final private static IRI xsdInteger = xsd("integer");
+    final private static IRI xsdInt = xsd("int");
+    final private static IRI xsdShort = xsd("short");
+    final private static IRI xsdByte = xsd("byte");
+    final private static IRI xsdLong = xsd("long");
     
 
-    final private static Set<Iri> decimalTypes = new HashSet<Iri>();
+    final private static Set<IRI> decimalTypes = new HashSet<IRI>();
 
     final private static Map<Class<?>, TypeConverter<?>> typeConverterMap = new HashMap<Class<?>, TypeConverter<?>>();
     final static Class<? extends byte[]> byteArrayType;
@@ -72,15 +72,15 @@ public class SimpleLiteralFactory extends LiteralFactory {
         typeConverterMap.put(Long.class, new LongConverter());
         typeConverterMap.put(Double.class, new DoubleConverter());
         typeConverterMap.put(Float.class, new FloatConverter());
-        typeConverterMap.put(Iri.class, new UriRefConverter());
+        typeConverterMap.put(IRI.class, new UriRefConverter());
     }
 
-    final private static Iri xsdDouble =xsd("double");
-    final private static Iri xsdFloat =xsd("float");
-    final private static Iri xsdAnyURI =xsd("anyURI");
+    final private static IRI xsdDouble =xsd("double");
+    final private static IRI xsdFloat =xsd("float");
+    final private static IRI xsdAnyURI =xsd("anyURI");
 
-    final private static Iri xsd(String name) {
-       return new Iri(XSD+name);
+    final private static IRI xsd(String name) {
+       return new IRI(XSD+name);
     }
 
     private static interface TypeConverter<T> {
@@ -90,7 +90,7 @@ public class SimpleLiteralFactory extends LiteralFactory {
 
     private static class  ByteArrayConverter implements TypeConverter<byte[]> {
 
-        private static final Iri base64Uri =xsd("base64Binary");
+        private static final IRI base64Uri =xsd("base64Binary");
 
         @Override
         public Literal createLiteral(byte[] value) {
@@ -109,7 +109,7 @@ public class SimpleLiteralFactory extends LiteralFactory {
     }
     private static class  DateConverter implements TypeConverter<Date> {
 
-        private static final Iri dateTimeUri =xsd("dateTime");
+        private static final IRI dateTimeUri =xsd("dateTime");
         private static final DateFormat DATE_FORMAT = new W3CDateFormat();
 
         @Override
@@ -134,7 +134,7 @@ public class SimpleLiteralFactory extends LiteralFactory {
 
     private static class BooleanConverter implements TypeConverter<Boolean> {
 
-        private static final Iri booleanUri =xsd("boolean");
+        private static final IRI booleanUri =xsd("boolean");
         public static final TypedLiteralImpl TRUE = new TypedLiteralImpl("true", booleanUri);
         public static final TypedLiteralImpl FALSE = new TypedLiteralImpl("false", booleanUri);
 
@@ -157,7 +157,7 @@ public class SimpleLiteralFactory extends LiteralFactory {
 
     private static class StringConverter implements TypeConverter<String> {
 
-        private static final Iri stringUri =xsd("string");
+        private static final IRI stringUri =xsd("string");
 
         @Override
         public Literal createLiteral(String value) {
@@ -261,21 +261,21 @@ public class SimpleLiteralFactory extends LiteralFactory {
         }
     }
     
-    private static class UriRefConverter implements TypeConverter<Iri> {
+    private static class UriRefConverter implements TypeConverter<IRI> {
 
 
 
         @Override
-        public Literal createLiteral(Iri value) {
+        public Literal createLiteral(IRI value) {
             return new TypedLiteralImpl(value.getUnicodeString(), xsdAnyURI);
         }
 
         @Override
-        public Iri createObject(Literal literal) {
+        public IRI createObject(Literal literal) {
             if (!literal.getDataType().equals(xsdAnyURI)) {
-                throw new InvalidLiteralTypeException(Iri.class, literal.getDataType());
+                throw new InvalidLiteralTypeException(IRI.class, literal.getDataType());
             }
-            return new Iri(literal.getLexicalForm());
+            return new IRI(literal.getLexicalForm());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
index bd28749..5fe7341 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/Parser.java
@@ -34,7 +34,7 @@ import java.util.logging.Level;
 
 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.commons.rdf.impl.utils.simple.SimpleMGraph;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.component.ComponentContext;
@@ -206,7 +206,7 @@ public class Parser {
      * @throws UnsupportedFormatException
      */
     public ImmutableGraph parse(InputStream serializedGraph,
-            String formatIdentifier, Iri baseUri) throws UnsupportedFormatException {
+            String formatIdentifier, IRI baseUri) throws UnsupportedFormatException {
         Graph graph = new SimpleMGraph();
         parse(graph, serializedGraph, formatIdentifier, baseUri);
         return graph.getImmutableGraph();
@@ -225,7 +225,7 @@ public class Parser {
      * @throws UnsupportedFormatException
      */
     public void parse(Graph target, InputStream serializedGraph,
-            String formatIdentifier, Iri baseUri) throws UnsupportedFormatException {
+            String formatIdentifier, IRI baseUri) throws UnsupportedFormatException {
         String deParameterizedIdentifier;
         int semicolonPos = formatIdentifier.indexOf(';');
         if (semicolonPos > -1) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
index 24da826..3998beb 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/serializedform/ParsingProvider.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.core.serializedform;
 import java.io.InputStream;
 
 import org.apache.clerezza.commons.rdf.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * An instance of this class parses RDF-ImmutableGraph from one or more serialization
@@ -44,6 +44,6 @@ public interface ParsingProvider {
      * @param baseUri the baseUri for interpreting relative uris, may be null
      */
     void parse(Graph target, InputStream serializedGraph,
-            String formatIdentifier, Iri baseUri);
+            String formatIdentifier, IRI baseUri);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
index 1868ec1..60d1805 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SolutionMapping.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql;
 
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import java.util.Map;
-import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.RDFTerm;
 
 /**
  * A set of mapping from variable names to solutions.
@@ -35,7 +35,7 @@ import org.apache.clerezza.commons.rdf.RdfTerm;
  *
  * @author rbn
  */
-public interface SolutionMapping extends Map<Variable, RdfTerm> {
+public interface SolutionMapping extends Map<Variable, RDFTerm> {
 
     /**
      * Should be the equivalent to this:
@@ -46,5 +46,5 @@ public interface SolutionMapping extends Map<Variable, RdfTerm> {
      * @param name
      * @return
      */
-    public RdfTerm get(String name);
+    public RDFTerm get(String name);
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
index 4ada2b8..b77d93a 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/SparqlPreParser.java
@@ -22,7 +22,7 @@ import java.io.StringReader;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
@@ -66,8 +66,8 @@ public class SparqlPreParser {
      * @return 
      * @throws ParseException 
      */
-    public Set<Iri> getReferredGraphs(String queryString, Iri defaultGraph) throws ParseException {
-        Set<Iri> referredGraphs;
+    public Set<IRI> getReferredGraphs(String queryString, IRI defaultGraph) throws ParseException {
+        Set<IRI> referredGraphs;
         JavaCCGeneratedSparqlPreParser parser = new JavaCCGeneratedSparqlPreParser(new StringReader(queryString));
         SparqlUnit sparqlUnit;
         sparqlUnit = parser.parse();
@@ -79,7 +79,7 @@ public class SparqlPreParser {
                 referredGraphs = dataSet.getDefaultGraphs();
                 referredGraphs.addAll(dataSet.getNamedGraphs());
             } else {
-                referredGraphs = new HashSet<Iri>();
+                referredGraphs = new HashSet<IRI>();
             }
             GroupGraphPattern queryPattern = q.getQueryPattern();
             if (queryPattern != null) {

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

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

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

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

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

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

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

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
index 1e1ddbe..354f5b0 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleDataSet.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 
 import java.util.HashSet;
 import java.util.Set;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.sparql.query.DataSet;
 
 /**
@@ -28,24 +28,24 @@ import org.apache.clerezza.rdf.core.sparql.query.DataSet;
  * @author hasan
  */
 public class SimpleDataSet implements DataSet {
-    private Set<Iri> defaultGraphs = new HashSet<Iri>();
-    private Set<Iri> namedGraphs = new HashSet<Iri>();
+    private Set<IRI> defaultGraphs = new HashSet<IRI>();
+    private Set<IRI> namedGraphs = new HashSet<IRI>();
 
     @Override
-    public Set<Iri> getDefaultGraphs() {
+    public Set<IRI> getDefaultGraphs() {
         return defaultGraphs;
     }
 
     @Override
-    public Set<Iri> getNamedGraphs() {
+    public Set<IRI> getNamedGraphs() {
         return namedGraphs;
     }
 
-    public void addDefaultGraph(Iri defaultGraph) {
+    public void addDefaultGraph(IRI defaultGraph) {
         defaultGraphs.add(defaultGraph);
     }
 
-    public void addNamedGraph(Iri namedGraph) {
+    public void addNamedGraph(IRI namedGraph) {
         namedGraphs.add(namedGraph);
     }
 }

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

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
index 7a77138..36ed721 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimplePropertyPathPattern.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.clerezza.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.rdf.core.sparql.query.PropertyPathExpression;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathExpressionOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.PropertyPathPattern;
@@ -58,17 +58,17 @@ public class SimplePropertyPathPattern implements PropertyPathPattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(BlankNodeOrIri subject, Variable propertyPathExpression, Variable object) {
+    public SimplePropertyPathPattern(BlankNodeOrIRI subject, Variable propertyPathExpression, Variable object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(Variable subject, Variable propertyPathExpression, RdfTerm object) {
+    public SimplePropertyPathPattern(Variable subject, Variable propertyPathExpression, RDFTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(BlankNodeOrIri subject, Variable propertyPathExpression, RdfTerm object) {
+    public SimplePropertyPathPattern(BlankNodeOrIRI subject, Variable propertyPathExpression, RDFTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
@@ -78,17 +78,17 @@ public class SimplePropertyPathPattern implements PropertyPathPattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(BlankNodeOrIri subject, PropertyPathExpression propertyPathExpression, Variable object) {
+    public SimplePropertyPathPattern(BlankNodeOrIRI subject, PropertyPathExpression propertyPathExpression, Variable object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(Variable subject, PropertyPathExpression propertyPathExpression, RdfTerm object) {
+    public SimplePropertyPathPattern(Variable subject, PropertyPathExpression propertyPathExpression, RDFTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }
 
-    public SimplePropertyPathPattern(BlankNodeOrIri subject, PropertyPathExpression propertyPathExpression, RdfTerm object) {
+    public SimplePropertyPathPattern(BlankNodeOrIRI subject, PropertyPathExpression propertyPathExpression, RDFTerm object) {
         this(new ResourceOrVariable(subject), new PropertyPathExpressionOrVariable(propertyPathExpression),
                 new ResourceOrVariable(object));
     }

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
index a27d12b..18266f6 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleStringQuerySerializer.java
@@ -21,8 +21,8 @@ package org.apache.clerezza.rdf.core.sparql.query.impl;
 import java.util.List;
 import java.util.Set;
 import org.apache.clerezza.commons.rdf.BlankNode;
-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.IRI;
 import org.apache.clerezza.rdf.core.sparql.StringQuerySerializer;
 import org.apache.clerezza.rdf.core.sparql.query.AlternativeGraphPattern;
 import org.apache.clerezza.rdf.core.sparql.query.AskQuery;
@@ -92,10 +92,10 @@ public class SimpleStringQuerySerializer extends StringQuerySerializer {
     private void appendDataSet(StringBuffer s, SimpleQuery q) {
         DataSet dataSet = q.getDataSet();
         if (dataSet != null) {
-            for (Iri dg : dataSet.getDefaultGraphs()) {
+            for (IRI dg : dataSet.getDefaultGraphs()) {
                 s.append("FROM ").append(dg.toString()).append("\n");
             }
-            for (Iri ng : dataSet.getNamedGraphs()) {
+            for (IRI ng : dataSet.getNamedGraphs()) {
                 s.append("FROM NAMED ").append(ng.toString()).append("\n");
             }
         }
@@ -186,7 +186,7 @@ public class SimpleStringQuerySerializer extends StringQuerySerializer {
         if (n.isVariable()) {
             appendVariable(s, n.getVariable());
         } else {
-            RdfTerm r = n.getResource();
+            RDFTerm r = n.getResource();
             if (r instanceof BlankNode) {
                 s.append("_:").append(r.toString().replace("@", "."));
             } else {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
index 1067e8b..adad648 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/sparql/query/impl/SimpleTriplePattern.java
@@ -18,9 +18,9 @@
  */
 package org.apache.clerezza.rdf.core.sparql.query.impl;
 
-import org.apache.clerezza.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.rdf.core.sparql.query.ResourceOrVariable;
 import org.apache.clerezza.rdf.core.sparql.query.TriplePattern;
 import org.apache.clerezza.rdf.core.sparql.query.UriRefOrVariable;
@@ -58,37 +58,37 @@ public class SimpleTriplePattern implements TriplePattern {
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(BlankNodeOrIri subject, Variable predicate, Variable object) {
+    public SimpleTriplePattern(BlankNodeOrIRI subject, Variable predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, Iri predicate, Variable object) {
+    public SimpleTriplePattern(Variable subject, IRI predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(BlankNodeOrIri subject, Iri predicate, Variable object) {
+    public SimpleTriplePattern(BlankNodeOrIRI subject, IRI predicate, Variable object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, Variable predicate, RdfTerm object) {
+    public SimpleTriplePattern(Variable subject, Variable predicate, RDFTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(BlankNodeOrIri subject, Variable predicate, RdfTerm object) {
+    public SimpleTriplePattern(BlankNodeOrIRI subject, Variable predicate, RDFTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(Variable subject, Iri predicate, RdfTerm object) {
+    public SimpleTriplePattern(Variable subject, IRI predicate, RDFTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }
 
-    public SimpleTriplePattern(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
+    public SimpleTriplePattern(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
         this(new ResourceOrVariable(subject), new UriRefOrVariable(predicate),
                 new ResourceOrVariable(object));
     }

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

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

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

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

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

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

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

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

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

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
index f8711c6..c41426e 100644
--- a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
+++ b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedQueryParser.jj
@@ -42,8 +42,8 @@ import java.util.regex.Pattern;
 import org.apache.clerezza.commons.rdf.BlankNode;
 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.Iri;
+import org.apache.clerezza.commons.rdf.RDFTerm;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
@@ -81,14 +81,14 @@ import org.apache.clerezza.rdf.core.sparql.query.impl.SimpleTriplePattern;
  */
 class JavaCCGeneratedQueryParser {
 
-	private static final Iri RDF_TYPE =
-		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
-	private static final Iri RDF_FIRST =
-		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
-	private static final Iri RDF_REST =
-		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
-	private static final Iri RDF_NIL =
-		new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+	private static final IRI RDF_TYPE =
+		new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
+	private static final IRI RDF_FIRST =
+		new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
+	private static final IRI RDF_REST =
+		new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
+	private static final IRI RDF_NIL =
+		new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
 
 	/** A RegEx pattern for separating out a namespace from a prefixed name. */
 	private static final Pattern pfxNamePattern = Pattern.compile("([^:]*):(.*)");
@@ -200,16 +200,16 @@ class JavaCCGeneratedQueryParser {
 		return bNode;
 	}
 
-	private Iri createUriRef(String r) throws ParseException {
+	private IRI createUriRef(String r) throws ParseException {
 		// Create an IRI directly if the string does not start with a prefix
 		Matcher m = pfxNamePattern.matcher(r);
 		if (!m.matches()) {
 			// either a normal IRI, or one with a BASE
-			return isRelative(r) ? new Iri(base + r) : new Iri(r);
+			return isRelative(r) ? new IRI(base + r) : new IRI(r);
 		}
 		// extract the prefix, and attempt to convert to a URI before creating the reference
 		String ns = prefixes.get(m.group(1));
-		return ns == null ? new Iri(r) : new Iri(ns + m.group(2));
+		return ns == null ? new IRI(r) : new IRI(ns + m.group(2));
 	}
 
 	/**
@@ -386,7 +386,7 @@ private void DatasetClause() : {} {
 
 /* [10]    DefaultGraphClause    ::=    SourceSelector */
 private void DefaultGraphClause() : {
-	Iri defaultGraph; } {
+	IRI defaultGraph; } {
 
 	defaultGraph=SourceSelector() {
 	((SimpleQuery) query).addDefaultGraph(defaultGraph); }
@@ -394,15 +394,15 @@ private void DefaultGraphClause() : {
 
 /* [11]    NamedGraphClause    ::=    'NAMED' SourceSelector */
 private void NamedGraphClause() : {
-	Iri namedGraph; } {
+	IRI namedGraph; } {
 
 	<NAMED> namedGraph=SourceSelector() {
 	((SimpleQuery) query).addNamedGraph(namedGraph); }
 }
 
 /* [12]    SourceSelector    ::=    IRIref */
-private Iri SourceSelector() : {
-	Iri graph; } {
+private IRI SourceSelector() : {
+	IRI graph; } {
 
 	graph=IRIref() {
 	return graph; }
@@ -572,7 +572,7 @@ private Expression Constraint() : {
 
 /* [28]    FunctionCall    ::=    IRIref ArgList */
 private FunctionCall FunctionCall() : {
-	Iri name;
+	IRI name;
 	List<Expression> arguments;} {
 
 	name=IRIref()
@@ -761,14 +761,14 @@ private ResourceOrVariable VarOrTerm() : {
 /* [43]    VarOrIRIref    ::=    Var | IRIref */
 private UriRefOrVariable VarOrIRIref() : {
 	Variable var;
-	Iri Iri; } {
+	IRI IRI; } {
 
 	(
 	var=Var() {
 	return new UriRefOrVariable(var); }
 	|
-	Iri=IRIref() {
-	return new UriRefOrVariable(Iri); }
+	IRI=IRIref() {
+	return new UriRefOrVariable(IRI); }
 	)
 }
 
@@ -783,7 +783,7 @@ private Variable Var() : {
 /* [45]    GraphTerm    ::=    IRIref |  RDFLiteral |  NumericLiteral |  BooleanLiteral |  BlankNode |  NIL */
 private ResourceOrVariable GraphTerm() : {
 	ResourceOrVariable bNode = null;
-	RdfTerm r = null; } {
+	RDFTerm r = null; } {
 
 	(r=IRIref() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | bNode=BlankNode() | <NIL> {
 		r = RDF_NIL; }) {
@@ -1046,22 +1046,22 @@ private BuiltInCall RegexExpression() : {
 
 /* [59]    IRIrefOrFunction    ::=    IRIref ArgList? */
 private Expression IRIrefOrFunction() : {
-	Iri Iri;
+	IRI IRI;
 	List<Expression> args; } {
 
-	Iri=IRIref()
+	IRI=IRIref()
 	(
 		args=ArgList() {
-		return new FunctionCall(Iri, args); }
+		return new FunctionCall(IRI, args); }
 	)? {
-	return new UriRefExpression(Iri); }
+	return new UriRefExpression(IRI); }
 }
 
 /* [60]    RDFLiteral    ::=    String ( LANGTAG | ( '^^' IRIref ) )? */
 private Literal RDFLiteral() : {
 	Token t;
 	String s;
-	Iri type; } {
+	IRI type; } {
 
 	s = String()
 	(
@@ -1143,19 +1143,19 @@ private String String() : {
 }
 
 /* [67]    IRIref    ::=    IRI_REF |  PrefixedName */
-private Iri IRIref() : {
-	Iri Iri;
+private IRI IRIref() : {
+	IRI IRI;
 	Token t; } {
 
 	t=<IRI_REF> {
 	return createUriRef(unquote(t.image)); }
 	|
-	Iri=PrefixedName() {
-	return Iri; }
+	IRI=PrefixedName() {
+	return IRI; }
 }
 
 /* [68]    PrefixedName    ::=    PNAME_LN | PNAME_NS */
-private Iri PrefixedName() : {
+private IRI PrefixedName() : {
 	Token t; } {
 
 	( t=<PNAME_LN> | t=<PNAME_NS> ) {


[50/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/LICENSE
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/LICENSE b/platform/accountcontrolpanel/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/accountcontrolpanel/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
new file mode 100644
index 0000000..7a7b7f9
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.accountcontrolpanel</artifactId>
+        <version>0.10</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.accountcontrolpanel.core</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Account Control Panel Core</name>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                                        <!-- <scalaVersion>${scala.version}</scalaVersion> -->
+                                        <!-- <args>
+                                                <arg>-target:jvm-1.5</arg>
+                                        </args> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+                        <Export-Package>org.apache.clerezza.platform.accountcontrolpanel.*</Export-Package>
+                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.xsite</groupId>
+                <artifactId>xsite-maven-plugin</artifactId>
+                <configuration>
+                    <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                    <sitemapPath>content/sitemap.xml</sitemapPath>
+                    <skinPath>templates/skin.html</skinPath>
+                    <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>pre-site</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>                 
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.seedsnipe</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.users.core</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+          <groupId>org.scala-lang</groupId>
+          <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scala</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.accountcontrolpanel.ontologies</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>ssl.keygen.base</artifactId>
+            <version>0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.security.foafssl.ontologies</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.clerezza.ext</groupId>
+          <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+            <version>0.11.0</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
new file mode 100644
index 0000000..6d0803d
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
@@ -0,0 +1,287 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/**
+ *
+ * Copyright (c) 2008-2010, The University of Manchester, United Kingdom. All
+ * rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer. Redistributions in binary
+ * form must reproduce the above copyright notice, this list of conditions and
+ * the following disclaimer in the documentation and/or other materials provided
+ * with the distribution. Neither the name of the The University of Manchester
+ * nor the names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author........: Bruno Harbulot
+ *
+ */
+
+
+
+function createCsrCertEnroll(enrollFactObj, keylength) {
+	/*
+	 * Creates a CX509EnrollmentWebClassFactory (used to create all the other
+	 * objects).
+	 */
+	if (enrollFactObj == null) {
+		enrollFactObj = new ActiveXObject(
+			"X509Enrollment.CX509EnrollmentWebClassFactory");
+	}
+
+	/*
+	 * Load the information about the providers.
+	 */
+	var providerInfosObj = enrollFactObj
+	.CreateObject("X509Enrollment.CCspInformations");
+	providerInfosObj.AddAvailableCsps();
+
+	/*
+	 * Find the provider of RSA type (sufficient for this example). The type
+	 * numbers for this are 1, 2 and 24.
+	 * http://msdn.microsoft.com/en-us/library/aa379427%28VS.85%29.aspx
+	 */
+	var providerType = -1;
+	var providerName = null;
+	for ( var i = 0; i < providerInfosObj.Count; i++) {
+		var providerInfoObj = providerInfosObj.ItemByIndex(i);
+		switch (providerInfoObj.Type) {
+			case 1:
+			case 2:
+			case 24:
+				providerType = providerInfoObj.Type;
+				providerName = providerInfoObj.Name;
+				break;
+			default:
+		}
+	}
+
+	/*
+	 * Creates a 2048-bit key with this provider.
+	 */
+	var privKeyObj = enrollFactObj
+	.CreateObject("X509Enrollment.CX509PrivateKey");
+	privKeyObj.ProviderType = providerInfoObj.Type;
+	privKeyObj.KeySpec = 1;
+	privKeyObj.Length = keylength;
+	// http://msdn.microsoft.com/en-us/library/aa379024%28VS.85%29.aspx
+	privKeyObj.MachineContext = false;
+	// http://msdn.microsoft.com/en-us/library/aa379414%28VS.85%29.aspx
+	privKeyObj.KeyProtection = 2;
+	// http://msdn.microsoft.com/en-us/library/aa379002%28VS.85%29.aspx
+	privKeyObj.ExportPolicy = 1;
+
+	/*
+	 * Creates the PKCS#10 object and initialise as a user context.
+	 */
+	var pkcs10CsrObj = enrollFactObj
+	.CreateObject("X509Enrollment.CX509CertificateRequestPkcs10");
+	pkcs10CsrObj.InitializeFromPrivateKey(1, privKeyObj, "");
+
+	/*
+	 * Creates the enrolment object and exports the CSR.
+	 */
+	var enrollObj = enrollFactObj
+	.CreateObject("X509Enrollment.CX509Enrollment");
+	enrollObj.InitializeFromRequest(pkcs10CsrObj);
+	var csr = enrollObj.CreateRequest(1);
+	csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr
+	+ "-----END CERTIFICATE REQUEST-----";
+
+	/*
+	 * Makes the request to the server.
+	 */
+    xmlHttpRequest = createRequest(csr);
+
+    /**
+	 * What to do on response
+	 */
+    xmlHttpRequest.onreadystatechange = function() {
+		if (xmlHttpRequest.readyState == 4) {
+			if (xmlHttpRequest.status == 200) {
+				/*
+				 * Installs the certificate.
+				 */
+				try {
+					enrollObj.InstallResponse(4, xmlHttpRequest.responseText,
+						0, "");
+					window.alert("A certificate has been installed.");
+				} catch (e1) {
+					try {
+						enrollObj.InstallResponse(0,
+							xmlHttpRequest.responseText, 0, "");
+						window.alert("A certificate has been installed.");
+					} catch (e2) {
+						window
+						.alert("You're probably using Vista without SP1 or above, in which case you need to add the certificate of this authority as a trusted root certificate (not recommended in general).");
+					}
+				}
+			} else {
+				window.alert("The server returned an error status: "
+					+ xmlHttpRequest.status);
+			}
+		}
+	}
+}
+
+
+function createRequest(csrString) {
+	var xmlHttpRequest = new XMLHttpRequest();
+
+	xmlHttpRequest.open("POST", kgnFloctn, true);
+
+	var params = "webId=" + encodeURIComponent(document.getElementById("webId").value);
+	params += "&cn=" + encodeURIComponent(document.getElementById("cn").value);
+	params += "&csr=" + encodeURIComponent(csrString);
+	params += "&days="+encodeURIComponent(document.getElementById("days").value);
+	params += "&hours="+encodeURIComponent(document.getElementById("hours").value);
+
+	xmlHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+	xmlHttpRequest.setRequestHeader("Content-length", params.length);
+	xmlHttpRequest.setRequestHeader("Connection", "close");
+
+	xmlHttpRequest.send(params);
+
+	return xmlHttpRequest;
+
+}
+
+
+function createCsrXenroll(enrollObj, keylength) {
+	if (enrollObj == null) {
+		enrollObj = new ActiveXObject("CEnroll.CEnroll");
+	}
+
+	// http://msdn.microsoft.com/en-us/library/aa379941%28VS.85%29.aspx
+	// CRYPT_EXPORTABLE: 1?
+	enrollObj.GenKeyFlags = (keylength * 256 * 256) + 1;
+	enrollObj.KeySpec = 2;
+
+	var csr = enrollObj.createPKCS10("", "");
+	csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr
+	+ "-----END CERTIFICATE REQUEST-----";
+
+	xmlHttpRequest = createRequest(csr);
+
+	xmlHttpRequest.onreadystatechange = function() {
+		if (xmlHttpRequest.readyState == 4) {
+			if (xmlHttpRequest.status == 200) {
+				enrollObj.acceptPKCS7(xmlHttpRequest.responseText);
+				window.alert("A certificate has been installed.");
+			} else {
+				window.alert("The server returned an error status: "
+					+ xmlHttpRequest.status);
+			}
+		}
+	}
+}
+
+function createCsr() {
+	var keystrengthSelectElem = document.getElementById("keylength");
+	var keylength = keystrengthSelectElem.value;
+
+	var enrollFactObj = null;
+	try {
+		enrollFactObj = new ActiveXObject(
+			"X509Enrollment.CX509EnrollmentWebClassFactory");
+	} catch (e) {
+	}
+
+	if (enrollFactObj != null) {
+		createCsrCertEnroll(enrollFactObj, keylength);
+	} else {
+		var enrollObj = null;
+		try {
+			enrollObj = new ActiveXObject("CEnroll.CEnroll");
+		} catch (e) {
+		}
+		if (enrollObj != null) {
+			createCsrXenroll(enrollObj, keylength);
+		} else {
+			window.alert("ActiveX certificate creation not supported or not enabled.");
+		}
+	}
+}
+// kgnFloctn needs to be calculated first
+var kgnFloctn = "errorKeyGenLoctn";
+function configurePage() {
+	kgnFloctn = document.getElementById("keygenform").getAttribute("action");
+
+	var keygenElem = document.getElementById("spkac");
+
+	if (navigator.appName == "Microsoft Internet Explorer") {
+		var keygenFormElem = document.getElementById("keygenform");
+		keygenFormElem.removeAttribute("action");
+		keygenFormElem.removeAttribute("method");
+
+		/*
+		 * Try the ActiveX approach, assume Internet Explorer.
+		 */
+
+		var iehelptextElem = document.getElementById("iehelptext");
+		iehelptextElem.style.display = "block";
+
+		var submitButtonElem = document.getElementById("keygensubmit");
+		var newSumbitButtonElem = document.createElement("input");
+		newSumbitButtonElem.setAttribute("type", "button");
+		newSumbitButtonElem.setAttribute("value", "Submit");
+		submitButtonElem.parentNode.replaceChild(newSumbitButtonElem,
+			submitButtonElem);
+		submitButtonElem = newSumbitButtonElem;
+
+		if (submitButtonElem.attachEvent) {
+			submitButtonElem.attachEvent("onclick", createCsr);
+		} else {
+			submitButtonElem.setAttribute("onclick", "createCsr()");
+		}
+
+		var keystrengthSelectElem = document.createElement("select");
+		keystrengthSelectElem.setAttribute("id", "keylength");
+		keystrengthSelectElem.setAttribute("name", "keylength");
+		var optionElem;
+		optionElem = document.createElement("option");
+		optionElem.setAttribute("value", "1024");
+		optionElem.appendChild(document.createTextNode("1024"));
+		keystrengthSelectElem.appendChild(optionElem);
+		optionElem = document.createElement("option");
+		optionElem.setAttribute("value", "2048");
+		optionElem.appendChild(document.createTextNode("2048"));
+		keystrengthSelectElem.appendChild(optionElem);
+		var keystrengthTdElem = document.getElementById("keystrenghtd");
+		keystrengthTdElem.appendChild(keystrengthSelectElem);
+	}
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
new file mode 100644
index 0000000..6ad1db2
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
@@ -0,0 +1,64 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+$(document).ready(function() {
+	$('#newWebIdButton').click(function() {
+		$("#newOrExistingSelection").css({display: "none"})
+		$("#createNewWebId").css({display: "block"})
+	});
+	$("#existingWebIdButton").click(function() {
+		$("#newOrExistingSelection").css({display: "none"})
+		$("#setExistingWebId").css({display: "block"})
+	});
+	$("#keygenform").submit(function() {
+		return spkacFix();
+	});
+});
+
+var crmfObject;
+function setCRMFRequest() {
+	var hiddenField = $("<input type=\"hidden\" name=\"crmf\" id=\"crmf\" \/>");
+	$("#keygenform").append(hiddenField)
+	//var formContents = $("#keygenform").serialize();
+	//var newContents = jQuery.extend({}, formContents);
+	hiddenField.val(crmfObject.request)
+	$("#keygenform").submit()
+}
+
+function spkacFix() {
+
+	if ($("#spkac").val()) {
+		return true;
+	} else {
+		if ($("#crmf").val()) {
+			return true;
+		}
+		//alert("fix needed by firefox in xhtml mode")
+		crmfObject = crypto.generateCRMFRequest(
+		'CN=Ignored',
+		"regToken", "authenticator", // not sure
+		null, // base-64 cert for key
+		// escrow. set this to null
+		"setCRMFRequest();", // callback
+		2048, null, "rsa-dual-use"); // key parameters
+		return false;
+	}
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
new file mode 100644
index 0000000..64e52c4
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
@@ -0,0 +1,51 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+#associateSelection {
+	width: 80%
+}
+#createNewWebId {
+	display: none
+}
+#setExistingWebId {
+	display: none
+}
+/* we need to override a table td:first-child in /style/table.css */
+td.propvalue:first-child { 
+	text-align: right;
+}
+
+td.formlabel:first-child { 
+	width: 10em;
+	text-align: right;
+}
+
+td.multiline:first-child {
+    vertical-align: text-top;
+}
+
+img.mugshot {
+    width: 80px;
+}
+
+td.personInABox {
+    width: 100px;
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
new file mode 100644
index 0000000..8e50481
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider"/>
+    </scr:component>
+
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider"/>
+    </scr:component>
+
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel"/>
+        <service servicefactory="false">
+            <provide interface="java.lang.Object"/>
+        </service>
+        <property name="javax.ws.rs" type="Boolean" value="true"/>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel"/>
+        <reference name="configurationAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" cardinality="0..1" policy="dynamic" bind="bindConfigurationAdmin" unbind="unbindConfigurationAdmin"/>
+        <reference name="systemGraph" interface="org.apache.clerezza.rdf.core.MGraph" cardinality="1..1" policy="static" target="(name=urn:x-localinstance:/system.graph)" bind="bindSystemGraph" unbind="unbindSystemGraph"/>
+        <reference name="cgProvider" interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider" cardinality="1..1" policy="static" bind="bindCgProvider" unbind="unbindCgProvider"/>
+    </scr:component>
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel"/>
+    </scr:component>
+
+
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel"/>
+        <service servicefactory="false">
+            <provide interface="java.lang.Object"/>
+        </service>
+        <property name="javax.ws.rs" type="Boolean" value="true"/>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel"/>
+        <reference name="userManager" interface="org.apache.clerezza.platform.usermanager.UserManager"
+                   cardinality="1..1" policy="static" bind="bindUserManager" unbind="unbindUserManager"/>
+        <reference name="graphNodeProvider" interface="org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider"
+                   cardinality="1..1" policy="static" bind="bindGraphNodeProvider" unbind="unbindGraphNodeProvider"/>
+        <reference name="keygenSrvc" interface="org.apache.clerezza.ssl.keygen.KeygenService"
+                   cardinality="1..1" policy="static" bind="bindKeygenSrvc" unbind="unbindKeygenSrvc"/>
+        <reference name="webIdGraphsService" interface="org.apache.clerezza.platform.users.WebIdGraphsService"
+                   cardinality="1..1" policy="static" bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
+        <reference name="platformConfig" interface="org.apache.clerezza.platform.config.PlatformConfig"
+                   cardinality="1..1" policy="static" bind="bindPlatformConfig" unbind="unbindPlatformConfig"/>
+        <reference name="tcManager" interface="org.apache.clerezza.rdf.core.access.TcManager"
+                   cardinality="1..1" policy="static" bind="bindTcManager" unbind="unbindTcManager"/>
+    </scr:component>
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel"/>
+    </scr:component>
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet"/>
+    </scr:component>
+    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox">
+        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
+        </service>
+        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox"/>
+    </scr:component>
+</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
new file mode 100644
index 0000000..5d41410
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.accountcontrolpanel
+
+import java.util.HashSet
+import java.util.Set
+import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider
+import org.apache.clerezza.permissiondescriptions.PermissionDescripton
+import org.apache.felix.scr.annotations.Component
+import org.apache.felix.scr.annotations.Service
+
+/**
+ * <code>PermissionDescriptionsProvider</code> implementation that provides
+ * <code>PermissionDescripton</code>s of Account Control Panel permissions.
+ * The following permissions are described:
+ * <ul>
+ *   <li>org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission</li>
+ *   <li>org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission</li>
+ *   <li>org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission</li>
+ * </ul>
+ *
+ * @author mir
+ */
+object AcpPermissionDescriptionsProvider {
+  private  val ACP_PERMISSION_DESCRIPTIONS: Set[PermissionDescripton] = new HashSet[PermissionDescripton]
+  ACP_PERMISSION_DESCRIPTIONS.add(
+    new PermissionDescripton("Change Own Password Permission",
+      "Grants permission to the user to change its own password",
+      null, classOf[ChangePasswordPermission],
+      "(org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission \"{username}\" \"\")"
+    )
+  )
+
+  ACP_PERMISSION_DESCRIPTIONS.add(
+    new PermissionDescripton("Access Own Account Control Panel Permission",
+      "Grants permission to the user to access its own Account Control Panel",
+      null, classOf[AccountControlPanelAppPermission],
+      "(org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission \"{username}\" \"\")"
+    )
+  )
+
+  ACP_PERMISSION_DESCRIPTIONS.add(
+    new PermissionDescripton("Bundle Upload Permission",
+      "Grants permission to the user to upload a bundle",
+      null, classOf[AccountControlPanelAppPermission],
+      "(org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission \"{username}\" \"\")"
+    )
+  )
+
+}
+
+class AcpPermissionDescriptionsProvider extends PermissionDescriptionsProvider {
+
+  import AcpPermissionDescriptionsProvider._
+
+  def getPermissionDescriptors: Set[PermissionDescripton] = {
+    return ACP_PERMISSION_DESCRIPTIONS
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
new file mode 100644
index 0000000..ce09780
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.accountcontrolpanel
+
+import java.io.UnsupportedEncodingException
+import java.net.URLEncoder
+import java.security.AccessControlContext
+import java.security.AccessControlException
+import java.security.AccessController
+import java.security.Principal
+import java.security.PrivilegedActionException
+import java.security.PrivilegedExceptionAction
+import java.util.HashSet
+import java.util.Iterator
+import java.util.Set
+import javax.security.auth.Subject
+import org.apache.felix.scr.annotations.Component
+import org.apache.felix.scr.annotations.Service
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
+import org.apache.stanbol.commons.security.UserUtil
+
+/**
+ *
+ * Provides menu-item to profile or settings-panel or none depending on user
+ * permissions.
+ *
+ * @author reto
+ */
+class MenuItemProvider extends GlobalMenuItemsProvider {
+  def getMenuItems: Set[GlobalMenuItem] = {
+    var items: Set[GlobalMenuItem] = new HashSet[GlobalMenuItem]
+    var userName: String = UserUtil.getCurrentUserName
+    if (userName != null) {
+      try {
+        AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
+      }
+      catch {
+        case e: AccessControlException => {
+          return items
+        }
+      }
+      try {
+        var path: String = "/user/" + URLEncoder.encode(userName, "utf-8") + "/control-panel"
+        items.add(new GlobalMenuItem(path, "ACP", "Account Control Panel", 5, "Administration"))
+      }
+      catch {
+        case e: UnsupportedEncodingException => {
+          throw new RuntimeException(e)
+        }
+      }
+    }
+    return items
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
new file mode 100644
index 0000000..d46f9f1
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
@@ -0,0 +1,466 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.accountcontrolpanel
+
+import java.util.List
+import java.util.Arrays
+import java.util.Collections
+import java.util.Iterator
+import ontologies.CONTROLPANEL
+import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider
+import org.apache.clerezza.ssl.keygen.CertSerialisation
+import org.apache.clerezza.ssl.keygen.Certificate
+import org.apache.clerezza.foafssl.ontologies.CERT
+import org.apache.clerezza.foafssl.ontologies.RSA
+import org.apache.clerezza.jaxrs.utils.RedirectUtil
+import org.apache.clerezza.jaxrs.utils.TrailingSlash
+import org.apache.clerezza.platform.config.PlatformConfig
+import org.apache.clerezza.platform.usermanager.UserManager
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.platform.Constants
+import access.TcManager
+import impl.{SimpleMGraph, TripleImpl}
+import org.apache.clerezza.rdf.utils.GraphNode
+import org.apache.clerezza.rdf.utils.UnionMGraph
+import org.osgi.service.component.ComponentContext
+import javax.ws.rs._
+import javax.ws.rs.core.Context
+import javax.ws.rs.core.MediaType
+import javax.ws.rs.core.Response
+import javax.ws.rs.core.UriInfo
+import java.math.BigInteger
+import java.security.AccessController
+import java.security.PrivilegedAction
+import java.security.interfaces.RSAPublicKey
+import org.apache.clerezza.ssl.keygen.KeygenService
+import java.net.URI
+import org.apache.clerezza.rdf.core.access.security.TcPermission
+import org.apache.clerezza.rdf.ontologies._
+import org.slf4j.scala.Logging
+import org.apache.clerezza.platform.users.{WebIdInfo, WebIdGraphsService}
+import org.apache.clerezza.rdf.scala.utils._
+
+/**
+ * Presents a panel where the user can create a webid and edit her profile.
+ *
+ * @author reto
+ */
+
+@Path("/user/{id}/profile")
+class ProfilePanel extends Logging {
+
+  import collection.JavaConversions._
+  import Preamble._
+
+  /**
+   * Returns a GraphNode describing a ProfilePage for the user identified by
+   * the specified UserName. A ProfilePage resourcve is retuned for any user
+   * disregarding if they have a WebId and if this is local. The renderlet
+   * may provide instrcutions on how a WebId is created for users that do
+   * not have a WebId and redirect them to their WebId provider if they have
+   * a remote WebId.
+   */
+  @GET
+  def getPersonalProfilePage(@Context uriInfo: UriInfo,
+                             @PathParam(value = "id") userName: String): GraphNode = {
+    TrailingSlash.enforceNotPresent(uriInfo)
+    //not checking as public profile must be public, more selective access control TBD
+    //AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
+    val resultNode= getPersonalProfile(userName, uriInfo)
+    return resultNode
+  }
+
+  private def getPersonalProfile(userName: String, info: UriInfo): GraphNode = {
+    lazy val suggestedPPDUri = getSuggestedPPDUri(userName)
+
+    val profile = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+      def run: GraphNode = {
+        val userInSysGraph = userManager.getUserInSystemGraph(userName)
+        val userResource = userInSysGraph.getNode
+        val profile: GraphNode = userResource match {
+          case blank: BNode => {
+            //user does not have a webId yet
+            val g = new EzMGraph()
+            import g._
+            val profile = bnode
+            (profile -- CONTROLPANEL.isLocalProfile --> bool2lit(true)
+            -- CONTROLPANEL.suggestedPPDUri --> suggestedPPDUri
+            -- FOAF.primaryTopic --> (bnode -- PLATFORM.userName --> userName))
+            profile
+          }
+          case webid: UriRef => {
+            var webIDInfo = webIdGraphsService.getWebIdInfo(webid)
+            var res = new GraphNode(suggestedPPDUri, new UnionMGraph(new SimpleMGraph, webIDInfo.localPublicUserData))
+            (res -- CONTROLPANEL.isLocalProfile --> bool2lit(webIDInfo.isLocal)
+              -- FOAF.primaryTopic --> webid)
+            res
+          }
+        }
+        /*val friendInfo:Iterator[TripleCollection] = for (kn: Triple <- profile.getGraph.filter(userResource.asInstanceOf[NonLiteral], FOAF.knows, null)
+                              if kn.getObject.isInstanceOf[UriRef];
+                              friend = kn.getObject.asInstanceOf[UriRef]
+                              if (friend != suggestedPPDUri)
+        ) yield {
+          try {
+            val friendGraph = tcManager.getGraph(FoafBrowser.removeHash(friend))
+            new RichGraphNode(friend, friendGraph).getNodeContext
+          } catch {
+            case e => {
+              logger.warn("cought exception trying to fetch graph - these graphs should already be in store " + friend, e)
+              new EzMGraph() {
+                friend -- SKOS.note --> ("problem with fetching this node: " + e)
+              }
+            }
+          }
+        }
+        //vera bad: mixing data from different sources
+        for (g <- friendInfo) profile.getGraph.addAll(g) */
+        profile
+      }
+    })
+
+
+    (profile a   PLATFORM.HeadedPage
+             a  CONTROLPANEL.ProfilePage)
+  }
+
+  /**
+   * @param userName
+   * @return the suggested Personal Profile Document URI
+   */
+  def getSuggestedPPDUri(userName: String): UriRef = {
+    return new UriRef(platformConfig.getDefaultBaseUri.getUnicodeString + "user/" + userName + "/profile")
+  }
+
+  @POST
+  @Path("set-existing-webid")
+  def setExistingWebId(@Context uriInfo: UriInfo,
+                       @FormParam("webid") webId: UriRef,
+                       @PathParam(value = "id") userName: String): Response = {
+    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
+    return AccessController.doPrivileged(new PrivilegedAction[Response] {
+      def run: Response = {
+        var userInSystemGraph: GraphNode = userManager.getUserInSystemGraph(userName)
+        userInSystemGraph.replaceWith(webId)
+        return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+      }
+    })
+  }
+
+  @POST
+  @Path("create-new-web-id")
+  def createNewWebId(@Context uriInfo: UriInfo,
+                     @PathParam(value = "id") userName: String): Response = {
+    val ppd: UriRef = getSuggestedPPDUri(userName)
+    val webId: UriRef = new UriRef(ppd.getUnicodeString + "#me")
+    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
+    return AccessController.doPrivileged(new PrivilegedAction[Response] {
+      def run: Response = {
+        userManager.assignPermissionsToUser(userName, java.util.Collections.singletonList(new TcPermission(
+            webId.getUnicodeString, TcPermission.READWRITE).toString))
+        tcManager.getTcAccessController.setRequiredReadPermissionStrings(
+          ppd, Collections.singleton(new TcPermission(
+              Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
+        tcManager.createMGraph(ppd)
+        val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
+        webIDInfo.localPublicUserData.addAll(
+          Arrays.asList(
+            new TripleImpl(ppd, RDF.`type`, FOAF.PersonalProfileDocument),
+            new TripleImpl(ppd, FOAF.primaryTopic, webId))
+        )
+        var userInSystemGraph: GraphNode = userManager.getUserInSystemGraph(userName)
+        userInSystemGraph.replaceWith(webId)
+        return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+      }
+    })
+  }
+
+  /**
+   * Presents a confirmation form for adding a contact
+   */
+  @GET
+  @Path("addContact")
+  def addContactConfirm(@PathParam(value = "id") userName: String,
+    @QueryParam("contactWebId") contactWebId: UriRef): GraphNode = {
+    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
+    val contactNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+      def run = {
+        graphNodeProvider.get(contactWebId);
+      }
+    })
+    val resultGraph = new EzMGraph(new UnionMGraph(new SimpleMGraph, contactNode.getGraph))
+    import resultGraph._
+    val result: GraphNode = bnode
+    result a CONTROLPANEL.ContactConfirmPage
+    result -- FOAF.primaryTopic --> contactNode
+  }
+
+  @POST
+  @Path("addContact")
+  def addContact(@PathParam(value = "id") userName: String, @Context uriInfo: UriInfo,
+                 @FormParam("webId") newContacts: java.util.List[UriRef]): Response = {
+    import collection.JavaConversions._
+    if (newContacts.size > 0) {
+      var me: GraphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+        def run: GraphNode = {
+          return userManager.getUserGraphNode(userName)
+        }
+      })
+      for (contactWebID <- newContacts) {
+        val webIdGraphs = webIdGraphsService.getWebIdInfo(me.getNode.asInstanceOf[UriRef])
+        var meGrph: GraphNode = new GraphNode(me.getNode, webIdGraphs.localPublicUserData)
+        meGrph.addProperty(FOAF.knows, contactWebID)
+      } //todo: one should catch errors here (bad uris sent for ex
+    }
+    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+  }
+
+  /**
+   * Removes a contact
+   */
+  @POST
+  @Path("deleteContact")
+  def deleteContact(@PathParam(value = "id") userName: String, @Context uriInfo: UriInfo,
+                 @FormParam("contactWebId") contactWebId: UriRef): Response = {
+    import collection.JavaConversions._
+    var me: GraphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
+      def run: GraphNode = {
+        return userManager.getUserGraphNode(userName)
+      }
+    })
+    val webIdGraphs = webIdGraphsService.getWebIdInfo(me.getNode.asInstanceOf[UriRef])
+    var meGrph: GraphNode = new GraphNode(me.getNode, webIdGraphs.localPublicUserData)
+    meGrph.deleteProperty(FOAF.knows, contactWebId)
+    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+  }
+
+  /**
+   * @parm webId: A list of WebIDs to be added as Subject Alternative Names
+   * @param cn Common Name, the name that usually appears in the certificate selection box
+   * @param spkac key request in format generated by  Netscape, Safari, Opera
+   * @param crmf hey request in format generated by M$ Explorer
+   * @param csr key request as generated by Javascript of Netscape
+   * @param hours the certificate should last  (hours and days add up)
+   * @param days the certificate should last
+   * @param comment a comment to be attached to the public key in the database
+   */
+  @POST
+  @Path("keygen")
+  def createCert(@FormParam("webId") webIds: java.util.List[URI],
+                 @FormParam("cn") commonName: String,
+                 @FormParam("spkac") spkac: String,
+                 @FormParam("crmf") crmf: String,
+                 @FormParam("csr") csr: String,
+                 @FormParam("hours") hours: String,
+                 @FormParam("days") days: String,
+                 @FormParam("comment") comment: String): Response = {
+    import scala.collection.JavaConversions._
+    var cert: Certificate = null
+    if (spkac != null && spkac.length > 0) {
+      cert = keygenSrvc.createFromSpkac(spkac)
+      if (cert == null) {
+        logger.warn("unable to create certificate from spkac request")
+      }
+    }
+    if (cert == null && crmf != null && crmf.length > 0) {
+      cert = keygenSrvc.createFromCRMF(crmf)
+      if (cert == null) {
+        logger.warn("unable to create certificate from crmf requrest :" + crmf)
+      }
+    }
+    if (cert == null && csr != null && csr.length > 0) {
+      cert = keygenSrvc.createFromPEM(csr)
+      if (cert == null) {
+        logger.warn("unable to create certificate from csr request :" + csr)
+      }
+    }
+    if (cert == null) {
+      throw new RuntimeException("The server was unable to create a certificate")
+    }
+    cert.setSubjectCommonName(commonName)
+    cert.addDurationInHours(hours)
+    cert.addDurationInDays(days)
+    cert.startEarlier("2")
+    for(san: URI<-webIds) {
+      cert.addSubjectAlternativeName(san.toString)
+    }
+    var ser: CertSerialisation = null
+    try {
+      ser = cert.getSerialisation
+    }
+    catch {
+      case ex: Exception => {
+        throw new RuntimeException(ex)
+      }
+    }
+    var pubKey: RSAPublicKey = cert.getSubjectPublicKey.getPublicKey.asInstanceOf[RSAPublicKey]
+    var publicExponent: BigInteger = pubKey.getPublicExponent
+    var modulus: BigInteger = pubKey.getModulus
+
+    for (webid: URI<-webIds
+         if (webid.getScheme=="https"||webid.getScheme=="http");
+          val webidRef = new UriRef(webid.toString);
+         val webIdInfo = webIdGraphsService.getWebIdInfo(webidRef);
+         if (webIdInfo.isLocal)
+    ) {
+      val certGraph = new EzMGraph(webIdInfo.localPublicUserData)
+      import certGraph._
+      val certNode = certGraph.bnode
+      ( (certNode a  RSA.RSAPublicKey)
+         -- CERT.identity -->  webidRef
+         -- RSA.modulus -->  modulus
+         -- RSA.public_exponent -->  publicExponent
+         -- DC.date -->  cert.getStartDate )
+      if (comment != null && comment.length > 0) {
+        certNode --  RDFS.comment -->  comment
+      }
+    }
+    var resBuild: Response.ResponseBuilder = Response.ok(ser.getContent, MediaType.valueOf(ser.getMimeType))
+    return resBuild.build
+  }
+
+  @POST
+  @Path("deletekey")
+  def deleteKey(@Context uriInfo: UriInfo,
+                @FormParam("webId") webId: UriRef,
+                @FormParam("keyhash") keys: List[String]): Response = {
+    val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
+    val agent: GraphNode = new GraphNode(webId, webIDInfo.localPublicUserData)
+    var subjects: Iterator[GraphNode] = agent.getSubjectNodes(CERT.identity)
+    import scala.util.control.Breaks._
+    breakable {
+      import scala.collection.JavaConversions._
+      //to for loop through iterators
+      for (nl <- subjects) {
+        var modulusIt: Iterator[Resource] = nl.getObjects(RSA.modulus)
+        if (!modulusIt.hasNext) break
+        var modLit: Resource = modulusIt.next
+        if (modulusIt.hasNext) logger.warn("data error, a modulus too many in cert for " + webId)
+        if (!(modLit.isInstanceOf[TypedLiteral])) {
+          logger.warn("a public key has a modulus that is not a literal for " + webId)
+          break
+        }
+        var modulus: BigInteger = LiteralFactory.getInstance.createObject(classOf[BigInteger], modLit.asInstanceOf[TypedLiteral])
+        for (key <- keys) {
+          if (modulus.hashCode == Integer.decode(key)) {
+            nl.deleteNodeContext
+            break
+          }
+        }
+      }
+    }
+    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+  }
+
+  @POST
+  @Path("modify")
+  def modifyProfile(@Context uriInfo: UriInfo,
+                    @PathParam("id") userName: String,
+                    @FormParam("webId") webId: UriRef,
+                    @FormParam("name") name: String,
+                    @FormParam("description") description: String): Response = {
+    val webIDInfo = AccessController.doPrivileged(new PrivilegedAction[WebIdInfo] {
+      def run = {
+        webIdGraphsService.getWebIdInfo(webId)
+      }
+    })
+    val agent: GraphNode = new GraphNode(webId, webIDInfo.localPublicUserData)
+    agent.deleteProperties(FOAF.name)
+    agent.addPropertyValue(FOAF.name, name)
+    agent.deleteProperties(DC.description)
+    agent.addPropertyValue(DC.description, description)
+    logger.debug("local graph (uri: {}) is now of size {}".format(webIDInfo.webId, webIDInfo.localPublicUserData.size))
+    RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
+  }
+
+  protected def bindUserManager(usermanager: UserManager): Unit = {
+    userManager = usermanager
+  }
+
+  protected def unbindUserManager(usermanager: UserManager): Unit = {
+    if (userManager == usermanager) {
+      userManager = null
+    }
+  }
+
+  protected def bindGraphNodeProvider(graphNodeProvider: GraphNodeProvider): Unit = {
+    this.graphNodeProvider = graphNodeProvider
+  }
+
+  protected def unbindGraphNodeProvider(graphNodeProvider: GraphNodeProvider): Unit = {
+    this.graphNodeProvider = null
+  }
+
+  protected def bindKeygenSrvc(keygenservice: KeygenService): Unit = {
+    keygenSrvc = keygenservice
+  }
+
+  protected def unbindKeygenSrvc(keygenservice: KeygenService): Unit = {
+    if (keygenSrvc == keygenservice) {
+      keygenSrvc = null
+    }
+  }
+
+
+  protected def bindWebIdGraphsService(webidgraphsservice: WebIdGraphsService): Unit = {
+    webIdGraphsService = webidgraphsservice
+  }
+
+  protected def unbindWebIdGraphsService(webidgraphsservice: WebIdGraphsService): Unit = {
+    webIdGraphsService = null
+  }
+
+  protected def bindPlatformConfig(platformconfig: PlatformConfig): Unit = {
+    platformConfig = platformconfig
+  }
+
+  protected def unbindPlatformConfig(platformconfig: PlatformConfig): Unit = {
+    if (platformConfig == platformconfig) {
+      platformConfig = null
+    }
+  }
+
+  protected def bindTcManager(tcManager: TcManager) = {
+    this.tcManager = tcManager
+  }
+
+  protected def unbindTcManager(tcManager: TcManager) = {
+    this.tcManager = null
+  }
+
+  protected def activate(componentContext: ComponentContext): Unit = {
+    this.componentContext = componentContext
+  }
+
+
+  private var userManager: UserManager = null
+
+  private var graphNodeProvider: GraphNodeProvider = null
+
+  private var webIdGraphsService: WebIdGraphsService = null
+
+  private var keygenSrvc: KeygenService = null
+  private var platformConfig: PlatformConfig = null
+
+
+  private var componentContext: ComponentContext = null
+
+  private var tcManager: TcManager = null;
+
+}
\ No newline at end of file


[76/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
index 35050c0..4ef0976 100644
--- a/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
+++ b/rdf/core/src/main/javacc/org/apache/clerezza/rdf/core/sparql/JavaCCGeneratedSparqlPreParser.jj
@@ -41,8 +41,8 @@ import java.util.regex.Pattern;
 import org.apache.clerezza.commons.rdf.BlankNode;
 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.Iri;
+import org.apache.clerezza.commons.rdf.RDFTerm;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl;
@@ -115,14 +115,14 @@ import org.apache.clerezza.rdf.core.sparql.update.impl.UpdateOperationWithQuads;
  */
 class JavaCCGeneratedSparqlPreParser {
 
-    private static final Iri RDF_TYPE =
-        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
-    private static final Iri RDF_FIRST =
-        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
-    private static final Iri RDF_REST =
-        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
-    private static final Iri RDF_NIL =
-        new Iri("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
+    private static final IRI RDF_TYPE =
+        new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
+    private static final IRI RDF_FIRST =
+        new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#first");
+    private static final IRI RDF_REST =
+        new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest");
+    private static final IRI RDF_NIL =
+        new IRI("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil");
 
     /** A RegEx pattern for separating out a namespace from a prefixed name. */
     private static final Pattern pfxNamePattern = Pattern.compile("([^:]*):(.*)");
@@ -134,17 +134,17 @@ class JavaCCGeneratedSparqlPreParser {
 
     private class GraphRefAllSpec {
         GraphSpec graphSpec;
-        Iri graph;
+        IRI graph;
         public void setGraphSpec(GraphSpec graphSpec) {
             this.graphSpec = graphSpec;
         }
         public GraphSpec getGraphSpec() {
             return this.graphSpec;
         }
-        public void setGraph(Iri graph){
+        public void setGraph(IRI graph){
             this.graph = graph;
         }
-        public Iri getGraph() {
+        public IRI getGraph() {
             return this.graph;
         }
     }
@@ -287,16 +287,16 @@ class JavaCCGeneratedSparqlPreParser {
         return bNode;
     }
 
-    private Iri createUriRef(String r) throws ParseException {
+    private IRI createUriRef(String r) throws ParseException {
         // Create an IRI directly if the string does not start with a prefix
         Matcher m = pfxNamePattern.matcher(r);
         if (!m.matches()) {
             // either a normal IRI, or one with a BASE
-            return isRelative(r) ? new Iri(base + r) : new Iri(r);
+            return isRelative(r) ? new IRI(base + r) : new IRI(r);
         }
         // extract the prefix, and attempt to convert to a URI before creating the reference
         String ns = prefixes.get(m.group(1));
-        return ns == null ? new Iri(r) : new Iri(ns + m.group(2));
+        return ns == null ? new IRI(r) : new IRI(ns + m.group(2));
     }
 
     /**
@@ -558,7 +558,7 @@ private Query ConstructQuery() : {
     return query; }
 }
 
-/* [11]    DescribeQuery ::= 'DESCRIBE' ( VarOrIri+ | '*' ) DatasetClause* WhereClause? SolutionModifier */
+/* [11]    DescribeQuery ::= 'DESCRIBE' ( VarOrIRI+ | '*' ) DatasetClause* WhereClause? SolutionModifier */
 private Query DescribeQuery() : {
     Query query;
     UriRefOrVariable node; } {
@@ -566,7 +566,7 @@ private Query DescribeQuery() : {
     <DESCRIBE> {
     query = new SimpleDescribeQuery(); }
     (
-        ( node=VarOrIri() {
+        ( node=VarOrIRI() {
             ((SimpleDescribeQuery) query).addResourceToDescribe(node); } )+
         |
         "*" {
@@ -597,7 +597,7 @@ private void DatasetClause(Query query) : {} {
 
 /* [14]    DefaultGraphClause ::= SourceSelector */
 private void DefaultGraphClause(Query query) : {
-    Iri defaultGraph; } {
+    IRI defaultGraph; } {
 
     defaultGraph=SourceSelector() {
     ((SimpleQuery) query).addDefaultGraph(defaultGraph); }
@@ -605,17 +605,17 @@ private void DefaultGraphClause(Query query) : {
 
 /* [15]    NamedGraphClause ::= 'NAMED' SourceSelector */
 private void NamedGraphClause(Query query) : {
-    Iri namedGraph; } {
+    IRI namedGraph; } {
 
     <NAMED> namedGraph=SourceSelector() {
     ((SimpleQuery) query).addNamedGraph(namedGraph); }
 }
 
 /* [16]    SourceSelector ::= iri */
-private Iri SourceSelector() : {
-    Iri graph; } {
+private IRI SourceSelector() : {
+    IRI graph; } {
 
-    graph=Iri() {
+    graph=IRI() {
     return graph; }
 }
 
@@ -781,7 +781,7 @@ private void Update1(Update update) : {
 
 /* [31]    Load ::= 'LOAD' 'SILENT'? iri ( 'INTO' GraphRef )? */
 private UpdateOperation Load() : {
-    Iri uriRef;
+    IRI uriRef;
     LoadOperation operation; } {
     <LOAD> {
     operation = new LoadOperation(); }
@@ -789,7 +789,7 @@ private UpdateOperation Load() : {
         <SILENT> {
         operation.setSilent(true); }
     )?
-    uriRef = Iri() {
+    uriRef = IRI() {
     operation.setSource(uriRef); }
     (
         <INTO>
@@ -834,7 +834,7 @@ private UpdateOperation Drop() : {
 
 /* [34]    Create ::= 'CREATE' 'SILENT'? GraphRef */
 private UpdateOperation Create() : {
-    Iri uriRef;
+    IRI uriRef;
     CreateOperation operation; } {
     <CREATE> {
     operation = new CreateOperation(); }
@@ -927,7 +927,7 @@ private UpdateOperation DeleteWhere() : {
 
 /* [41]    Modify ::= ( 'WITH' iri )? ( DeleteClause InsertClause? | InsertClause ) UsingClause* 'WHERE' GroupGraphPattern */
 private UpdateOperation Modify() : {
-    Iri fallbackGraph = null;
+    IRI fallbackGraph = null;
     UpdateOperationWithQuads deleteOperation = null;
     UpdateOperationWithQuads insertOperation = null;
     SimpleDataSet dataSet = new SimpleDataSet();
@@ -935,7 +935,7 @@ private UpdateOperation Modify() : {
     ModifyOperation operation; } {
     (
         <WITH>
-        fallbackGraph = Iri()
+        fallbackGraph = IRI()
     )?
     (
         deleteOperation = DeleteClause()
@@ -986,21 +986,21 @@ private UpdateOperationWithQuads InsertClause() : {
 
 /* [44]    UsingClause ::= 'USING' ( iri | 'NAMED' iri ) */
 private void UsingClause(SimpleDataSet dataSet) : {
-    Iri graph; } {
+    IRI graph; } {
     <USING>
     (
-        graph = Iri() {
+        graph = IRI() {
         dataSet.addDefaultGraph(graph); }
     |
         <NAMED>
-        graph = Iri() {
+        graph = IRI() {
         dataSet.addNamedGraph(graph); }
     )
 }
 
 /* [45]    GraphOrDefault ::= 'DEFAULT_T' | 'GRAPH'? iri */
 private GraphRefAllSpec GraphOrDefault() : {
-    Iri uriRef;
+    IRI uriRef;
     GraphRefAllSpec graphRefAllSpec = new GraphRefAllSpec(); } {
     (
         <DEFAULT_T> {
@@ -1009,7 +1009,7 @@ private GraphRefAllSpec GraphOrDefault() : {
         (
             <GRAPH>
         )?
-        uriRef = Iri() {
+        uriRef = IRI() {
         graphRefAllSpec.setGraph(uriRef);
         graphRefAllSpec.setGraphSpec(GraphSpec.GRAPH); }
     ) {
@@ -1017,16 +1017,16 @@ private GraphRefAllSpec GraphOrDefault() : {
 }
 
 /* [46]    GraphRef ::= 'GRAPH' iri */
-private Iri GraphRef() : {
-    Iri uriRef; } {
+private IRI GraphRef() : {
+    IRI uriRef; } {
     <GRAPH>
-    uriRef = Iri() {
+    uriRef = IRI() {
     return uriRef; }
 }
 
 /* [47]    GraphRefAll ::= GraphRef | 'DEFAULT_T' | 'NAMED' | 'ALL' */
 private GraphRefAllSpec GraphRefAll() : {
-    Iri uriRef;
+    IRI uriRef;
     GraphRefAllSpec graphRefAllSpec = new GraphRefAllSpec(); } {
     (
         uriRef = GraphRef() {
@@ -1076,13 +1076,13 @@ private void Quads(UpdateOperationWithQuads operation) : {
     )*
 }
 
-/* [51]    QuadsNotTriples ::= 'GRAPH' VarOrIri '{' TriplesTemplate? '}' */
+/* [51]    QuadsNotTriples ::= 'GRAPH' VarOrIRI '{' TriplesTemplate? '}' */
 private void QuadsNotTriples(UpdateOperationWithQuads operation) : {
     UriRefOrVariable graph;
     Set<TriplePattern> triplePatterns = null; } {
 
     <GRAPH>
-    graph=VarOrIri()
+    graph=VarOrIRI()
     "{"
     (
         triplePatterns=TriplesTemplate()
@@ -1184,18 +1184,18 @@ private void OptionalGraphPattern(GroupGraphPattern groupGraphPattern) : {
     ((SimpleGroupGraphPattern) groupGraphPattern).addOptionalGraphPattern(optional); }
 }
 
-/* [58]    GraphGraphPattern ::= 'GRAPH' VarOrIri GroupGraphPattern */
+/* [58]    GraphGraphPattern ::= 'GRAPH' VarOrIRI GroupGraphPattern */
 private void GraphGraphPattern(GroupGraphPattern groupGraphPattern) : {
     UriRefOrVariable graph;
     GroupGraphPattern g; } {
 
     <GRAPH>
-    graph=VarOrIri()
+    graph=VarOrIRI()
     g=GroupGraphPattern() {
     ((SimpleGroupGraphPattern) groupGraphPattern).addGraphPattern(new SimpleGraphGraphPattern(graph, g)); }
 }
 
-/* [59]    ServiceGraphPattern ::= 'SERVICE' 'SILENT'? VarOrIri GroupGraphPattern */
+/* [59]    ServiceGraphPattern ::= 'SERVICE' 'SILENT'? VarOrIRI GroupGraphPattern */
 private void ServiceGraphPattern(GroupGraphPattern groupGraphPattern) : {
     UriRefOrVariable service;
     GroupGraphPattern g;
@@ -1206,7 +1206,7 @@ private void ServiceGraphPattern(GroupGraphPattern groupGraphPattern) : {
         <SILENT> {
         silent = true; }
     )?
-    service=VarOrIri()
+    service=VarOrIRI()
     g=GroupGraphPattern() {
     SimpleServiceGraphPattern simpleServiceGraphPattern;
     simpleServiceGraphPattern = new SimpleServiceGraphPattern(service, g);
@@ -1255,14 +1255,14 @@ private InlineData DataBlock() : {
 /* [63]    InlineDataOneVar ::= Var '{' DataBlockValue* '}' */
 private void InlineDataOneVar(InlineData inlineData) : {
     Variable var;
-    RdfTerm val; } {
+    RDFTerm val; } {
 
     var=Var() {
     ((SimpleInlineData) inlineData).addVariable(var); }
     "{"
     (
         val=DataBlockValue() {
-        List<RdfTerm> values = new ArrayList<RdfTerm>();
+        List<RDFTerm> values = new ArrayList<RDFTerm>();
         values.add(val);
         ((SimpleInlineData) inlineData).addValues(values); }
     )*
@@ -1272,7 +1272,7 @@ private void InlineDataOneVar(InlineData inlineData) : {
 /* [64]    InlineDataFull ::= ( NIL | '(' Var* ')' ) '{' ( '(' DataBlockValue* ')' | NIL )* '}' */
 private void InlineDataFull(InlineData inlineData) : {
     Variable var;
-    RdfTerm val; } {
+    RDFTerm val; } {
     (
         <NIL>
     |
@@ -1288,7 +1288,7 @@ private void InlineDataFull(InlineData inlineData) : {
     (
         (
             "(" {
-            List<RdfTerm> values = new ArrayList<RdfTerm>(); }
+            List<RDFTerm> values = new ArrayList<RDFTerm>(); }
             (
                 val=DataBlockValue() {
                 values.add(val); }
@@ -1298,15 +1298,15 @@ private void InlineDataFull(InlineData inlineData) : {
         )
     |
         <NIL> {
-        ((SimpleInlineData) inlineData).addValues(new ArrayList<RdfTerm>()); }
+        ((SimpleInlineData) inlineData).addValues(new ArrayList<RDFTerm>()); }
     )*
     "}"
 }
 
 /* [65]    DataBlockValue ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF' */
-private RdfTerm DataBlockValue() : {
-    RdfTerm r = null; } {
-    (r=Iri() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | <UNDEF> ) {
+private RDFTerm DataBlockValue() : {
+    RDFTerm r = null; } {
+    (r=IRI() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | <UNDEF> ) {
     return r; }
 }
 
@@ -1359,10 +1359,10 @@ private Expression Constraint() : {
 
 /* [70]    FunctionCall ::= iri ArgList */
 private FunctionCall FunctionCall() : {
-    Iri name;
+    IRI name;
     List<Expression> arguments; } {
 
-    name=Iri()
+    name=IRI()
     arguments=ArgList() {
     return new FunctionCall(name, arguments); }
 }
@@ -1477,11 +1477,11 @@ private void PropertyListNotEmpty(ResourceOrVariable subject, Set<TriplePattern>
     )*
 }
 
-/* [78]    Verb ::= VarOrIri | 'a' */
+/* [78]    Verb ::= VarOrIRI | 'a' */
 private UriRefOrVariable Verb() : {
     UriRefOrVariable predicate; } {
 
-    predicate=VarOrIri() {
+    predicate=VarOrIRI() {
     return predicate; }
     | "a" {
     return new UriRefOrVariable(RDF_TYPE); }
@@ -1685,10 +1685,10 @@ private String PathMod() : {} {
 /* [94]    PathPrimary ::= iri | 'a' | '!' PathNegatedPropertySet | '(' Path ')' */
 private PropertyPathExpression PathPrimary() : {
     PropertyPathExpression ppe;
-    Iri uriRef; } {
+    IRI uriRef; } {
 
     (
-        uriRef=Iri() {
+        uriRef=IRI() {
         return new PredicatePath(uriRef); }
     |
         "a" {
@@ -1731,10 +1731,10 @@ private PropertyPathExpression PathNegatedPropertySet() : {
 
 /* [96]    PathOneInPropertySet ::= iri | 'a' | '^' ( iri | 'a' ) */
 private PropertyPathExpression PathOneInPropertySet() : {
-    Iri uriRef; } {
+    IRI uriRef; } {
 
     (
-        uriRef=Iri() {
+        uriRef=IRI() {
         return new PredicatePath(uriRef); }
     |
         "a" {
@@ -1742,7 +1742,7 @@ private PropertyPathExpression PathOneInPropertySet() : {
     |
         "^"
         (
-            uriRef=Iri() {
+            uriRef=IRI() {
             return new UnaryPropertyPathOperation("^", new PredicatePath(uriRef)); }
         |
             "a" {
@@ -1863,16 +1863,16 @@ private ResourceOrVariable VarOrTerm() : {
     )
 }
 
-/* [107]    VarOrIri ::= Var | iri */
-private UriRefOrVariable VarOrIri() : {
+/* [107]    VarOrIRI ::= Var | iri */
+private UriRefOrVariable VarOrIRI() : {
     Variable var;
-    Iri uriRef; } {
+    IRI uriRef; } {
 
     (
     var=Var() {
     return new UriRefOrVariable(var); }
     |
-    uriRef=Iri() {
+    uriRef=IRI() {
     return new UriRefOrVariable(uriRef); }
     )
 }
@@ -1885,12 +1885,12 @@ private Variable Var() : {
     return createVariable(t.image); }
 }
 
-/* [109]    GraphTerm ::= Iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL */
+/* [109]    GraphTerm ::= IRI | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL */
 private ResourceOrVariable GraphTerm() : {
     ResourceOrVariable bNode = null;
-    RdfTerm r = null; } {
+    RDFTerm r = null; } {
 
-    (r=Iri() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | bNode=BlankNode() | <NIL> {
+    (r=IRI() | r=RDFLiteral() | r=NumericLiteral() | r=BooleanLiteral() | bNode=BlankNode() | <NIL> {
         r = RDF_NIL; }) {
     if (bNode == null) {
         return new ResourceOrVariable(r);
@@ -2057,7 +2057,7 @@ private Expression PrimaryExpression() : {
         e=BuiltInCall()
 */
     |
-        e=IriOrFunction()
+        e=IRIOrFunction()
     |
         l=RDFLiteral()
     |
@@ -2283,12 +2283,12 @@ private Expression NotExistsFunc() : {
     return patternExistenceCondition; }
 }
 
-/* [128]    IriOrFunction ::= iri ArgList? */
-private Expression IriOrFunction() : {
-    Iri uriRef;
+/* [128]    IRIOrFunction ::= iri ArgList? */
+private Expression IRIOrFunction() : {
+    IRI uriRef;
     List<Expression> args; } {
 
-    uriRef=Iri()
+    uriRef=IRI()
     (
         args=ArgList() {
         return new FunctionCall(uriRef, args); }
@@ -2300,7 +2300,7 @@ private Expression IriOrFunction() : {
 private Literal RDFLiteral() : {
     Token t;
     String s;
-    Iri type; } {
+    IRI type; } {
 
     s = String()
     (
@@ -2309,7 +2309,7 @@ private Literal RDFLiteral() : {
     |
         (
             "^^"
-            type=Iri() {
+            type=IRI() {
             return new TypedLiteralImpl(s, type); }
         )
     )? {
@@ -2400,8 +2400,8 @@ private String String() : {
 }
 
 /* [136]    iri ::= IRIREF |  PrefixedName */
-private Iri Iri() : {
-    Iri uriRef;
+private IRI IRI() : {
+    IRI uriRef;
     Token t; } {
 
         t=<IRIREF> {
@@ -2412,7 +2412,7 @@ private Iri Iri() : {
 }
 
 /* [137]    PrefixedName ::= PNAME_LN | PNAME_NS */
-private Iri PrefixedName() : {
+private IRI PrefixedName() : {
     Token t; } {
 
     ( t=<PNAME_LN> | t=<PNAME_NS> ) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
index e333535..f0dbd79 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LiteralFactoryTest.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.rdf.core;
 
 
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import java.util.Arrays;
 import java.util.Date;
 import org.junit.Test;
@@ -52,7 +52,7 @@ public class LiteralFactoryTest {
             bytes[i] = i;
         }
         Literal literal = LiteralFactory.getInstance().createTypedLiteral(bytes);
-        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#base64Binary"), 
+        Assert.assertEquals(new IRI("http://www.w3.org/2001/XMLSchema#base64Binary"), 
                 literal.getDataType());
         //we are using bytes.getClass() but there should be a way to get
         //that instance of Class without getting it from an instance
@@ -69,7 +69,7 @@ public class LiteralFactoryTest {
     public void dateConversion() {
         Date date = new Date();
         Literal literal = LiteralFactory.getInstance().createTypedLiteral(date);
-        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#dateTime"),
+        Assert.assertEquals(new IRI("http://www.w3.org/2001/XMLSchema#dateTime"),
                 literal.getDataType());
         Date dateBack = LiteralFactory.getInstance().createObject(Date.class, literal);
         Assert.assertEquals(date.getTime(), dateBack.getTime());
@@ -83,7 +83,7 @@ public class LiteralFactoryTest {
     public void stringConversion() {
         String value = "Hello world";
         Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#string"),
+        Assert.assertEquals(new IRI("http://www.w3.org/2001/XMLSchema#string"),
                 literal.getDataType());
         String valueBack = LiteralFactory.getInstance().createObject(String.class, literal);
         Assert.assertEquals(value, valueBack);
@@ -97,7 +97,7 @@ public class LiteralFactoryTest {
     public void intConversion() {
         int value = 3;
         Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#int"),
+        Assert.assertEquals(new IRI("http://www.w3.org/2001/XMLSchema#int"),
                 literal.getDataType());
         Integer valueBack = LiteralFactory.getInstance().createObject(Integer.class, literal);
         Assert.assertEquals(value, valueBack.intValue());
@@ -111,7 +111,7 @@ public class LiteralFactoryTest {
     public void longConversion() {
         long value = 332314646;
         Literal literal = LiteralFactory.getInstance().createTypedLiteral(value);
-        Assert.assertEquals(new Iri("http://www.w3.org/2001/XMLSchema#long"),
+        Assert.assertEquals(new IRI("http://www.w3.org/2001/XMLSchema#long"),
                 literal.getDataType());
         Long valueBack = LiteralFactory.getInstance().createObject(Long.class, literal);
         Assert.assertEquals(value, valueBack.longValue());

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

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
index 6e3ab07..181e36f 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/TcManagerTest.java
@@ -27,7 +27,7 @@ import org.mockito.Mockito;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
 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.rdf.core.access.providers.WeightedA;
 import org.apache.clerezza.rdf.core.access.providers.WeightedA1;
 import org.apache.clerezza.rdf.core.access.providers.WeightedAHeavy;
@@ -50,10 +50,10 @@ import static org.junit.Assert.*;
  */
 public class TcManagerTest {
 
-	public static Iri uriRefAHeavy = new Iri("http://example.org/aHeavy");
-	public static Iri uriRefB = new Iri("http://example.org/b");;
-	public static final Iri uriRefA = new Iri("http://example.org/a");
-	public static final Iri uriRefA1 = new Iri("http://example.org/a1");
+	public static IRI uriRefAHeavy = new IRI("http://example.org/aHeavy");
+	public static IRI uriRefB = new IRI("http://example.org/b");;
+	public static final IRI uriRefA = new IRI("http://example.org/a");
+	public static final IRI uriRefA1 = new IRI("http://example.org/a1");
 	private TcManager graphAccess;
 	private QueryEngine queryEngine;
 	private final WeightedA weightedA = new WeightedA();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
index 0216dd6..624a80d 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
@@ -24,7 +24,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.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -37,14 +37,14 @@ import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
  * @author reto
  */
 public class WeightedA implements WeightedTcProvider {
-    private Set<Iri> mGraphList = new HashSet<Iri>();
+    private Set<IRI> mGraphList = new HashSet<IRI>();
     @Override
     public int getWeight() {
         return 5;
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefA)) {
             Graph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefA, 
@@ -56,48 +56,48 @@ public class WeightedA implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getImmutableGraph(name);
     }
 
     @Override
-    public Graph createGraph(Iri name) {
+    public Graph createGraph(IRI name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteGraph(Iri name) throws NoSuchEntityException, 
+    public void deleteGraph(IRI name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return Collections.singleton(TcManagerTest.uriRefA);
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         return mGraphList;
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         return listGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
index f121cdf..9053e02 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA1.java
@@ -24,7 +24,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.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -38,14 +38,14 @@ import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
  * @author reto
  */
 public class WeightedA1 implements WeightedTcProvider {
-    private Set<Iri> mGraphList = new HashSet<Iri>();
+    private Set<IRI> mGraphList = new HashSet<IRI>();
     @Override
     public int getWeight() {
         return 5;
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefA)) {
             Graph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefA1, 
@@ -57,48 +57,48 @@ public class WeightedA1 implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getImmutableGraph(name);
     }
 
     @Override
-    public Graph createGraph(Iri name) {
+    public Graph createGraph(IRI name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteGraph(Iri name) throws NoSuchEntityException, 
+    public void deleteGraph(IRI name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         return mGraphList;
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return listMGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
index ef9497e..7674ca6 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedAHeavy.java
@@ -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.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -46,7 +46,7 @@ public class WeightedAHeavy implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefA)) {
             Graph mResult = new SimpleGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefAHeavy, 
@@ -57,47 +57,47 @@ public class WeightedAHeavy implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getImmutableGraph(name);
     }
 
     @Override
-    public Graph createGraph(Iri name) {
+    public Graph createGraph(IRI name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteGraph(Iri name) throws NoSuchEntityException, 
+    public void deleteGraph(IRI name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return Collections.singleton(TcManagerTest.uriRefA);
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        return new HashSet<Iri>();
+    public Set<IRI> listMGraphs() {
+        return new HashSet<IRI>();
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         return listGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
index d528fbd..68ad4cf 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedBlight.java
@@ -24,7 +24,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.Graph;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
@@ -44,7 +44,7 @@ public class WeightedBlight implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         if (name.equals(TcManagerTest.uriRefB)) {
             Graph mResult = new SimpleMGraph();
             mResult.add(new TripleImpl(TcManagerTest.uriRefB, TcManagerTest.uriRefB, TcManagerTest.uriRefB));
@@ -59,48 +59,48 @@ public class WeightedBlight implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getImmutableGraph(name);
     }
 
     @Override
-    public Graph createGraph(Iri name) {
+    public Graph createGraph(IRI name) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void deleteGraph(Iri name) throws NoSuchEntityException, 
+    public void deleteGraph(IRI name) throws NoSuchEntityException, 
             EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        return new HashSet<Iri>();
+    public Set<IRI> listMGraphs() {
+        return new HashSet<IRI>();
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return listMGraphs();
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
index 64c164d..5d616fb 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedDummy.java
@@ -26,7 +26,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.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.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
  */
 public class WeightedDummy 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)) {
@@ -69,7 +69,7 @@ public class WeightedDummy 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");
@@ -88,7 +88,7 @@ public class WeightedDummy 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);
@@ -96,7 +96,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         Graph Graph = tripleMap.get(name);
         if (Graph == null) {
             throw new NoSuchEntityException(name);
@@ -107,7 +107,7 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         Graph Graph = tripleMap.get(name);
         if (Graph == null) {
             throw new NoSuchEntityException(name);
@@ -118,13 +118,13 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph ImmutableGraph) {
+    public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
         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 Graph = tripleMap.get(name);
         if (Graph == null) {
@@ -140,17 +140,17 @@ public class WeightedDummy implements WeightedTcProvider {
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
-        return new HashSet<Iri>();
+    public Set<IRI> listMGraphs() {
+        return new HashSet<IRI>();
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return listMGraphs();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
index 36d3584..e8b16b8 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/impl/util/SimpleLiteralFactoryTest.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.rdf.core.impl.util;
 import junit.framework.Assert;
 import org.apache.clerezza.rdf.core.impl.util.SimpleLiteralFactory;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.junit.Test;
 
 /**
@@ -30,12 +30,12 @@ import org.junit.Test;
  */
 public class SimpleLiteralFactoryTest {
 
-    final private static Iri xsdInteger = 
-            new Iri("http://www.w3.org/2001/XMLSchema#integer");
-    final private static Iri xsdInt =
-            new Iri("http://www.w3.org/2001/XMLSchema#int");
-    final private static Iri xsdLong =
-            new Iri("http://www.w3.org/2001/XMLSchema#long");
+    final private static IRI xsdInteger = 
+            new IRI("http://www.w3.org/2001/XMLSchema#integer");
+    final private static IRI xsdInt =
+            new IRI("http://www.w3.org/2001/XMLSchema#int");
+    final private static IRI xsdLong =
+            new IRI("http://www.w3.org/2001/XMLSchema#long");
 
     SimpleLiteralFactory simpleLiteralFactory = new SimpleLiteralFactory();
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
index 2919ba4..2745026 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/ParserTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.serializedform;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.Graph;
 import java.io.InputStream;
 import junit.framework.Assert;
@@ -74,7 +74,7 @@ public class ParserTest {
     static class ParsingProviderA implements ParsingProvider {
 
         @Override
-        public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
+        public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, IRI baseUri) {
             providerAInvoked = true;
         }
     };
@@ -82,7 +82,7 @@ public class ParserTest {
     static class ParsingProviderB implements ParsingProvider {
 
         @Override
-        public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
+        public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, IRI baseUri) {
             providerBInvoked = true;
         }
     };

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
index 6bf5c91..7e7adb7 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/serializedform/TestServiceManagedProvider.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
 import org.apache.clerezza.commons.rdf.Graph;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * This class is listed in
@@ -36,7 +36,7 @@ public class TestServiceManagedProvider implements ParsingProvider {
     private static boolean parseInvoked;
 
     @Override
-    public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, Iri baseUri) {
+    public void parse(Graph target, InputStream serializedGraph, String formatIdentifier, IRI baseUri) {
         parseInvoked = true;
     }
     

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

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

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

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
index 388bbdb..a1cec37 100644
--- a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileGraph.java
@@ -30,10 +30,10 @@ import java.util.Collection;
 
 import java.util.Iterator;
 import org.apache.clerezza.commons.rdf.ImmutableGraph;
-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.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
@@ -49,7 +49,7 @@ public class FileGraph extends SimpleGraph {
     private File file;
     private String fileType;
 
-    FileGraph(Iri uri, Parser parser,
+    FileGraph(IRI uri, Parser parser,
             Serializer serializer) {
         this(new File(URI.create(uri.getUnicodeString())), parser, serializer);    
     }
@@ -121,9 +121,9 @@ public class FileGraph extends SimpleGraph {
     }
     
     @Override
-    public Iterator<Triple> filter(final BlankNodeOrIri subject,
-            final Iri predicate,
-            final RdfTerm object) {
+    public Iterator<Triple> filter(final BlankNodeOrIRI subject,
+            final IRI predicate,
+            final RDFTerm object) {
         final Iterator<Triple> baseIter = super.filter(subject, predicate, object);
         Iterator<Triple> iterator = new Iterator<Triple>() {
 


[70/87] [abbrv] clerezza git commit: CLEREZZA-982: using new package names for rdf-core

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java b/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
index ce9e30e..6c48057 100644
--- a/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
+++ b/rdf/jena/parser/src/test/java/org/apache/clerezza/rdf/jena/parser/JenaParserProviderTest.java
@@ -24,10 +24,10 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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.impl.utils.simple.SimpleGraph;
 
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/serializer/src/main/java/org/apache/clerezza/rdf/jena/serializer/JenaSerializerProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/serializer/src/main/java/org/apache/clerezza/rdf/jena/serializer/JenaSerializerProvider.java b/rdf/jena/serializer/src/main/java/org/apache/clerezza/rdf/jena/serializer/JenaSerializerProvider.java
index 19baad1..4a3bbe5 100644
--- a/rdf/jena/serializer/src/main/java/org/apache/clerezza/rdf/jena/serializer/JenaSerializerProvider.java
+++ b/rdf/jena/serializer/src/main/java/org/apache/clerezza/rdf/jena/serializer/JenaSerializerProvider.java
@@ -30,7 +30,7 @@ import com.hp.hpl.jena.rdf.model.ModelFactory;
 import com.hp.hpl.jena.rdf.model.RDFWriter;
 import java.util.concurrent.locks.Lock;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedSerializationFormatException;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java b/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
index d1e0726..6bf0f75 100644
--- a/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
+++ b/rdf/jena/serializer/src/test/java/org/apache/clerezza/rdf/jena/serializer/TestJenaSerializerProvider.java
@@ -24,19 +24,19 @@ import java.io.InputStream;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.serializedform.SerializingProvider;
 import org.apache.clerezza.rdf.jena.facade.JenaGraph;
 
 import com.hp.hpl.jena.rdf.model.Model;
 import com.hp.hpl.jena.rdf.model.ModelFactory;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNode;
 
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 /**
  * Serializes a ImmutableGraph to different formats

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
index a8c83c3..f43b596 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/HashMapSolutionMapping.java
@@ -23,8 +23,8 @@ import com.hp.hpl.jena.query.QuerySolution;
 import com.hp.hpl.jena.rdf.model.RDFNode;
 import java.util.HashMap;
 import java.util.Iterator;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.RdfTerm;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import org.apache.clerezza.rdf.jena.commons.Jena2TriaUtil;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
index 940b963..96ddf7d 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/JenaSparqlEngine.java
@@ -43,10 +43,10 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.locks.Lock;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ParseException;
 import org.apache.clerezza.rdf.core.sparql.SparqlPreParser;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
index 9fe0cc8..e56b7ae 100644
--- a/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
+++ b/rdf/jena/sparql/src/main/java/org/apache/clerezza/rdf/jena/sparql/TcDatasetGraph.java
@@ -25,8 +25,8 @@ import com.hp.hpl.jena.sparql.core.DatasetGraph;
 import com.hp.hpl.jena.sparql.core.Quad;
 import com.hp.hpl.jena.sparql.util.Context;
 import java.util.Iterator;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+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.jena.facade.JenaGraph;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java b/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
index 8fabc4e..76d762b 100644
--- a/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
+++ b/rdf/jena/sparql/src/test/java/org/apache/clerezza/rdf/jena/sparql/SimpleTest.java
@@ -22,13 +22,13 @@ import java.util.List;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.TripleImpl;
 import org.apache.clerezza.rdf.core.sparql.ParseException;
 import org.apache.clerezza.rdf.core.sparql.QueryParser;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
----------------------------------------------------------------------
diff --git a/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java b/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
index 87df8b1..bf40c66 100644
--- a/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
+++ b/rdf/jena/storage/src/main/java/org/apache/clerezza/rdf/jena/storage/JenaGraphAdaptor.java
@@ -25,14 +25,14 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.rdf.jena.commons.Jena2TriaUtil;
 import org.apache.clerezza.rdf.jena.commons.Tria2JenaUtil;
-import org.apache.commons.rdf.impl.utils.AbstractGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph;
 import org.wymiwyg.commons.util.collections.BidiMap;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/storage/src/test/java/org/apache/clerezza/rdf/jena/storage/RoundTripTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/storage/src/test/java/org/apache/clerezza/rdf/jena/storage/RoundTripTest.java b/rdf/jena/storage/src/test/java/org/apache/clerezza/rdf/jena/storage/RoundTripTest.java
index efe68cf..48daa7d 100644
--- a/rdf/jena/storage/src/test/java/org/apache/clerezza/rdf/jena/storage/RoundTripTest.java
+++ b/rdf/jena/storage/src/test/java/org/apache/clerezza/rdf/jena/storage/RoundTripTest.java
@@ -25,9 +25,9 @@ import com.hp.hpl.jena.vocabulary.DC;
 import com.hp.hpl.jena.vocabulary.RDFS;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.jena.facade.JenaGraph;
 import org.apache.clerezza.rdf.ontologies.SKOS04;
 import org.apache.clerezza.rdf.core.LiteralFactory;
@@ -40,11 +40,11 @@ public class RoundTripTest {
 
     @Test
     public void addAndCount() {
-        org.apache.commons.rdf.Graph mGraph = new SimpleGraph();
+        org.apache.clerezza.commons.rdf.Graph mGraph = new SimpleGraph();
         Graph jenaGraph = new JenaGraph(mGraph);
         Model model = ModelFactory.createModelForGraph(jenaGraph);
         model.add(DC.title, RDFS.label, "title");
-        org.apache.commons.rdf.Graph rewrappedGraph = new JenaGraphAdaptor(jenaGraph);
+        org.apache.clerezza.commons.rdf.Graph rewrappedGraph = new JenaGraphAdaptor(jenaGraph);
         Assert.assertEquals(1, rewrappedGraph.size());
         rewrappedGraph.add(new TripleImpl(new BlankNode(), SKOS04.prefLabel,
                 LiteralFactory.getInstance().createTypedLiteral("foo")));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
index 1eb5d55..5f23953 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/IriSet.java
@@ -3,8 +3,8 @@ package org.apache.clerezza.rdf.jena.tdb.internals;
 import java.util.AbstractSet;
 import java.util.Iterator;
 
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
index 7ea89eb..80a5210 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/ModelGraph.java
@@ -2,11 +2,11 @@ package org.apache.clerezza.rdf.jena.tdb.internals;
 
 import java.util.concurrent.locks.ReadWriteLock;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
 
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper;
 import org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper;
 import org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor;
@@ -16,7 +16,7 @@ import com.hp.hpl.jena.rdf.model.Model;
 import com.hp.hpl.jena.sparql.core.DatasetGraph;
 import com.hp.hpl.jena.sparql.core.Quad;
 import com.hp.hpl.jena.tdb.TDB;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
 
 /**
  * Represents the Jena {@link Model} and the Clerezza {@link ImmutableGraph} or

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
index 39ec2fd..0afa3fa 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/internals/Symbols.java
@@ -1,6 +1,6 @@
 package org.apache.clerezza.rdf.jena.tdb.internals;
 
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 /**
  * Provides static methods in order to represent classes used to

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
index feb5dcc..8c05d7b 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/BaseTdbTcProvider.java
@@ -3,7 +3,7 @@ package org.apache.clerezza.rdf.jena.tdb.storage;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.access.QueryableTcProvider;
 import org.apache.clerezza.rdf.core.sparql.query.Query;
 import org.apache.clerezza.rdf.jena.sparql.ResultSetWrapper;
@@ -18,7 +18,7 @@ import com.hp.hpl.jena.query.QueryFactory;
 import com.hp.hpl.jena.update.GraphStore;
 import com.hp.hpl.jena.update.GraphStoreFactory;
 import com.hp.hpl.jena.update.UpdateAction;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 
 abstract class BaseTdbTcProvider implements QueryableTcProvider{
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
index d18b20b..4264c2d 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProvider.java
@@ -13,18 +13,18 @@ import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+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.rdf.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.QueryableTcProvider;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.jena.tdb.internals.ModelGraph;
 import org.apache.clerezza.rdf.jena.tdb.internals.Symbols;
 import org.apache.clerezza.rdf.jena.tdb.internals.IriSet;
@@ -396,7 +396,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.Iri)
      */
     @Override
     public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
@@ -417,7 +417,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getGraph(org.apache.clerezza.commons.rdf.Iri)
      */
     @Override
     public Graph getMGraph(Iri name) throws NoSuchEntityException {
@@ -438,7 +438,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getTriples(org.apache.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getTriples(org.apache.clerezza.commons.rdf.Iri)
      */
     @Override
     public Graph getGraph(Iri name) throws NoSuchEntityException {
@@ -503,7 +503,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
 
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.Iri)
      */
     @Override
     public Graph createGraph(Iri name) throws UnsupportedOperationException,
@@ -526,7 +526,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.commons.rdf.Iri, org.apache.commons.rdf.Graph)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#createGraph(org.apache.clerezza.commons.rdf.Iri, org.apache.clerezza.commons.rdf.Graph)
      */
     @Override
     public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws UnsupportedOperationException,
@@ -556,7 +556,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#deleteGraph(org.apache.commons.rdf.Iri)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#deleteGraph(org.apache.clerezza.commons.rdf.Iri)
      */
     @Override
     public void deleteGraph(Iri name) throws UnsupportedOperationException,
@@ -587,7 +587,7 @@ public class SingleTdbDatasetTcProvider extends BaseTdbTcProvider implements Wei
     
     /*
      * (non-Javadoc)
-     * @see org.apache.clerezza.rdf.core.access.TcProvider#getNames(org.apache.commons.rdf.ImmutableGraph)
+     * @see org.apache.clerezza.rdf.core.access.TcProvider#getNames(org.apache.clerezza.commons.rdf.ImmutableGraph)
      */
     @Override
     public Set<Iri> getNames(ImmutableGraph graph) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
index c9733ff..6c7578b 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
@@ -38,15 +38,15 @@ import java.util.logging.Level;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 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.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper;
 import org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor;
 import org.apache.felix.scr.annotations.Component;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
index d08ce42..d348532 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
@@ -33,13 +33,13 @@ import java.util.Random;
 import java.util.Set;
 
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+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.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
index 88a6cec..00ec289 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
@@ -28,14 +28,14 @@ import java.util.HashSet;
 import java.util.Set;
 
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Graph;
+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.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.felix.scr.annotations.Activate;
 import org.junit.Assert;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
index 2554225..b76f676 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
@@ -31,15 +31,15 @@ import java.util.Hashtable;
 import java.util.Set;
 
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Graph;
+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.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.felix.scr.annotations.Activate;
 import org.junit.Assert;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
index 30451f3..1a5b78a 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetGraphTest.java
@@ -5,8 +5,8 @@ import java.io.IOException;
 import java.util.Dictionary;
 import java.util.Hashtable;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.test.GraphTest;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
index 2d3fe66..b90cfed 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/SingleTdbDatasetTcProviderTest.java
@@ -9,16 +9,16 @@ import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+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.Triple;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.TripleImpl;
 import org.apache.clerezza.rdf.core.test.TcProviderTest;
 import org.junit.After;
 import org.junit.Assert;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
index 72a9f57..4dbaceb 100644
--- a/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
+++ b/rdf/jena/tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbGraphTest.java
@@ -23,16 +23,16 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.Iterator;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.BlankNode;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.test.GraphTest;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.junit.Assert;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
----------------------------------------------------------------------
diff --git a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
index 98e769a..d68173b 100644
--- a/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
+++ b/rdf/rdfa/src/main/java/org/apache/clerezza/rdf/rdfa/ClerezzaRDFaParser.java
@@ -22,8 +22,8 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import net.rootdev.javardfa.Parser;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 718a8fb..cbb90be 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
@@ -22,16 +22,16 @@ import java.util.HashMap;
 import java.util.Map;
 
 import net.rootdev.javardfa.StatementSink;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.Language;
+import org.apache.clerezza.commons.rdf.Literal;
+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;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 c9fcc11..7fb0bb4 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.commons.rdf.Iri
-import org.apache.commons.rdf.Language
-import org.apache.commons.rdf.Literal
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl
-//import org.apache.commons.rdf.core.{TypedLiteral, Language, PlainLiteral, 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}
 
 object EzLiteral extends EzLiteralImplicits
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 6ddb92b..1e86b50 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
@@ -21,14 +21,14 @@ package org.apache.clerezza.rdf.scala.utils
 
 import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.core.impl._
-import org.apache.commons.rdf.BlankNode
-import org.apache.commons.rdf.BlankNodeOrIri
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.RdfTerm
-import org.apache.commons.rdf.Triple
-import org.apache.commons.rdf.impl.utils.AbstractGraph
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.BlankNode
+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.Triple
+import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import scala.collection.mutable.HashMap
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
index 19be8aa..fc44b29 100644
--- a/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
+++ b/rdf/scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.scala.utils
 
-import org.apache.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Iri
 
 /**
  * A IRI-namespace prefix

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 8af2452..f9c4c55 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
@@ -26,13 +26,13 @@ import java.net.URI
 import java.net.URL
 import java.util.Date
 import org.apache.clerezza.rdf.core._
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.Literal
-import org.apache.commons.rdf.RdfTerm
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph
+import org.apache.clerezza.commons.rdf.Graph
+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.impl.utils.PlainLiteralImpl
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph
 
 /**
 * This object provides the implicit conversions. Typically this is used by

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 4f2addc..86d436c 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
@@ -24,11 +24,11 @@ import org.apache.clerezza.rdf.utils.GraphNode
 import java.util.Iterator
 import _root_.scala.collection.JavaConversions._
 import _root_.scala.reflect.Manifest
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.Literal
-import org.apache.commons.rdf.RdfTerm
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.Graph
+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.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.rdf.utils.UnionGraph
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
index 3e72d87..d5e6544 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
@@ -18,14 +18,14 @@
  */
 package org.apache.clerezza.rdf.scala.utils
 
-import org.apache.commons.rdf.BlankNode
-import org.apache.commons.rdf.ImmutableGraph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.Language
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl
-import org.apache.commons.rdf.impl.utils.TripleImpl
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.BlankNode
+import org.apache.clerezza.commons.rdf.ImmutableGraph
+import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Language
+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
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.junit._
 import org.apache.clerezza.rdf.core._
 import impl._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
index 2029c03..5240cc7 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNodeTest.scala
@@ -22,15 +22,15 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.core.impl._
 import org.apache.clerezza.rdf.ontologies._
-import org.apache.commons.rdf.BlankNode
-import org.apache.commons.rdf.Graph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.Language
-import org.apache.commons.rdf.Literal
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl
-import org.apache.commons.rdf.impl.utils.TripleImpl
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
+import org.apache.clerezza.commons.rdf.BlankNode
+import org.apache.clerezza.commons.rdf.Graph
+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.TripleImpl
+import org.apache.clerezza.commons.rdf.impl.utils.TypedLiteralImpl
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph
 import org.junit._
 import Preamble._
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
----------------------------------------------------------------------
diff --git a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
index 5798e86..d73d5f6 100644
--- a/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
+++ b/rdf/scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/TypeConversionTest.scala
@@ -18,11 +18,11 @@ package org.apache.clerezza.rdf.scala.utils
  * specific language governing permissions and limitations
  * under the License.
  */
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf.Language
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl
-import org.apache.commons.rdf.impl.utils.TripleImpl
-import org.apache.commons.rdf.impl.utils.TypedLiteralImpl
+import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf.Language
+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
 import org.junit._
 import org.apache.clerezza.rdf.core._
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 adbfbeb..ad73af9 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
@@ -34,15 +34,15 @@ import java.util.TreeSet;
 
 
 import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.Literal;
+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;
 import org.wymiwyg.commons.util.arguments.ArgumentHandler;
 import org.wymiwyg.commons.util.arguments.InvalidArgumentsException;
@@ -133,7 +133,7 @@ public class SchemaGen {
             out.println(';');
         }
         out.println();
-        out.println("import org.apache.commons.rdf.Iri;");
+        out.println("import org.apache.clerezza.commons.rdf.Iri;");
         out.println();
         out.print("public class ");
         out.print(getSimpleName());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 1754a9c..1dbdaa1 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
@@ -23,16 +23,16 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 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.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
 import org.osgi.service.component.annotations.Component;
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 4598cfb..9c86d60 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
@@ -16,9 +16,9 @@
 package org.apache.clerezza.rdf.simple.storage;
 
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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.junit.Assert;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/SimpleGraphGenericTest.java
----------------------------------------------------------------------
diff --git a/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/SimpleGraphGenericTest.java b/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/SimpleGraphGenericTest.java
index b98c459..99127e0 100644
--- a/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/SimpleGraphGenericTest.java
+++ b/rdf/simple.storage/src/test/java/org/apache/clerezza/rdf/simple/storage/SimpleGraphGenericTest.java
@@ -18,8 +18,8 @@
  */
 package org.apache.clerezza.rdf.simple.storage;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.test.GraphTest;
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf/storage.web/src/main/scala/WebProxy.scala b/rdf/storage.web/src/main/scala/WebProxy.scala
index 3a03e3b..e51d91c 100644
--- a/rdf/storage.web/src/main/scala/WebProxy.scala
+++ b/rdf/storage.web/src/main/scala/WebProxy.scala
@@ -20,10 +20,10 @@
 package org.apache.clerezza.rdf.storage.web
 
 
-import org.apache.commons.rdf.ImmutableGraph
-import org.apache.commons.rdf.Iri
-import org.apache.commons.rdf._
-import org.apache.commons.rdf.impl.utils.AbstractGraph
+import org.apache.clerezza.commons.rdf.ImmutableGraph
+import org.apache.clerezza.commons.rdf.Iri
+import org.apache.clerezza.commons.rdf._
+import org.apache.clerezza.commons.rdf.impl.utils.AbstractGraph
 import org.osgi.service.component.ComponentContext
 import java.io.IOException
 import java.net.{HttpURLConnection, URL}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 a95608d..af8696c 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
@@ -18,13 +18,13 @@
  */
 package org.apache.clerezza.rdf.utils;
 
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 
 import java.util.*;
 import java.util.concurrent.locks.Lock;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.*;
+import org.apache.clerezza.commons.rdf.*;
 
 /**
  * This class represents a node in the context of a graph. It provides

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 dc3943b..4ed57cd 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
@@ -22,13 +22,13 @@ package org.apache.clerezza.rdf.utils;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+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.Triple;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 
 /**
  * Utility methods to manipulate <code>Graph</code>s

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 db994e9..f6e4311 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
@@ -27,16 +27,16 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 fef7e4b..9bcc652 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.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.ontologies.RDFS;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/Smusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/Smusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/Smusher.java
index 8d0ea45..49daa75 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/Smusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/Smusher.java
@@ -18,7 +18,7 @@
  */
 package org.apache.clerezza.rdf.utils;
 
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.utils.smushing.IfpSmusher;
 import org.apache.clerezza.rdf.utils.smushing.SameAsSmusher;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 a928f79..d2bf031 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,12 +27,12 @@ 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.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.AbstractGraph;
+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;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionWatchableGraph.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionWatchableGraph.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionWatchableGraph.java
index 3892811..52ed1ba 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionWatchableGraph.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/UnionWatchableGraph.java
@@ -15,10 +15,10 @@
  */
 package org.apache.clerezza.rdf.utils;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.WatchableGraph;
-import org.apache.commons.rdf.event.FilterTriple;
-import org.apache.commons.rdf.event.GraphListener;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.WatchableGraph;
+import org.apache.clerezza.commons.rdf.event.FilterTriple;
+import org.apache.clerezza.commons.rdf.event.GraphListener;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 4b0a4dc..6834726 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,15 +22,15 @@ package org.apache.clerezza.rdf.utils;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.AbstractGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
+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.impl.utils.AbstractGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
 
 /**
  * This wrapps a Triplecollection changing a prefix for the Iris contained

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 03c73a5..a8c59f2 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.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 1841cd1..f296849 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
@@ -21,14 +21,14 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.locks.Lock;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.Triple;
+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;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/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 fad1d6b..5b3b410 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
@@ -25,11 +25,11 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Graph;
+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.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
index e656a42..59911c4 100644
--- a/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
+++ b/rdf/utils/src/main/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmusher.java
@@ -24,10 +24,10 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+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.rdf.ontologies.OWL;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
index fa14977..3b78422 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/GraphUtilsTest.java
@@ -19,11 +19,11 @@
 
 package org.apache.clerezza.rdf.utils;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.utils.GraphUtils.NoSuchSubGraphException;
 import org.junit.Assert;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
index d7a2b81..58b377e 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/IfpSmushTest.java
@@ -18,12 +18,12 @@
  */
 package org.apache.clerezza.rdf.utils;
 
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
index cd4045d..1e62180 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/RdfListTest.java
@@ -24,13 +24,13 @@ import java.util.Set;
 import junit.framework.Assert;
 
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import static org.junit.Assert.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
index 66c4005..8512695 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/SameAsSmushTest.java
@@ -19,14 +19,14 @@
 package org.apache.clerezza.rdf.utils;
 
 import java.util.Iterator;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+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.commons.rdf.impl.utils.PlainLiteralImpl;
+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.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
index af8434a..45e2547 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/TestGraphNode.java
@@ -25,15 +25,15 @@ import java.util.Set;
 
 import junit.framework.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Graph;
+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.impl.utils.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.test.RandomGraph;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
index 2881eb4..8069438 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/UnionGraphTest.java
@@ -20,12 +20,12 @@ package org.apache.clerezza.rdf.utils;
 
 import java.util.Iterator;
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+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.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.junit.Assert;
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
----------------------------------------------------------------------
diff --git a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
index bab58e9..22a5385 100644
--- a/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
+++ b/rdf/utils/src/test/java/org/apache/clerezza/rdf/utils/smushing/SameAsSmushTest.java
@@ -20,14 +20,14 @@ package org.apache.clerezza.rdf.utils.smushing;
 
 import java.util.Iterator;
 import java.util.Set;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Literal;
+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.commons.rdf.impl.utils.PlainLiteralImpl;
+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.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
index 440e877..8558b48 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
@@ -22,10 +22,10 @@ import org.apache.clerezza.platform.Constants;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.web.ontologies.BACKUP;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
index 5029eea..2619e14 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
@@ -43,14 +43,14 @@ 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;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+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;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
index c00bf1b..7f3d8f5 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
@@ -26,17 +26,17 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 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;
-import org.apache.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.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
index 886d1e7..4ae100b 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
@@ -33,18 +33,18 @@ import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 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;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.TCPROVIDER;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
index d0ceed7..a5c4a33 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
@@ -33,12 +33,12 @@ import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Literal;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Literal;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.serializedform.Parser;


[20/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageDescription.java
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageDescription.java b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageDescription.java
new file mode 100644
index 0000000..498dbbb
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageDescription.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.language;
+
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import org.apache.clerezza.rdf.core.Language;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.PlainLiteral;
+import org.apache.clerezza.rdf.core.Resource;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.ontologies.LINGVOJ;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * An object of this class keeps information about a language.
+ *
+ * @author mir
+ */
+public class LanguageDescription {
+
+    private GraphNode resource;
+    private Language language;
+
+    LanguageDescription(GraphNode resource) {
+        this.resource = resource;
+        Literal iso1Literal = null;
+        TripleCollection configGraph = resource.getGraph();
+        if (configGraph instanceof LockableMGraph) {
+            LockableMGraph lockableConfigGraph = (LockableMGraph)configGraph;
+            Lock readLock = lockableConfigGraph.getLock().readLock();
+            readLock.lock();
+            try {
+                iso1Literal = (Literal) resource.getObjects(LINGVOJ.iso1).next();
+            } finally {
+                readLock.unlock();
+            }
+        } else {
+            iso1Literal = (Literal) resource.getObjects(LINGVOJ.iso1).next();
+        }
+        if (iso1Literal == null) {
+            throw new RuntimeException("No iso1 code for " +resource.getNode());
+        }
+        String iso1 = iso1Literal.getLexicalForm();
+        this.language = new Language(iso1);
+    }
+
+    /**
+     * Returns a <code>Language</code> object which represents the language
+     * described by this object.
+     * @return the described language
+     */
+    public Language getLanguage() {
+        return language;
+    }
+
+    /**
+     * Returns a graph node in the content graph which leads to further
+     * information about the language described by this object.
+     * The information are those provided by http://www.lingvoj.org/lingvoj.rdf.
+     * @return the graph node leading to further information about the described
+     *        language
+     */
+    public GraphNode getResource() {
+        return resource;
+    }
+
+    /**
+     * Returns the label of the language described by this object in the
+     * specified language, or null if no lable is available in that language
+     * @param lang the language in which the label should be.
+     * @return
+     */
+    public String getLabel(Language lang) {
+        Lock readLock = null;
+        TripleCollection configGraph = resource.getGraph();
+        if (configGraph instanceof LockableMGraph) {
+            LockableMGraph lockableConfigGraph = (LockableMGraph)configGraph;
+            readLock = lockableConfigGraph.getLock().readLock();
+            readLock.lock();
+        }
+        try {
+            Iterator<Resource> labels = resource.getObjects(RDFS.label);
+            while (labels.hasNext()) {
+                PlainLiteral label = (PlainLiteral) labels.next();
+                if (label.getLanguage().equals(lang)) {
+                    return label.getLexicalForm();
+                }
+            }
+            return null;
+        } finally {
+            if (readLock != null) {
+                readLock.unlock();
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageService.java
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageService.java b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageService.java
new file mode 100644
index 0000000..883a9c9
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageService.java
@@ -0,0 +1,328 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.language;
+
+import java.io.IOException;
+import java.lang.ref.SoftReference;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.config.SystemConfig;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.Language;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.PlainLiteral;
+import org.apache.clerezza.rdf.core.Resource;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.SecuredMGraph;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.clerezza.rdf.ontologies.LINGVOJ;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.utils.RdfList;
+
+/**
+ * This class provides a OSGi service for managing languages in the Clerezza
+ * platform.
+ * 
+ * @author mir
+ */
+@Component(immediate=true, enabled= true)
+@Service(LanguageService.class)
+public class LanguageService {    
+
+    @Reference
+    private TcManager tcManager;
+
+    /**
+     * this is linked to the system-graph, accessing requires respective
+     * permission
+     */
+    private List<Resource> languageList;
+    /**
+     * no permission on the system graph required to access this
+     */
+    private List<Resource> languageListCache;
+
+    private static final String PARSER_FILTER =
+            "(supportedFormat=" + SupportedFormat.RDF_XML +")";
+
+    @Reference(target=PARSER_FILTER)
+    private ParsingProvider parser;
+
+    @Reference(target = SystemConfig.SYSTEM_GRAPH_FILTER)
+    private MGraph securedSystemGraph;
+
+    @Reference(target = PlatformConfig.CONFIG_GRAPH_FILTER)
+    private MGraph securedConfigGraph;
+    
+    private SoftReference<Graph> softLingvojGraph = new SoftReference<Graph>(null);
+
+
+    private LockableMGraph getSystemGraph() {
+        return ((SecuredMGraph) securedSystemGraph).getUnsecuredMGraph();
+    }
+
+    private LockableMGraph getConfigGraph() {
+        return ((SecuredMGraph) securedConfigGraph).getUnsecuredMGraph();
+    }
+
+    /**
+     * Returns a <code>List</code> of <code>LanguageDescription</code>s which
+     * describe the languages which are supported by the platform. The first
+     * entry describes the default language of the platform.
+     * @return a list containing all language descriptions.
+     */
+    public List<LanguageDescription> getLanguages() {
+        List<LanguageDescription> langList = new ArrayList<LanguageDescription>();
+        Iterator<Resource> languages = languageListCache.iterator();
+        while (languages.hasNext()) {
+            UriRef language = (UriRef) languages.next();
+            langList.add(new LanguageDescription(new GraphNode(language, getConfigGraph())));
+        }
+        return langList;
+    }
+
+    /**
+     * Returns the <code>LanguageDescription</code> of the default language
+     * of the platform.
+     * @return the language description of the default language.
+     */
+    public LanguageDescription getDefaultLanguage() {
+        return new LanguageDescription(
+                new GraphNode(languageListCache.get(0), getConfigGraph()));
+    }
+
+    /**
+     * Returns a set containg all language uris which are in the
+     * <http://www.lingvoj.org/lingvoj> graph which is included in this bundle.
+     * @return a set containing all language uris. This uris can be used to 
+     * add the language to Clerezza over the addLanguage()-method in this class.
+     */
+    public Set<UriRef> getAllLanguages() {
+        Set<UriRef> result = new HashSet<UriRef>();
+        Graph lingvojGraph = getLingvojGraph();
+        Iterator<Triple> languages = lingvojGraph.filter(null, RDFS.isDefinedBy,
+                null);
+        while (languages.hasNext()) {
+            UriRef languageUri = (UriRef) languages.next().getSubject();
+            result.add(languageUri);
+        }
+        return result;
+    }
+
+    /**
+     * Returns a language uri of a language which has a label containing the
+     * specified languageName. The label itself is in the language specified through
+     * inLanguage. If inLanguage is null, then all labels of a language of searched.
+     * If no language was found in the <http://www.lingvoj.org/lingvoj>
+     * graph, then null is returned. The returned uri can be used to
+     * add the language to Clerezza over the addLanguage()-method in this class.
+     * @return a language uris
+     */
+    public UriRef getLanguage(String languageName, Language inLanguage) {
+        Graph lingvojGraph = getLingvojGraph();
+        Iterator<Triple> languages = lingvojGraph.filter(null, RDFS.isDefinedBy, null);
+        while (languages.hasNext()) {
+            GraphNode languageNode = new GraphNode((UriRef) languages.next().getSubject(), lingvojGraph);
+            Iterator<Resource> labels = languageNode.getObjects(RDFS.label);
+            while (labels.hasNext()) {
+                PlainLiteral label = (PlainLiteral) labels.next();
+                if (label.getLanguage().equals(inLanguage) || inLanguage == null) {
+                    if (label.getLexicalForm().contains(languageName)) {
+                        return (UriRef) languageNode.getNode();
+                    }
+                }
+            }
+        }
+        return null;
+    }
+    
+    /**
+     * Get the language as <code>GraphNode</code> specified through languageUri. 
+     * The languageUri has to be a <http://www.lingvoj.org/ontology#Lingvo>
+     * according to the graph <http://www.lingvoj.org/lingvoj> included in this
+     * bundle., e.g. "http://www.lingvoj.org/lang/de".
+     *
+     * @param languageUri The language uri which specifies the language 
+     */
+    public GraphNode getLanguageNode(NonLiteral langUri) {
+        Graph lingvojRdf = getLingvojGraph();
+        return new GraphNode(langUri, lingvojRdf);
+    }
+
+    /**
+     * Adds the language specified through languageUri to the Clerezza
+     * platform. The languageUri has to be a <http://www.lingvoj.org/ontology#Lingvo>
+     * according to the graph <http://www.lingvoj.org/lingvoj> included in this
+     * bundle., e.g. "http://www.lingvoj.org/lang/de" adds German.
+     * The uri is added to the system graph and its context to the config graph.
+     * The context added is the context provided by lingvoj.rdf.
+     * @param languageUri The language uri which specifies the language to be
+     *        added to the platform.
+     */
+    public void addLanguage(UriRef languageUri) {
+        if (!languageListCache.contains(languageUri)) {
+            LockableMGraph systemGraph = getSystemGraph();
+            Lock writeLock = systemGraph.getLock().writeLock();
+            writeLock.lock();
+            try {
+                if (languageList.add(languageUri)) {
+                    addToLanguageConfigGraph(languageUri);
+                }
+            } finally {
+                writeLock.unlock();
+            }
+            languageListCache.add(languageUri);
+        }
+    }
+
+    private void synchronizeContentGraph() {
+        for (Resource resource : languageListCache) {
+            addToLanguageConfigGraph((UriRef)resource);
+        }
+    }
+    /**
+     * Adds the language information of the language specified through
+     * languageUri to the config graph. The languageUri has to be of type 
+     * <http://www.lingvoj.org/ontology#Lingvo> according to the graph 
+     * <http://www.lingvoj.org/lingvoj> included in this
+     * bundle., e.g. "http://www.lingvoj.org/lang/de" adds German.
+     * 
+     * The added language will not be a platform language.
+     *
+     * @param languageUri
+     */
+    public void addToLanguageConfigGraph(NonLiteral languageUri) {
+        LockableMGraph configGraph = getConfigGraph();
+        Lock writeLock = configGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            if (!configGraph.filter(languageUri, LINGVOJ.iso1, null).hasNext()) {
+                configGraph.addAll(getLanguageContext(languageUri));
+            }
+        } finally {
+            writeLock.unlock();
+        }
+    }
+
+    private Graph getLanguageContext(NonLiteral langUri) {
+        Graph lingvojRdf = getLingvojGraph();
+        GraphNode languageNode = new GraphNode(langUri, lingvojRdf);
+        return languageNode.getNodeContext();
+    }
+    
+    private Graph getLingvojGraph() {
+        Graph lingvojGraph = softLingvojGraph.get();
+        if (lingvojGraph != null) {
+            return lingvojGraph;
+        }
+        URL config = getClass().getResource("lingvoj.rdf");
+        if (config == null) {
+            throw new RuntimeException("no file found");
+        }
+        try {
+            MGraph lingvojMGraph = new SimpleMGraph();
+            parser.parse(lingvojMGraph, config.openStream(), SupportedFormat.RDF_XML, null);
+            lingvojGraph = lingvojMGraph.getGraph();
+            softLingvojGraph = new SoftReference<Graph>(lingvojGraph);
+            return lingvojGraph;
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
+     * The activate method is called when SCR activates the component configuration.
+     * 
+     * @param componentContext
+     */
+    protected void activate(ComponentContext componentContext) {
+        LockableMGraph systemGraph = getSystemGraph();
+        NonLiteral listNode = getListNode(systemGraph);
+
+        Lock writeLock = systemGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            // the constructor of RdfList might write to the graph! => requires a write lock
+            final RdfList rdfList = new RdfList(listNode, systemGraph);
+            languageList = Collections.synchronizedList(rdfList);
+            //access to languages should not require access to system graph,
+            //so copying the resources to an ArrayList
+            languageListCache = Collections.synchronizedList(
+                    new ArrayList<Resource>(rdfList));
+            if (languageListCache.size() == 0) {
+                addLanguage(new UriRef("http://www.lingvoj.org/lang/en"));
+            }
+            //this is to make sure the content graph contains the relevant data
+            synchronizeContentGraph();
+        } finally {
+            writeLock.unlock();
+        }
+    }
+
+    private NonLiteral getListNode(LockableMGraph systemGraph) {
+        NonLiteral instance = null;
+        Lock readLock = systemGraph.getLock().readLock();
+        readLock.lock();
+        try {
+            Iterator<Triple> instances = systemGraph.filter(null, RDF.type, PLATFORM.Instance);
+            if (!instances.hasNext()) {
+                throw new RuntimeException("No Platform:Instance in system graph.");
+            }
+            instance = instances.next().getSubject();
+            Iterator<Triple> langListIter = systemGraph.filter(instance,
+                    PLATFORM.languages, null);
+            if (langListIter.hasNext()) {
+                return (NonLiteral) langListIter.next().getObject();
+            }
+        } finally {
+            readLock.unlock();
+        }
+        BNode listNode = new BNode();
+        Lock writeLock = systemGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            systemGraph.add(new TripleImpl(instance, PLATFORM.languages, listNode));
+        } finally {
+            writeLock.unlock();
+        }
+        return listNode;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageWidget.java
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageWidget.java b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageWidget.java
new file mode 100644
index 0000000..a403a08
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/java/org/apache/clerezza/platform/language/LanguageWidget.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.language;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.concurrent.locks.Lock;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.platform.config.PlatformConfig;
+
+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;
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.platform.language.ontologies.LANGUAGE;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.UserContextProvider;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.NonLiteral;
+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.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.RdfList;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+import org.apache.clerezza.web.fileserver.BundlePathNode;
+import org.apache.clerezza.web.fileserver.FileServer;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.framework.Bundle;
+import org.wymiwyg.commons.util.dirbrowser.PathNode;
+
+/**
+ * Use the LanguageWidget service to store an RDF list of
+ * languages in a triple collection and retrieve the root node of the list. The widget
+ * can be rendered by using the render method. Via javascript function
+ * LanguageList.getLanguage() the currently selected language can be retrieved.
+ *
+ * @author tio
+ */
+@Component(enabled=true, immediate=true)
+@Services({
+    @Service(Object.class),
+    @Service(UserContextProvider.class)
+})
+@Property(name = "javax.ws.rs", boolValue = true)
+
+@Path("/language-widget")
+public class LanguageWidget implements UserContextProvider {
+
+    private FileServer fileServer;
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    private PlatformConfig platformConfig;
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    @Reference
+    private LanguageService languageService;
+    
+    protected void activate(ComponentContext context) throws IOException, URISyntaxException {
+        Bundle bundle = context.getBundleContext().getBundle();
+        URL resourceDir = getClass().getResource("staticweb");
+        PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
+
+        fileServer = new FileServer(pathNode);
+
+        URL template = getClass().getResource("language-list.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(template.toURI().toString()),
+                LANGUAGE.LanguageList, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+    }
+
+    private LockableMGraph getConfigGraph() {
+        return tcManager.getMGraph(Constants.CONFIG_GRAPH_URI);
+    }
+
+    /**
+     *
+     * @param node  The graph of the specified GraphNode will not be locked, neither for reading nor writing.
+     *        It is the responsibility of the calling function to set the write lock, if necessary.
+     * @return
+     */
+    @Override
+    public GraphNode addUserContext(final GraphNode node) {    
+        final NonLiteral platformInstance = AccessController.doPrivileged(
+            new PrivilegedAction<NonLiteral>() {
+                @Override
+                public NonLiteral run() {
+                    return (NonLiteral) platformConfig.getPlatformInstance().getNode();
+                }
+            });
+        try {
+            return addLanguages(node, platformInstance, languageService.getLanguages(), false);
+             
+        } catch (AccessControlException ex) {
+            return AccessController.doPrivileged(
+                new PrivilegedAction<GraphNode>() {
+                    @Override
+                    public GraphNode run() {
+                        return addLanguages(node, platformInstance, languageService.getLanguages(), true);
+                    }
+                });
+        }        
+    }
+
+    private GraphNode addLanguages(GraphNode node, NonLiteral platformInstance, List<LanguageDescription> languages,
+            boolean copyToNode) {
+        TripleCollection graph = node.getGraph();
+        BNode listNode = new BNode();        
+        RdfList list = new RdfList(listNode, graph);
+        LockableMGraph configGraph = getConfigGraph();
+        Lock readLock = configGraph.getLock().readLock();
+        for (LanguageDescription languageDescription : languages) {
+            NonLiteral languageUri = (NonLiteral) languageDescription.getResource().getNode();
+            list.add(languageUri);
+            if (copyToNode) {
+                readLock.lock();
+                try {
+                    graph.addAll(new GraphNode(languageUri, configGraph).getNodeContext());
+                } finally {
+                    readLock.unlock();
+                }
+            }
+        }
+        node.addProperty(PLATFORM.instance, platformInstance);
+        graph.add(new TripleImpl(platformInstance, RDF.type, PLATFORM.Instance));
+        graph.add(new TripleImpl(platformInstance, PLATFORM.languages, listNode));
+        graph.add(new TripleImpl(listNode, RDF.type, LANGUAGE.LanguageList));
+        if (!copyToNode) {
+            node = new GraphNode(node.getNode(), new UnionMGraph(graph, configGraph));
+        }
+        return node;
+    }
+
+    /**
+     * Returns a PathNode of a static file from the staticweb folder.
+     *
+     * @param path specifies the path param of a URI
+     *
+     * @return {@link PathNode}
+     */
+    @GET
+    @Path("{path:.+}")
+    public PathNode getStaticFile(@PathParam("path") String path) {
+        return fileServer.getNode(path);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/language-list.ssp
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/language-list.ssp b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/language-list.ssp
new file mode 100644
index 0000000..362009b
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/language-list.ssp
@@ -0,0 +1,50 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+import org.apache.clerezza.rdf.scala.utils.RichGraphNode
+def lingvoj(s: Any) = new UriRef("http://www.lingvoj.org/ontology#"+s)
+def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
+def getLabel(language:Language, node:RichGraphNode) : String = {
+	val matchingLabels = for (label <- node/rdfs("label");
+		val labelLiteral = label.getNode.asInstanceOf[PlainLiteral];
+		if (labelLiteral.getLanguage.equals(language))
+	) yield {
+		label*
+	}
+	if (matchingLabels.length == 0) {
+		"no label"
+	} else {
+		matchingLabels.apply(0)
+	}
+}
+resultDocModifier.addScriptReference("/language-widget/scripts/language-list.js")
+val defaultLanguage:Language = new Language(res%!!(0)/lingvoj("iso1")*)
+
+<select name="availablelanguages" id="availablelanguages">
+	<option value={defaultLanguage.toString} selected="selected">{getLabel(defaultLanguage, res%!!(0))}</option>
+	{
+		for(language <- res!!;
+			val iso1 = language/lingvoj("iso1")*;
+			if (!iso1.equals(defaultLanguage.toString))) yield {
+			<option value={iso1}>{getLabel(defaultLanguage,language)}</option>
+		}
+	}
+</select>


[36/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/form.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/form.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/form.rng
new file mode 100755
index 0000000..1c47382
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/exclude/form.rng
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Checks exclusions applying to form and basic-form modules.
+  This schema is intended to be used in addition to xhtml.rng.
+-->
+<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
+  <start>
+    <ref name="normalElement"/>
+  </start>
+  <define name="normalElement">
+    <element>
+      <anyName>
+        <except>
+          <name>form</name>
+          <name>label</name>
+          <name>button</name>
+        </except>
+      </anyName>
+      <ref name="normalContent"/>
+    </element>
+  </define>
+  <define name="normalContent">
+    <zeroOrMore>
+      <choice>
+        <ref name="normalElement"/>
+        <ref name="formElement"/>
+        <ref name="labelElement"/>
+        <ref name="buttonElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="formElement">
+    <element name="form">
+      <ref name="formContent"/>
+    </element>
+  </define>
+  <define name="formContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>form</name>
+              <name>label</name>
+              <name>button</name>
+            </except>
+          </anyName>
+          <ref name="formContent"/>
+        </element>
+        <ref name="labelElement"/>
+        <ref name="buttonElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="labelElement">
+    <element name="label">
+      <ref name="labelContent"/>
+    </element>
+  </define>
+  <define name="labelContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>form</name>
+              <name>label</name>
+              <name>button</name>
+            </except>
+          </anyName>
+          <ref name="labelContent"/>
+        </element>
+        <ref name="buttonElement"/>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="buttonElement">
+    <element name="button">
+      <ref name="buttonContent"/>
+    </element>
+  </define>
+  <define name="buttonContent">
+    <zeroOrMore>
+      <choice>
+        <element>
+          <anyName>
+            <except>
+              <name>a</name>
+              <name>input</name>
+              <name>select</name>
+              <name>textarea</name>
+              <name>label</name>
+              <name>button</name>
+              <name>form</name>
+              <name>isindex</name>
+              <name>fieldset</name>
+              <name>iframe</name>
+            </except>
+          </anyName>
+          <ref name="buttonContent"/>
+        </element>
+        <ref name="anyAttribute"/>
+        <text/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="anyAttribute">
+    <attribute>
+      <anyName/>
+    </attribute>
+  </define>
+</grammar>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/index.html
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/index.html b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/index.html
new file mode 100644
index 0000000..bf61574
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/index.html
@@ -0,0 +1,129 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Modularization of XHTML in RELAX NG</title>
+</head>
+<body>
+<h1>Modularization of XHTML in RELAX NG</h1>
+
+<p>This directory contains an implementataion in RELAX NG of the
+modularization of XHTML specified by the <a
+href="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410"
+>Modularization of XHTML Recommendation</a>.</p>
+
+<p>The RELAX NG schema has not been mechanically derived from the DTDs.
+Rather, it has been hand-crafted so as to produce a good quality RELAX NG
+schema.  However, it may well contain bugs.</p>
+
+<p>The <a href="modules"><code>modules</code></a> directory contains
+all the modules; <a
+href="xhtml-basic.rng"><code>xhtml-basic.rng</code></a> uses the
+modules to implement <a href="http://www.w3.org/TR/xhtml-basic/">XHTML
+Basic</a>; <a
+href="xhtml-strict.rng"><code>xhtml-strict.rng</code></a> uses the
+modules to implement <a href="http://www.w3.org/TR/xhtml1/">XHTML
+1.0</a> strict; <a href="xhtml.rng"><code>xhtml.rng</code></a> uses
+the modules to implement the union of <a
+href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> transitional and <a
+href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> frameset.  You can
+<a href="http://www.thaiopensource.com/download">download</a>
+everything as part of the main Jing distribution.  To create a custom
+version of XHTML, simply copy <code>xhtml.rng</code> and delete the
+inclusions of the modules that you do not want.</p>
+
+<p>The biggest difference between the RELAX NG implementation and the
+DTD implementation is that the RELAX NG implementation does not
+require you to create a model module specific to the combination of
+XHTML modules you are using. Instead, simply include the modules you
+want. The modules take care of redefining the content models
+appropriately.</p>
+
+<p>Note also the following differences:</p>
+
+<ul>
+
+<li>The frames module is used instead of the struct module, rather
+than in addition to it.</li>
+
+<li>In the frames module, the <code>frameset</code> element does not
+restrict the optional <code>noframes</code> element to follow all the
+other child elements. XHTML Modularization is inconsistent with both
+HTML 4.0 and XHTML 1.0 here.</li>
+
+<li>In the basic tables abstract module, the <code>table</code>
+element does not have a <code>width</code> attribute.  The XHTML Rec is
+ambiguous here: the abstract module has the attribute, but the DTD
+does not.</li>
+
+<li>The object and applet modules takes advantage of RELAX NG's
+absence of restrictions on mixed content to enforce the requirement
+that <code>param</code>s precede other content.</li>
+
+<li>The forms module takes advantage of RELAX NG's absence of
+restrictions on mixed content to enforce the requirement that any
+<code>legend</code> precedes other content.</li>
+
+<li>The RELAX NG schema does not enforce exclusions. The HTML 4 DTD
+uses exclusions in several places, for example, to disallow an
+<code>a</code> element from having an <code>a</code> element as a
+descendant. It is not possible to represent this constraint in XML
+DTDs. XHTML Modularization takes the approach of partially
+representing this restriction by, for example, disallowing an
+<code>a</code> element from having an <code>a</code> element as a
+<em>child</em>, without disallowing it from having an <code>a</code>
+element as a non-immediate descendant.  This partial restriction has a
+substantial cost in increasing the complexity and reducing the
+modularity of the schemas. This implementation adopts a different
+approach. The <a href="exclude"><code>exclude</code></a> directory
+contains separate, independent RELAX NG schemas that enforce
+exclusions.  To check use of exclusions, a document should be
+validated against each of these schemas that is applicable <strong>in
+addition to</strong> being validated against the RELAX NG XHTML schema
+proper. The available schemas are as follows:
+
+<dl>
+
+<dt><a href="exclude/basic.rng"><code>exclude/basic.rng</code></a></dt>
+<dd>checks the exclusions relating to <code>a</code> and
+<code>pre</code> elements</dd>
+
+<dt><a
+href="exclude/basic-table.rng"><code>exclude/basic-table.rng</code></a></dt>
+
+<dd>checks the exclusions relating to basic tables module (i.e.
+checks that <code>table</code> elements are not nested)</dd>
+
+<dt><a href="exclude/form.rng"><code>exclude/form.rng</code></a></dt>
+
+<dd>checks the exclusions relating to forms and basic forms modules</dd>
+
+</dl>
+
+</li>
+
+</ul>
+
+<address><a href="mailto:jjc@jclark.com">James Clark</a></address>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/applet.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/applet.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/applet.rng
new file mode 100755
index 0000000..22baa50
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/applet.rng
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Applet Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="applet">
+  <element name="applet">
+    <ref name="applet.attlist"/>
+    <!-- No restrictions on mixed content in TREX. -->
+    <zeroOrMore>
+      <ref name="param"/>
+    </zeroOrMore>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="applet.attlist">
+  <ref name="Core.attrib"/>
+  <attribute name="alt">
+    <ref name="Text.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="archive"/>
+  </optional>
+  <optional>
+    <attribute name="code"/>
+  </optional>
+  <optional>
+    <attribute name="codebase">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="object"/>
+  </optional>
+  <attribute name="height">
+    <ref name="Length.datatype"/>
+  </attribute>
+  <attribute name="width">
+    <ref name="Length.datatype"/>
+  </attribute>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="applet"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/attribs.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/attribs.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/attribs.rng
new file mode 100755
index 0000000..5fa3bfa
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/attribs.rng
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Common Attributes Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="id.attrib">
+  <optional>
+    <attribute name="id">
+      <ref name="ID.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="class.attrib">
+  <optional>
+    <attribute name="class">
+      <ref name="NMTOKENS.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="title.attrib">
+  <optional>
+    <attribute name="title">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Core.attrib">
+  <ref name="id.attrib"/>
+  <ref name="class.attrib"/>
+  <ref name="title.attrib"/>
+</define>
+
+<define name="lang.attrib">
+  <optional>
+    <attribute name="xml:lang">
+      <ref name="LanguageCode.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="I18n.attrib">
+  <ref name="lang.attrib"/>
+</define>
+
+<define name="Common.attrib">
+  <ref name="Core.attrib"/>
+  <ref name="I18n.attrib"/>
+</define>
+
+<define name="CommonIdRequired.attrib">
+  <attribute name="id">
+    <ref name="ID.datatype"/>
+  </attribute>
+  <ref name="class.attrib"/>
+  <ref name="title.attrib"/>
+  <ref name="I18n.attrib"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/base.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/base.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/base.rng
new file mode 100755
index 0000000..c9ade45
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/base.rng
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Base Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="base">
+  <element name="base">
+    <ref name="base.attlist"/>
+  </element>
+</define>
+
+<define name="base.attlist">
+  <attribute name="href">
+    <ref name="URI.datatype"/>
+  </attribute>
+</define>
+
+<define name="head.content" combine="interleave">
+  <optional>
+    <ref name="base"/>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-form.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-form.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-form.rng
new file mode 100755
index 0000000..b8f8afb
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-form.rng
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Simplified Forms Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="form">
+  <element name="form">
+    <ref name="form.attlist"/>
+    <!-- Don't use Block.model, because this gets redefined by the
+	 legacy module. -->
+    <oneOrMore>
+      <ref name="Block.class"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="form.attlist">
+  <ref name="Common.attrib"/>
+  <attribute name="action">
+    <ref name="URI.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="method">
+      <choice>
+	<value>get</value>
+	<value>post</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="enctype">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="label">
+  <element name="label">
+    <ref name="label.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="label.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="for">
+      <ref name="IDREF.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="input">
+  <element name="input">
+    <ref name="input.attlist"/>
+  </element>
+</define>
+
+<define name="input.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="type">
+      <ref name="InputType.class"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="name"/>
+  </optional>
+  <optional>
+    <attribute name="value"/>
+  </optional>
+  <optional>
+    <attribute name="checked">
+      <value>checked</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="size"/>
+  </optional>
+  <optional>
+    <attribute name="maxlength">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="src">
+       <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="InputType.class">
+  <choice>
+    <value>text</value>
+    <value>password</value>
+    <value>checkbox</value>
+    <value>radio</value>
+    <value>submit</value>
+    <value>reset</value>
+    <value>hidden</value>
+  </choice>
+</define>
+
+<define name="select">
+  <element name="select">
+    <ref name="select.attlist"/>
+    <oneOrMore>
+      <ref name="option"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="select.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="name"/>
+  </optional>
+  <optional>
+    <attribute name="size">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="multiple">
+      <value>multiple</value>
+    </attribute>
+  </optional>
+</define>
+   
+<define name="option">
+  <element name="option">
+    <ref name="Common.attrib"/>
+    <optional>
+      <attribute name="selected">
+        <value>selected</value>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="value"/>
+    </optional>
+    <text/>
+  </element>
+</define>
+
+<define name="textarea">
+  <element name="textarea">
+    <ref name="textarea.attlist"/>
+  </element>
+</define>
+
+<define name="textarea.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="name"/>
+  </optional>
+  <attribute name="rows">
+    <ref name="Number.datatype"/>
+  </attribute>
+  <attribute name="cols">
+    <ref name="Number.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+  <text/>
+</define>
+
+<define name="Form.class">
+  <ref name="form"/>
+</define>
+
+<define name="Formctrl.class">
+  <choice>
+    <ref name="input"/>
+    <ref name="label"/>
+    <ref name="select"/>
+    <ref name="textarea"/>
+  </choice>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="Form.class"/>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="Formctrl.class"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-table.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-table.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-table.rng
new file mode 100755
index 0000000..db9a534
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/basic-table.rng
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Basic Tables Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="table">
+  <element name="table">
+    <ref name="table.attlist"/>
+    <optional>
+      <ref name="caption"/>
+    </optional>
+    <oneOrMore>
+      <ref name="tr"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="table.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="summary">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="caption">
+  <element name="caption">
+    <ref name="caption.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="caption.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="tr">
+  <element name="tr">
+    <ref name="tr.attlist"/>
+    <oneOrMore>
+      <choice>
+        <ref name="th"/>
+        <ref name="td"/>
+      </choice>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="tr.attlist">
+  <ref name="Common.attrib"/>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="th">
+  <element name="th">
+    <ref name="th.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="th.attlist">
+  <ref name="Cell.attrib"/>
+</define>
+
+<define name="td">
+  <element name="td">
+    <ref name="td.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="td.attlist">
+  <ref name="Cell.attrib"/>
+</define>
+
+<define name="Cell.attrib">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="abbr">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="axis"/>
+  </optional>
+  <optional>
+    <attribute name="headers">
+      <ref name="IDREFS.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="scope.attrib"/>
+  <optional>
+    <attribute name="rowspan">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="colspan">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="CellHAlign.attrib"/>
+  <ref name="CellVAlign.attrib"/>
+</define>
+
+<define name="CellHAlign.attrib">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>left</value>
+	<value>center</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="CellVAlign.attrib">
+  <optional>
+    <attribute name="valign">
+      <choice>
+	<value>top</value>
+	<value>middle</value>
+	<value>bottom</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="scope.attrib">
+  <optional>
+    <attribute name="scope">
+      <choice>
+	<value>row</value>
+	<value>col</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="table"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/bdo.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/bdo.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/bdo.rng
new file mode 100755
index 0000000..2742f3a
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/bdo.rng
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Bi-directional Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="bdo">
+  <element name="bdo">
+    <ref name="bdo.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="bdo.attlist">
+  <ref name="Core.attrib"/>
+  <ref name="lang.attrib"/>
+  <ref name="dir.attrib"/>
+</define>
+
+<define name="dir.attrib">
+  <attribute name="dir">
+    <choice>
+      <value>ltr</value>
+      <value>rtl</value>
+    </choice>
+  </attribute>
+</define>
+
+<define name="I18n.attrib" combine="interleave">
+  <optional>
+    <ref name="dir.attrib"/>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="bdo"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/csismap.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/csismap.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/csismap.rng
new file mode 100755
index 0000000..7ad9833
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/csismap.rng
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Client-side Image Map Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="area">
+  <element name="area">
+    <ref name="area.attlist"/>
+  </element>
+</define>
+
+<define name="area.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="href">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <ref name="shape.attrib"/>
+  <ref name="coords.attrib"/>
+  <optional>
+    <attribute name="nohref">
+      <value>nohref</value>
+    </attribute>
+  </optional>
+  <attribute name="alt">
+    <ref name="Text.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="map">
+  <element name="map">
+    <ref name="map.attlist"/>
+    <oneOrMore>
+      <choice>
+        <!-- This does not use Block.mix
+             because loose.dtd doesn't use %Flow; -->
+        <ref name="Block.class"/>
+        <ref name="area"/>
+      </choice>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="map.attlist">
+  <ref name="CommonIdRequired.attrib"/>
+</define>
+
+<define name="a.attlist" combine="interleave">
+  <ref name="shape.attrib"/>
+  <ref name="coords.attrib"/>
+</define>
+
+<define name="img.attlist" combine="interleave">
+  <ref name="usemap.attlist"/>
+</define>
+
+<define name="object.attlist" combine="interleave">
+  <ref name="usemap.attlist"/>
+</define>
+
+<define name="usemap.attlist">
+  <optional>
+    <attribute name="usemap">
+      <ref name="IDREF.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="shape.attrib">
+  <optional>
+    <attribute name="shape">
+      <choice>
+        <value>rect</value>
+        <value>circle</value>
+        <value>poly</value>
+        <value>default</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="coords.attrib">
+  <optional>
+    <attribute name="coords"/>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="map"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/datatypes.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/datatypes.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/datatypes.rng
new file mode 100755
index 0000000..d62631a
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/datatypes.rng
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Datatypes Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+<!-- Length defined for cellpadding/cellspacing -->
+
+<!-- nn for pixels or nn% for percentage length -->
+<define name="Length.datatype">
+  <text/>
+</define>
+
+<!-- space-separated list of link types -->
+<define name="LinkTypes.datatype">
+  <ref name="NMTOKENS.datatype"/>
+</define>
+
+<!-- single or comma-separated list of media descriptors -->
+<define name="MediaDesc.datatype">
+  <text/>
+</define>
+
+<!-- pixel, percentage, or relative -->
+<define name="MultiLength.datatype">
+  <text/>
+</define>
+
+<!-- one or more digits (NUMBER) -->
+<define name="Number.datatype">
+  <text/>
+</define>
+
+<!-- integer representing length in pixels -->
+<define name="Pixels.datatype">
+  <text/>
+</define>
+
+<!-- script expression -->
+<define name="Script.datatype">
+  <text/>
+</define>
+
+<!-- textual content -->
+<define name="Text.datatype">
+  <text/>
+</define>
+
+<!-- Imported Datatypes ................................ -->
+
+<!-- a single character from [ISO10646] -->
+<define name="Character.datatype">
+  <text/>
+</define>
+
+<!-- a character encoding, as per [RFC2045] -->
+<define name="Charset.datatype">
+  <text/>
+</define>
+
+<!-- a space separated list of character encodings, as per [RFC2045] -->
+<define name="Charsets.datatype">
+  <text/>
+</define>
+
+<!-- media type, as per [RFC2045] -->
+<define name="ContentType.datatype">
+  <text/>
+</define>
+
+<!-- comma-separated list of media types, as per [RFC2045] -->
+<define name="ContentTypes.datatype">
+  <text/>
+</define>
+
+<!-- date and time information. ISO date format -->
+<define name="Datetime.datatype">
+  <text/>
+</define>
+
+<!-- formal public identifier, as per [ISO8879] -->
+<define name="FPI.datatype">
+  <text/>
+</define>
+
+<!-- a language code, as per [RFC1766] -->
+<define name="LanguageCode.datatype">
+  <data type="language"/>
+</define>
+
+<!-- a Uniform Resource Identifier, see [URI] -->
+<define name="URI.datatype">
+  <data type="anyURI"/>
+</define>
+
+<!-- a space-separated list of Uniform Resource Identifiers, see [URI] -->
+<define name="URIs.datatype">
+  <text/>
+</define>
+
+<define name="NMTOKEN.datatype">
+  <data type="NMTOKEN"/>
+</define>
+
+<define name="NMTOKENS.datatype">
+  <data type="NMTOKENS"/>
+</define>
+
+<define name="ID.datatype">
+  <data type="ID"/>
+</define>
+
+<define name="IDREF.datatype">
+  <data type="IDREF"/>
+</define>
+
+<define name="IDREFS.datatype">
+  <data type="IDREFS"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/edit.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/edit.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/edit.rng
new file mode 100755
index 0000000..ad98c89
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/edit.rng
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Edit Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="del">
+  <element name="del">
+    <ref name="del.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="del.attlist">
+  <ref name="Edit.attrib"/>
+</define>
+
+<define name="ins">
+  <element name="ins">
+    <ref name="ins.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="ins.attlist">
+  <ref name="Edit.attrib"/>
+</define>
+
+<define name="Edit.attrib">
+  <optional>
+    <attribute name="cite">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="datetime">
+      <ref name="Datetime.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Edit.class">
+  <choice>
+    <ref name="del"/>
+    <ref name="ins"/>
+  </choice>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="Edit.class"/>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="Edit.class"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/events.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/events.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/events.rng
new file mode 100755
index 0000000..e13432f
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/events.rng
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Events Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="a.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="area.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="form.attlist" combine="interleave">
+  <optional>
+    <attribute name="onreset">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onsubmit">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="body.attlist" combine="interleave">
+  <optional>
+    <attribute name="onload">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onunload">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="label.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="input.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onchange">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onselect">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="select.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onchange">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="textarea.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onchange">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onselect">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="button.attlist" combine="interleave">
+  <optional>
+    <attribute name="onblur">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onfocus">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Events.attrib">
+  <optional>
+    <attribute name="onclick">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="ondblclick">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onmousedown">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onmouseup">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onmouseover">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onmousemove">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onmouseout">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onkeypress">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onkeydown">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="onkeyup">
+      <ref name="Script.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Common.attrib" combine="interleave">
+  <ref name="Events.attrib"/>
+</define>
+
+<define name="CommonIdRequired.attrib" combine="interleave">
+  <ref name="Events.attrib"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/form.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/form.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/form.rng
new file mode 100755
index 0000000..3189678
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/form.rng
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Forms Module -->
+<!-- Unlike the DTD implementation, this builds on the basic-form module --><grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="basic-form.rng">
+
+  <define name="select">
+    <element name="select">
+      <ref name="select.attlist"/>
+      <oneOrMore>
+	<choice>
+	  <ref name="option"/>
+	  <ref name="optgroup"/>
+	</choice>
+      </oneOrMore>
+    </element>
+  </define>
+
+</include>
+
+<define name="form.attlist" combine="interleave">
+  <optional>
+    <attribute name="accept-charset">
+      <ref name="Charsets.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accept">
+      <ref name="ContentTypes.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="input.attlist" combine="interleave">
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="readonly">
+      <value>readonly</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="alt"/>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accept">
+      <ref name="ContentTypes.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="InputType.class" combine="choice">
+  <choice>
+    <value>image</value>
+    <value>button</value>
+  </choice>
+</define>
+
+<define name="select.attlist" combine="interleave">
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="option.attlist" combine="interleave">
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="label">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="optgroup">
+  <element name="optgroup">
+    <ref name="optgroup.attlist"/>
+    <oneOrMore>
+      <ref name="option"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="optgroup.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <attribute name="label">
+    <ref name="Text.datatype"/>
+  </attribute>
+</define>
+
+<define name="textarea.attlist" combine="interleave">
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="readonly">
+      <value>readonly</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="fieldset">
+  <element name="fieldset">
+    <ref name="fieldset.attlist"/>
+    <ref name="legend"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="fieldset.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="button">
+  <element name="button">
+    <ref name="button.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="button.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="name"/>
+  </optional>
+  <optional>
+    <attribute name="value"/>
+  </optional>
+  <optional>
+    <attribute name="type">
+      <choice>
+        <value>button</value>
+        <value>submit</value>
+        <value>reset</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="disabled">
+      <value>disabled</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="legend">
+  <element name="legend">
+    <ref name="legend.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="legend.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Form.class" combine="choice">
+  <ref name="fieldset"/>
+</define>
+
+<define name="Formctrl.class" combine="choice">
+  <ref name="button"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/frames.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/frames.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/frames.rng
new file mode 100755
index 0000000..7b97353
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/frames.rng
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Frames Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<include href="struct.rng">
+
+  <define name="html">
+    <element name="html">
+      <ref name="html.attlist"/>
+      <ref name="head"/>
+      <ref name="frameset"/>
+    </element>
+  </define>
+
+</include>
+
+<define name="frameset">
+  <element name="frameset">
+    <ref name="frameset.attlist"/>
+    <interleave>
+      <oneOrMore>
+	<choice>
+	  <ref name="frameset"/>
+	  <ref name="frame"/>
+	</choice>
+      </oneOrMore>
+      <optional>
+	<ref name="noframes"/>
+      </optional>
+    </interleave>
+  </element>
+</define>
+
+<define name="frameset.attlist">
+  <ref name="Core.attrib"/>
+  <optional>
+    <attribute name="cols">
+      <ref name="MultiLength.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="rows">
+      <ref name="MultiLength.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="frame">
+  <element name="frame">
+    <ref name="frame.attlist"/>
+  </element>
+</define>
+
+<define name="frame.attlist">
+  <ref name="Core.attrib"/>
+  <optional>
+    <attribute name="longdesc">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="src">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="frameborder">
+      <choice>
+        <value>1</value>
+        <value>0</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="marginwidth">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="marginheight">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="noresize">
+      <value>noresize</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="scrolling">
+      <choice>
+        <value>yes</value>
+        <value>no</value>
+        <value>auto</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="noframes">
+  <element name="noframes">
+    <ref name="noframes.attlist"/>
+    <ref name="body"/>
+  </element>
+</define>
+
+<define name="noframes.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/hypertext.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/hypertext.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/hypertext.rng
new file mode 100755
index 0000000..fb90d95
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/hypertext.rng
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Hypertext Module -->
+<!-- Depends on text module. -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="a">
+  <element name="a">
+    <ref name="a.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="a.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="href">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="charset">
+      <ref name="Charset.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="type">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="hreflang">
+      <ref name="LanguageCode.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="rel">
+      <ref name="LinkTypes.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="rev">
+      <ref name="LinkTypes.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="accesskey">
+      <ref name="Character.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="a"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/iframe.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/iframe.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/iframe.rng
new file mode 100755
index 0000000..3763854
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/iframe.rng
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Iframe Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="iframe">
+  <element name="iframe">
+    <ref name="iframe.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="iframe.attlist">
+  <ref name="Core.attrib"/>
+  <optional>
+    <attribute name="longdesc">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="src">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="frameborder">
+      <choice>
+        <value>1</value>
+        <value>0</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="height">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="marginwidth">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="marginheight">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="scrolling">
+      <choice>
+        <value>yes</value>
+        <value>no</value>
+        <value>auto</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="iframe"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/image.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/image.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/image.rng
new file mode 100755
index 0000000..1f313f6
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/image.rng
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Image Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="img">
+  <element name="img">
+    <ref name="img.attlist"/>
+  </element>
+</define>
+
+<define name="img.attlist">
+  <ref name="Common.attrib"/>
+  <attribute name="src">
+    <ref name="URI.datatype"/>
+  </attribute>
+  <attribute name="alt">
+    <ref name="Text.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="longdesc">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="height">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="img"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/inlstyle.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/inlstyle.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/inlstyle.rng
new file mode 100755
index 0000000..70d728a
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/inlstyle.rng
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Inline Style Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="Core.attrib" combine="interleave">
+  <optional>
+    <attribute name="style"/>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/legacy.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/legacy.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/legacy.rng
new file mode 100755
index 0000000..87a7205
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/legacy.rng
@@ -0,0 +1,502 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Legacy Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="lang.attrib" combine="interleave">
+  <optional>
+    <attribute name="lang">
+      <ref name="LanguageCode.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="basefont">
+  <element name="basefont">
+    <ref name="basefont.attlist"/>
+  </element>
+</define>
+
+<define name="basefont.attlist">
+  <ref name="id.attrib"/>
+  <ref name="Font.attrib"/>
+</define>
+
+<define name="center">
+  <element name="center">
+    <ref name="center.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="center.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="font">
+  <element name="font">
+    <ref name="font.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="font.attlist">
+  <ref name="Core.attrib"/>
+  <ref name="I18n.attrib"/>
+  <ref name="Font.attrib"/>
+</define>
+
+<define name="Font.attrib">
+  <optional>
+    <attribute name="size"/>
+  </optional>
+  <optional>
+    <attribute name="color">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="face"/>
+  </optional>
+</define>
+
+<define name="s">
+  <element name="s">
+    <ref name="s.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="s.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="strike">
+  <element name="strike">
+    <ref name="strike.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="strike.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="u">
+  <element name="u">
+    <ref name="u.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="u.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="dir">
+  <element name="dir">
+    <ref name="dir.attlist"/>
+    <oneOrMore>
+      <ref name="li.noblock"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="dir.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="compact">
+      <value>compact</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="menu">
+  <element name="menu">
+    <ref name="menu.attlist"/>
+    <oneOrMore>
+      <ref name="li.noblock"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="menu.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="compact">
+      <value>compact</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="li.noblock">
+  <element name="li">
+    <ref name="li.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="isindex">
+  <element name="isindex">
+    <ref name="isindex.attlist"/>
+  </element>
+</define>
+
+<define name="isindex.attlist">
+  <ref name="Core.attrib"/>
+  <ref name="I18n.attrib"/>
+  <optional>
+    <attribute name="prompt">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="applet.attlist" combine="interleave">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>top</value>
+	<value>middle</value>
+	<value>bottom</value>
+	<value>left</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="hspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="vspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="body.attlist" combine="interleave">
+  <optional>
+    <attribute name="background">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="bgcolor">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="text">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="link">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="vlink">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="alink">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="br.attlist" combine="interleave">
+  <optional>
+    <attribute name="clear">
+      <choice>
+	<value>left</value>
+	<value>all</value>
+	<value>right</value>
+	<value>none</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="caption.attlist" combine="interleave">
+  <ref name="align.attrib"/>
+</define>
+
+<define name="div.attlist" combine="interleave">
+  <ref name="align.attrib"/>
+</define>
+
+<!-- Not in the CR, but surely an error. -->
+
+<define name="dl.attlist" combine="interleave">
+  <optional>
+    <attribute name="compact">
+      <value>compact</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Heading.attrib" combine="interleave">
+  <ref name="align.attrib"/>
+</define>
+
+<define name="hr.attlist" combine="interleave">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>left</value>
+	<value>center</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="noshade">
+      <value>noshade</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="size">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="img.attlist" combine="interleave">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>top</value>
+	<value>middle</value>
+	<value>bottom</value>
+	<value>left</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="border">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="hspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="vspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="input.attlist" combine="interleave">
+  <ref name="align.attrib"/>
+</define>
+
+<define name="legend.attlist" combine="interleave">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>top</value>
+	<value>bottom</value>
+	<value>left</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="li.attlist" combine="interleave">
+  <optional>
+    <attribute name="type"/>
+  </optional>
+  <optional>
+    <attribute name="value"/>
+  </optional>
+</define>
+
+<define name="object.attlist" combine="interleave">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>top</value>
+	<value>middle</value>
+	<value>bottom</value>
+	<value>left</value>
+	<value>right</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="border">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="hspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="vspace">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="ol.attlist" combine="interleave">
+  <optional>
+    <attribute name="type"/>
+  </optional>
+  <optional>
+    <attribute name="compact">
+      <value>compact</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="start"/>
+  </optional>
+</define>
+
+<define name="p.attlist" combine="interleave">
+  <ref name="align.attrib"/>
+</define>
+
+<define name="pre.attlist" combine="interleave">
+  <optional>
+    <attribute name="width">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="script.attlist" combine="interleave">
+  <optional>
+    <attribute name="language">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="table.attlist" combine="interleave">
+  <ref name="align.attrib"/>
+  <optional>
+    <attribute name="bgcolor">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="tr.attlist" combine="interleave">
+  <optional>
+    <attribute name="bgcolor">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Cell.attrib" combine="interleave">
+  <optional>
+    <attribute name="nowrap">
+      <value>nowrap</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="bgcolor">
+      <ref name="Color.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="height">
+      <ref name="Pixels.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="ul.attlist" combine="interleave">
+  <optional>
+    <attribute name="type"/>
+  </optional>
+  <optional>
+    <attribute name="compact">
+      <value>compact</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="align.attrib">
+  <optional>
+    <attribute name="align">
+      <choice>
+	<value>left</value>
+	<value>all</value>
+	<value>right</value>
+	<value>none</value>
+      </choice>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Color.datatype">
+  <text/>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <choice>
+    <ref name="font"/>
+    <ref name="basefont"/>
+    <ref name="s"/>
+    <ref name="strike"/>
+    <ref name="u"/>
+  </choice>
+</define>
+
+<define name="Block.class" combine="choice">
+  <choice>
+    <ref name="center"/>
+    <ref name="isindex"/>
+  </choice>
+</define>
+
+<define name="List.class" combine="choice">
+  <choice>
+    <ref name="dir"/>
+    <ref name="menu"/>
+  </choice>
+</define>
+
+<define name="head.content" combine="interleave">
+  <optional>
+    <ref name="isindex"/>
+  </optional>
+</define>
+
+<define name="Block.mix" combine="choice">
+  <choice>
+    <text/>
+    <ref name="Inline.class"/>
+  </choice>
+</define>
+
+<!-- With the legacy module and the frames modules, the html
+     element can contain either body or frameset. -->
+<define name="frameset" combine="choice">
+  <ref name="body"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/link.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/link.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/link.rng
new file mode 100755
index 0000000..3cce22d
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/link.rng
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Link Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="link">
+  <element name="link">
+    <ref name="link.attlist"/>
+  </element>
+</define>
+
+<define name="link.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="charset">
+      <ref name="Charset.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="href">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="hreflang">
+      <ref name="LanguageCode.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="type">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="rel">
+      <ref name="LinkTypes.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="rev">
+      <ref name="LinkTypes.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="media">
+      <ref name="MediaDesc.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="head.content" combine="interleave">
+  <zeroOrMore>
+    <ref name="link"/>
+  </zeroOrMore>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/list.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/list.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/list.rng
new file mode 100755
index 0000000..eb81c1c
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/list.rng
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- List Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="dl">
+  <element name="dl">
+    <ref name="dl.attlist"/>
+    <oneOrMore>
+      <choice>
+	<ref name="dt"/>
+	<ref name="dd"/>
+      </choice>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="dl.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="dt">
+  <element name="dt">
+    <ref name="dt.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="dt.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="dd">
+  <element name="dd">
+    <ref name="dd.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="dd.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="ol">
+  <element name="ol">
+    <ref name="ol.attlist"/>
+    <oneOrMore>
+      <ref name="li"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="ol.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="ul">
+  <element name="ul">
+    <ref name="ul.attlist"/>
+    <oneOrMore>
+      <ref name="li"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="ul.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="li">
+  <element name="li">
+    <ref name="li.attlist"/>
+    <ref name="Flow.model"/>
+  </element>
+</define>  
+
+<define name="li.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="List.class">
+  <choice>
+    <ref name="ul"/>
+    <ref name="ol"/>
+    <ref name="dl"/>
+  </choice>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="List.class"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/meta.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/meta.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/meta.rng
new file mode 100755
index 0000000..fbccc94
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/meta.rng
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Meta Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="meta">
+  <element name="meta">
+    <ref name="meta.attlist"/>
+  </element>
+</define>
+
+<define name="meta.attlist">
+  <ref name="I18n.attrib"/>
+  <optional>
+    <attribute name="http-equiv">
+      <ref name="NMTOKEN.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="name">
+      <ref name="NMTOKEN.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="content"/>
+  </optional>
+  <optional>
+    <attribute name="scheme"/>
+  </optional>
+</define>
+
+<define name="head.content" combine="interleave">
+  <zeroOrMore>
+    <ref name="meta"/>
+  </zeroOrMore>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/nameident.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/nameident.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/nameident.rng
new file mode 100755
index 0000000..dcd8633
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/nameident.rng
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Name Identification Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="a.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="applet.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="form.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="frame.attrib" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="iframe.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="img.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="map.attlist" combine="interleave">
+  <ref name="name.attlist"/>
+</define>
+
+<define name="name.attlist">
+  <optional>
+    <attribute name="name"/>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/object.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/object.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/object.rng
new file mode 100755
index 0000000..3f5ef9a
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/object.rng
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Object Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="object">
+  <element name="object">
+    <ref name="object.attlist"/>
+    <!-- No restrictions on mixed content in TREX. -->
+    <zeroOrMore>
+      <ref name="param"/>
+    </zeroOrMore>
+    <ref name="Flow.model"/>
+  </element>
+</define>
+
+<define name="object.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="declare">
+      <value>declare</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="classid">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="codebase">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="data">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="type">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="codetype">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="archive">
+      <ref name="URIs.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="standby">
+      <ref name="Text.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="height">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="width">
+      <ref name="Length.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="name"/>
+  </optional>
+  <optional>
+    <attribute name="tabindex">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="object"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/param.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/param.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/param.rng
new file mode 100755
index 0000000..20a7a82
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/param.rng
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Param Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="param">
+  <element name="param">
+    <ref name="param.attlist"/>
+  </element>
+</define>
+
+<define name="param.attlist">
+  <ref name="id.attrib"/>
+  <attribute name="name"/>
+  <optional>
+    <attribute name="value"/>
+  </optional>
+  <optional>
+    <attribute name="valuetype">
+      <choice>
+	<value>data</value>
+	<value>ref</value>
+	<value>object</value>
+      </choice>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="type">
+      <ref name="ContentType.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/pres.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/pres.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/pres.rng
new file mode 100755
index 0000000..8526d16
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/pres.rng
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="hr">
+  <element name="hr">
+    <ref name="hr.attlist"/>
+  </element>
+</define>
+
+<define name="hr.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="hr"/>
+</define>
+
+<define name="b">
+  <element name="b">
+    <ref name="b.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="b.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="big">
+  <element name="big">
+    <ref name="big.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="big.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="i">
+  <element name="i">
+    <ref name="i.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="i.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="small">
+  <element name="small">
+    <ref name="small.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="small.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="sub">
+  <element name="sub">
+    <ref name="sub.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="sub.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="sup">
+  <element name="sup">
+    <ref name="sup.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="sup.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="tt">
+  <element name="tt">
+    <ref name="tt.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="tt.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <choice>
+    <ref name="b"/>
+    <ref name="big"/>
+    <ref name="i"/>
+    <ref name="small"/>
+    <ref name="sub"/>
+    <ref name="sup"/>
+    <ref name="tt"/>
+  </choice>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ruby.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ruby.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ruby.rng
new file mode 100755
index 0000000..cc154a5
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ruby.rng
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="ruby">
+  <element name="ruby">
+    <ref name="ruby.attlist"/>
+    <choice>
+      <group>
+        <ref name="rb"/>
+        <choice>
+          <ref name="rt"/>
+          <group>
+            <ref name="rp"/>
+            <ref name="rt"/>
+            <ref name="rp"/>
+          </group>
+        </choice>
+      </group>
+      <group>
+        <ref name="rbc"/>
+        <ref name="rtc"/>
+        <optional>
+          <ref name="rtc"/>
+        </optional>
+      </group>
+    </choice>
+  </element>
+</define>
+
+<define name="ruby.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="rbc">
+  <element name="rbc">
+    <ref name="rbc.attlist"/>
+    <oneOrMore>
+      <ref name="rb"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="rbc.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="rtc">
+  <element name="rtc">
+    <ref name="rtc.attlist"/>
+    <oneOrMore>
+      <ref name="rt"/>
+    </oneOrMore>
+  </element>
+</define>
+
+<define name="rtc.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="rb">
+  <element name="rb">
+    <ref name="rb.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="rb.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="rt">
+  <element name="rt">
+    <ref name="rt.attlist"/>
+    <ref name="Inline.model"/>
+  </element>
+</define>
+
+<define name="rt.attlist">
+  <ref name="Common.attrib"/>
+  <optional>
+    <attribute name="rt">
+      <ref name="Number.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+<define name="rp">
+  <element name="rp">
+    <ref name="rp.attlist"/>
+    <text/>
+  </element>
+</define>
+
+<define name="rp.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="ruby"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/script.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/script.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/script.rng
new file mode 100755
index 0000000..16c200a
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/script.rng
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Script Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="script">
+  <element name="script">
+    <ref name="script.attlist"/>
+    <text/>
+  </element>
+</define>
+
+<define name="script.attlist">
+  <optional>
+    <attribute name="charset">
+      <ref name="Charset.datatype"/>
+    </attribute>
+  </optional>
+  <attribute name="type">
+    <ref name="ContentType.datatype"/>
+  </attribute>
+  <optional>
+    <attribute name="src">
+      <ref name="URI.datatype"/>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="defer">
+      <value>defer</value>
+    </attribute>
+  </optional>
+  <optional>
+    <attribute name="xml:space">
+      <value>preserve</value>
+    </attribute>
+  </optional>
+</define>
+
+<define name="noscript">
+  <element name="noscript">
+    <ref name="noscript.attlist"/>
+    <ref name="Block.model"/>
+  </element>
+</define>
+
+<define name="noscript.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="head.content" combine="interleave">
+  <zeroOrMore>
+    <ref name="script"/>
+  </zeroOrMore>
+</define>
+
+<define name="Script.class">
+  <choice>
+    <ref name="noscript"/>
+    <ref name="script"/>
+  </choice>
+</define>
+
+<define name="Inline.class" combine="choice">
+  <ref name="Script.class"/>
+</define>
+
+<define name="Block.class" combine="choice">
+  <ref name="Script.class"/>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ssismap.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ssismap.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ssismap.rng
new file mode 100755
index 0000000..3aa9fce
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/ssismap.rng
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Server-side Image Map Module -->
+<!-- Depends on image module. -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<define name="img.attlist" combine="interleave">
+  <optional>
+    <attribute name="ismap">
+      <value>ismap</value>
+    </attribute>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/struct.rng
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/struct.rng b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/struct.rng
new file mode 100755
index 0000000..98ff167
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/lib/xhtml/modules/struct.rng
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Structure Module -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+<start>
+  <ref name="html"/>
+</start>
+
+<define name="title">
+  <element name="title">
+    <ref name="title.attlist"/>
+    <text/>
+  </element>
+</define>
+
+<define name="title.attlist">
+  <ref name="I18n.attrib"/>
+</define>
+
+<define name="head">
+  <element name="head">
+    <ref name="head.attlist"/>
+    <ref name="head.content"/>
+  </element>
+</define>
+
+<define name="head.attlist">
+  <ref name="I18n.attrib"/>
+  <ref name="profile.attlist"/>
+</define>
+
+<define name="head.content">
+  <ref name="title"/>
+</define>
+
+<define name="profile.attlist">
+  <optional>
+    <attribute name="profile">
+      <ref name="URI.datatype"/>
+    </attribute>     
+  </optional>
+</define>
+
+<define name="body">
+  <element name="body">
+    <ref name="body.attlist"/>
+    <ref name="Block.model"/>
+  </element>
+</define>
+
+<define name="body.attlist">
+  <ref name="Common.attrib"/>
+</define>
+
+<define name="html">
+  <element name="html">
+    <ref name="html.attlist"/>
+    <ref name="head"/>
+    <ref name="body"/>
+  </element>
+</define>
+
+<define name="html.attlist">
+  <ref name="XHTML.version.attrib"/>
+  <ref name="I18n.attrib"/>
+</define>
+
+<define name="XHTML.version.attrib">
+  <optional>
+    <attribute name="version">
+      <ref name="FPI.datatype"/>
+    </attribute>
+  </optional>
+</define>
+
+</grammar>
\ No newline at end of file


[33/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/src/gui/htmlToolbar.css
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/src/gui/htmlToolbar.css b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/src/gui/htmlToolbar.css
new file mode 100644
index 0000000..18d0939
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/src/gui/htmlToolbar.css
@@ -0,0 +1,162 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ * Full Terms at http://mozile.mozdev.org/0.8/LICENSE
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is James A. Overton's code (james@overton.ca).
+ *
+ * The Initial Developer of the Original Code is James A. Overton.
+ * Portions created by the Initial Developer are Copyright (C) 2005-2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *	James A. Overton <ja...@overton.ca>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * @fileoverview Provides CSS styles for Mozile's HTML Toolbar GUI.
+ * @link http://mozile.mozdev.org 
+ * @author James A. Overton <ja...@overton.ca>
+ * @version 0.8
+ * $Id: htmlToolbar.css,v 1.3 2006/08/31 14:18:17 jameso Exp $
+ */
+
+/* 
+ * NOTE: There are several CSS hacks coded into the "htmlToolbar.js" file which override the defaults set here. Be careful.
+ */
+
+/*
+#mozileToolbar, .mozileMenu {
+	background-color: #EEEEEE;
+	border: 1px solid #888888;
+	font-family: Arial, Helvitica, sans-serif;
+}
+*/
+
+#mozileToolbar {
+	text-decoration: none;
+	color: black;
+	background-color: #EEEEEE;
+	border: 1px solid #888888;
+	font-family: sans-serif;
+	padding: 1px 0px 1px 0px;
+	position: absolute;
+	top: -1px;
+	left: 0px;
+	z-index: 1000;
+	vertical-align: middle;
+	font-family: Arial, Helvitica, sans-serif;
+	-moz-user-select: none;
+}
+
+#mozileToolbar img {
+	border: 0px;
+	vertical-align: middle;
+}
+
+#mozileToolbar *[available=false] {
+	opacity: 0.5;
+}
+
+.mozileButton {
+	margin: 0px 0px 1px 0px;
+	padding: 1px 1px 2px 1px;
+	border: 0px;
+	text-decoration: none;
+	min-width: 16px;
+	height: 16px;
+}
+
+.mozileButton img {
+	margin: 0px;
+	padding: 0px;
+}
+
+.mozileButton * {
+	text-decoration: none;
+}
+
+.mozileButton[active=true] {
+	background-color: #C1D2EE;
+	border: 1px solid #316AC5;
+	padding: 0px 0px 1px 0px;
+}
+
+.mozileButton:hover {
+	background-color: #DDDDFF;
+	border: 1px solid #316AC5;
+	padding: 0px 0px 1px 0px;
+}
+
+.mozileMenuItem {
+	vertical-align: middle;
+	cursor: pointer;
+	padding: 0px;
+}
+
+.mozileMenuItem td {
+	margin: 0px;
+}
+
+.mozileMenuItem:hover {
+	background-color: #316AC5;
+	color: white;
+}
+
+.mozileMenuItem img {
+	vertical-align: middle;
+}
+
+.mozileMenu {
+	background-color: #EEEEEE;
+	border: 1px solid #888888;
+	position: absolute;
+	padding: 1px 1px 1px 1px;
+	vertical-align: middle;
+}
+
+.mozileRight {
+	position: absolute;
+	right: 2px;
+	vertical-align: middle;
+}
+
+.mozileActive {
+}
+
+.mozileIcon {
+}
+
+.mozileLabel {
+	white-space: pre;
+}
+
+.mozileAccel {
+	text-align: right;
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/parameters.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/parameters.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/parameters.js
new file mode 100644
index 0000000..6fdcde7
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/parameters.js
@@ -0,0 +1,72 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+function Parameters() {
+
+	this.parameterArray = new Array(0);
+    var url   = window.location.search;
+    if (url != "")
+     {
+      url = url.substring(1,url.length);                      
+      splittedURL = url.split("&"); 
+      for (i=0;i < splittedURL.length;i++)
+       {
+        temp = splittedURL[i].split("=");
+        currentField = new field();
+				currentField.name = temp[0];
+				currentField.value = Parameters.readField(temp[1]);
+				this.parameterArray.push(currentField);
+       }
+     }
+     
+}
+
+Parameters.prototype.getField = function(name) {
+
+	for (i = 0; i < this.parameterArray.length; i++) {
+		if (this.parameterArray[i].name == name) {
+			return this.parameterArray[i].value;
+		}
+	}
+	return null;
+}
+
+Parameters.readField = function(raw) {
+	if (raw == null) {
+		return null;
+	}
+	var result = raw.replace(/\+/g," ");
+	return unescape(result);
+}
+
+	 
+function field() {
+ 	var name;
+	var value;
+}
+	
+	
+	
+	
+
+
+   
+	 	

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfparser.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfparser.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfparser.js
new file mode 100644
index 0000000..74eaa46
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfparser.js
@@ -0,0 +1,544 @@
+/**
+ * @fileoverview
+ * TABULATOR RDF PARSER
+ *
+ * Version 0.1
+ *  Parser believed to be in full positive RDF/XML parsing compliance
+ *  with the possible exception of handling deprecated RDF attributes
+ *  appropriately. Parser is believed to comply fully with other W3C
+ *  and industry standards where appropriate (DOM, ECMAScript, &c.)
+ *
+ *  Author: David Sheets <ds...@mit.edu>
+ *  SVN ID: $Id$
+ *
+ * W3C® SOFTWARE NOTICE AND LICENSE
+ * http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ * This work (and included software, documentation such as READMEs, or
+ * other related items) is being provided by the copyright holders under
+ * the following license. By obtaining, using and/or copying this work,
+ * you (the licensee) agree that you have read, understood, and will
+ * comply with the following terms and conditions.
+ * 
+ * Permission to copy, modify, and distribute this software and its
+ * documentation, with or without modification, for any purpose and
+ * without fee or royalty is hereby granted, provided that you include
+ * the following on ALL copies of the software and documentation or
+ * portions thereof, including modifications:
+ * 
+ * 1. The full text of this NOTICE in a location viewable to users of
+ * the redistributed or derivative work.
+ * 2. Any pre-existing intellectual property disclaimers, notices, or terms and
+ * conditions. If none exist, the W3C Software Short Notice should be
+ * included (hypertext is preferred, text is permitted) within the body
+ * of any redistributed or derivative code.
+ * 3. Notice of any changes or modifications to the files, including the
+ * date changes were made. (We recommend you provide URIs to the location
+ * from which the code is derived.)
+ * 
+ * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+ * HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+ * FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+ * DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ * TRADEMARKS OR OTHER RIGHTS.
+ * 
+ * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+ * OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ * DOCUMENTATION.
+ * 
+ * The name and trademarks of copyright holders may NOT be used in
+ * advertising or publicity pertaining to the software without specific,
+ * written prior permission. Title to copyright in this software and any
+ * associated documentation will at all times remain with copyright
+ * holders.
+ */
+/**
+ * @class Class defining an RDFParser resource object tied to an RDFStore
+ *  
+ * @author David Sheets <ds...@mit.edu>
+ * @version 0.1
+ * 
+ * @constructor
+ * @param {RDFStore} store An RDFStore object
+ */
+function RDFParser(store) {
+    /** Standard namespaces that we know how to handle @final
+     *  @member RDFParser
+     */
+    RDFParser['ns'] = {'RDF':
+		       "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+		       'RDFS':
+		       "http://www.w3.org/2000/01/rdf-schema#"}
+    /** DOM Level 2 node type magic numbers @final
+     *  @member RDFParser
+     */
+    RDFParser['nodeType'] = {'ELEMENT': 1, 'ATTRIBUTE': 2, 'TEXT': 3,
+			     'CDATA_SECTION': 4, 'ENTITY_REFERENCE': 5,
+			     'ENTITY': 6, 'PROCESSING_INSTRUCTION': 7,
+			     'COMMENT': 8, 'DOCUMENT': 9, 'DOCUMENT_TYPE': 10,
+			     'DOCUMENT_FRAGMENT': 11, 'NOTATION': 12}
+
+    /**
+     * Frame class for namespace and base URI lookups
+     * Base lookups will always resolve because the parser knows
+     * the default base.
+     *
+     * @private
+     */
+    this['frameFactory'] = function (parser, parent, element) {
+	return {'NODE': 1,
+		'ARC': 2,
+		'parent': parent,
+		'parser': parser,
+		'store': parser['store'],
+		'element': element,
+		'lastChild': 0,
+		'base': null,
+		'lang': null,
+		'node': null,
+		'nodeType': null,
+		'listIndex': 1,
+		'rdfid': null,
+		'datatype': null,
+		'collection': false,
+
+	/** Terminate the frame and notify the store that we're done */
+		'terminateFrame': function () {
+		    if (this['collection']) {
+			this['node']['close']()
+		    }
+		},
+	
+	/** Add a symbol of a certain type to the this frame */
+		'addSymbol': function (type, uri) {
+		    uri = Util.uri.join(uri, this['base'])
+		    this['node'] = this['store']['sym'](uri)
+		    this['nodeType'] = type
+		},
+	
+	/** Load any constructed triples into the store */
+		'loadTriple': function () {
+		    if (this['parent']['parent']['collection']) {
+			this['parent']['parent']['node']['append'](this['node'])
+		    }
+		    else {
+			this['store']['add'](this['parent']['parent']['node'],
+				       this['parent']['node'],
+				       this['node'],
+				       this['parser']['why'])
+		    }
+		    if (this['parent']['rdfid'] != null) { // reify
+			var triple = this['store']['sym'](
+			    Util.uri.join("#"+this['parent']['rdfid'],
+					  this['base']))
+			this['store']['add'](triple,
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']
+						     +"type"),
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']
+						     +"Statement"),
+					     this['parser']['why'])
+			this['store']['add'](triple,
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']
+						     +"subject"),
+					     this['parent']['parent']['node'],
+					     this['parser']['why'])
+			this['store']['add'](triple,
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']
+						     +"predicate"),
+					     this['parent']['node'],
+					     this['parser']['why'])
+			this['store']['add'](triple,
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']
+						     +"object"),
+					     this['node'],
+					     this['parser']['why'])
+		    }
+		},
+
+	/** Check if it's OK to load a triple */
+		'isTripleToLoad': function () {
+		    return (this['parent'] != null
+			    && this['parent']['parent'] != null
+			    && this['nodeType'] == this['NODE']
+			    && this['parent']['nodeType'] == this['ARC']
+			    && this['parent']['parent']['nodeType']
+			    == this['NODE'])
+		},
+
+	/** Add a symbolic node to this frame */
+		'addNode': function (uri) {
+		    this['addSymbol'](this['NODE'],uri)
+		    if (this['isTripleToLoad']()) {
+			this['loadTriple']()
+		    }
+		},
+
+	/** Add a collection node to this frame */
+		'addCollection': function () {
+		    this['nodeType'] = this['NODE']
+		    this['node'] = this['store']['collection']()
+		    this['collection'] = true
+		    if (this['isTripleToLoad']()) {
+			this['loadTriple']()
+		    }
+		},
+
+	/** Add a collection arc to this frame */
+		'addCollectionArc': function () {
+		    this['nodeType'] = this['ARC']
+		},
+
+	/** Add a bnode to this frame */
+		'addBNode': function (id) {
+		    if (id != null) {
+			if (this['parser']['bnodes'][id] != null) {
+			    this['node'] = this['parser']['bnodes'][id]
+			} else {
+			    this['node'] = this['parser']['bnodes'][id] = this['store']['bnode']()
+			}
+		    } else { this['node'] = this['store']['bnode']() }
+		    
+		    this['nodeType'] = this['NODE']
+		    if (this['isTripleToLoad']()) {
+			this['loadTriple']()
+		    }
+		},
+
+	/** Add an arc or property to this frame */
+		'addArc': function (uri) {
+		    if (uri == RDFParser['ns']['RDF']+"li") {
+			uri = RDFParser['ns']['RDF']+"_"+this['parent']['listIndex']++
+		    }
+		    this['addSymbol'](this['ARC'], uri)
+		},
+
+	/** Add a literal to this frame */
+		'addLiteral': function (value) {
+		    if (this['parent']['datatype']) {
+			this['node'] = this['store']['literal'](
+			    value, "", this['store']['sym'](
+				this['parent']['datatype']))
+		    }
+		    else {
+			this['node'] = this['store']['literal'](
+			    value, this['lang'])
+		    }
+		    this['nodeType'] = this['NODE']
+		    if (this['isTripleToLoad']()) {
+			this['loadTriple']()
+		    }
+		}
+	       }
+    }
+
+    /** Our triple store reference @private */
+    this['store'] = store
+    /** Our identified blank nodes @private */
+    this['bnodes'] = {}
+    /** A context for context-aware stores @private */
+    this['why'] = null
+    /** Reification flag */
+    this['reify'] = false
+
+    /**
+     * Build our initial scope frame and parse the DOM into triples
+     * @param {DOMTree} document The DOM to parse
+     * @param {String} base The base URL to use 
+     * @param {Object} why The context to which this resource belongs
+     */
+    this['parse'] = function (document, base, why) {
+	var children = document['childNodes']
+
+	// clean up for the next run
+	this['cleanParser']()
+
+	// figure out the root element
+	if (document['nodeType'] == RDFParser['nodeType']['DOCUMENT']) {
+	    for (var c=0; c<children['length']; c++) {
+		if (children[c]['nodeType']
+		    == RDFParser['nodeType']['ELEMENT']) {
+		    var root = children[c]
+		    break
+		}
+	    }	    
+	}
+	else if (document['nodeType'] == RDFParser['nodeType']['ELEMENT']) {
+	    var root = document
+	}
+	else {
+	    throw new Error("RDFParser: can't find root in " + base
+			    + ". Halting. ")
+	    return false
+	}
+	
+	this['why'] = why
+
+	// our topmost frame
+
+	var f = this['frameFactory'](this)
+	f['base'] = base
+	f['lang'] = ''
+	
+	this['parseDOM'](this['buildFrame'](f,root))
+	return true
+    }
+    this['parseDOM'] = function (frame) {
+	// a DOM utility function used in parsing
+	var elementURI = function (el) {
+	    return el['namespaceURI'] + el['localName']
+	}
+	var dig = true // if we'll dig down in the tree on the next iter
+
+	while (frame['parent']) {
+	    var dom = frame['element']
+	    var attrs = dom['attributes']
+
+	    if (dom['nodeType']
+		== RDFParser['nodeType']['TEXT']
+		|| dom['nodeType']
+		== RDFParser['nodeType']['CDATA_SECTION']) {//we have a literal
+		frame['addLiteral'](dom['nodeValue'])
+	    }
+	    else if (elementURI(dom)
+		     != RDFParser['ns']['RDF']+"RDF") { // not root
+		if (frame['parent'] && frame['parent']['collection']) {
+		    // we're a collection element
+		    frame['addCollectionArc']()
+		    frame = this['buildFrame'](frame,frame['element'])
+		    frame['parent']['element'] = null
+		}
+                if (!frame['parent'] || !frame['parent']['nodeType']
+		    || frame['parent']['nodeType'] == frame['ARC']) {
+		    // we need a node
+		    var about =dom['getAttributeNodeNS'](
+			RDFParser['ns']['RDF'],"about")
+		    var rdfid =dom['getAttributeNodeNS'](
+			RDFParser['ns']['RDF'],"ID")
+		    if (about && rdfid) {
+			throw new Error("RDFParser: " + dom['nodeName']
+					+ " has both rdf:id and rdf:about."
+					+ " Halting. Only one of these"
+					+ " properties may be specified on a"
+					+ " node.");
+		    }
+		    if (about == null && rdfid) {
+			frame['addNode']("#"+rdfid['nodeValue'])
+			dom['removeAttributeNode'](rdfid)
+		    }
+		    else if (about == null && rdfid == null) {
+			var bnid = dom['getAttributeNodeNS'](
+			    RDFParser['ns']['RDF'],"nodeID")
+			if (bnid) {
+			    frame['addBNode'](bnid['nodeValue'])
+			    dom['removeAttributeNode'](bnid)
+			} else { frame['addBNode']() }
+		    }
+		    else {
+			frame['addNode'](about['nodeValue'])
+			dom['removeAttributeNode'](about)
+		    }
+		
+		    // Typed nodes
+		    var rdftype = dom['getAttributeNodeNS'](
+			RDFParser['ns']['RDF'],"type")
+		    if (RDFParser['ns']['RDF']+"Description"
+			!= elementURI(dom)) {
+			rdftype = {'nodeValue': elementURI(dom)}
+		    }
+		    if (rdftype != null) {
+			this['store']['add'](frame['node'],
+					     this['store']['sym'](
+						 RDFParser['ns']['RDF']+"type"),
+					     this['store']['sym'](
+						 Util.uri.join(
+						     rdftype['nodeValue'],
+						     frame['base'])),
+					     this['why'])
+			if (rdftype['nodeName']){
+			    dom['removeAttributeNode'](rdftype)
+			}
+		    }
+		    
+		    // Property Attributes
+		    for (var x = attrs['length']-1; x >= 0; x--) {
+			this['store']['add'](frame['node'],
+					     this['store']['sym'](
+						 elementURI(attrs[x])),
+					     this['store']['literal'](
+						 attrs[x]['nodeValue'],
+						 frame['lang']),
+					     this['why'])
+		    }
+		}
+		else { // we should add an arc (or implicit bnode+arc)
+		    frame['addArc'](elementURI(dom))
+
+		    // save the arc's rdf:ID if it has one
+		    if (this['reify']) {
+			var rdfid = dom['getAttributeNodeNS'](
+			    RDFParser['ns']['RDF'],"ID")
+			if (rdfid) {
+			    frame['rdfid'] = rdfid['nodeValue']
+			    dom['removeAttributeNode'](rdfid)
+			}
+		    }
+
+		    var parsetype = dom['getAttributeNodeNS'](
+			RDFParser['ns']['RDF'],"parseType")
+		    var datatype = dom['getAttributeNodeNS'](
+			RDFParser['ns']['RDF'],"datatype")
+		    if (datatype) {
+			frame['datatype'] = datatype['nodeValue']
+			dom['removeAttributeNode'](datatype)
+		    }
+
+		    if (parsetype) {
+			var nv = parsetype['nodeValue']
+			if (nv == "Literal") {
+			    frame['datatype']
+				= RDFParser['ns']['RDF']+"XMLLiteral"
+			    // (this.buildFrame(frame)).addLiteral(dom)
+			    // should work but doesn't
+			    frame = this['buildFrame'](frame)
+			    frame['addLiteral'](dom)
+			    dig = false
+			}
+			else if (nv == "Resource") {
+			    frame = this['buildFrame'](frame,frame['element'])
+			    frame['parent']['element'] = null
+			    frame['addBNode']()
+			}
+			else if (nv == "Collection") {
+			    frame = this['buildFrame'](frame,frame['element'])
+			    frame['parent']['element'] = null
+			    frame['addCollection']()
+			}
+			dom['removeAttributeNode'](parsetype)
+		    }
+
+		    if (attrs['length'] != 0) {
+			var resource = dom['getAttributeNodeNS'](
+			    RDFParser['ns']['RDF'],"resource")
+			var bnid = dom['getAttributeNodeNS'](
+			    RDFParser['ns']['RDF'],"nodeID")
+
+			frame = this['buildFrame'](frame)
+			if (resource) {
+			    frame['addNode'](resource['nodeValue'])
+			    dom['removeAttributeNode'](resource)
+			} else {
+			    if (bnid) {
+				frame['addBNode'](bnid['nodeValue'])
+				dom['removeAttributeNode'](bnid)
+			    } else { frame['addBNode']() }
+			}
+
+			for (var x = attrs['length']-1; x >= 0; x--) {
+			    var f = this['buildFrame'](frame)
+			    f['addArc'](elementURI(attrs[x]))
+			    if (elementURI(attrs[x])
+				==RDFParser['ns']['RDF']+"type"){
+				(this['buildFrame'](f))['addNode'](
+				    attrs[x]['nodeValue'])
+			    } else {
+				(this['buildFrame'](f))['addLiteral'](
+				    attrs[x]['nodeValue'])
+			    }
+			}
+		    }
+		    else if (dom['childNodes']['length'] == 0) {
+			(this['buildFrame'](frame))['addLiteral']("")
+		    }
+		}
+	    } // rdf:RDF
+
+	    // dig dug
+	    dom = frame['element']
+	    while (frame['parent']) {
+		var pframe = frame
+		while (dom == null) {
+		    frame = frame['parent']
+		    dom = frame['element']
+		}
+		var candidate = dom['childNodes'][frame['lastChild']]
+		if (candidate == null || !dig) {
+		    frame['terminateFrame']()
+		    if (!(frame = frame['parent'])) { break } // done
+		    dom = frame['element']
+		    dig = true
+		}
+		else if ((candidate['nodeType']
+			  != RDFParser['nodeType']['ELEMENT']
+			  && candidate['nodeType']
+			  != RDFParser['nodeType']['TEXT']
+			  && candidate['nodeType']
+			  != RDFParser['nodeType']['CDATA_SECTION'])
+			 || ((candidate['nodeType']
+			      == RDFParser['nodeType']['TEXT']
+			      || candidate['nodeType']
+			      == RDFParser['nodeType']['CDATA_SECTION'])
+			     && dom['childNodes']['length'] != 1)) {
+		    frame['lastChild']++
+		}
+		else { // not a leaf
+		    frame['lastChild']++
+		    frame = this['buildFrame'](pframe,
+					       dom['childNodes'][frame['lastChild']-1])
+		    break
+		}
+	    }
+	} // while
+    }
+
+    /**
+     * Cleans out state from a previous parse run
+     * @private
+     */
+    this['cleanParser'] = function () {
+	this['bnodes'] = {}
+	this['why'] = null
+    }
+
+    /**
+     * Builds scope frame 
+     * @private
+     */
+    this['buildFrame'] = function (parent, element) {
+	var frame = this['frameFactory'](this,parent,element)
+	if (parent) {
+	    frame['base'] = parent['base']
+	    frame['lang'] = parent['lang']
+	}
+	if (element == null
+	    || element['nodeType'] == RDFParser['nodeType']['TEXT']
+	    || element['nodeType'] == RDFParser['nodeType']['CDATA_SECTION']) {
+	    return frame
+	}
+
+	var attrs = element['attributes']
+
+	var base = element['getAttributeNode']("xml:base")
+	if (base != null) {
+	    frame['base'] = base['nodeValue']
+	    element['removeAttribute']("xml:base")
+	}
+	var lang = element['getAttributeNode']("xml:lang")
+	if (lang != null) {
+	    frame['lang'] = lang['nodeValue']
+	    element['removeAttribute']("xml:lang")
+	}
+
+	// remove all extraneous xml and xmlns attributes
+	for (var x = attrs['length']-1; x >= 0; x--) {
+	    if (attrs[x]['nodeName']['substr'](0,3) == "xml") {
+		element['removeAttributeNode'](attrs[x])
+	    }
+	}
+	return frame
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfxmlserializer.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfxmlserializer.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfxmlserializer.js
new file mode 100644
index 0000000..edbf4c8
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/rdfxmlserializer.js
@@ -0,0 +1,130 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+function RDFXMLSerializer() {
+}
+
+
+RDFXMLSerializer.serialize = function(rdfFormula, baseURL) {
+	var statements = rdfFormula.statements;
+	var result = document.implementation.createDocument("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdf:RDF", null);
+	var root = result.firstChild;
+	var elementMap = new Object();
+	for (var i = 0; i < statements.length; i++) {
+		RDFXMLSerializer.addStatement(statements[i], result, root, baseURL, elementMap);
+	}
+	root.appendChild(result.createTextNode("\n"));
+	for (var key in elementMap) {
+		elementMap[key].appendChild(result.createTextNode("\n\t"));
+	}
+	//alert(new XMLSerializer().serializeToString(result));
+	return result;
+}
+
+RDFXMLSerializer.addStatement = function(statement, result, root, baseURL, elementMap) {
+	
+	var elem = result.createElementNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:Description");
+	var elemId;
+	if (statement.subject.termType == "symbol") {
+		elemId = statement.subject.uri;
+		elem.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:about", RDFXMLSerializer.getRelativePath(statement.subject.uri, baseURL));
+	} else {
+		elemId = statement.subject.id;
+		elem.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:nodeID", "a"+statement.subject.id);
+	}
+	if (elementMap[elemId]) {
+		elem = elementMap[elemId];
+	} else {
+		elementMap[elemId] = elem;
+		root.appendChild(result.createTextNode("\n\t"));
+		root.appendChild(elem);
+	}
+	elem.appendChild(result.createTextNode("\n"));
+	elem.appendChild(result.createTextNode("\t\t"));
+	var splittedURI = RDFXMLSerializer.splitURI(statement.predicate.uri);
+	var propertyElem = result.createElementNS(splittedURI.ns, splittedURI.name);
+	elem.appendChild(propertyElem);
+	if (statement.object.termType == "symbol") {
+		propertyElem.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:resource", RDFXMLSerializer.getRelativePath(statement.object.uri, baseURL));
+	} else {
+		if (statement.object.termType == "literal") {
+			//note supports hacked xml-literals, other types are not in the store
+			if (statement.object.elementValue) {
+				var nodes = statement.object.elementValue.childNodes;
+				for (var i = 0; i < nodes.length; i ++) {
+					propertyElem.appendChild(nodes[i].cloneNode(true));
+				}
+				propertyElem.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:parseType", "Literal");
+			} else {
+				var textNode = result.createTextNode(statement.object.value);
+				propertyElem.appendChild(textNode);
+				if (statement.object.lang) {
+					propertyElem.setAttribute("xml:lang", statement.object.lang);
+				}
+			}
+		} else {
+			propertyElem.setAttributeNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdf:nodeID", "a"+statement.object.id);
+		}
+	}
+}
+
+RDFXMLSerializer.splitURI = function(uri) {
+	var poundPos = uri.indexOf('#');
+	var splitPos; 
+	if (poundPos > -1) {
+		splitPos = poundPos;
+	} else {
+		splitPos = uri.lastIndexOf('/');
+	}
+	var result = new Object();
+	result.ns = uri.substring(0, splitPos+1);
+	result.name = uri.substring(splitPos+1);
+	return result;
+	
+}
+
+RDFXMLSerializer.getRelativePath = function(url, contextURL) {
+	if (!contextURL) {
+		return url;
+	}
+	var contextCollection = contextURL.substring(0, contextURL.lastIndexOf('/'));
+	var contextualisation =  RDFXMLSerializer.getRelativePathToCollection(url, contextCollection);
+	if (contextualisation) {
+		return contextualisation;
+	} else {
+		return url;
+	}
+}
+
+RDFXMLSerializer.getRelativePathToCollection = function(url, contextCollection) {
+	if (url.indexOf(contextCollection) == 0) {
+		return url.substring(contextCollection.length+1);
+	} else {
+		if (contextCollection.match(/.*\/\/.*\.*\//)) {
+			var contextCollection = contextCollection.substring(0, contextCollection.lastIndexOf('/'));
+			var superContextualisation = RDFXMLSerializer.getRelativePathToCollection(url, contextCollection);
+			if (superContextualisation) {
+				return "../"+superContextualisation;
+			}
+		} 
+		return null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/term.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/term.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/term.js
new file mode 100644
index 0000000..29e5d7f
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/term.js
@@ -0,0 +1,307 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+// These are the classes corresponding to the RDF and N3 data models
+//
+// Designed to look like rdflib and cwm designs.
+//
+// Issues: Should the names start with RDF to make them
+//      unique as program-wide symbols?
+//
+// W3C open source licence 2005.
+//
+
+RDFTracking = 0  // Are we requiring reasons for statements?
+
+//takes in an object and makes it an object if it's a literal
+function makeTerm(val) {
+    //  fyi("Making term from " + val)
+    if (typeof val == 'object') return val;
+    if (typeof val == 'string') return new RDFLiteral(val);
+    if (typeof val == 'undefined') return undefined;
+    alert("Can't make term from " + val + " of type " + typeof val) // @@ add numbers
+}
+
+
+
+//	Symbol
+
+function RDFEmpty() {
+	return this;
+}
+RDFEmpty.prototype.termType = 'empty'
+RDFEmpty.prototype.toString = function () { return "" }
+RDFEmpty.prototype.toNT = function () { return "" }
+
+function RDFSymbol_toNT(x) {
+    return ("<" + x.uri + ">")
+}
+
+function toNT() {
+    return RDFSymbol_toNT(this)
+}
+
+function RDFSymbol(uri) {
+    this.uri = uri
+    return this
+}
+	
+RDFSymbol.prototype.termType = 'symbol'
+RDFSymbol.prototype.toString = toNT
+RDFSymbol.prototype.toNT = toNT
+
+
+//	Blank Node
+
+var RDFNextId = 0;  // Gobal genid
+RDFGenidPrefix = "genid:"
+NTAnonymousNodePrefix = "_:n"
+
+function RDFBlankNode(id) {
+    /*if (id)
+    	this.id = id;
+    else*/
+    this.id = RDFNextId++
+    return this
+}
+
+RDFBlankNode.prototype.termType = 'bnode'
+
+RDFBlankNode.prototype.toNT = function() {
+    return NTAnonymousNodePrefix + this.id
+}
+RDFBlankNode.prototype.toString = RDFBlankNode.prototype.toNT  
+
+//	Literal
+
+//LiteralSmush = []
+
+function RDFLiteral(value, lang, datatype) {
+	if (typeof value == 'object') {	
+		var serializer = new XMLSerializer();
+		this.value = serializer.serializeToString(value);
+		this.elementValue = value.cloneNode(true); //cloning so taht literal doesn't become mutable
+	} else {
+		//console.debug("value: " +value+" type "+ typeof value);
+    	this.value = value.toString();
+    }
+    this.lang=lang;	  // string
+    this.datatype=datatype;  // term
+    this.toString = RDFLiteralToString
+    this.toNT = RDFLiteral_toNT
+    //if (LiteralSmush[this.toNT()]) return LiteralSmush[this.toNT()];
+    //else LiteralSmush[this.toNT()]=this;
+    return this
+}
+
+RDFLiteral.prototype.termType = 'literal'
+
+function RDFLiteral_toNT() {
+    var str = this.value
+    if (typeof str != 'string') {
+	throw Error("Value of RDF literal is not string: "+str)
+    }
+    str = str.replace(/\\/g, '\\\\');  // escape
+    str = str.replace(/\"/g, '\\"');
+    str = '"' + str + '"'
+
+    if (this.datatype){
+    //alert(this.datatype.termType+"   "+typeof this.datatype)
+	str = str + '^^' + this.datatype//.toNT()
+    }
+    if (this.lang) {
+	str = str + "@" + this.lang
+    }
+    return str
+}
+
+function RDFLiteralToString() {
+    return this.value
+}
+    
+RDFLiteral.prototype.toString = RDFLiteralToString   
+RDFLiteral.prototype.toNT = RDFLiteral_toNT
+
+function RDFCollection() {
+    this.id = RDFNextId++
+    this.elements = []
+    this.closed = false
+}
+
+RDFCollection.prototype.termType = 'collection'
+
+RDFCollection.prototype.toNT = function() {
+    return NTAnonymousNodePrefix + this.id
+}
+RDFCollection.prototype.toString = RDFCollection.prototype.toNT 
+
+RDFCollection.prototype.append = function (el) {
+    this.elements.push(el)
+}
+
+RDFCollection.prototype.close = function () {
+    this.closed = true
+}
+
+//	Statement
+//
+//  This is a triple with an optional reason.
+//
+//   The reason can point to provenece or inference
+//
+function RDFStatement_toNT() {
+    return (this.subject.toNT() + " "
+	    + this.predicate.toNT() + " "
+	    +  this.object.toNT() +" .")
+}
+
+function RDFStatement(subject, predicate, object, why) {
+    this.subject = makeTerm(subject)
+    this.predicate = makeTerm(predicate)
+    this.object = makeTerm(object)
+    if (typeof why !='undefined') {
+	this.why = why
+    } else if (RDFTracking) {
+	fyi("WARNING: No reason on "+subject+" "+predicate+" "+object)
+    }
+    return this
+}
+
+RDFStatement.prototype.toNT = RDFStatement_toNT
+RDFStatement.prototype.toString = RDFStatement_toNT
+	
+
+//	Formula
+//
+//	Set of statements.
+
+function RDFFormula() {
+    this.statements = []
+    this.constraints = []
+    this.initBindings = []
+    this.optional = []
+    return this
+}
+
+/*function RDFQueryFormula() {
+	this.statements = []
+	this.constraints = []
+	this.initBindings = []
+	this.optional = []
+	return this
+}*/
+
+function RDFFormula_toNT() {
+    return "{\n" + this.statements.join('\n') + "}"
+}
+
+//RDFQueryFormula.prototype = new RDFFormula()
+//RDFQueryFormula.termType = 'queryFormula'
+RDFFormula.prototype.termType = 'formula'
+RDFFormula.prototype.toNT = RDFFormula_toNT
+RDFFormula.prototype.toString = RDFFormula_toNT   
+
+RDFFormula.prototype.add = function(subj, pred, obj, why) {
+    this.statements.push(new RDFStatement(subj, pred, obj, why))
+}
+
+// Convenience methods on a formula allow the creation of new RDF terms:
+
+RDFFormula.prototype.sym = function(uri,name) {
+    if (name != null) {
+	uri = this.namespaces[uri] + name
+    }
+    return new RDFSymbol(uri)
+}
+
+RDFFormula.prototype.literal = function(val, lang, dt) {
+    return new RDFLiteral(val, lang, dt)
+}
+
+RDFFormula.prototype.bnode = function(id) {
+    return new RDFBlankNode(id)
+}
+
+RDFFormula.prototype.formula = function() {
+    return new RDFFormula()
+}
+
+RDFFormula.prototype.collection = function () {
+    return new RDFCollection()
+}
+
+
+/*RDFFormula.prototype.queryFormula = function() {
+	return new RDFQueryFormula()
+}*/
+
+RDFVariableBase = "varid:"; // We deem variabe x to be the symbol varid:x 
+
+//An RDFVariable is a type of s/p/o that's not literal. All it holds is it's URI.
+//It has type 'variable', and a function toNT that turns it into NTriple form
+function RDFVariable(rel) {
+    this.uri = URIjoin(rel, RDFVariableBase);
+    return this;
+}
+
+RDFVariable.prototype.termType = 'variable';
+RDFVariable.prototype.toNT = function() {
+    if (this.uri.slice(0, RDFVariableBase.length) == RDFVariableBase) {
+	return '?'+ this.uri.slice(RDFVariableBase.length);} // @@ poor man's refTo
+    return '?' + this.uri;
+};
+
+RDFVariable.prototype.toString = RDFVariable.prototype.toNT;
+RDFVariable.prototype.classOrder = 7;
+
+RDFFormula.prototype.variable = function(name) {
+    return new RDFVariable(name);
+};
+
+RDFVariable.prototype.hashString = RDFVariable.prototype.toNT;
+
+
+// The namespace function generator 
+
+function Namespace(nsuri) {
+    return function(ln) { return new RDFSymbol(nsuri+ln) }
+}
+
+// Parse a single token
+//
+// The bnode bit should not be used on program-external values; designed
+// for internal work such as storing a bnode id in an HTML attribute.
+// Not coded for literals.
+
+RDFFormula.prototype.fromNT = function(str) {
+    var len = str.length
+    var ch = str.slice(0,1)
+    if (ch == '<') return this.sym(str.slice(1,len-1))
+    if (ch == '_') {
+	var x = new RDFBlankNode()
+	x.id = parseInt(str.slice(3))
+	RDFNextId--
+	return x
+    }
+    alert("Can't yet convert from NT: '"+str+"', "+str[0])
+}
+
+// ends

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/uri.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/uri.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/uri.js
new file mode 100644
index 0000000..2a8582e
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/uri.js
@@ -0,0 +1,123 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+//  Implementing URI-specific functions
+//
+//	See RFC 2386
+//
+// This is or was   http://www.w3.org/2005/10/ajaw/uri.js
+// 2005 W3C open source licence
+//
+//
+//  Take a URI given in relative or absolute form and a base
+//  URI, and return an absolute URI
+//
+//  See also http://www.w3.org/2000/10/swap/uripath.py
+//
+
+if (typeof Util == "undefined") { Util = {}}
+if (typeof Util.uri == "undefined") { Util.uri = {}}
+
+Util.uri.join = function (given, base) {
+    // if (typeof fyi != 'undefined') fyi("   URI given="+given+" base="+base)
+    var baseHash = base.indexOf('#')
+    if (baseHash > 0) base = base.slice(0, baseHash)
+    if (given.length==0) return base // before chopping its filename off
+    if (given.indexOf('#')==0) return base + given
+    var colon = given.indexOf(':')
+    if (colon >= 0) return given	// Absolute URI form overrides base URI
+    var baseColon = base.indexOf(':')
+    if (baseColon<0) {alert("Invalid base URL "+ base); return given}
+    var baseScheme = base.slice(0,baseColon+1)  // eg http:
+    if (given.indexOf("//") == 0)     // Starts with //
+	return baseScheme + given;
+    if (base.indexOf('//', baseColon)==baseColon+1) {  // Any hostpart?
+	    var baseSingle = base.indexOf("/", baseColon+3)
+	if (baseSingle < 0) {
+	    if (base.length-baseColon-3 > 0) {
+		return base + "/" + given
+	    } else {
+		return baseScheme + given
+	    }
+	}
+    } else {
+	var baseSingle = base.indexOf("/", baseColon+1)
+	if (baseSingle < 0) {
+	    if (base.length-baseColon-1 > 0) {
+		return base + "/" + given
+	    } else {
+		return baseScheme + given
+	    }
+	}
+    }
+
+    if (given.indexOf('/') == 0)	// starts with / but not //
+	return base.slice(0, baseSingle) + given
+    
+    var path = base.slice(baseSingle)
+    var lastSlash = path.lastIndexOf("/")
+    if (lastSlash <0) return baseScheme + given
+    if ((lastSlash >=0) && (lastSlash < (path.length-1)))
+	path = path.slice(0, lastSlash+1) // Chop trailing filename from base
+    
+    path = path + given
+    while (path.match(/[^\/]*\/\.\.\//)) // must apply to result of prev
+	path = path.replace( /[^\/]*\/\.\.\//, '') // ECMAscript spec 7.8.5
+    path = path.replace( /\.\//g, '') // spec vague on escaping
+    return base.slice(0, baseSingle) + path
+}
+
+/** returns URI without the frag **/
+Util.uri.docpart = function (uri) {
+    var i = uri.indexOf("#")
+    if (i < 0) return uri
+    return uri.slice(0,i)
+} 
+
+/** return the protocol of a uri **/
+Util.uri.protocol = function (uri) {
+    return uri.slice(0, uri.indexOf(':'))
+} //protocol
+
+URIjoin = Util.uri.join
+uri_docpart = Util.uri.docpart
+uri_protocol = Util.uri.protocol
+
+
+/** returns true if has a protocol & domain **/
+/* No -- this is general URI code.  Not all URIs have protocol and domain.
+** Eg file:, mailto: etc
+
+function uri_valid(uri) {
+	return (uri.match(/(.+?):\/\/(.+?)/));  
+} //valid
+
+
+// returns the filename of a uri @fixme
+function uri_filename(uri) {
+	if (uri_valid(uri))
+		return uri.slice(uri.lastIndexOf('/')+1);
+} //filename
+
+*/
+
+
+//ends

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/util.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/util.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/util.js
new file mode 100644
index 0000000..3c43d13
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/util.js
@@ -0,0 +1,174 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/**
+ * Utility functions for tabulator
+ */
+
+/**
+ * A function emulating Scheme's filter. Should have been part of JavaScript so
+ * it is global.
+ */
+function filter(func, list) {
+    //tdebug("entered filter with list length=" + list.length);
+    var output = [];
+    for (var elt in list) {
+	//tdebug("elt=" + list[elt] + ", true? " + func(list[elt]));
+	if (func(list[elt])) {
+	    output.push(list[elt]);
+	}
+    } //construct output
+    //tdebug("exiting filter with list length=" + output.length);
+    return output;
+}
+
+/** 
+ * A function emulating Scheme's map. Should have been part of JavaScript so it
+ * is global.
+ */
+function map(func, list) {
+    //tdebug("entered map with list=" + list.join(", "));
+    var output = [];
+    for (var i in list)  //works on assoc? i hope so
+	output[i] = func(list[i]);
+    return output;
+}
+
+// These are extra
+
+/**
+ * @class A utility class
+ */
+Util = {
+    /** A simple debugging function */         
+        'output': function (o) {
+	    var k = document.createElement('div')
+	    k.textContent = o
+	    document.body.appendChild(k)
+	},
+    /**
+     * A standard way to add callback functionality to an object
+     */
+        'callbackify': function (obj,callbacks) {
+	    obj.callbacks = {}
+	    for (var x=callbacks.length-1; x>=0; x--) {
+		obj.callbacks[callbacks[x]] = []
+	    }
+	    
+	    obj.addHook = function (hook) {
+		if (!obj.callbacks[hook]) { obj.callbacks[hook] = [] }
+	    }
+
+	    obj.addCallback = function (hook, func) {
+		obj.callbacks[hook].push(func)
+	    }
+
+	    obj.fireCallbacks = function (hook, args) {
+		var newCallbacks = []
+		var replaceCallbacks = []
+		var len = obj.callbacks[hook].length
+		for (var x=len-1; x>=0; x--) {
+		    if (obj.callbacks[hook][x].apply(obj,args)) {
+			newCallbacks.push(obj.callbacks[hook][x])
+		    }
+		}
+
+		for (var x=newCallbacks.length-1; x>=0; x--) {
+		    replaceCallbacks.push(newCallbacks[x])
+		}
+		
+		for (var x=len; x<obj.callbacks[hook].length; x++) {
+		    replaceCallbacks.push(obj.callbacks[hook][x])
+		}
+		
+		obj.callbacks[hook] = replaceCallbacks
+	    }
+	},
+    
+    /**
+     * A standard way to create XMLHttpRequest objects
+     */
+	'XMLHTTPFactory': function () {
+	    if (window.XMLHttpRequest) {
+		try {
+		    return new XMLHttpRequest()
+		} catch (e) {
+		    return false
+		}
+	    }
+	    else if (window.ActiveXObject) {
+		try {
+		    return new ActiveXObject("Msxml2.XMLHTTP")
+		} catch (e) {
+		    try {
+			return new ActiveXObject("Microsoft.XMLHTTP")
+		    } catch (e) {
+			return false
+		    }
+		}
+	    }
+	    else {
+		return false
+	    }
+	},
+    /**
+     * Returns a hash of headers and values
+     */
+	'getHTTPHeaders': function (xhr) {
+	    var lines = xhr.getAllResponseHeaders().split("\n")
+	    var headers = {}
+	    var last = undefined
+	    for (var x=0; x<lines.length; x++) {
+		if (lines[x].length > 0) {
+		    var pair = lines[x].split(': ')
+		    if (typeof pair[1] == "undefined") { // continuation
+			headers[last] += "\n"+pair[0]
+		    } else {
+			last = pair[0].toLowerCase()
+			headers[last] = pair[1]
+		    }
+		}
+	    }
+	    return headers
+	},
+
+        'dtstamp': function () {
+	    var now = new Date();
+	    var year  = now.getYear() + 1900;
+	    var month = now.getMonth() + 1;
+	    var day  = now.getDate() + 1;
+	    var hour = now.getUTCHours();
+	    var minute = now.getUTCMinutes();
+	    var second = now.getSeconds();
+	    if (month < 10) month = "0" + month;
+	    if (day < 10) day = "0" + day;
+	    if (hour < 10) hour = "0" + hour;
+	    if (minute < 10) minute = "0" + minute;
+	    if (second < 10) second = "0" + second;
+	    return year + "-" + month + "-" + day + "T"
+		+ hour + ":" + minute + ":" + second + "Z";
+	},
+
+        'enablePrivilege': netscape.security.PrivilegeManager.enablePrivilege,
+
+        'disablePrivilege': netscape.security.PrivilegeManager.disablePrivilege
+}
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/widget-factory.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/widget-factory.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/widget-factory.js
new file mode 100644
index 0000000..1d5317c
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/widget-factory.js
@@ -0,0 +1,995 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+xhtmlNS  = "http://www.w3.org/1999/xhtml";
+
+function RDF(localName) {
+	return new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#'+localName);
+}
+
+function RDFS(localName) {
+	return new RDFSymbol('http://www.w3.org/2000/01/rdf-schema#'+localName);
+}
+
+function WidgetFactory() {
+}
+
+window.onbeforeunload = function () {
+	var overview = "";
+	var unsavedCount = 0;
+	for (var i = 0; i < WidgetFactory.openWidgets.length; i++) {
+		overview += WidgetFactory.openWidgets [i].rdfSymbol+"="+WidgetFactory.openWidgets[i].modified+", ";
+		if (WidgetFactory.openWidgets[i].modified) {
+			unsavedCount++;
+		}
+	}
+	//alert("DEBUG. "+overview);
+	if (unsavedCount > 1) {
+		return "There are "+unsavedCount+" unsaved discobits.";
+	}
+	if (unsavedCount == 1) {
+		return "There is an unsaved discobit.";
+	}
+	return undefined;
+}
+
+WidgetFactory.typeWidgets = new Array();
+
+WidgetFactory.openWidgets = new Array();
+
+
+/**
+ * Creates a new widget
+ * ...
+ * @param {RDFIndexedFormula} lastSavedContent the last saved version of the store, if this is provided the save-link is active in the new widget
+ * @type String
+ */
+WidgetFactory.createBackground = function(terminationListener, rdfSymbol, xhtmlContainer, providedFunctions, store, widgetHolder, lastSavedContent) {
+			// use FireBug extension to inspect console.debug'd objects
+		// Using TestStore you can access store.triples
+		/*if (typeof(console) !=  'undefined') {
+			console.debug('creating '+rdfSymbol+' with WidgetFactory.store',WidgetFactory.store);
+		}*/
+	if (!widgetHolder) {
+		var widgetHolder = new Object();
+		//temporary pseudo-widget, a hack to make rdfSymbol accesible already
+		widgetHolder.widget = new Object();
+		widgetHolder.widget.rdfSymbol = rdfSymbol;
+	}
+	window.setTimeout(function(){
+		WidgetFactory.create(terminationListener, rdfSymbol, xhtmlContainer, providedFunctions, store, widgetHolder, lastSavedContent);
+		
+	}, 0)
+	
+	return widgetHolder;
+}
+WidgetFactory.create = function(terminationListener, rdfSymbol, xhtmlContainer, providedFunctions, store, widgetHolder, lastSavedContent) {
+	//alert("creating widget");
+	//private functions
+	if (!widgetHolder) {
+			var widgetHolder = new Object();
+	}
+	var fillController = function(functions, container) {
+		while (container.firstChild) {
+			container.removeChild(container.firstChild);
+		}
+		for (var i = 0; i < functions.length; i++) {
+			var controlFunction = functions[i];
+			var functionLinkElement = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
+			if (controlFunction.icon) {
+				var functIcon = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
+				functionLinkElement.appendChild(functIcon);
+				functIcon.src = controlFunction.icon;
+				functIcon.alt = controlFunction.label;
+			} else {
+				functionLinkElement.appendChild(document.createTextNode(controlFunction.label));			
+				
+			}
+			functionLinkElement.href = "#";
+			container.appendChild(functionLinkElement);
+			
+			functionLinkElement.onclick = WidgetFactory.createOnClickFromPerform(controlFunction.perform);
+			container.appendChild(document.createTextNode(" "));
+		}
+	}
+	
+	var getGenericControls = function() {
+		var controlFunctions = new Array();
+		var RDFControl = new Object();
+	   	RDFControl.label = "RDF"
+	   	RDFControl.perform = function() {
+	   		mozile.edit.disable();
+		   	var div = document.createElementNS(xhtmlNS, "div");
+			var textarea = document.createElementNS(xhtmlNS, "textarea");
+			div.appendChild(textarea);
+			var useButton = document.createElementNS(xhtmlNS, "button");
+			useButton.appendChild(document.createTextNode("use"));
+			div.appendChild(useButton);
+			var discardButton = document.createElementNS(xhtmlNS, "button");
+			discardButton.appendChild(document.createTextNode("discard"));
+			div.appendChild(discardButton);
+			var body = document.getElementsByTagNameNS(xhtmlNS,"body")[0];
+			div.className = "sourceEdit";
+			textarea.appendChild(document.createTextNode(new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(widgetHolder.widget.getStore(), ""))));
+	   		body.appendChild(div);
+	   		useButton.onclick = function() {
+	   			var editedStore = new RDFIndexedFormula();
+	   			var nodeTree = (new DOMParser()).parseFromString(textarea.value, 'text/xml');
+	   			var docElem = nodeTree.documentElement;
+	   			if (docElem.namespaceURI == 'http://www.mozilla.org/newlayout/xml/parsererror.xml') {
+	   				alert(new XMLSerializer().serializeToString(docElem.firstChild));
+	   				return;
+	   			}
+	   			var parser = new RDFParser(editedStore);
+	   			parser.parse(nodeTree,rdfSymbol.uri);
+				while (xhtmlContainer.firstChild) {
+					xhtmlContainer.removeChild(xhtmlContainer.firstChild);
+				}
+				widgetHolder.widget.remove();
+				WidgetFactory.create(function() {
+					body.removeChild(div);
+					mozile.edit.enable();
+				}, rdfSymbol, xhtmlContainer, providedFunctions, editedStore, widgetHolder, widgetHolder.widget.lastSavedContent);
+					   		}
+	   		discardButton.onclick = function() {
+				body.removeChild(div);
+				mozile.edit.enable();
+	   		}
+   		}
+   		controlFunctions[controlFunctions.length] = RDFControl;
+   		
+   		/* control to view RDF to be revoked
+   		var revRDFControl = new Object();
+	   	revRDFControl.label = "REVRDF"
+	   	revRDFControl.perform = function() {
+	   	
+	   		alert(new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(widget.lastSavedContent, "")));
+   		}
+   		controlFunctions[controlFunctions.length] = revRDFControl;
+   		*/
+   		var uriControl = new Object();
+	   	uriControl.label = "URI"
+	   	uriControl.perform = function() {
+	   		alert(rdfSymbol.uri);
+   		}
+   		controlFunctions[controlFunctions.length] = uriControl;
+   		
+   		var reloadControl = new Object();
+	   	reloadControl.label = "RELOAD"
+	   	reloadControl.perform = function() {
+			var reloadedStore = new RDFIndexedFormula();
+			WidgetFactory.load(rdfSymbol, reloadedStore, function() {
+				while (xhtmlContainer.firstChild) {
+					xhtmlContainer.removeChild(xhtmlContainer.firstChild);
+				}
+				widgetHolder.widget.remove();
+				var body = document.getElementsByTagNameNS(xhtmlNS,"body")[0];
+				var origCursor = body.style.cursor;
+				body.style.cursor = 'progress';
+				WidgetFactory.create(function() {
+					body.style.cursor = origCursor;
+				},rdfSymbol, xhtmlContainer, providedFunctions, reloadedStore, widgetHolder);
+			});
+
+   		}
+   		controlFunctions[controlFunctions.length] = reloadControl;
+   		
+	 	return controlFunctions;
+	}
+	
+	
+	xhtmlContainer.style.border = "dashed";
+	xhtmlContainer.style.borderWidth = "1px 1px 0px 0px";
+	
+	var saveLink = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
+	saveLink.style.visibility ="hidden";
+	//saveLink.appendChild(document.createTextNode("Save"));
+	var saveIcon = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
+	saveLink.appendChild(saveIcon);
+	saveIcon.src = WidgetFactory.root+"mozile/images/silk/page_save.png";
+	;
+	saveLink.onclick = function() {
+		widgetHolder.widget.save();
+	}
+	var controlArea = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+	controlArea.className = "controlArea";
+	
+	//order: genericControls, widgetControls, contextControls, save
+	var genericFunctionContainer = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
+	controlArea.appendChild(genericFunctionContainer);
+	var widgetFunctionContainer = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
+	controlArea.appendChild(widgetFunctionContainer);
+	var contextFunctionContainer = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
+	controlArea.appendChild(contextFunctionContainer);
+	xhtmlContainer.appendChild(controlArea);
+	controlArea.appendChild(saveLink);
+	
+	fillController(getGenericControls(), genericFunctionContainer);
+	
+	var fillContextControler = function(contextFunctions) {
+		fillController(contextFunctions, contextFunctionContainer);
+	}
+
+	if (providedFunctions) {
+		fillContextControler(providedFunctions);
+	}
+		
+	var typeWidget = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+	typeWidget.className = "typeWidget";
+	xhtmlContainer.appendChild(typeWidget);
+	
+	
+	var afterLoading = function() {
+		//	alert("hasType "+WidgetFactory.hasType(rdfSymbol, new RDFSymbol("http://discobits.org/ontology#XHTMLInfoDiscoBit")));
+		
+		widgetHolder.widget = null;
+		
+		var controller = new Object();
+		controller.modifiedStateChanged = function(newState, widget) {
+			if (newState) {
+				saveLink.style.visibility ="";
+				widget.modified = true;
+			} else {
+				saveLink.style.visibility ="hidden";
+				widget.modified = false;
+			}
+		}
+		
+		for (var i = 0; i < WidgetFactory.typeWidgets.length; i++) {
+			if (WidgetFactory.hasType(rdfSymbol, WidgetFactory.typeWidgets[i].type, store)) {
+				widgetHolder.widget = new WidgetFactory.typeWidgets[i](store, rdfSymbol, typeWidget, controller, function(widget) {
+					WidgetFactory.openWidgets.push(widget);
+					if(terminationListener) {
+						window.setTimeout(function(){
+							terminationListener(widgetHolder);
+						}, 0);
+					}
+				});
+				break;
+			}
+		}
+	
+		if (widgetHolder.widget == null) {
+			//throw new Error(rdfSymbol+" no good");
+			widgetHolder.widget = new TypeSelectionWidget(rdfSymbol, typeWidget, xhtmlContainer, providedFunctions);
+			if(terminationListener) {
+				terminationListener(widgetHolder);
+			}
+		}
+	
+		widgetHolder.widget.remove = function() {
+			var newOpenWidgets = new Array();
+			for (var i = 0; i < WidgetFactory.openWidgets.length; i++) {
+				if (WidgetFactory.openWidgets[i] != widgetHolder.widget) {
+					newOpenWidgets.push(WidgetFactory.openWidgets[i]);
+				}
+			}
+			WidgetFactory.openWidgets = newOpenWidgets;
+			if (this.removeChildWidgets) {
+				this.removeChildWidgets();
+			}
+		}
+		 
+	
+		if (widgetHolder.widget.getWidgetControls) {
+			fillController(widgetHolder.widget.getWidgetControls(), widgetFunctionContainer);
+		}
+		widgetHolder.widget.fillContextControler = fillContextControler;
+		widgetHolder.widget.xhtmlContainer = xhtmlContainer
+		widgetHolder.widget.rdfSymbol = rdfSymbol;
+		widgetHolder.widget.controller = controller;
+		if (lastSavedContent) {
+			widgetHolder.widget.lastSavedContent = lastSavedContent;
+			widgetHolder.widget.controller.modifiedStateChanged(true, widgetHolder.widget);
+		} else {
+			if (widgetHolder.widget.getStore) {
+				widgetHolder.widget.lastSavedContent = widgetHolder.widget.getStore();
+			}
+		}
+		if (widgetHolder.widget.getStore) {
+			widgetHolder.widget.save = function() {
+				var widgetStore = widgetHolder.widget.getStore();
+				WidgetFactory.putData(widgetHolder.widget.rdfSymbol, widgetStore, widgetHolder.widget.lastSavedContent);
+				widgetHolder.widget.lastSavedContent = widgetStore;
+				widgetHolder.widget.controller.modifiedStateChanged(false, widgetHolder.widget);
+			}
+		}
+		//alert(new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(widget.getStore(), rdfSymbol.uri)));
+		
+		
+	}
+	
+	if (!store) {
+		var store = WidgetFactory.store;
+		WidgetFactory.ensureDicoBitLoaded(rdfSymbol, function() {
+			store = WidgetFactory.store;
+			afterLoading();
+		});
+	} else {
+		afterLoading();
+	}
+
+}
+
+WidgetFactory.createOnClickFromPerform = function(perform) {
+	return function() {
+		perform();
+		return false;
+	}
+}
+
+TypeSelectionWidget = function(rdfSymbol, typeWidget, xhtmlContainer, providedFunctions) {
+	var select = document.createElementNS("http://www.w3.org/1999/xhtml", "select");
+	typeWidget.appendChild(select);
+	var selectText = "--- select type ----";
+	var option = document.createElementNS("http://www.w3.org/1999/xhtml", "option");
+		select.appendChild(option);
+		option.appendChild(document.createTextNode(selectText));
+	for (var i = 0; i < WidgetFactory.typeWidgets.length; i++) {
+		var option = document.createElementNS("http://www.w3.org/1999/xhtml", "option");
+		select.appendChild(option);
+		option.value = WidgetFactory.typeWidgets[i].type.uri;
+		var label;
+		if (WidgetFactory.typeWidgets[i].description) {
+			label = WidgetFactory.typeWidgets[i].description;
+		} else {
+			label = WidgetFactory.typeWidgets[i].type.uri
+		}
+		option.appendChild(document.createTextNode(label));
+	}
+	var button = document.createElementNS("http://www.w3.org/1999/xhtml", "button");
+	button.appendChild(document.createTextNode("set"));
+	button.disabled = true;
+	typeWidget.appendChild(button);
+	select.onchange = function() {
+		button.disabled = (this.value == selectText);
+	};
+	button.onclick = function() {
+		WidgetFactory.store.add(rdfSymbol, 
+			new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), 
+			new RDFSymbol(select.value));
+		while (xhtmlContainer.firstChild) {
+			xhtmlContainer.removeChild(xhtmlContainer.firstChild);
+		}
+		WidgetFactory.create(function() {}, rdfSymbol, xhtmlContainer, providedFunctions, undefined, undefined, new RDFIndexedFormula());
+		//alert(select.value);
+	};
+}
+
+
+//mozile.debug.logLevel = "debug";
+
+{
+	var found = false;
+	for(var i=0; i < mozile.edit.commands._commands.length; i++) {
+		if(mozile.edit.commands._commands[i] == mozile.edit.save);
+		//delete(mozile.edit.commands._commands[i]);
+		found = true;
+		if (found) {
+			mozile.edit.commands._commands[i] = mozile.edit.commands._commands[i+1];
+		}
+	}
+	mozile.edit.commands._commands.pop();
+}
+
+	
+function XHTMLInfoDiscoBitWidget(store, rdfSymbol, xhtmlContainer, controller, terminationListener) {
+	// Configure Mozile Basics
+	if (!XHTMLInfoDiscoBitWidget.mozileInitialized) {
+		mozile.root = WidgetFactory.root+"mozile/";
+		mozile.useSchema("lib/xhtml.rng");
+		XHTMLInfoDiscoBitWidget.mozileInitialized = true;
+	}
+	this.rdfSymbol = rdfSymbol;
+	this.controller = controller;
+	this.xhtmlContainer = xhtmlContainer;
+	this.origStore = store;
+	this.loadData(store);
+	terminationListener(this);
+}
+
+WidgetFactory.typeWidgets.push(XHTMLInfoDiscoBitWidget);
+
+XHTMLInfoDiscoBitWidget.type = new RDFSymbol("http://discobits.org/ontology#XHTMLInfoDiscoBit");
+
+
+XHTMLInfoDiscoBitWidget.prototype.getWidgetControls = function() {
+	var controlFunctions = new Array();
+	var RDFControl = new Object();
+   	RDFControl.label = "XHTML"
+   	var widget = this;
+   	RDFControl.perform = function() {
+   		mozile.edit.disable();
+	   	var div = document.createElementNS(xhtmlNS, "div");
+		var textarea = document.createElementNS(xhtmlNS, "textarea");
+		div.appendChild(textarea);
+		var useButton = document.createElementNS(xhtmlNS, "button");
+		useButton.appendChild(document.createTextNode("use"));
+		div.appendChild(useButton);
+		var discardButton = document.createElementNS(xhtmlNS, "button");
+		discardButton.appendChild(document.createTextNode("discard"));
+		div.appendChild(discardButton);
+		var body = document.getElementsByTagNameNS(xhtmlNS,"body")[0];
+		div.className = "sourceEdit";
+		var serialized = "";
+		for (var i = 0; i < widget.editableArea.childNodes.length; i++) {
+			serialized += new XMLSerializer().serializeToString(widget.editableArea.childNodes[i]);
+		}
+		textarea.appendChild(document.createTextNode(serialized));
+   		body.appendChild(div);
+   		useButton.onclick = function() {
+   			var editedStore = new RDFIndexedFormula();
+   			var nodeTree = (new DOMParser()).parseFromString("<elem xmlns=\"http://www.w3.org/1999/xhtml\">"+textarea.value+"</elem>", 'text/xml');
+   			var docElem = nodeTree.documentElement;
+   			if (docElem.namespaceURI == 'http://www.mozilla.org/newlayout/xml/parsererror.xml') {
+   				alert(new XMLSerializer().serializeToString(docElem.firstChild));
+   				return;
+   			}
+   			widget.remove();
+   			while (widget.editableArea.firstChild) {
+	   			widget.editableArea.removeChild(widget.editableArea.firstChild);
+   			}
+   			for (var i = 0; i < nodeTree.documentElement.childNodes.length; i++) {
+				widget.editableArea.appendChild(nodeTree.documentElement.childNodes[i].cloneNode(true));
+			}
+			widget.controller.modifiedStateChanged(true, widget);
+   			body.removeChild(div);
+			mozile.edit.enable();
+   		}
+   		discardButton.onclick = function() {
+			body.removeChild(div);
+			mozile.edit.enable();
+   		}
+  		}
+  		controlFunctions[controlFunctions.length] = RDFControl;
+  		return controlFunctions;
+}   		
+
+XHTMLInfoDiscoBitWidget.prototype.loadData = function(store) {
+	var infobitProperty = store.anyStatementMatching(this.rdfSymbol, new RDFSymbol("http://discobits.org/ontology#infoBit"), undefined);
+	if (infobitProperty) {
+		var objectElement = infobitProperty.object.elementValue;
+	} else {
+		var objectElement = document.createElementNS("http://discobits.org/ontology#","infoBit");
+		objectElement.appendChild(document.createTextNode("empty"));
+	}
+	//var editableParagraph = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
+	//xhtmlContainer.appendChild(editableParagraph);
+	WidgetFactory.appendChildrenInDiv(objectElement, this.xhtmlContainer);
+	this.editableArea = this.xhtmlContainer.childNodes[0];
+	mozile.editElement(this.editableArea);
+	var controller = this.controller;
+	var widget = this;
+	var modifiedTrue = function() {
+		controller.modifiedStateChanged(true, widget);
+	}
+	this.editableArea.addEventListener("change", modifiedTrue, false);
+}
+
+XHTMLInfoDiscoBitWidget.prototype.getStore = function() {
+	var store = new RDFIndexedFormula();
+	store.add(this.rdfSymbol, new RDFSymbol("http://discobits.org/ontology#infoBit"), new RDFLiteral(this.editableArea));
+	store.add(this.rdfSymbol, 
+		new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), 
+		new RDFSymbol("http://discobits.org/ontology#XHTMLInfoDiscoBit"));
+	var origStatements = this.origStore.statements
+	for (var i=0; i<origStatements.length; i++) {
+        var statement = origStatements[i];
+		if (statement.subject.uri == this.rdfSymbol.uri) {
+			if (!(statement.predicate.uri == "http://discobits.org/ontology#infoBit")) {
+				store.add(statement.subject, statement.predicate, statement.object)
+			}
+		}
+    }
+	return store;
+}
+
+
+
+
+
+function OrderedContentWidget(store, rdfSymbol, xhtmlContainer, controller, terminationListener) {
+	this.controller = controller;
+	this.rdfSymbol = rdfSymbol;
+	this.origStore = store;
+	this.load(store, rdfSymbol, xhtmlContainer, terminationListener);	
+}
+
+
+
+OrderedContentWidget.prototype.load = function(store, rdfSymbol, xhtmlContainer, terminationListener) {
+   
+    var containsStatements = store.statementsMatching(rdfSymbol, new RDFSymbol("http://discobits.org/ontology#contains"), undefined);
+    this.childElemContainer = document.createElementNS("http://www.w3.org/1999/xhtml", "ol");
+    this.childElemContainer.className = this.getChildElemContainerClassName();
+    
+    var children = new Array();//the rdfSymbolS of the children, will accessible by childWidgets[i].rdfSymbol
+    var thisWidget = this;
+    for(var i=0;i<containsStatements.length;i++) {
+        var entry = containsStatements[i].object;
+        var pos = store.statementsMatching(entry, new RDFSymbol("http://discobits.org/ontology#pos"), undefined);
+        var holdsStatements = store.statementsMatching(entry, new RDFSymbol("http://discobits.org/ontology#holds"), undefined);
+        children[pos[0].object] = holdsStatements[0].object; 
+    }
+	var elementsToAdd = children.length;
+	if (elementsToAdd == 0) {
+    	window.setTimeout(function() {terminationListener(thisWidget);}, 0);
+    }
+    this.childWidgets = new Array(children.length);
+    for(var j=0;j<children.length;j++) {  
+    	this.addChild(children[j], j, undefined, function() {
+    		elementsToAdd--;
+    		if (elementsToAdd == 0) {
+    			terminationListener(thisWidget);
+    		}
+    	});    	
+    }
+    xhtmlContainer.appendChild(this.childElemContainer);
+}
+
+OrderedContentWidget.type = new RDFSymbol("http://discobits.org/ontology#OrderedContent");
+
+WidgetFactory.typeWidgets.push(OrderedContentWidget);
+
+OrderedContentWidget.prototype.addChild = function(child, pos, lastSavedStore, terminationListener) {
+   	var li = document.createElementNS("http://www.w3.org/1999/xhtml", "li");
+   	var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
+   	this.positionHandling(pos, div);
+   	var controlFunctions = this.getControlFunctions(li, pos);
+   	this.childElemContainer.appendChild(li);
+   	li.appendChild(div);
+   	this.childWidgets[pos] = WidgetFactory.createBackground(terminationListener, child, div, controlFunctions, undefined, undefined, lastSavedStore);
+}
+
+OrderedContentWidget.prototype.removeChildWidgets = function() {
+	for (var i = 0; i < this.childWidgets.length; i++) {
+		this.childWidgets[i].widget.remove();
+	}
+}
+
+OrderedContentWidget.prototype.getWidgetControls = function() {
+	var controlFunctions = new Array();
+	var moveUpControl = new Object();
+   	moveUpControl.label = "ADD";
+   	var orderedContentWidget = this;
+   	moveUpControl.perform = function() {
+   		var baseURI = orderedContentWidget.rdfSymbol.uri;
+   		if (!baseURI.match(/\/$/)) {
+   			baseURI += "-el/";
+   		}
+   		var childRDFSymbol = new RDFSymbol(baseURI+orderedContentWidget.childWidgets.length);
+   		orderedContentWidget.addChild(childRDFSymbol, orderedContentWidget.childWidgets.length); 
+   		orderedContentWidget.controller.modifiedStateChanged(true, orderedContentWidget);
+   	}
+   	controlFunctions[controlFunctions.length] = moveUpControl;
+	return controlFunctions;
+}
+OrderedContentWidget.prototype.getControlFunctions = function(li, pos) {
+	var controlFunctions = new Array();
+	var childWidgets = this.childWidgets;
+	var containerWidget = this;
+	
+	if (pos > 0) {
+	   	var moveUpControl = new Object();
+	   	moveUpControl.label = "UP";
+	   	moveUpControl.perform = function() {
+	   		if (!li.previousSibling) {
+	   			alert("no previous element");
+	   			return;
+	   		}
+	   		var previousLiElem = li.previousSibling;
+	   		var ulElem = li.parentNode;
+	   		ulElem.removeChild(li);
+	   		ulElem.insertBefore(li, previousLiElem);
+	   		var previousWidget = childWidgets[pos -1];
+	   		childWidgets[pos -1] = childWidgets[pos];
+	   		childWidgets[pos] = previousWidget;
+	   		for (var i = 0; i < childWidgets.length; i++) {
+	   			childWidgets[i].widget.fillContextControler(containerWidget.getControlFunctions(ulElem.childNodes[i], i));
+	   		}
+	   		containerWidget.controller.modifiedStateChanged(true, containerWidget);
+	   	}
+	   	controlFunctions[controlFunctions.length] = moveUpControl;
+	   	
+   	}
+   	if (pos < (this.childWidgets.length -1)) {
+	   	var moveDownControl = new Object();
+	   	moveDownControl.label = "DOWN";
+	   	moveDownControl.perform = function() {
+	   		if (!li.nextSibling) {
+	   			alert("no next element");
+	   			return;
+	   		}
+	   		var nextLiElem = li.nextSibling;
+	   		var ulElem = li.parentNode;
+	   		ulElem.removeChild(nextLiElem);
+	   		ulElem.insertBefore(nextLiElem, li);
+	   		var nextWidget = childWidgets[pos +1];
+	   		childWidgets[pos +1] = childWidgets[pos];
+	   		childWidgets[pos] = nextWidget;
+	   		for (var i = 0; i < childWidgets.length; i++) {
+	   			childWidgets[i].widget.fillContextControler(containerWidget.getControlFunctions(ulElem.childNodes[i], i));
+	   		}
+	   		containerWidget.controller.modifiedStateChanged(true, containerWidget);
+	   	}
+	   	controlFunctions[controlFunctions.length] = moveDownControl;
+   	}
+   	
+   	
+   	var removeControl = new Object();
+   	removeControl.label = "REMOVE"
+   	removeControl.perform = function() {
+   		var ulElem = li.parentNode;
+   		ulElem.removeChild(li);
+   		containerWidget.controller.modifiedStateChanged(true, containerWidget);
+   		var j = 0;
+   		for (var i = 0; i < childWidgets.length; i++) {
+   			if (i != pos) {
+	   			childWidgets[j] = childWidgets[i];
+	   			j++;
+	   		} else {
+	   			//alert("DEBUG: removing "+childWidgets[i].widget.rdfSymbol);
+	   			childWidgets[i].widget.remove();
+	   		}
+	   	}
+	   	childWidgets.length = childWidgets.length-1;
+	   	for (var i = 0; i < childWidgets.length; i++) {
+		   	childWidgets[i].widget.fillContextControler(containerWidget.getControlFunctions(ulElem.childNodes[i], i));
+		}
+   	}
+   	controlFunctions[controlFunctions.length] = removeControl;
+   	
+   	return controlFunctions;
+}
+
+OrderedContentWidget.prototype.getChildElemContainerClassName = function() {
+	return "orderedContent";
+}
+
+OrderedContentWidget.prototype.positionHandling = function(pos, div) {
+	//div.appendChild(document.createTextNode("regular: "));
+}
+OrderedContentWidget.prototype.getStore = function() {
+	var store = new RDFIndexedFormula();
+	store.add(this.rdfSymbol, 
+		new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), 
+		new RDFSymbol('http://discobits.org/ontology#OrderedContent'));
+	for (var i = 0; i < this.childWidgets.length; i++) {
+		var entry = this.getEntryForChild(store, i);
+		store.add(this.rdfSymbol,  
+		new RDFSymbol('http://discobits.org/ontology#contains'),
+		entry);
+	}
+	var origStatements = this.origStore.statements
+	for (i=0; i<origStatements.length; i++) {
+        var statement = origStatements[i];
+		if (statement.subject.uri == this.rdfSymbol.uri) {
+			if (!(statement.predicate.uri == "http://discobits.org/ontology#contains")) {
+				store.add(statement.subject, statement.predicate, statement.object)
+			}
+		}
+    }
+	return store;
+}
+
+OrderedContentWidget.prototype.getEntryForChild = function(store, entryPos) {
+	var result = new RDFBlankNode();
+	store.add(result, 
+		new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), 
+		new RDFSymbol('http://discobits.org/ontology#Entry'));
+	store.add(result,  
+		new RDFSymbol('http://discobits.org/ontology#pos'),
+		new RDFLiteral(entryPos));
+	store.add(result,  
+		new RDFSymbol('http://discobits.org/ontology#holds'),
+		this.childWidgets[entryPos].widget.rdfSymbol);
+	return result;
+}
+
+
+function TitledContentWidget(store, rdfSymbol, xhtmlContainer, controller, terminationListener) {
+	var containsStatements = store.statementsMatching(rdfSymbol, new RDFSymbol("http://discobits.org/ontology#contains"), undefined);
+    this.childElemContainer = document.createElementNS("http://www.w3.org/1999/xhtml", "ol");
+    this.childElemContainer.className = this.getChildElemContainerClassName();
+	this.origStore = store
+    var titledContentWidget = this;
+    var elementsToAdd = 2;
+    var subTerminationListener = function() {
+    	elementsToAdd--;
+    	if (elementsToAdd == 0) {
+    		terminationListener(titledContentWidget);
+    	}
+    }
+    
+    if (containsStatements.length != 2) {
+    	this.childWidgets = new Array(2);
+    	var baseURI = rdfSymbol.uri;
+   		if (!baseURI.match(/\/$/)) {
+   			baseURI += "-";
+   		}
+   		
+   		var titleURI = baseURI + "title";
+   		var titleRDFSymbol = new RDFSymbol(titleURI);
+   		WidgetFactory.store.add(titleRDFSymbol,  RDF("type"), XHTMLInfoDiscoBitWidget.type);
+		this.addChild(titleRDFSymbol, 0, new RDFIndexedFormula(), function(widgetHolder) {
+			widgetHolder.widget.controller.modifiedStateChanged(true, widgetHolder.widget);
+			//titledContentWidget.childWidgets[0].widget.controller.modifiedStateChanged(true);
+			subTerminationListener();
+		});    		
+   		var contentURI = baseURI + "content";
+   		var contentRDFSymbol = new RDFSymbol(contentURI);
+		this.addChild(contentRDFSymbol, 1, undefined, subTerminationListener); 
+   		controller.modifiedStateChanged(true, this);
+   		
+   		xhtmlContainer.appendChild(this.childElemContainer);
+    } else {
+		this.load(store, rdfSymbol, xhtmlContainer, terminationListener);
+	}
+
+	
+}
+
+TitledContentWidget.type = new RDFSymbol("http://discobits.org/ontology#TitledContent");
+
+WidgetFactory.typeWidgets.push(TitledContentWidget);
+
+TitledContentWidget.prototype.load = OrderedContentWidget.prototype.load;
+TitledContentWidget.prototype.addChild = OrderedContentWidget.prototype.addChild;
+TitledContentWidget.prototype.getEntryForChild = OrderedContentWidget.prototype.getEntryForChild;
+TitledContentWidget.prototype.removeChildWidgets = OrderedContentWidget.prototype.removeChildWidgets;
+
+TitledContentWidget.prototype.getControlFunctions = function(li, pos) {
+	controlFunctions = new Array();
+	return controlFunctions;
+}
+
+TitledContentWidget.prototype.getChildElemContainerClassName = function() {
+	return "titledContent";
+}
+
+TitledContentWidget.prototype.positionHandling = function(pos, div) {
+	if (pos == 0) {
+		WidgetFactory.addClass(div, "title");
+	}
+	
+	if (pos == 1) {
+		WidgetFactory.addClass(div, "content");
+	}
+}
+
+TitledContentWidget.prototype.getStore = function() {
+	var store = new RDFIndexedFormula();
+	store.add(this.rdfSymbol, 
+		new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), 
+		new RDFSymbol('http://discobits.org/ontology#TitledContent'));
+	for (var i = 0; i < this.childWidgets.length; i++) {
+		var entry = this.getEntryForChild(store, i);
+		store.add(this.rdfSymbol,  
+		new RDFSymbol('http://discobits.org/ontology#contains'),
+		entry);
+	}
+	var origStatements = this.origStore.statements
+	for (i=0; i<origStatements.length; i++) {
+        var statement = origStatements[i];
+		if (statement.subject.uri == this.rdfSymbol.uri) {
+			if (!(statement.predicate.uri == "http://discobits.org/ontology#contains")) {
+				store.add(statement.subject, statement.predicate, statement.object)
+			}
+		}
+    }
+	return store;
+}
+
+// helpers ////////////
+WidgetFactory.addClass = function(elem, className) {
+	//elem.className += "foo bar ";
+	elem.className += " "+className;
+	
+}
+WidgetFactory.hasType = function(rdfSymbol, type, store) {
+ 	//alert("anyStatementMatching for "+rdfSymbol+WidgetFactory.store.anyStatementMatching(rdfSymbol, undefined, undefined));
+	//return (typeof(WidgetFactory.store.anyStatementMatching(rdfSymbol, undefined, type)) != 'undefined')
+	return (typeof(store.anyStatementMatching(rdfSymbol, new RDFSymbol('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), type)) != 'undefined')
+}
+
+WidgetFactory.appendChildrenInDiv = function(objectElement, xhtmlContainer) {
+		var div = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
+		/*if (typeof(console) !=  'undefined') {
+			console.debug(objectElement);
+		}*/
+		for( var i=0; i< objectElement.childNodes.length; i++ ){
+			/*if (typeof(console) !=  'undefined') {
+				console.debug("adding node "+i+" "+objectElement.childNodes[i]);
+			}*/
+			div.appendChild(objectElement.childNodes[i].cloneNode(true));		
+		}
+		xhtmlContainer.appendChild(div);	
+	}
+WidgetFactory.putData = function(rdfSymbol, store, previousStore, noContainerCreation) {
+	var url = rdfSymbol.uri;
+	var xhr = Util.XMLHTTPFactory();
+	
+	xhr.open("PUT", url, false);
+	xhr.setRequestHeader("Content-Type", "application/rdf+xml");
+	xhr.send(new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(store, rdfSymbol.uri)));
+	/*RFC 2518 says: "A PUT that would result in the creation of a resource without an
+   appropriately scoped parent collection MUST fail with a 409."
+   
+   Apache however sends a 403*/
+	if ((xhr.status == 409) || (xhr.status == 403)) {
+  		//alert("collection does not exist"+xhr.responseText);
+  		if (!noContainerCreation) {
+  			WidgetFactory.createContainingCollection(url);
+  			WidgetFactory.putData(rdfSymbol, store, previousStore, true);
+  		} else {
+  			throw new Error(xhr.responseText);
+  		}
+  	} else {
+	  	if (xhr.status >= 300) {
+	  		alert("server returned failure: "+xhr.responseText);
+	  	}
+	 }
+}
+
+WidgetFactory.createContainingCollection = function(url, noContainerCreation) {
+	if (url == "/") {
+		return;
+	} 
+	var containerURL = url.substring(0, url.lastIndexOf('/',url.length -2)+1);
+	var xhr = Util.XMLHTTPFactory();
+	xhr.open("MKCOL", containerURL, false);
+	xhr.send();
+	if ((xhr.status == 409) || (xhr.status == 403)) {
+  		//alert("collection does not exist"+xhr.responseText);
+  		if (!noContainerCreation) {
+  			WidgetFactory.createContainingCollection(containerURL);
+  			WidgetFactory.createContainingCollection(url, true);
+  		} else {
+  			throw new Error(xhr.responseText);
+  		}
+  	} else {
+	  	if (xhr.status >= 300) {
+	  		alert("server returned failure: "+xhr.responseText);
+	  	}
+  	}
+}
+
+WidgetFactory.ensureDicoBitLoaded = function(rdfSymbol, terminationListener) {
+	if(WidgetFactory.isLoading) {
+		window.setTimeout(function() {
+			WidgetFactory.ensureDicoBitLoaded(rdfSymbol, terminationListener);
+		}, 10);
+	} else {
+		if (typeof(WidgetFactory.store.anyStatementMatching(rdfSymbol)) == 'undefined') {
+			WidgetFactory.isLoading = true;
+			WidgetFactory.store = WidgetFactory.removeContext(rdfSymbol, WidgetFactory.store);
+			WidgetFactory.load(rdfSymbol, WidgetFactory.store, function(store) {
+				WidgetFactory.isLoading = false;
+				terminationListener(store);
+			});
+		} else {
+			terminationListener();
+		}
+	}
+}
+
+WidgetFactory.createURIderefURL = function(uri) {
+	return uri;
+}
+/**
+* returns the context of a resource as an aaray of statements
+*/
+WidgetFactory.getContext = function(rdfSymbol, store, pResult) {
+	if (pResult) {
+		var result = pResult;
+	} else {
+		var result = [ ];
+	}
+	var directedExpander = function(directioner) {
+		for (var i = 0; i < statements.length; i++) {
+			if (result.contains(statements[i])) {
+				continue;
+			}
+			result.push(statements[i]);
+			var other = directioner(statements[i]);
+			if (other.termType == 'bnode') {
+				WidgetFactory.getContext(other, store, result);
+			}
+		}
+	}
+	var statements = store.statementsMatching(rdfSymbol, undefined, undefined);
+	directedExpander(function(statement) {
+		return statement.object;
+	});
+	statements = store.statementsMatching(undefined, undefined, rdfSymbol);
+	directedExpander(function(statement) {
+		return statement.subject;
+	});
+	return result;
+}
+
+WidgetFactory.removeContext = function(rdfSymbol, store) {
+	var result = new RDFIndexedFormula();
+	var blockStatements = WidgetFactory.getContext(rdfSymbol, store);
+	var statements = store.statementsMatching(undefined, undefined, undefined);
+	for (var i = 0; i < statements.length; i++) {
+		if (!blockStatements.contains(statements[i])) {
+			result.statements.push(statements[i]);
+		}
+	}
+	return result;
+}
+
+
+WidgetFactory.load = function(rdfSymbol, pStore, terminationListener) {
+	var store;
+	if (pStore) {
+		store = pStore;
+	} else {
+		store = new RDFIndexedFormula();
+	}
+	var parser = new RDFParser(store);
+	parser.reify = parser.forceRDF = true;
+	// forceRDF isn't used??
+	
+	
+	// var url = 'http://something.or/other';
+	
+	// get the XML
+	var xhr = Util.XMLHTTPFactory(); // returns a new XMLHttpRequest, or ActiveX XMLHTTP object
+	if (xhr.overrideMimeType) {
+	    xhr.overrideMimeType("text/xml");
+	}
+	// the "data/" path and encoding is just how I store files locally
+	xhr.onload = function() {
+		var nodeTree = xhr.responseXML;
+		if (nodeTree === null && xhr.responseText !== null) {
+		    // Only if the server fails to set Content-Type: text/xml AND xmlhttprequest doesn't have the overrideMimeType method
+		    nodeTree = (new DOMParser()).parseFromString(xhr.responseText, 'text/xml');
+		}
+		// must be an XML document node tree
+		parser.parse(nodeTree,rdfSymbol.uri);
+		terminationListener(store);	
+	};
+	xhr.open("GET", WidgetFactory.createURIderefURL(rdfSymbol.uri), true);
+        xhr.setRequestHeader("Accept", "application/rdf+xml");
+	// xhr.open("GET", "data/" + encodeURIComponent(encodeURIComponent(url)), false);
+	xhr.send("");
+	
+	
+}
+WidgetFactory.store = new RDFIndexedFormula();//WidgetFactory.load(document.location.toString().substring(0, document.location.toString().lastIndexOf('/')+1)+'sample1b.rdf');
+
+Array.prototype.contains = function(element) {
+  for(var i = 0; i < this.length; i++) {
+    if (this[i] == element) {
+      return true;
+    }
+  }
+  return false;
+}
+
+
+//////////////////
+
+
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/scripts/tria-disco.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/scripts/tria-disco.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/scripts/tria-disco.js
new file mode 100644
index 0000000..7026eca
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/scripts/tria-disco.js
@@ -0,0 +1,56 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+function TriaDisco() {
+	var graphUri = null;
+}
+
+
+TriaDisco.putData = function(rdfSymbol, store, previousStore, noContainerCreation) {
+    var xhr = Util.XMLHTTPFactory();
+    var postUrl = "post";
+	if (TriaDisco.graphUri != null) {
+		postUrl += "?graph="+TriaDisco.graphUri
+	}
+    xhr.open('POST', postUrl, false);
+
+	var assertedRDF = new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(store, ""));
+	var revokedRDF = new XMLSerializer().serializeToString(RDFXMLSerializer.serialize(previousStore, ""));
+	var parameters = "assert="+encodeURIComponent(assertedRDF);
+	parameters += "&revoke="+encodeURIComponent(revokedRDF);
+	xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+	xhr.setRequestHeader("Content-length", parameters.length);
+	//xhr.setRequestHeader("Connection", "close");
+	xhr.send(parameters);
+    if (xhr.status >= 300) {
+        alert(xhr.status+" " +xhr.statusText);
+        throw new Error(xhr.status+" " +xhr.statusText);
+    }
+            
+}
+
+WidgetFactory.createURIderefURL = function(uri) {
+	var getUrl = "get?resource="+uri;
+	if (TriaDisco.graphUri != null) {
+		getUrl += "&graph="+TriaDisco.graphUri
+	}
+	return getUrl;
+}


[79/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
CLEREZZA-983: Adapted to new casing of rdf-core (part 1)


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

Branch: refs/heads/master
Commit: 60d73ea787f0dd3787a706ab1dd4995ff9b96800
Parents: 1ad142e
Author: Reto Gmuer <re...@apache.org>
Authored: Sat Apr 11 12:59:25 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Sat Apr 11 12:59:25 2015 +0000

----------------------------------------------------------------------
 .../jaxrs/rdf/providers/GraphNodeWriter.java    |  36 ++--
 .../ResultSetCsvMessageBodyWriter.java          |  14 +-
 .../ResultSetJsonMessageBodyWriter.java         |  14 +-
 .../ResultSetTsvMessageBodyWriter.java          |  12 +-
 .../ResultSetXmlMessageBodyWriter.java          |  15 +-
 .../platform/config/PlatformConfig.java         |  40 ++---
 .../clerezza/platform/config/SystemConfig.java  |  24 +--
 .../content/ContentGraphProvider.java           |  22 +--
 .../platform/logging/LoggingManager.java        |   4 +-
 .../org/apache/clerezza/platform/Constants.java |  14 +-
 .../jaxrs/TypeHandlerSpace.java                 |  22 +--
 .../typehandlerspace/TypeHandlerDiscovery.java  |   4 +-
 .../impl/TypeHandlerDiscoveryImpl.java          |  17 +-
 .../platform/typepriority/TypePrioritizer.java  |  38 ++---
 .../typepriority/TypePrioritizerTest.java       |   6 +-
 .../ScalaServerPagesService.java                |   6 +-
 .../scalaserverpages/SspTypeRenderlet.java      |   8 +-
 .../seedsnipe/WebRenderingFunctions.java        |  20 +--
 .../typerendering/seedsnipe/GenericTest.java    |   4 +-
 .../seedsnipe/WebRenderingFunctionsTest.java    |   4 +-
 .../typerendering/CallbackRenderer.java         |   6 +-
 .../typerendering/CallbackRendererImpl.java     |   4 +-
 .../platform/typerendering/RendererFactory.java |  22 +--
 .../typerendering/RenderingException.java       |   4 +-
 .../RenderingspecificationException.java        |   4 +-
 .../typerendering/RenderletManager.java         |   4 +-
 .../typerendering/RenderletManagerImpl.java     |  20 +--
 .../typerendering/RenderletRendererImpl.java    |   4 +-
 .../TypeRenderingExceptionMapper.java           |   7 +-
 .../platform/typerendering/TypeRenderlet.java   |   4 +-
 .../platform/usermanager/UserManager.java       |  20 +--
 .../platform/usermanager/UserManagerImpl.java   |  91 +++++-----
 .../clerezza/rdf/core/test/GraphTest.java       |  46 ++---
 .../clerezza/rdf/core/test/GraphWrapper.java    |   8 +-
 .../test/LockableMGraphWrapperForTesting.java   |   8 +-
 .../clerezza/rdf/core/test/RandomGraph.java     |  48 +++---
 .../clerezza/rdf/core/test/TcProviderTest.java  |  36 ++--
 .../rdf/core/InvalidLiteralTypeException.java   |   4 +-
 .../access/EntityAlreadyExistsException.java    |   8 +-
 .../core/access/EntityUndeletableException.java |   8 +-
 .../access/ImmutableGraphServiceFactory.java    |   6 +-
 .../rdf/core/access/MGraphServiceFactory.java   |   6 +-
 .../rdf/core/access/NoSuchEntityException.java  |   8 +-
 .../rdf/core/access/QueryableTcProvider.java    |   4 +-
 .../clerezza/rdf/core/access/SecuredGraph.java  |  12 +-
 .../clerezza/rdf/core/access/TcManager.java     |  66 +++----
 .../clerezza/rdf/core/access/TcProvider.java    |  22 +--
 .../rdf/core/access/TcProviderMultiplexer.java  |  52 +++---
 .../access/security/TcAccessController.java     |  72 ++++----
 .../rdf/core/impl/WriteBlockedGraph.java        |   8 +-
 .../core/impl/util/PrivilegedGraphWrapper.java  |  10 +-
 .../core/impl/util/SimpleLiteralFactory.java    |  44 ++---
 .../rdf/core/serializedform/Parser.java         |   6 +-
 .../core/serializedform/ParsingProvider.java    |   4 +-
 .../rdf/core/sparql/SolutionMapping.java        |   6 +-
 .../rdf/core/sparql/SparqlPreParser.java        |   8 +-
 .../clerezza/rdf/core/sparql/query/DataSet.java |   6 +-
 .../rdf/core/sparql/query/FunctionCall.java     |  10 +-
 .../core/sparql/query/GroupGraphPattern.java    |   4 +-
 .../rdf/core/sparql/query/InlineData.java       |   4 +-
 .../rdf/core/sparql/query/PredicatePath.java    |   8 +-
 .../core/sparql/query/ResourceOrVariable.java   |  12 +-
 .../rdf/core/sparql/query/UriRefExpression.java |  10 +-
 .../rdf/core/sparql/query/UriRefOrVariable.java |  10 +-
 .../core/sparql/query/impl/SimpleDataSet.java   |  14 +-
 .../query/impl/SimpleGroupGraphPattern.java     |  10 +-
 .../sparql/query/impl/SimpleInlineData.java     |   8 +-
 .../query/impl/SimplePropertyPathPattern.java   |  16 +-
 .../rdf/core/sparql/query/impl/SimpleQuery.java |   6 +-
 .../query/impl/SimpleStringQuerySerializer.java |  10 +-
 .../sparql/query/impl/SimpleTriplePattern.java  |  20 +--
 .../clerezza/rdf/core/sparql/update/Update.java |   4 +-
 .../rdf/core/sparql/update/UpdateOperation.java |   6 +-
 .../sparql/update/impl/BaseUpdateOperation.java |  18 +-
 .../update/impl/ClearOrDropOperation.java       |   8 +-
 .../sparql/update/impl/CreateOperation.java     |   6 +-
 .../core/sparql/update/impl/LoadOperation.java  |   6 +-
 .../sparql/update/impl/ModifyOperation.java     |  20 +--
 .../core/sparql/update/impl/SimpleUpdate.java   |   6 +-
 .../update/impl/SimpleUpdateOperation.java      |  14 +-
 .../update/impl/UpdateOperationWithQuads.java   |  10 +-
 .../core/sparql/JavaCCGeneratedQueryParser.jj   |  64 +++----
 .../sparql/JavaCCGeneratedSparqlPreParser.jj    | 154 ++++++++---------
 .../clerezza/rdf/core/LiteralFactoryTest.java   |  12 +-
 .../apache/clerezza/rdf/core/UriRefTest.java    |  12 +-
 .../clerezza/rdf/core/access/SecurityTest.java  |  34 ++--
 .../clerezza/rdf/core/access/TcManagerTest.java |  10 +-
 .../rdf/core/access/providers/WeightedA.java    |  24 +--
 .../rdf/core/access/providers/WeightedA1.java   |  24 +--
 .../core/access/providers/WeightedAHeavy.java   |  24 +--
 .../core/access/providers/WeightedBlight.java   |  24 +--
 .../core/access/providers/WeightedDummy.java    |  26 +--
 .../impl/util/SimpleLiteralFactoryTest.java     |  14 +-
 .../rdf/core/serializedform/ParserTest.java     |   6 +-
 .../TestServiceManagedProvider.java             |   4 +-
 .../rdf/core/sparql/QueryParserTest.java        |  26 +--
 .../rdf/core/sparql/QuerySerializerTest.java    |  32 ++--
 .../rdf/core/sparql/SparqlPreParserTest.java    | 108 ++++++------
 .../clerezza/rdf/file/storage/FileGraph.java    |  14 +-
 .../rdf/file/storage/FileTcProvider.java        |  32 ++--
 .../rdf/file/storage/FileGraphTest.java         |  20 +--
 .../rdf/file/storage/FileTcProviderTest.java    |   8 +-
 .../rdf/jena/commons/Jena2TriaUtil.java         |  36 ++--
 .../rdf/jena/commons/Tria2JenaUtil.java         |  22 +--
 .../clerezza/rdf/jena/facade/JenaGraph.java     |  12 +-
 .../rdf/facade/blackbox/TestBasics.java         |   6 +-
 .../rdf/jena/parser/JenaParserProvider.java     |   5 +-
 .../rdf/jena/parser/JenaParserProviderTest.java |   4 +-
 .../serializer/TestJenaSerializerProvider.java  |  14 +-
 .../rdf/jena/sparql/HashMapSolutionMapping.java |   8 +-
 .../rdf/jena/sparql/JenaSparqlEngine.java       |  10 +-
 .../rdf/jena/sparql/TcDatasetGraph.java         |  10 +-
 .../clerezza/rdf/jena/sparql/SimpleTest.java    |  16 +-
 .../rdf/jena/storage/JenaGraphAdaptor.java      |   8 +-
 .../clerezza/rdf/jena/tdb/internals/IriSet.java |  22 +--
 .../rdf/jena/tdb/internals/ModelGraph.java      |   2 +-
 .../rdf/jena/tdb/internals/Symbols.java         |  10 +-
 .../rdf/jena/tdb/storage/BaseTdbTcProvider.java |   4 +-
 .../tdb/storage/SingleTdbDatasetTcProvider.java |  58 +++----
 .../rdf/jena/tdb/storage/TdbTcProvider.java     |  42 ++---
 .../MultiThreadedSingleTdbDatasetTest.java      |  10 +-
 .../rdf/jena/tdb/storage/MultiThreadedTest.java |   8 +-
 .../tdb/storage/MultiThreadedTestSingleTdb.java |   8 +-
 .../tdb/storage/SingleTdbDatasetGraphTest.java  |   8 +-
 .../storage/SingleTdbDatasetTcProviderTest.java |  40 ++---
 .../rdf/jena/tdb/storage/TdbGraphTest.java      |   8 +-
 .../clerezza/rdf/rdfa/ClerezzaRDFaParser.java   |   6 +-
 .../rdf/rdfa/ClerezzaStatementSink.java         |  20 +--
 .../clerezza/rdf/scala/utils/EzLiteral.scala    |   8 +-
 .../clerezza/rdf/scala/utils/EzMGraph.scala     |  10 +-
 .../clerezza/rdf/scala/utils/Preamble.scala     |  12 +-
 .../rdf/scala/utils/RichGraphNode.scala         |  46 ++---
 .../clerezza/rdf/schemagen/SchemaGen.java       |  84 ++++-----
 .../rdf/simple/storage/SimpleTcProvider.java    |  32 ++--
 .../rdf/simple/storage/AccessViaTcManager.java  |   4 +-
 .../apache/clerezza/rdf/utils/GraphNode.java    | 170 +++++++++----------
 .../apache/clerezza/rdf/utils/GraphUtils.java   |   8 +-
 .../org/apache/clerezza/rdf/utils/RdfList.java  |  46 ++---
 .../clerezza/rdf/utils/SeeAlsoExpander.java     |  28 +--
 .../apache/clerezza/rdf/utils/UnionGraph.java   |  10 +-
 .../clerezza/rdf/utils/UriMutatingGraph.java    |  24 +--
 .../graphnodeprovider/GraphNodeProvider.java    |  14 +-
 .../rdf/utils/smushing/BaseSmusher.java         |  44 ++---
 .../clerezza/rdf/utils/smushing/IfpSmusher.java |  30 ++--
 .../rdf/utils/smushing/SameAsSmusher.java       |  24 +--
 .../clerezza/rdf/utils/GraphUtilsTest.java      |   8 +-
 .../apache/clerezza/rdf/utils/IfpSmushTest.java |  18 +-
 .../apache/clerezza/rdf/utils/RdfListTest.java  |  24 +--
 .../clerezza/rdf/utils/SameAsSmushTest.java     |   6 +-
 .../clerezza/rdf/utils/TestGraphNode.java       |  58 +++----
 .../clerezza/rdf/utils/UnionGraphTest.java      |  18 +-
 .../rdf/utils/smushing/SameAsSmushTest.java     |  10 +-
 .../rdf/web/core/BackupMessageBodyWriter.java   |  10 +-
 .../apache/clerezza/rdf/web/core/Delete.java    |   4 +-
 .../clerezza/rdf/web/core/GraphManagement.java  |   8 +-
 .../apache/clerezza/rdf/web/core/Restorer.java  |  10 +-
 .../web/core/ResultSetMessageBodyWriter.java    |  15 +-
 .../org/apache/clerezza/rdf/web/core/Smush.java |   6 +-
 .../clerezza/rdf/web/core/SparqlEndpoint.java   |  29 ++--
 .../apache/clerezza/rdf/web/core/WebAccess.java |   8 +-
 .../rdf/web/core/BackupAndRestoreTest.java      |  26 +--
 .../GraphNodeDataFieldResolver.java             |  39 +++--
 .../templating/seedsnipe/GraphNodeTest.java     |  64 +++----
 163 files changed, 1638 insertions(+), 1646 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/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 256806d..264fc77 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
@@ -38,10 +38,10 @@ import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-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.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.apache.clerezza.rdf.utils.GraphNode;
 
@@ -100,15 +100,15 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
 
     private Graph getExpandedContext(GraphNode node) {
         final Graph result = new SimpleGraph(node.getNodeContext());
-        final Set<RdfTerm> expandedResources = new HashSet<RdfTerm>();
+        final Set<RDFTerm> expandedResources = new HashSet<RDFTerm>();
         expandedResources.add(node.getNode());
         while (true) {
-            Set<RdfTerm> additionalExpansionRes = getAdditionalExpansionResources(result);
+            Set<RDFTerm> additionalExpansionRes = getAdditionalExpansionResources(result);
             additionalExpansionRes.removeAll(expandedResources);
             if (additionalExpansionRes.size() == 0) {
                 return result;
             }
-            for (RdfTerm resource : additionalExpansionRes) {
+            for (RDFTerm resource : additionalExpansionRes) {
                 final GraphNode additionalNode = new GraphNode(resource, node.getGraph());
                 result.addAll(additionalNode.getNodeContext());
                 expandedResources.add(resource);
@@ -116,14 +116,14 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
         }
     }
 
-    private Set<RdfTerm> getAdditionalExpansionResources(Graph tc) {
-        final Set<Iri> subjectExpansionProperties = getSubjectExpansionProperties();
-        final Set<Iri> objectExpansionProperties = getObjectExpansionProperties();
-        final Set<RdfTerm> result = new HashSet<RdfTerm>();
+    private Set<RDFTerm> getAdditionalExpansionResources(Graph tc) {
+        final Set<IRI> subjectExpansionProperties = getSubjectExpansionProperties();
+        final Set<IRI> objectExpansionProperties = getObjectExpansionProperties();
+        final Set<RDFTerm> result = new HashSet<RDFTerm>();
         if ((subjectExpansionProperties.size() > 0)
                 || (objectExpansionProperties.size() > 0)) {
             for (Triple triple : tc) {
-                final Iri predicate = triple.getPredicate();
+                final IRI predicate = triple.getPredicate();
                 if (subjectExpansionProperties.contains(predicate)) {
                     result.add(triple.getSubject());
                 }
@@ -135,28 +135,28 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
         return result;
     }
 
-    private Set<Iri> getSubjectExpansionProperties() {
+    private Set<IRI> getSubjectExpansionProperties() {
         final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
         final List<String> paramValues = queryParams.get(SUBJ_EXP_PARAM);
         if (paramValues == null) {
-            return new HashSet<Iri>(0);
+            return new HashSet<IRI>(0);
         }
-        final Set<Iri> result = new HashSet<Iri>(paramValues.size());
+        final Set<IRI> result = new HashSet<IRI>(paramValues.size());
         for (String uriString : paramValues) {
-            result.add(new Iri(uriString));
+            result.add(new IRI(uriString));
         }
         return result;
     }
 
-    private Set<Iri> getObjectExpansionProperties() {
+    private Set<IRI> getObjectExpansionProperties() {
         final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
         final List<String> paramValues = queryParams.get(OBJ_EXP_PARAM);
         if (paramValues == null) {
-            return new HashSet<Iri>(0);
+            return new HashSet<IRI>(0);
         }
-        final Set<Iri> result = new HashSet<Iri>(paramValues.size());
+        final Set<IRI> result = new HashSet<IRI>(paramValues.size());
         for (String uriString : paramValues) {
-            result.add(new Iri(uriString));
+            result.add(new IRI(uriString));
         }
         return result;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
index 967b56f..9a4a3c3 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
@@ -33,8 +33,8 @@ import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
-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.IRI;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.commons.rdf.Literal;
@@ -179,7 +179,7 @@ public class ResultSetCsvMessageBodyWriter implements MessageBodyWriter<ResultSe
       if( !first ) {
         outputStream.write( separator );
       }
-      RdfTerm resource = lineData.get( header );
+      RDFTerm resource = lineData.get( header );
       if( resource != null ) {
         writeEscaped( outputStream, getResourceValue( resource ) );
       }
@@ -189,12 +189,12 @@ public class ResultSetCsvMessageBodyWriter implements MessageBodyWriter<ResultSe
   }
 
   /**
-   * Helper to get the proper string representation for the given RdfTerm.
+   * Helper to get the proper string representation for the given RDFTerm.
    */
-  private String getResourceValue( RdfTerm resource ) {
+  private String getResourceValue( RDFTerm resource ) {
     StringBuilder value = new StringBuilder();
-    if( resource instanceof Iri ) {
-      value.append( ((Iri) resource).getUnicodeString() );
+    if( resource instanceof IRI ) {
+      value.append(((IRI) resource).getUnicodeString() );
     } else if( resource instanceof Literal ) {
       value.append( ((Literal) resource).getLexicalForm() );
     } else if( resource instanceof BlankNode ) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
index a78c9a0..a56baf1 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
@@ -34,8 +34,8 @@ import javax.ws.rs.ext.Provider;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Language;
-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.IRI;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
@@ -114,15 +114,15 @@ public class ResultSetJsonMessageBodyWriter implements MessageBodyWriter<ResultS
 	}
 
 	/**
-	 * Helper: creates value element from {@link RdfTerm} depending on its
+	 * Helper: creates value element from {@link RDFTerm} depending on its
 	 * class
 	 *
 	 */
-	private JSONObject createResultElement(RdfTerm resource) {
+	private JSONObject createResultElement(RDFTerm resource) {
 		JSONObject element = new JSONObject();
-		if (resource instanceof Iri) {
+		if (resource instanceof IRI) {
 			element.put("type", "uri");
-			element.put("value", Iri.class.cast(resource).getUnicodeString());
+			element.put("value", IRI.class.cast(resource).getUnicodeString());
 		} else if (resource instanceof Literal) {
 			element.put("type", "literal");
 			element.put("value", Literal.class.cast(resource).getLexicalForm());
@@ -151,7 +151,7 @@ public class ResultSetJsonMessageBodyWriter implements MessageBodyWriter<ResultS
 		JSONObject result = new JSONObject();
 		Set<Variable> keys = solutionMap.keySet();
 		for (Variable key : keys) {
-			result.put(key.getName(), createResultElement((RdfTerm) solutionMap.get(key)));
+			result.put(key.getName(), createResultElement((RDFTerm) solutionMap.get(key)));
 		}
 		return result;
 	}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
index 5b5fefe..2db72aa 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
@@ -33,8 +33,8 @@ import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
 import org.apache.clerezza.commons.rdf.BlankNode;
-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.IRI;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.commons.rdf.Literal;
@@ -179,7 +179,7 @@ public class ResultSetTsvMessageBodyWriter implements MessageBodyWriter<ResultSe
       if( !first ) {
         outputStream.write( separator );
       }
-      RdfTerm resource = lineData.get( header );
+      RDFTerm resource = lineData.get( header );
       if( resource != null ) {
         writeEscaped( outputStream, getResourceValue( resource ) );
       }
@@ -189,11 +189,11 @@ public class ResultSetTsvMessageBodyWriter implements MessageBodyWriter<ResultSe
   }
 
   /**
-   * Helper to get the proper string representation for the given RdfTerm.
+   * Helper to get the proper string representation for the given RDFTerm.
    */
-  private String getResourceValue( RdfTerm resource ) {
+  private String getResourceValue( RDFTerm resource ) {
     StringBuilder value = new StringBuilder();
-    if( resource instanceof Iri ) {
+    if( resource instanceof IRI ) {
       value.append( resource.toString() );
     } else if( resource instanceof Literal ) {
       value.append( "\"" );

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
index f4abb17..1250edd 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
@@ -41,8 +41,8 @@ import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
 import org.apache.clerezza.commons.rdf.Language;
-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.IRI;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
@@ -147,15 +147,15 @@ public class ResultSetXmlMessageBodyWriter implements MessageBodyWriter<ResultSe
 
 
 	/**
-	 * Helper: creates value element from {@link RdfTerm} depending on its
+	 * Helper: creates value element from {@link RDFTerm} depending on its
 	 * class
 	 *
 	 */
-	private Element createValueElement(RdfTerm resource, Document doc) {
+	private Element createValueElement(RDFTerm resource, Document doc) {
 		Element value = null;
-		if (resource instanceof Iri) {
+		if (resource instanceof IRI) {
 			value = doc.createElement("uri");
-			value.appendChild(doc.createTextNode(((Iri) resource)
+			value.appendChild(doc.createTextNode(((IRI) resource)
 					.getUnicodeString()));
 		} else if (resource instanceof Literal) {
 			value = doc.createElement("literal");
@@ -185,8 +185,7 @@ public class ResultSetXmlMessageBodyWriter implements MessageBodyWriter<ResultSe
 		for (Variable key : keys) {
 			Element bindingElement = doc.createElement("binding");
 			bindingElement.setAttribute("name", key.getName());
-			bindingElement.appendChild(createValueElement(
-					(RdfTerm) solutionMap.get(key), doc));
+			bindingElement.appendChild(createValueElement((RDFTerm) solutionMap.get(key), doc));
 			result.appendChild(bindingElement);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
index 003df78..16aa8cf 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/PlatformConfig.java
@@ -30,10 +30,10 @@ import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.ComponentContext;
-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.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
@@ -61,7 +61,7 @@ public class PlatformConfig {
      * @deprecated use org.apache.clerezza.platform.Contants instead
      */
     @Deprecated
-    public static final Iri CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
+    public static final IRI CONFIG_GRAPH_URI = Constants.CONFIG_GRAPH_URI;
 
     /**
      * A filter that can be used to get the config graph as OSGi service,
@@ -78,27 +78,27 @@ public class PlatformConfig {
      * Returns the default base URI of the Clerezza platform instance.
      * @return the base URI of the Clerezza platform
      */
-    public Iri getDefaultBaseUri() {
-        return AccessController.doPrivileged(new PrivilegedAction<Iri>() {
+    public IRI getDefaultBaseUri() {
+        return AccessController.doPrivileged(new PrivilegedAction<IRI>() {
 
             @Override
-            public Iri run() {
+            public IRI run() {
                 GraphNode platformInstance = getPlatformInstance();
                 Lock l = platformInstance.readLock();
                 l.lock();
                 try {
-                    Iterator<RdfTerm> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
+                    Iterator<RDFTerm> triples = platformInstance.getObjects(PLATFORM.defaultBaseUri);
                     if (triples.hasNext()) {
-                        return (Iri) triples.next();
+                        return (IRI) triples.next();
                     } else {
                         String port = context.getProperty("org.osgi.service.http.port");
                         if (port == null) {
                             port = DEFAULT_PORT;
                         }
                         if (port.equals("80")) {
-                            return new Iri("http://localhost/");
+                            return new IRI("http://localhost/");
                         }
-                        return new Iri("http://localhost:" + port + "/");
+                        return new IRI("http://localhost:" + port + "/");
                     }
                 } finally {
                     l.unlock();
@@ -118,7 +118,7 @@ public class PlatformConfig {
         return new GraphNode(getPlatformInstanceRdfTerm(), systemGraph);
     }
 
-    private BlankNodeOrIri getPlatformInstanceRdfTerm() {
+    private BlankNodeOrIRI getPlatformInstanceRdfTerm() {
         Lock l = systemGraph.getLock().readLock();
         l.lock();
         try {
@@ -138,17 +138,17 @@ public class PlatformConfig {
      * @return the base URI of the Clerezza platform
      */
     //todo: if this is the only class that sets and reads base uris then getBaseURIs should keep a cache
-    public Set<Iri> getBaseUris() {
+    public Set<IRI> getBaseUris() {
 
-        return AccessController.doPrivileged(new PrivilegedAction<Set<Iri>>() {
+        return AccessController.doPrivileged(new PrivilegedAction<Set<IRI>>() {
 
             @Override
-            public Set<Iri> run() {
-                Iterator<RdfTerm> baseUrisIter = getPlatformInstance().
+            public Set<IRI> run() {
+                Iterator<RDFTerm> baseUrisIter = getPlatformInstance().
                         getObjects(PLATFORM.baseUri);
-                Set<Iri> baseUris = new HashSet<Iri>();
+                Set<IRI> baseUris = new HashSet<IRI>();
                 while (baseUrisIter.hasNext()) {
-                    Iri baseUri = (Iri) baseUrisIter.next();
+                    IRI baseUri = (IRI) baseUrisIter.next();
                     baseUris.add(baseUri);
                 }
                 baseUris.add(getDefaultBaseUri());
@@ -163,7 +163,7 @@ public class PlatformConfig {
      *
      * @param baseUri The base URI which will be added to the platform instance
      */
-    public void addBaseUri(Iri baseUri) {
+    public void addBaseUri(IRI baseUri) {
         systemGraph.add(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
     }
 
@@ -172,7 +172,7 @@ public class PlatformConfig {
      *
      * @param baseUri The base URI which will be removed from the platform instance
      */
-    public void removeBaseUri(Iri baseUri) {
+    public void removeBaseUri(IRI baseUri) {
         systemGraph.remove(new TripleImpl(getPlatformInstanceRdfTerm(), PLATFORM.baseUri, baseUri));
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
index e5fc314..1527ee4 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
@@ -29,7 +29,7 @@ import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.osgi.service.component.ComponentContext;
 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;
@@ -65,7 +65,7 @@ public class SystemConfig implements WeightedTcProvider {
      * @deprecated use org.apache.clerezza.platform.Contants instead
      */
     @Deprecated
-    public static final Iri SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
+    public static final IRI SYSTEM_GRAPH_URI = Constants.SYSTEM_GRAPH_URI;
     /**
      * A filter that can be used to get the system graph as OSGi service, that
      * is provided by
@@ -128,12 +128,12 @@ public class SystemConfig implements WeightedTcProvider {
     }
 
     @Override
-    public ImmutableGraph getImmutableGraph(Iri name) throws NoSuchEntityException {
+    public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
         throw new NoSuchEntityException(name);
     }
 
     @Override
-    public Graph getMGraph(Iri name) throws NoSuchEntityException {
+    public Graph getMGraph(IRI name) throws NoSuchEntityException {
         if (name.equals(Constants.SYSTEM_GRAPH_URI)) {
             return systemGraph;
         } else {
@@ -142,42 +142,42 @@ public class SystemConfig implements WeightedTcProvider {
     }
 
     @Override
-    public Graph getGraph(Iri name) throws NoSuchEntityException {
+    public Graph getGraph(IRI name) throws NoSuchEntityException {
         return getMGraph(name);
     }
 
     @Override
-    public Set<Iri> listImmutableGraphs() {
+    public Set<IRI> listImmutableGraphs() {
         return Collections.emptySet();
     }
 
     @Override
-    public Set<Iri> listMGraphs() {
+    public Set<IRI> listMGraphs() {
         return Collections.singleton(Constants.SYSTEM_GRAPH_URI);
     }
 
     @Override
-    public Set<Iri> listGraphs() {
+    public Set<IRI> listGraphs() {
         return listMGraphs();
     }
 
     @Override
-    public Graph createGraph(Iri name) throws UnsupportedOperationException, EntityAlreadyExistsException {
+    public Graph createGraph(IRI name) throws UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public ImmutableGraph createImmutableGraph(Iri name, Graph triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
+    public ImmutableGraph createImmutableGraph(IRI name, Graph triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
         throw new UnsupportedOperationException("Not supported yet."); 
     }
 
     @Override
-    public void deleteGraph(Iri name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
+    public void deleteGraph(IRI name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public Set<Iri> getNames(ImmutableGraph graph) {
+    public Set<IRI> getNames(ImmutableGraph graph) {
         return Collections.emptySet();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
index 9b79d85..9891444 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -26,7 +26,7 @@ import org.apache.clerezza.platform.Constants;
 
 import org.osgi.service.component.ComponentContext;
 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.utils.UnionGraph;
@@ -73,7 +73,7 @@ public class ContentGraphProvider {
     /**
      * The URIs of the read-only addition-<code>Graph</code>s
      */
-    private Iri[] additions;
+    private IRI[] additions;
 
     private ReentrantReadWriteLock configLock = new ReentrantReadWriteLock();
 
@@ -85,9 +85,9 @@ public class ContentGraphProvider {
         }
         String[] additionUriStrings = (String[]) context.getProperties().get(
                 CONTENT_ADDITIONS);
-        additions = new Iri[additionUriStrings.length];
+        additions = new IRI[additionUriStrings.length];
         for (int i = 0; i < additionUriStrings.length; i++) {
-            additions[i] = new Iri(additionUriStrings[i]);
+            additions[i] = new IRI(additionUriStrings[i]);
 
         }
     }
@@ -98,7 +98,7 @@ public class ContentGraphProvider {
             Graph[] united = new Graph[additions.length + 1];
             int i = 0;
             united[i++] = tcManager.getGraph(Constants.CONTENT_GRAPH_URI);
-            for (Iri uriRef : additions) {
+            for (IRI uriRef : additions) {
                 united[i++] = tcManager.getGraph(uriRef);
             }
             return new UnionGraph(united);
@@ -107,25 +107,25 @@ public class ContentGraphProvider {
         }
     }
 
-    public void addTemporaryAdditionGraph(Iri graphName) {
+    public void addTemporaryAdditionGraph(IRI graphName) {
         configLock.writeLock().lock();
         try {
-            Set<Iri> additionsSet = new HashSet<Iri>(Arrays
+            Set<IRI> additionsSet = new HashSet<IRI>(Arrays
                     .asList(additions));
             additionsSet.add(graphName);
-            additions = additionsSet.toArray(new Iri[additionsSet.size()]);
+            additions = additionsSet.toArray(new IRI[additionsSet.size()]);
         } finally {
             configLock.writeLock().unlock();
         }
     }
 
-    public void removeTemporaryAdditionGraph(Iri graphName) {
+    public void removeTemporaryAdditionGraph(IRI graphName) {
         configLock.writeLock().lock();
         try {
-            Set<Iri> additionsSet = new HashSet<Iri>(Arrays
+            Set<IRI> additionsSet = new HashSet<IRI>(Arrays
                     .asList(additions));
             additionsSet.remove(graphName);
-            additions = additionsSet.toArray(new Iri[additionsSet.size()]);
+            additions = additionsSet.toArray(new IRI[additionsSet.size()]);
         } finally {
             configLock.writeLock().unlock();
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
index 85a41bc..9129a41 100644
--- a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
+++ b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
@@ -45,7 +45,7 @@ import org.apache.clerezza.platform.logging.ontologies.LOGGING;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
 import org.apache.clerezza.commons.rdf.BlankNode;
-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.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -78,7 +78,7 @@ public class LoggingManager implements GlobalMenuItemsProvider {
     public void activate(ComponentContext context)
             throws URISyntaxException, IOException {
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new Iri(getClass().getResource(
+                new IRI(getClass().getResource(
                 "config-page-naked.ssp").toURI().toString()),
                 LOGGING.LoggingConfigPage, "naked",
                 MediaType.APPLICATION_XHTML_XML_TYPE, true);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
----------------------------------------------------------------------
diff --git a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
index 49c4a49..b31e9ea 100644
--- a/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
+++ b/platform/platform/src/main/java/org/apache/clerezza/platform/Constants.java
@@ -17,7 +17,7 @@
 
 package org.apache.clerezza.platform;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * This class gropus some constant values used by the clerezza.platform components
@@ -40,8 +40,8 @@ public class Constants {
     /**
      * the uri of the system graph
      */
-    public static final Iri SYSTEM_GRAPH_URI =
-            new Iri(SYSTEM_GRAPH_URI_STRING);
+    public static final IRI SYSTEM_GRAPH_URI =
+            new IRI(SYSTEM_GRAPH_URI_STRING);
 
     /**
      * the uri of the config graph as string
@@ -51,8 +51,8 @@ public class Constants {
     /**
      * the uri of the config graph as string
      */
-    public static final Iri CONFIG_GRAPH_URI =
-            new Iri(CONFIG_GRAPH_URI_STRING);
+    public static final IRI CONFIG_GRAPH_URI =
+            new IRI(CONFIG_GRAPH_URI_STRING);
 
     /**
      * the uri of the content graph as string
@@ -62,8 +62,8 @@ public class Constants {
     /**
      * the uri of the content graph
      */
-    public static final Iri CONTENT_GRAPH_URI =
-            new Iri(CONTENT_GRAPH_URI_STRING);
+    public static final IRI CONTENT_GRAPH_URI =
+            new IRI(CONTENT_GRAPH_URI_STRING);
 
 
     /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
index 80c2bed..2485850 100644
--- a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
+++ b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
@@ -31,8 +31,8 @@ import javax.ws.rs.core.UriInfo;
 
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
-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.IRI;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;
@@ -89,13 +89,13 @@ public class TypeHandlerSpace {
     }
 
     private Object getTypeHandler(String absoluteUriPath) {
-        Iri uri = new Iri(absoluteUriPath);
+        IRI uri = new IRI(absoluteUriPath);
         if (gnp.existsLocal(uri)) {
             GraphNode node = gnp.getLocal(uri);
             Lock lock =node.readLock();
             lock.lock();
             try {
-                Set<Iri> rdfTypes = getRdfTypesOfIri(node);
+                Set<IRI> rdfTypes = getRdfTypesOfIri(node);
                 return typeHandlerDiscovery.getTypeHandler(rdfTypes);
             } finally {
                 lock.unlock();
@@ -105,17 +105,17 @@ public class TypeHandlerSpace {
         return null;
     }
 
-    private Set<Iri> getRdfTypesOfIri(GraphNode node) {
-        Set<Iri> rdfTypes = new HashSet<Iri>();
-        Iterator<RdfTerm> types = node.getObjects(RDF.type);
+    private Set<IRI> getRdfTypesOfIri(GraphNode node) {
+        Set<IRI> rdfTypes = new HashSet<IRI>();
+        Iterator<RDFTerm> types = node.getObjects(RDF.type);
         while (types.hasNext()) {
-            RdfTerm typeStmtObj = types.next();
-            if (!(typeStmtObj instanceof Iri)) {
+            RDFTerm typeStmtObj = types.next();
+            if (!(typeStmtObj instanceof IRI)) {
                 throw new RuntimeException(
                         "RDF type is expected to be a URI but is " + typeStmtObj
                         + "(of " + node.getNode() + ")");
             }
-            Iri rdfType = (Iri) typeStmtObj;
+            IRI rdfType = (IRI) typeStmtObj;
             rdfTypes.add(rdfType);
         }
         
@@ -128,7 +128,7 @@ public class TypeHandlerSpace {
         public Object getDescription(@Context UriInfo uriInfo){
             String absoluteUriPath = uriInfo.getAbsolutePath().toString();
             //Graph contentGraph = cgp.getContentGraph();
-                Iri uri = new Iri(absoluteUriPath.substring(0,
+                IRI uri = new IRI(absoluteUriPath.substring(0,
                         absoluteUriPath.length() - DESCRIPTION_SUFFIX.length()));
                 GraphNode graphNode = gnp.getLocal(uri);
                 return graphNode.getNodeContext();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
index 580f59c..746103e 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.platform.typehandlerspace;
 
 import java.util.Set;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * Implementations of this interface map RDF-types to type handlers. A type
@@ -41,6 +41,6 @@ public interface TypeHandlerDiscovery {
      *            be handled
      * @return the type handler for most important rdf-type in the set
      */
-    public Object getTypeHandler(Set<Iri> rdfTypes);
+    public Object getTypeHandler(Set<IRI> rdfTypes);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
index a3f9c35..c5cb673 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
@@ -35,7 +35,7 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typehandlerspace.SupportedTypes;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 
@@ -56,8 +56,7 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
     @Reference
     private TypePrioritizer typePrioritizer;
 
-    private final Map<Iri, Object> typeHandlerMap = Collections.synchronizedMap(
-            new HashMap<Iri, Object>());
+    private final Map<IRI, Object> typeHandlerMap = Collections.synchronizedMap(new HashMap<IRI, Object>());
     
     protected void bindTypeHandler(Object typeHandler) {
         SupportedTypes supportedTypes = typeHandler.getClass()
@@ -66,17 +65,17 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
             return;
         }
         for (String typeUriString : supportedTypes.types()) {
-            Iri typeUri = new Iri(typeUriString);
+            IRI typeUri = new IRI(typeUriString);
             typeHandlerMap.put(typeUri, typeHandler);
         }
     }
         
     protected void unbindTypeHandler(Object typeHandler) {
-        Iterator<Iri> keys = typeHandlerMap.keySet().iterator();
-        Set<Iri> toRemove = new HashSet<Iri>(typeHandlerMap.size());
+        Iterator<IRI> keys = typeHandlerMap.keySet().iterator();
+        Set<IRI> toRemove = new HashSet<IRI>(typeHandlerMap.size());
         synchronized(typeHandlerMap) {
             while (keys.hasNext()) {
-                Iri uriRef = keys.next();
+                IRI uriRef = keys.next();
                 if(typeHandlerMap.get(uriRef) == typeHandler) {
                     toRemove.add(uriRef);
                 }
@@ -89,12 +88,12 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
     }
 
     @Override
-    public Object getTypeHandler(final Set<Iri> types) {
+    public Object getTypeHandler(final Set<IRI> types) {
         return AccessController.doPrivileged(new PrivilegedAction<Object>() {
 
             @Override
             public Object run() {
-                Iterator<Iri> prioritizedTypes = typePrioritizer.iterate(types);
+                Iterator<IRI> prioritizedTypes = typePrioritizer.iterate(types);
                 while (prioritizedTypes.hasNext()) {
                     Object result = typeHandlerMap.get(prioritizedTypes.next());
                     if (result != null) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
index 487726d..4fc0f8b 100644
--- a/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
+++ b/platform/typepriority/src/main/java/org/apache/clerezza/platform/typepriority/TypePrioritizer.java
@@ -33,8 +33,8 @@ import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.apache.felix.scr.annotations.References;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.config.SystemConfig;
-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.IRI;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.RdfList;
 import org.apache.clerezza.commons.rdf.Graph;
@@ -52,9 +52,9 @@ import org.slf4j.LoggerFactory;
         referenceInterface=Graph.class,
         target=SystemConfig.SYSTEM_GRAPH_FILTER)})
 public class TypePrioritizer {
-    public static final Iri typePriorityListUri = new Iri("urn:x-localinstance:/typePriorityList");
+    public static final IRI typePriorityListUri = new IRI("urn:x-localinstance:/typePriorityList");
 
-    private List<Iri> typePriorityList;
+    private List<IRI> typePriorityList;
     private static final Logger log = LoggerFactory.getLogger(TypePrioritizer.class);
     
     Graph systemGraph;
@@ -63,12 +63,12 @@ public class TypePrioritizer {
         Lock l = systemGraph.getLock().readLock();
         l.lock();
         try {
-            List<RdfTerm> rdfTypePriorityList = new RdfList(
+            List<RDFTerm> rdfTypePriorityList = new RdfList(
                  typePriorityListUri, systemGraph);
-            typePriorityList  = new ArrayList<Iri>(rdfTypePriorityList.size());
-            for (RdfTerm resource : rdfTypePriorityList) {
-                if (resource instanceof Iri) {
-                    typePriorityList.add((Iri) resource);
+            typePriorityList  = new ArrayList<IRI>(rdfTypePriorityList.size());
+            for (RDFTerm resource : rdfTypePriorityList) {
+                if (resource instanceof IRI) {
+                    typePriorityList.add((IRI) resource);
                 } else {
                     log.warn("Type priority list contains a resource "
                             + "that is not a uri, skipping.");
@@ -90,17 +90,17 @@ public class TypePrioritizer {
      * @param rdfTypes the rdf types to be sorted
      * @return a sorted iterator of the types
      */
-    public Iterator<Iri> iterate(final Collection<Iri> rdfTypes) {
-        return new Iterator<Iri>() {
-            final Set<Iri> remaining = new HashSet<Iri>(rdfTypes);
+    public Iterator<IRI> iterate(final Collection<IRI> rdfTypes) {
+        return new Iterator<IRI>() {
+            final Set<IRI> remaining = new HashSet<IRI>(rdfTypes);
             boolean rdfsResourceRemovedAndNotYetReturned = remaining.remove(RDFS.Resource);
-            final Iterator<Iri> typePriorityIter = typePriorityList.iterator();
-            Iterator<Iri> remainingIter = null;
-            Iri next = prepareNext();
+            final Iterator<IRI> typePriorityIter = typePriorityList.iterator();
+            Iterator<IRI> remainingIter = null;
+            IRI next = prepareNext();
             
-            private Iri prepareNext() {
+            private IRI prepareNext() {
                 while (typePriorityIter.hasNext()) {
-                    Iri nextPriority = typePriorityIter.next();
+                    IRI nextPriority = typePriorityIter.next();
                     if (remaining.contains(nextPriority)) {
                         remaining.remove(nextPriority);
                         return nextPriority;
@@ -127,11 +127,11 @@ public class TypePrioritizer {
             }
 
             @Override
-            public Iri next() {
+            public IRI next() {
                 if (next == null) {
                     throw new NoSuchElementException();
                 }
-                Iri current = next;
+                IRI current = next;
                 next = prepareNext();
                 return current;
             }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
----------------------------------------------------------------------
diff --git a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
index ccaa75d..ff95059 100644
--- a/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
+++ b/platform/typepriority/src/test/java/org/apache/clerezza/platform/typepriority/TypePrioritizerTest.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 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.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -51,11 +51,11 @@ public class TypePrioritizerTest {
 
     @Test
     public void oderList() {
-        List<Iri> l = new ArrayList<Iri>();
+        List<IRI> l = new ArrayList<IRI>();
         l.add(FOAF.Agent);
         l.add(RDF.Bag);
         l.add(FOAF.Person);
-        Iterator<Iri> iter = typePrioritizer.iterate(l);
+        Iterator<IRI> iter = typePrioritizer.iterate(l);
         Assert.assertEquals(FOAF.Person, iter.next());
         Assert.assertEquals(FOAF.Agent, iter.next());
         Assert.assertEquals(RDF.Bag, iter.next());

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
index 4e37f0d..738fbaa 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.platform.typerendering.scalaserverpages;
 
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
@@ -66,7 +66,7 @@ public class ScalaServerPagesService {
      * @param mediaType
      * @return
      */
-    public ServiceRegistration registerScalaServerPage(URL location,  Iri rdfType,
+    public ServiceRegistration registerScalaServerPage(URL location,  IRI rdfType,
             String modePattern, MediaType mediaType) {
         return registerScalaServerPage(location, rdfType, modePattern, mediaType, bundleContext);
     }
@@ -83,7 +83,7 @@ public class ScalaServerPagesService {
      * @param callerBundleContext
      * @return
      */
-    public ServiceRegistration registerScalaServerPage(URL location,  Iri rdfType,
+    public ServiceRegistration registerScalaServerPage(URL location,  IRI rdfType,
             String modePattern, MediaType mediaType, BundleContext callerBundleContext) {
         TypeRenderlet sspTypeRenderlet = new SspTypeRenderlet(location, rdfType,
                 modePattern, mediaType, scalaCompilerService);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
index 501fd9b..c6d547b 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering.scalaserverpages;
 import java.util.logging.Level;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.slf4j.Logger;
@@ -53,7 +53,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
             + lineSeparator + "}" + lineSeparator + "}" + lineSeparator).toCharArray();
     
 
-    private Iri rdfType;
+    private IRI rdfType;
     private String modePattern;
     private MediaType mediaType;
     private URL sspLocation;
@@ -61,7 +61,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
     private TypeRenderlet lastCompiledSsp = null;
     private CompilerService scalaCompilerService;
 
-    SspTypeRenderlet(URL sspLocation, Iri rdfType, String modePattern, MediaType mediaType,
+    SspTypeRenderlet(URL sspLocation, IRI rdfType, String modePattern, MediaType mediaType,
                      CompilerService scalaCompilerService) {
         this.sspLocation = sspLocation;
         this.rdfType = rdfType;
@@ -71,7 +71,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
     }
 
     @Override
-    public Iri getRdfType() {
+    public IRI getRdfType() {
         return rdfType;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
index eda3b7b..2f560a8 100644
--- a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
+++ b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
@@ -31,11 +31,11 @@ import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.commons.rdf.BlankNode;
 import org.apache.clerezza.commons.rdf.Language;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.templating.RenderingFunction;
 import org.apache.clerezza.templating.RenderingFunctions;
-import org.apache.clerezza.commons.rdf.BlankNodeOrIri;
+import org.apache.clerezza.commons.rdf.BlankNodeOrIRI;
 import org.apache.clerezza.commons.rdf.Graph;
 
 /**
@@ -44,9 +44,9 @@ import org.apache.clerezza.commons.rdf.Graph;
  */
 class WebRenderingFunctions implements RenderingFunctions {
 
-    private static final Iri XML_DATE_LITERAL = new Iri(
+    private static final IRI XML_DATE_LITERAL = new IRI(
             "http://www.w3.org/2001/XMLSchema#dateTime");
-    private final static Iri RDF_XML_LITERAL = new Iri(
+    private final static IRI RDF_XML_LITERAL = new IRI(
             "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
     private Graph graph;
     private GraphNode context;
@@ -84,8 +84,8 @@ class WebRenderingFunctions implements RenderingFunctions {
                     }
                     stringValue = ((Literal) value).getLexicalForm();
                 } else {
-                    if (value instanceof Iri) {
-                        stringValue = ((Iri) value).getUnicodeString();
+                    if (value instanceof IRI) {
+                        stringValue = ((IRI) value).getUnicodeString();
                     } else {
                         stringValue = value.toString();
                     }
@@ -138,7 +138,7 @@ class WebRenderingFunctions implements RenderingFunctions {
 
         @Override
         public String process(Object... values) throws IOException {
-            BlankNodeOrIri resource = (BlankNodeOrIri) values[0];
+            BlankNodeOrIRI resource = (BlankNodeOrIRI) values[0];
             GraphNode graphNode = new GraphNode(resource, graph);
             String mode = null;
             if (values.length > 1) {
@@ -185,10 +185,10 @@ class WebRenderingFunctions implements RenderingFunctions {
      * A function that returns the Datatype of a Literal or null if the
      * Literal has no language or if the object is not a Literal
      */
-    private static RenderingFunction datatypeFunction = new RenderingFunction<Object, Iri>() {
+    private static RenderingFunction datatypeFunction = new RenderingFunction<Object, IRI>() {
 
         @Override
-        public Iri process(Object... values) {
+        public IRI process(Object... values) {
             Object value = values[0];
             if (value instanceof Literal) {
                 return ((Literal) value).getDataType();
@@ -225,7 +225,7 @@ class WebRenderingFunctions implements RenderingFunctions {
             if (value instanceof Literal) {
                 return "literal";
             }
-            if (value instanceof Iri) {
+            if (value instanceof IRI) {
                 return "iri";
             }
             if (value instanceof BlankNode) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
index a7f3858..0622b33 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
@@ -24,7 +24,7 @@ import java.io.InputStream;
 import org.junit.Assert;
 import org.junit.Test;
 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.serializedform.Parser;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
@@ -34,7 +34,7 @@ import org.apache.clerezza.rdf.utils.GraphNode;
  */
 public class GenericTest {
 
-    private final Iri root = new Iri("http://tests.clerezza.org/root#");
+    private final IRI root = new IRI("http://tests.clerezza.org/root#");
     private final SeedsnipeRenderlet renderlet = new SeedsnipeRenderlet();
 
     @Test

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
index 520e54d..e326ae2 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
@@ -27,7 +27,7 @@ import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.junit.Assert;
 import org.junit.Test;
 import org.apache.clerezza.commons.rdf.Literal;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.templating.RenderingFunction;
 
 /**
@@ -105,7 +105,7 @@ public class WebRenderingFunctionsTest {
                 null, null, null, null);
         RenderingFunction<Object, Boolean> function = webRenderingFunctions
                 .getNamedFunctions().get("contains");
-        Iri testObject = new Iri("http://example.org/bla#fooBar");
+        IRI testObject = new IRI("http://example.org/bla#fooBar");
         Assert.assertTrue(function.process(testObject, "bla"));
         Assert.assertFalse(function.process(testObject, "hello"));
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
index 5a0cb10..0148cd3 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRenderer.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering;
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -48,7 +48,7 @@ public interface CallbackRenderer {
 
     /**
      * Renders a specified named resource using the GraphNode returned by
-     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.clerezza.commons.rdf.Iri)</code>.
+     * <code>org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider#get(org.apache.clerezza.commons.rdf.IRI)</code>.
      *
      * Otherwise same as render(GraphNode, .GraphNode, String, OutputStream)
      *
@@ -58,7 +58,7 @@ public interface CallbackRenderer {
      * @param os
      * @throws IOException
      */
-    public void render(Iri resource, GraphNode context, String mode,
+    public void render(IRI resource, GraphNode context, String mode,
             OutputStream os) throws IOException;
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
index a0b31e8..aa77cc6 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/CallbackRendererImpl.java
@@ -30,7 +30,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 
@@ -71,7 +71,7 @@ public class CallbackRendererImpl implements CallbackRenderer {
     }
 
     @Override
-    public void render(final Iri resource, GraphNode context, String mode,
+    public void render(final IRI resource, GraphNode context, String mode,
             OutputStream os) throws IOException {
         final GraphNode resourceNode = AccessController.doPrivileged( new PrivilegedAction<GraphNode>() {
                     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
index 91886fc..f0736cf 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RendererFactory.java
@@ -25,7 +25,7 @@ import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
 import org.apache.clerezza.platform.typerendering.utils.MediaTypeMap;
 import org.apache.clerezza.platform.typerendering.utils.RegexMap;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -91,8 +91,8 @@ public class RendererFactory {
         }
     }
 
-    private Map<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeRenderletMap =
-            Collections.synchronizedMap(new HashMap<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>>());
+    private Map<IRI, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeRenderletMap =
+            Collections.synchronizedMap(new HashMap<IRI, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>>());
 
     private BundleContext bundleContext;
 
@@ -125,14 +125,14 @@ public class RendererFactory {
      */
     public Renderer createRenderer(GraphNode resource, String mode,
             List<MediaType> acceptableMediaTypes) {
-        Set<Iri> types = new HashSet<Iri>();
+        Set<IRI> types = new HashSet<IRI>();
         if (resource.getNode() instanceof Literal) {
             types.add(((Literal) resource.getNode()).getDataType());
         } else {
             // extract rdf types
-            Iterator<Iri> it = resource.getIriObjects(RDF.type);
+            Iterator<IRI> it = resource.getIriObjects(RDF.type);
             while (it.hasNext()) {
-                final Iri rdfType = it.next();
+                final IRI rdfType = it.next();
                 types.add(rdfType);
             }
             types.add(RDFS.Resource);
@@ -140,11 +140,11 @@ public class RendererFactory {
         return getRenderer(types, mode, acceptableMediaTypes);
     }
 
-    private Renderer getRenderer(Set<Iri> types, String mode,
+    private Renderer getRenderer(Set<IRI> types, String mode,
             List<MediaType> acceptableMediaTypes) {
-        Iterator<Iri> sortedTypes = typePrioritizer.iterate(types);
+        Iterator<IRI> sortedTypes = typePrioritizer.iterate(types);
         while (sortedTypes.hasNext()) {
-            final Iri currentType = sortedTypes.next();
+            final IRI currentType = sortedTypes.next();
             final RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeRenderletMap.get(currentType);
             if (regexMap != null) {
                 Iterator<MediaTypeMap<TypeRenderletStartLevel>> mediaTypeMapIter = regexMap.getMatching(mode);
@@ -190,7 +190,7 @@ public class RendererFactory {
     }
 
     private void registerRenderlet(TypeRenderlet typeRenderlet, int startLevel) {
-        final Iri rdfType = typeRenderlet.getRdfType();
+        final IRI rdfType = typeRenderlet.getRdfType();
         RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeRenderletMap.get(rdfType);
         if (regexMap == null) {
             regexMap = new RegexMap<MediaTypeMap<TypeRenderletStartLevel>>();
@@ -208,7 +208,7 @@ public class RendererFactory {
 
     protected void unbindTypeRenderlet(TypeRenderlet typeRenderlet) {
         TypeRenderletStartLevel typeRenderletStartLevel = new TypeRenderletStartLevel(typeRenderlet, 0);
-        for (Map.Entry<Iri, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeEntry: typeRenderletMap.entrySet()) {
+        for (Map.Entry<IRI, RegexMap<MediaTypeMap<TypeRenderletStartLevel>>> typeEntry: typeRenderletMap.entrySet()) {
             final RegexMap<MediaTypeMap<TypeRenderletStartLevel>> regexMap = typeEntry.getValue();
             for (Map.Entry<String, MediaTypeMap<TypeRenderletStartLevel>> regexEntry: regexMap.entrySet()) {
                 final MediaTypeMap<TypeRenderletStartLevel> mediaTypeMap = regexEntry.getValue();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
index cbe1469..8b0cbe9 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingException.java
@@ -23,7 +23,7 @@ import java.io.StringWriter;
 import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -53,7 +53,7 @@ public class RenderingException extends TypeRenderingException {
     public GraphNode getExceptionGraphNode() {
         GraphNode result = new GraphNode(new BlankNode(), new SimpleGraph());
         result.addProperty(RDF.type, TYPERENDERING.Exception);
-        result.addProperty(TYPERENDERING.errorSource, new Iri(renderingSpecification.toString()));
+        result.addProperty(TYPERENDERING.errorSource, new IRI(renderingSpecification.toString()));
         result.addProperty(TYPERENDERING.message, new PlainLiteralImpl(getMessage()));
         result.addProperty(TYPERENDERING.stackTrace, getStackTraceLiteral());
         return result;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
index a186180..b92da78 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderingspecificationException.java
@@ -22,7 +22,7 @@ import java.net.URI;
 import org.apache.clerezza.platform.typerendering.ontologies.TYPERENDERING;
 import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.clerezza.commons.rdf.BlankNode;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.commons.rdf.impl.utils.PlainLiteralImpl;
 import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -124,7 +124,7 @@ public class RenderingspecificationException extends TypeRenderingException{
         GraphNode result = new GraphNode(new BlankNode(), new SimpleGraph());
         result.addProperty(RDF.type, TYPERENDERING.Exception);
         LiteralFactory factory = LiteralFactory.getInstance();
-        result.addProperty(TYPERENDERING.errorSource, new Iri(renderingSpecification.toString()));
+        result.addProperty(TYPERENDERING.errorSource, new IRI(renderingSpecification.toString()));
         if (lineNumber != -1) {
             result.addProperty(TYPERENDERING.line, factory.createTypedLiteral(new Integer(lineNumber)));
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
index 29e3d6d..cc0011b 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManager.java
@@ -18,7 +18,7 @@
 package org.apache.clerezza.platform.typerendering;
 
 import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 
 /**
  * Over the RenderletManagerImpl renderlets can be registered.
@@ -48,6 +48,6 @@ public interface RenderletManager {
      * required.
      * @param mediaType The media type of the rendered
      * @param builtIn ignored
-     */ void registerRenderlet(String renderletServiceName, final Iri renderingSpecification, final Iri rdfType, final String mode, final MediaType mediaType, boolean builtIn);
+     */ void registerRenderlet(String renderletServiceName, final IRI renderingSpecification, final IRI rdfType, final String mode, final MediaType mediaType, boolean builtIn);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
index 201b670..71907d5 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletManagerImpl.java
@@ -33,7 +33,7 @@ import java.util.Set;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
@@ -67,12 +67,12 @@ public class RenderletManagerImpl implements RenderletManager {
     private static class RegistrationRequest {
 
         String renderletServiceName;
-        Iri renderingSpecification;
-        Iri rdfType;
+        IRI renderingSpecification;
+        IRI rdfType;
         String mode;
         MediaType mediaType;
 
-        public RegistrationRequest(String renderletServiceName, Iri renderingSpecification, Iri rdfType, String mode, MediaType mediaType) {
+        public RegistrationRequest(String renderletServiceName, IRI renderingSpecification, IRI rdfType, String mode, MediaType mediaType) {
             this.renderletServiceName = renderletServiceName;
             this.renderingSpecification = renderingSpecification;
             this.rdfType = rdfType;
@@ -112,8 +112,8 @@ public class RenderletManagerImpl implements RenderletManager {
      * @param builtIn ignored
      */
     public void registerRenderlet(String renderletServiceName,
-            final Iri renderingSpecification,
-            final Iri rdfType,
+            final IRI renderingSpecification,
+            final IRI rdfType,
             final String mode,
             final MediaType mediaType, boolean builtIn) {
         RegistrationRequest registrationRequest = new RegistrationRequest(renderletServiceName,
@@ -232,8 +232,8 @@ public class RenderletManagerImpl implements RenderletManager {
 
     private boolean attemptRegistration(RegistrationRequest registrationRequest) {
         final String renderletServiceName = registrationRequest.renderletServiceName;
-        Iri renderingSpecification = registrationRequest.renderingSpecification;
-        final Iri rdfType = registrationRequest.rdfType;
+        IRI renderingSpecification = registrationRequest.renderingSpecification;
+        final IRI rdfType = registrationRequest.rdfType;
         final String modePattern = registrationRequest.mode;
         final MediaType mediaType = registrationRequest.mediaType;
 
@@ -252,7 +252,7 @@ public class RenderletManagerImpl implements RenderletManager {
         TypeRenderlet typeRenderlet = new TypeRenderlet() {
 
             @Override
-            public Iri getRdfType() {
+            public IRI getRdfType() {
                 return rdfType;
             }
 
@@ -304,7 +304,7 @@ public class RenderletManagerImpl implements RenderletManager {
         return true;
     }
 
-    private ServiceRegistration getAlreadyRegisteredServiceReg(Iri rdfType, 
+    private ServiceRegistration getAlreadyRegisteredServiceReg(IRI rdfType, 
             MediaType mediaType, String modePattern) {
         
         for (ServiceRegistration serviceRegistration : registeredTypeRenderlets) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/60d73ea7/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
index 3bde164..8b87ec7 100644
--- a/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
+++ b/platform/typerendering/platform.typerendering.core/src/main/java/org/apache/clerezza/platform/typerendering/RenderletRendererImpl.java
@@ -28,7 +28,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.IRI;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.osgi.framework.BundleContext;
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
@@ -52,7 +52,7 @@ class RenderletRendererImpl implements Renderer {
     private GraphNodeProvider graphNodeProvider;
 
 
-    RenderletRendererImpl(Iri renderingSpecification, org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider graphNodeProvider,
+    RenderletRendererImpl(IRI renderingSpecification, org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider graphNodeProvider,
             Renderlet renderlet, MediaType mediaType, 
             RendererFactory rendererFactory,
             BundleContext bundleContext) {


[41/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java b/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
new file mode 100644
index 0000000..c58865c
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
@@ -0,0 +1,378 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.representations.core;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.core.Resource;
+import org.apache.clerezza.rdf.core.TypedLiteral;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.ontologies.EXIF;
+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;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This JAX-RS resource provides a method to retrieve the uri to
+ * the thumbnail or a other small representation of a InfoDiscoBit.
+ *
+ * @author mir
+ */
+@Component
+@Services({
+    @Service(Object.class),
+    @Service(ThumbnailService.class)
+})
+
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("thumbnail-service")
+public class ThumbnailService implements BundleListener {
+
+    @Reference
+    ContentGraphProvider cgProvider;
+    @Reference
+    PlatformConfig config;
+    @Reference
+    AlternativeRepresentationGenerator altRepGen;
+    private static final Logger log = LoggerFactory.getLogger(ThumbnailService.class);
+    private BundleContext bundleContext;
+    private String STATICWEB_PATH = "/CLEREZZA-INF/web-resources/style/";
+    private String MEDIA_TYPE_BASE_PATH = STATICWEB_PATH + "images/icons/mediatype/";
+    private Bundle cachedStyleBundle = null;
+    private Map<MediaType, String> mediaTypeIconUriCache =
+            Collections.synchronizedMap(new HashMap<MediaType, String>());
+
+    protected void activate(ComponentContext context) {
+        bundleContext = context.getBundleContext();
+        bundleContext.addBundleListener(this);
+    }
+
+    protected void deactivate(ComponentContext context) {
+        bundleContext.removeBundleListener(this);
+        bundleContext = null;
+        mediaTypeIconUriCache.clear();
+    }
+
+    /**
+     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
+     * specified over the query parameter "uri". The thumbnails
+     * maximum width and height can optionally be specified over the query parameters
+     * "width" and "height". Futhermore there is the optional "exact" parameter,
+     * which specifies if the thumbnail must have the exact width and height as
+     * specified or not (default is "false"). If more than one acceptable thumbnail
+     * is available then the thumbnail uri of the thumbnail with the highest resolution
+     * (width * height) is returned. If no thumbnail is available and the logged
+     * in user has the write permission for the content graph, then an attempt is
+     * made to create the thumbnail on the fly. If this fails or the write permission
+     * is missing, then the uri of the icon representing the media type is returned.
+     * If also no media type icon is available the uri to default icon is returned.
+     *
+     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
+     *        be returned
+     * @param height the maximum height that the thumbnail has
+     * @param width the maximum width that the thumbnail has
+     * @param exact boolean that specifies if the return thumbnail should have
+     *        the exact width and height.
+     * @return
+     */
+    @GET
+    public Response getThumbnailUri(@QueryParam("uri") UriRef infoBitUri,
+            @QueryParam("width") Integer width, @QueryParam("height") Integer height,
+            @DefaultValue("false") @QueryParam("exact") Boolean exact, @Context UriInfo uriInfo) {
+        return RedirectUtil.createSeeOtherResponse(
+                getThumbnailUri(infoBitUri, width, height, exact).getUnicodeString(), uriInfo);
+    }
+
+
+    /**
+     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
+     * specified over the query parameter "uri". The thumbnails
+     * maximum width and height can optionally be specified over the query parameters
+     * "width" and "height". If more than one acceptable thumbnail is available
+     * then the thumbnail uri of the thumbnail with the highest resolution
+     * (width * height) is returned. If no thumbnail is available and the logged
+     * in user has the write permission for the content graph, then an attempt is
+     * made to create the thumbnail on the fly. If this fails or the write permission
+     * is missing, then the uri of the icon representing the media type is returned.
+     * If also no media type icon is available the uri to default icon is returned.
+     *
+     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
+     *        be returned
+     * @param height the maximum height that the thumbnail has
+     * @param width the maximum width that the thumbnail has
+     * @return
+     */
+    public UriRef getThumbnailUri(UriRef infoBitUri, Integer width,  Integer height) {
+        return getThumbnailUri(infoBitUri, width, height, false);
+    }
+
+    /**
+     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
+     * specified over the query parameter "uri". The thumbnails
+     * maximum width and height can optionally be specified over the query parameters
+     * "width" and "height". Futhermore there is the optional "exact" parameter,
+     * which specifies if the thumbnail must have the exact width and height as
+     * specified or not. If more than one acceptable thumbnail is available then
+     * the thumbnail uri of the thumbnail with the highest resolution (width * height)
+     * is returned. If no thumbnail is available and the logged in user has the write
+     * permission for the content graph, then an attempt is made to create the
+     * thumbnail on the fly. If this fails or the write permission is missing, then
+     * the uri of the icon representing the media type is returned. If also no
+     * media type icon is available the uri to default icon is returned.
+     *
+     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
+     *        be returned
+     * @param height the maximum height that the thumbnail has
+     * @param width the maximum width that the thumbnail has
+     * @param exact boolean that specifies if the return thumbnail should have
+     *        the exact width and height.
+     * @return
+     */
+    public UriRef getThumbnailUri(UriRef infoBitUri, Integer width,  Integer height,
+            boolean exact) {
+        if ((width == null) && (height == null)) {
+            throw new IllegalArgumentException("height and/or width must be specified");
+        }
+        if (width == null) {
+            width = Integer.MAX_VALUE;
+        }
+        if (height == null) {
+            height = Integer.MAX_VALUE;
+        }
+        GraphNode infoBitNode = new GraphNode(infoBitUri, cgProvider.getContentGraph());
+        UriRef thumbnailUri = getGeneratedThumbnailUri(infoBitNode, width, height, exact);
+        if (thumbnailUri == null) {
+            Literal mediaTypeLiteral = null;
+            Lock readLock = infoBitNode.readLock();
+            readLock.lock();
+            try {
+                Iterator<Resource> mediaTypes = infoBitNode.getObjects(DISCOBITS.mediaType);
+                if (mediaTypes.hasNext()) {
+                    mediaTypeLiteral = (Literal) mediaTypes.next();
+                }
+            } finally {
+                readLock.unlock();
+            }
+            if (mediaTypeLiteral != null) {
+                MediaType mediaType = MediaType.valueOf(mediaTypeLiteral.getLexicalForm());
+                // if the infoBit is an image, create a thumbnail on the fly.
+                if (mediaType.getType().startsWith("image")) {
+                    try {
+                        thumbnailUri = altRepGen.generateAlternativeImage(infoBitNode, width,
+                                height, exact);
+                    } catch (Exception ex) {
+                        ex.printStackTrace();
+                        // Was worth a try. eLets go on
+                    }
+                }
+                if (thumbnailUri == null) {
+                    String iconUri = mediaTypeIconUriCache.get(mediaType);
+                    if (iconUri == null) {
+                        iconUri = getMediaTypeIconUri(mediaType);
+                        mediaTypeIconUriCache.put(mediaType, iconUri);
+                    }
+                    thumbnailUri = new UriRef(iconUri);
+                }
+            }
+        }
+        if (thumbnailUri == null) {
+            thumbnailUri = new UriRef(getDefaultIconUrl(getStyleBundle()));
+        }
+        return thumbnailUri;
+    }
+
+    private String getMediaTypeIconUri(MediaType mediaType) {
+        Bundle styleBundle = getStyleBundle();
+        if (styleBundle == null) {
+            throw new RuntimeException("no style bundle found");
+        }
+        String path = MEDIA_TYPE_BASE_PATH + mediaType.getType() + "/";
+        Enumeration entries = styleBundle.findEntries(path,
+                mediaType.getSubtype() + ".*", false);
+        String iconUri = createIconUri(entries);
+        if (iconUri != null) {
+            return iconUri;
+        }
+        entries = styleBundle.findEntries(path, "any.*", false);
+        iconUri = createIconUri(entries);
+        if (iconUri != null) {
+            return iconUri;
+        }
+        return getDefaultIconUrl(styleBundle);
+    }
+
+    private String getDefaultIconUrl(Bundle bundle) {
+        Enumeration entries = bundle.findEntries(MEDIA_TYPE_BASE_PATH, "any.*", false);
+        String iconUri = createIconUri(entries);
+        if (iconUri != null) {
+            return iconUri;
+        } else {
+            throw new RuntimeException("No default icon found");
+        }
+    }
+
+    private String createIconUri(Enumeration entries) {
+        if (entries != null && entries.hasMoreElements()) {
+            URL iconUrl = (URL) entries.nextElement();
+            return iconUrl.getPath().replace(STATICWEB_PATH, "style/");
+        }
+        return null;
+    }
+
+    private UriRef getGeneratedThumbnailUri(GraphNode infoBitNode,
+            Integer width, Integer height, boolean exact) {
+        if (isFittingImage(infoBitNode, width, height, exact)) {
+            return (UriRef) infoBitNode.getNode();
+        }
+        UriRef resultThumbnailUri = null;
+        int pixels = 0;
+        Lock readLock = infoBitNode.readLock();
+        readLock.lock();
+        try {
+            Iterator<Resource> thumbnails = infoBitNode.getObjects(DISCOBITS.thumbnail);
+            while (thumbnails.hasNext()) {
+                UriRef thumbnailUri = (UriRef) thumbnails.next();
+                GraphNode thumbnailNode = new GraphNode(thumbnailUri,
+                        cgProvider.getContentGraph());
+                int thumbnailPixels = getSurfaceSizeIfFitting(thumbnailNode, width, height, exact);
+                if (thumbnailPixels > pixels) {
+                    if (exact) {
+                        return thumbnailUri;
+                    }
+                    resultThumbnailUri = thumbnailUri;
+                    pixels = thumbnailPixels;
+                }
+            }
+        } finally {
+            readLock.unlock();
+        }
+        return resultThumbnailUri;
+    }
+
+    /**
+     * returns the surface in pixel if the image fits withing width and height,
+     * or -1 if it doesn't fit
+     */
+    private int getSurfaceSizeIfFitting(GraphNode infoBitNode, Integer width, Integer height,
+            boolean exact) {
+        Resource imageRes = infoBitNode.getNode();
+        if (imageRes instanceof UriRef) {
+            String imageUri = ((UriRef)imageRes).getUnicodeString();
+            if (!exact && imageUri.contains(AlternativeRepresentationGenerator.EXACT_APPENDIX)) {
+                return -1;
+            }
+        }        
+        Iterator<Resource> exifWidths = infoBitNode.getObjects(EXIF.width);
+        Iterator<Resource> exifHeights = infoBitNode.getObjects(EXIF.height);
+        if (!exifWidths.hasNext() || !exifHeights.hasNext()) {
+            log.warn(infoBitNode.getNode() + " doesn't have exif:width and exif:height");
+            return -1;
+        }
+        int thumbnailWidth = LiteralFactory.getInstance().createObject(
+                Integer.class, (TypedLiteral) exifWidths.next());
+        int thumbnailHeight = LiteralFactory.getInstance().createObject(
+                Integer.class, (TypedLiteral) exifHeights.next());
+        if (exact) {
+            if (thumbnailHeight == height && thumbnailWidth == width) {
+                return 1;
+            }
+        } else {
+            if (thumbnailHeight <= height && thumbnailWidth <= width) {
+                return thumbnailWidth * thumbnailHeight;
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * returns true if infoBitNode is an image and fits
+     */
+    private boolean isFittingImage(GraphNode infoBitNode, Integer width, Integer height,
+            boolean exact) {
+        Lock readLock = infoBitNode.readLock();
+        readLock.lock();
+        try {
+            final Iterator<Literal> mediaTypesIter = infoBitNode.getLiterals(DISCOBITS.mediaType);
+            if (!mediaTypesIter.hasNext()) {
+                return false;
+            }
+            if (mediaTypesIter.next().getLexicalForm().startsWith("image")) {
+                return getSurfaceSizeIfFitting(infoBitNode, width, height, exact) > -1;
+            } else {
+                return false;
+            }
+        } finally {
+            readLock.unlock();
+        }
+    }
+
+    private synchronized Bundle getStyleBundle() {
+        if (cachedStyleBundle != null) {
+            return cachedStyleBundle;
+        }
+        Bundle[] bundles = bundleContext.getBundles();
+        for (Bundle bundle : bundles) {
+            URL staticWebPathURL = bundle.getEntry(STATICWEB_PATH);
+            if (staticWebPathURL != null) {
+                cachedStyleBundle = bundle;
+                return bundle;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public synchronized void bundleChanged(BundleEvent be) {
+        if (be.getType() == BundleEvent.UNINSTALLED
+                && be.getBundle().equals(cachedStyleBundle)) {
+            cachedStyleBundle = null;
+            cachedStyleBundle = getStyleBundle();
+            mediaTypeIconUriCache.clear();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.ontologies/LICENSE b/platform/content.representations/platform.content.representations.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.ontologies/pom.xml b/platform/content.representations/platform.content.representations.ontologies/pom.xml
new file mode 100644
index 0000000..41cfd94
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.content.representations</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.representations.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content Representations Ontologies</name>
+    <description>
+        Representations Ontologies
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
----------------------------------------------------------------------
diff --git a/platform/content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf b/platform/content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
new file mode 100644
index 0000000..01e604d
--- /dev/null
+++ b/platform/content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/12/representations#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Content Representations
+	</dc:title>
+</owl:Ontology>
+
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="http://clerezza.org/2009/12/representations#isIconFor">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">is icon for</rdfs:label>
+	<skos:definition xml:lang="en">Points to a string specifying the resource type for which the subject is an icon.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/12/representations#" />
+	<rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Image" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
+</rdf:Property>
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content.representations/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content.representations/pom.xml b/platform/content.representations/pom.xml
new file mode 100644
index 0000000..0327c26
--- /dev/null
+++ b/platform/content.representations/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.content.representations</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Content Representations</name>
+    <description>Provides services for creating and retrieving alternative representations of content.</description>
+    
+    <modules>
+        <module>platform.content.representations.ontologies</module>
+        <module>platform.content.representations.core</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/LICENSE
----------------------------------------------------------------------
diff --git a/platform/content/LICENSE b/platform/content/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/content/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/content/pom.xml b/platform/content/pom.xml
new file mode 100644
index 0000000..0cb5e24
--- /dev/null
+++ b/platform/content/pom.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </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>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+             <artifactId>org.osgi.core</artifactId>
+         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+             <artifactId>org.osgi.compendium</artifactId>
+         </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typehandlerspace</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphnodeprovider</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.seedsnipe</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>javax.servlet</artifactId>
+                    <groupId>org.apache.felix</groupId>
+                </exclusion>
+            </exclusions>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>wymiwyg-commons-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </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>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.metadata</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core.test</artifactId>
+            <scope>test</scope>
+            <version>0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>net.sf.alchim</groupId>
+                <artifactId>yuicompressor-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..e605c40
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.platform.content.collections.CollectionCreator;
+
+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;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author reto
+ */
+public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(AbstractDiscobitsHandler.class);
+
+    /**
+     *
+     * @return the MGraph to be used to retrieve and create discobits
+     */
+    protected abstract MGraph getMGraph();
+
+    /**
+     * A <code>Set</code> containing <code>MetaDataGenerator</code>s to be used
+     * to add meta data to data putted by the handler.
+     *
+     * @return a Set containing meta data generators
+     */
+    protected abstract Set<MetaDataGenerator> getMetaDataGenerators();
+
+    
+    @Override
+    public void put(UriRef infoDiscoBitUri, MediaType mediaType,
+            byte[] data) {
+
+        GraphNode infoDiscoBitNode;
+        final LockableMGraph mGraph = (LockableMGraph) getMGraph();
+        infoDiscoBitNode = new GraphNode(infoDiscoBitUri, mGraph);
+        CollectionCreator collectionCreator = new CollectionCreator(mGraph);
+        collectionCreator.createContainingCollections(infoDiscoBitUri);
+        Lock writeLock = mGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            infoDiscoBitNode.addProperty(RDF.type, DISCOBITS.InfoDiscoBit);
+            TypedLiteral dataLiteral = LiteralFactory.getInstance().createTypedLiteral(data);
+            infoDiscoBitNode.deleteProperties(DISCOBITS.infoBit);
+            infoDiscoBitNode.addProperty(DISCOBITS.infoBit, dataLiteral);
+            TypedLiteral mediaTypeLiteral = LiteralFactory.getInstance().createTypedLiteral(mediaType.toString());
+            infoDiscoBitNode.deleteProperties(DISCOBITS.mediaType);
+            infoDiscoBitNode.addProperty(DISCOBITS.mediaType,mediaTypeLiteral);
+        } finally {
+            writeLock.unlock();
+        }
+        Set<MetaDataGenerator> metaDataGenerators = getMetaDataGenerators();
+        synchronized(metaDataGenerators) {
+            for(MetaDataGenerator generator : metaDataGenerators) {
+                try {
+                    generator.generate(infoDiscoBitNode, data, mediaType);
+                } catch (RuntimeException ex) {
+                    logger.error("Exception in MetaDataGenerator ", ex);
+                }
+            }
+        }
+    }
+
+    @Override
+    public  void remove(NonLiteral node) {
+        MGraph mGraph = getMGraph();        
+        Iterator<Triple> properties = mGraph.filter(node, null, null);
+        //copying properties to set, as we're modifying underlying graph
+        Set<Triple> propertiesSet = new HashSet<Triple>();
+        while (properties.hasNext()) {
+            propertiesSet.add(properties.next());
+        }
+        properties = propertiesSet.iterator();
+        while (properties.hasNext()) {
+            Triple triple = properties.next();
+            UriRef predicate = triple.getPredicate();
+            if (predicate.equals(DISCOBITS.contains)) {
+                try {
+                    GraphNode containedNode = new GraphNode((NonLiteral)triple.getObject(), mGraph);
+                    //The following includes triple
+                    containedNode.deleteNodeContext();
+                } catch (ClassCastException e) {
+                    throw new RuntimeException("The value of "+predicate+" is expected not to be a literal");
+                }
+                //as some other properties of node could have been in the context of the object
+                remove(node);
+                return;
+            }            
+        }
+        GraphNode graphNode = new GraphNode(node, mGraph);
+        graphNode.deleteNodeContext();
+    }
+
+    @Override
+    public byte[] getData(UriRef uriRef) {
+        MGraph mGraph = getMGraph();
+        GraphNode node = new GraphNode(uriRef, mGraph);
+        final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
+        if (infoDiscobit == null) {
+            return null;
+        }
+        return infoDiscobit.getData();
+    }
+
+    @Override
+    public MediaType getMediaType(UriRef uriRef) {
+        MGraph mGraph = getMGraph();
+        GraphNode node = new GraphNode(uriRef, mGraph);
+        final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
+        if (infoDiscobit == null) {
+            return null;
+        }
+        return MediaType.valueOf(infoDiscobit.getContentType());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..5bcf1af
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.clerezza.platform.content;
+
+import java.net.URL;
+import java.util.Map;
+import javax.ws.rs.GET;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.clerezza.platform.content.WebDavUtils.PropertyMap;
+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;
+import org.apache.clerezza.platform.content.webdav.COPY;
+import org.apache.clerezza.platform.content.webdav.LOCK;
+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.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.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.felix.scr.annotations.Services;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * Provides HTTP Methods for WebDav
+ * 
+ * @author ali
+ */
+
+@Component
+@Services({
+    @Service(Object.class),
+    @Service(CollectionTypeHandler.class)
+})
+@Property(name = "org.apache.clerezza.platform.typehandler", boolValue = true)
+@SupportedTypes(types = { "http://clerezza.org/2009/09/hierarchy#Collection" }, prioritize = true)
+public class CollectionTypeHandler extends DiscobitsTypeHandler{
+
+    private Logger logger = LoggerFactory.getLogger(CollectionTypeHandler.class);
+    
+    @Reference
+    private RenderletManager renderletManager;
+
+    /**
+     * The activate method is called when SCR activates the component configuration.
+     * This method gets the system graph or create a new one if it doesn't exist.
+     *
+     * @param componentContext
+     */
+    protected void activate(ComponentContext componentContext) {
+        URL templateURL = getClass().getResource("collection.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(templateURL.toString()), HIERARCHY.Collection,
+                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        logger.info("CollectionTypeHandler activated.");
+    }
+
+    /**
+     * Returns a GraphNode of the requested collection
+     * @return 
+     */
+    @GET
+    @Override
+    public GraphNode getResource(@Context UriInfo uriInfo) {
+        final MGraph contentGraph = cgProvider.getContentGraph();
+        final String uriString = uriInfo.getAbsolutePath().toString();
+        final UriRef indexUri = new UriRef(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 GraphNode graphNode = new GraphNode(uri, mGraph);
+        graphNode.addProperty(RDF.type, PLATFORM.HeadedPage);
+
+        UriRef collectionUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        return graphNode;
+    }
+
+    @Override
+    Map<UriRef, 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,
+            String depthHeader) {
+        Map<UriRef, PropertyMap> result;
+        NodeList children = requestNode.getChildNodes();
+        result = WebDavUtils.getPropsByName(children, node, depthHeader,
+                true /* includeValues */);
+        return result;
+    }
+
+    @Override
+    Map<UriRef, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
+        return WebDavUtils.getCollectionProps(null, null, null, node,
+                            depthHeader, true /* includeValues */);
+    }
+
+    /*-----------------------*
+     * Not Supported Methods * 
+     *-----------------------*/
+    
+    /**
+     * Locks a resource
+     *
+     * @return returns a 501 Not Implemented response
+     */
+    @LOCK
+    public Object lock() {
+        return Response.status(501/* Not Implemented */).build();
+    }
+
+    /**
+     * Unlocks a resource
+     *
+     * @return returns a 501 Not Implemented response
+     */
+    @UNLOCK
+    public Object unlock() {
+        return Response.status(501/* Not Implemented */).build();
+    }
+
+    /**
+     * Copies a resource
+     *
+     * @return returns a 501 Not Implemented response
+     */
+    @COPY
+    public Object copy() {
+        return Response.status(501/* Not Implemented */).build();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..6a7db15
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+
+import java.net.URI;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+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.rdf.ontologies.RDF;
+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;
+
+/**
+ * This Jax-rs root resource provides a method to post content to the content
+ * graph
+ *
+ * @author mir
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("content")
+public class ContentPostSupport {
+    
+    @Reference
+    private DiscobitsHandler handler;
+
+    @Reference
+    private ContentGraphProvider cgProvider;
+
+    /**
+     * Creates an InfoDiscoBt (aka Binary Content) in the content graph.<br/>
+     * This JAX-RS method is available under the path "content". It requires
+     * a multipart/form-data with two fields: "content", which is the content of the
+     * InfoDiscobit to be created and "uri" which is the uri of the new
+     * InfoDiscoBit.
+     *
+     * @param form
+     * @return Returns a Created (201) response, if the info bit was successfully
+     * uploaded. Returns Bad Request (400) response, if required form fields are
+     * missing. Returns a Conflict (409) response, if at the specified URI a
+     * resource already exists.
+     */
+    @POST
+    @Consumes("multipart/form-data")
+    public Response postContent(MultiPartBody form) {
+        FormFile formFile = form.getFormFileParameterValues("content")[0];
+        String uri = form.getTextParameterValues("uri")[0];
+        byte[] content = formFile.getContent();
+        if (content == null || uri == null) {
+            return Response.status(400).entity("Required form field is missing").
+                    type(MediaType.TEXT_PLAIN_TYPE).build();
+        }
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        Lock readLock = contentGraph.getLock().readLock();
+        readLock.lock();
+        try {
+            if (contentGraph.filter(new UriRef(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();
+            }
+        } finally {
+            readLock.unlock();
+        }
+        handler.put(new UriRef(uri), formFile.getMediaType(), content);
+        return Response.created(URI.create(uri)).build();
+    }    
+    
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..3b45d62
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+
+
+import javax.ws.rs.core.MediaType;
+
+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.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+
+/**
+ *
+ * @author tio
+ */
+@Component(immediate = true)
+public class DiscobitTemplating {
+
+    @Reference
+    RenderletManager renderletManager;
+
+    protected void activate(ComponentContext context) {
+
+        // register seedsnipe renderlets
+        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
+                new UriRef(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()),
+                RDFS.Resource, "(naked|.*-naked)", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
+                new UriRef(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()),
+                DISCOBITS.OrderedContent, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
+                new UriRef(getClass().getResource("TitledContent.xhtml").toString()),
+                DISCOBITS.TitledContent, null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        renderletManager.registerRenderlet(TitledContentRenderlet.class.getName(),
+                null, DISCOBITS.TitledContent, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        // 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,
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..2e3e441
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+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;
+
+/**
+ * Provides utility methods to create, retrieve and remove binary contents.
+ * Binary contents are modeled as InfoDiscoBit from the discobit ontology at
+ * http://discobits.org/ontology
+ *
+ * @author rbn
+ */
+public interface DiscobitsHandler {
+
+    /**
+     * Creates an InfoDiscoBit
+     * 
+     * @param infoDiscoBitUri
+     * @param mediaType
+     * @param data
+     */
+    public abstract void put(UriRef infoDiscoBitUri, MediaType mediaType,
+            byte[] data);
+
+    /**
+     * Removes InfoDiscoBits (aka binary contents), other DiscoBits and
+     * the context of the specified node. If it is in a hierarchy then it
+     * will be removed also form its container.
+     * 
+     * @param node
+     */
+    public abstract void remove(NonLiteral node);
+
+    /**
+     * 
+     * @param uriRef
+     * @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);
+
+    /**
+     * 
+     * @param uriRef
+     * @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);
+
+}
\ No newline at end of file


[58/87] [abbrv] clerezza git commit: CLEREZZA-989: All bundle and components in linked data launchers satisfied, some runtime problems

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
index 3477bd2..5029eea 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
@@ -38,20 +38,19 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
+import org.apache.clerezza.rdf.core.LiteralFactory;
 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;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-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.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
@@ -88,12 +87,12 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
     }
 
     private void archive(ZipOutputStream compressedTcs, 
-            TripleCollection tripleCollection,
+            Graph tripleCollection,
             String fileName) throws IOException, UnsupportedFormatException {
         Lock readLock = null;
         compressedTcs.putNextEntry(new ZipEntry(fileName));
-        if (tripleCollection instanceof LockableMGraph) {
-            readLock = ((LockableMGraph) tripleCollection).getLock().readLock();
+        if (tripleCollection instanceof Graph) {
+            readLock = ((Graph) tripleCollection).getLock().readLock();
             readLock.lock();
         }
         try {
@@ -106,7 +105,7 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
         }
     }
 
-    private String getTcFileName(UriRef tcUri, String extension,
+    private String getTcFileName(Iri tcUri, String extension,
             Map<String, Integer> fileNameCount) {
         String fileName = tcUri.getUnicodeString();
         fileName = fileName.substring(fileName.lastIndexOf("/")+1);
@@ -123,23 +122,23 @@ public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
 
     private void writeBackup(OutputStream result) {
         Map<String, Integer> fileNameCount = new HashMap<String, Integer>();
-        MGraph backupContents = new SimpleMGraph();
+        Graph backupContents = new SimpleGraph();
         try {
             ZipOutputStream compressedTcs = new ZipOutputStream(result);
 
             compressedTcs.putNextEntry(new ZipEntry(folder));
 
-            Set<UriRef> tripleCollections = tcManager.listTripleCollections();
-            Iterator<UriRef> tcUriRefs = tripleCollections.iterator();
-            while (tcUriRefs.hasNext()) {
-                UriRef tcUri = tcUriRefs.next();
+            Set<Iri> tripleCollections = tcManager.listGraphs();
+            Iterator<Iri> tcIris = tripleCollections.iterator();
+            while (tcIris.hasNext()) {
+                Iri tcUri = tcIris.next();
                 String fileName = folder + getTcFileName(tcUri, ".nt",
                         fileNameCount);
-                TripleCollection tripleCollection = tcManager.getTriples(tcUri);
+                Graph tripleCollection = tcManager.getGraph(tcUri);
                 archive(compressedTcs, tripleCollection, fileName);
-                if (tripleCollection instanceof MGraph) {
+                if (tripleCollection instanceof Graph) {
                     backupContents.add(new TripleImpl(tcUri, RDF.type,
-                            BACKUP.MGraph));
+                            BACKUP.Graph));
                 } else {
                     backupContents.add(new TripleImpl(tcUri, RDF.type,
                             BACKUP.Graph));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
index 1cd7491..caf5d18 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
@@ -33,7 +33,7 @@ public class BackupPermission extends Permission {
 
 
     public BackupPermission() {
-        super("Graph Management permission");
+        super("ImmutableGraph Management permission");
     }
     /**
      *
@@ -41,7 +41,7 @@ public class BackupPermission extends Permission {
      * @param action ignored
      */
     public BackupPermission(String target, String actions) {
-        super("Graph Management permission");
+        super("ImmutableGraph Management permission");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
index f08e5ce..c00bf1b 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
@@ -26,17 +26,17 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Graph;
 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;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.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.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
@@ -45,7 +45,7 @@ import org.apache.clerezza.rdf.utils.Smusher;
 import org.osgi.service.component.ComponentContext;
 
 /**
- * Provides a method to remove duplicate noded from (aka smush) a Graph
+ * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
  * 
  * @author reto
  */
@@ -60,8 +60,8 @@ public class Delete {
 
     
     @POST
-    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") UriRef graphName) {
-        tcManager.deleteTripleCollection(graphName);
+    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+        tcManager.deleteGraph(graphName);
         return RedirectUtil.createSeeOtherResponse("./", uriInfo);
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
index 118c6f1..886d1e7 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
@@ -33,18 +33,18 @@ import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Graph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.ImmutableGraph;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.commons.rdf.Graph;
 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;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.TCPROVIDER;
@@ -74,7 +74,7 @@ public class GraphManagement implements GlobalMenuItemsProvider {
     protected void activate(ComponentContext componentContext) {
         URL templateURL = getClass().getResource("graph-management.ssp");
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
+                new Iri(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
                 "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }
 
@@ -82,19 +82,19 @@ public class GraphManagement implements GlobalMenuItemsProvider {
     public GraphNode mainPage(@Context UriInfo uriInfo) {
         AccessController.checkPermission(new GraphManagementAppPermission());
         TrailingSlash.enforcePresent(uriInfo);
-        final SimpleMGraph resultGraph = new SimpleMGraph();
-        GraphNode graphNode = new GraphNode(new BNode(), resultGraph);
-        Set<UriRef> tripleCollections = tcManager.listTripleCollections();
-        for (UriRef uriRef : tripleCollections) {
+        final SimpleGraph resultGraph = new SimpleGraph();
+        GraphNode graphNode = new GraphNode(new BlankNode(), resultGraph);
+        Set<Iri> tripleCollections = tcManager.listGraphs();
+        for (Iri uriRef : tripleCollections) {
             graphNode.addProperty(GRAPHMANAGEMENT.tripleCollection, uriRef);
-            final TripleCollection tripleCollection = tcManager.getTriples(uriRef);
+            final Graph tripleCollection = tcManager.getGraph(uriRef);
             resultGraph.add(new TripleImpl(uriRef,GRAPHMANAGEMENT.size,
                     LiteralFactory.getInstance().createTypedLiteral(
                     tripleCollection.size())));
-            if (tripleCollection instanceof Graph) {
+            if (tripleCollection instanceof ImmutableGraph) {
                 resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
             } else {
-                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.MGraph));
+                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
             }
         }
         graphNode.addProperty(RDF.type, GRAPHMANAGEMENT.GraphManagementPage);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
index 838879e..09ec04d 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
@@ -22,18 +22,18 @@ import java.security.Permission;
 import org.apache.clerezza.permissiondescriptions.PermissionInfo;
 
 /**
- * Permission to use the Graph-Management page. Nothe that the user
- * additioonally needs permssion on the TripleCollections they manipulate.
+ * Permission to use the ImmutableGraph-Management page. Nothe that the user
+ * additioonally needs permssion on the Graphs they manipulate.
  *
  * @author reto
  */
-@PermissionInfo(value="Graph Management Access Permission", description="Grants access " +
-    "to the Graph Management page")
+@PermissionInfo(value="ImmutableGraph Management Access Permission", description="Grants access " +
+    "to the ImmutableGraph Management page")
 public class GraphManagementAppPermission extends Permission {
 
 
     public GraphManagementAppPermission() {
-        super("Graph Management permission");
+        super("ImmutableGraph Management permission");
     }
     /**
      * 
@@ -41,7 +41,7 @@ public class GraphManagementAppPermission extends Permission {
      * @param action ignored
      */
     public GraphManagementAppPermission(String target, String actions) {
-        super("Graph Management permission");
+        super("ImmutableGraph Management permission");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
index 1096524..d0ceed7 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Restorer.java
@@ -32,13 +32,13 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.Literal;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
@@ -75,10 +75,10 @@ public class Restorer {
     public void restore(InputStream backupData, TcProvider target) throws IOException {
         ZipInputStream compressedTcs = new ZipInputStream(backupData);
 
-        Map<String, TripleCollection> extractedTc = new HashMap<String, TripleCollection>();
+        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
         String folder = "";
         ZipEntry entry;
-        Graph metaGraph = null;
+        ImmutableGraph metaGraph = null;
         while ((entry = compressedTcs.getNextEntry()) != null) {
             String entryName = entry.getName();
             if (entry.isDirectory()) {
@@ -109,7 +109,7 @@ public class Restorer {
                     metaGraph = parser.parse(serializedGraph,
                             SupportedFormat.N_TRIPLE, null);
                 } else {
-                    Graph deserializedGraph = parser.parse(serializedGraph,
+                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
                             SupportedFormat.N_TRIPLE, null);
                     extractedTc.put(entryName, deserializedGraph);
                 }
@@ -121,16 +121,16 @@ public class Restorer {
         }
         compressedTcs.close();
         {
-            final Iterator<Triple> mGraphIterator = metaGraph.filter(null, RDF.type, BACKUP.MGraph);
+            final Iterator<Triple> mGraphIterator = metaGraph.filter(null, RDF.type, BACKUP.Graph);
             while (mGraphIterator.hasNext()) {
                 GraphNode graphGN = new GraphNode(mGraphIterator.next().getSubject(), metaGraph);
                 String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
-                TripleCollection extracted = extractedTc.get(fileName);
+                Graph extracted = extractedTc.get(fileName);
                 
-                MGraph mGraph;
+                Graph mGraph;
                 boolean created = false;
                 try {
-                    mGraph = target.getMGraph((UriRef)graphGN.getNode());
+                    mGraph = target.getGraph((Iri)graphGN.getNode());
                     try {
                         mGraph.clear();
                     } catch (UnsupportedOperationException ex) {
@@ -139,7 +139,7 @@ public class Restorer {
                         continue;
                     }
                 } catch (NoSuchEntityException ex) {
-                    mGraph = target.createMGraph((UriRef)graphGN.getNode());
+                    mGraph = target.createGraph((Iri)graphGN.getNode());
                     created = true;
                 }
                 try {
@@ -156,9 +156,9 @@ public class Restorer {
             while (graphIterator.hasNext()) {
                 GraphNode graphGN = new GraphNode(graphIterator.next().getSubject(), metaGraph);
                 String fileName = graphGN.getLiterals(BACKUP.file).next().getLexicalForm();
-                TripleCollection extracted = extractedTc.get(fileName);
+                Graph extracted = extractedTc.get(fileName);
                 try {
-                    target.deleteTripleCollection((UriRef)graphGN.getNode());
+                    target.deleteGraph((Iri)graphGN.getNode());
                 } catch (UnsupportedOperationException ex) {
                     log.warn("could not restore "+graphGN.getNode()+" as the exsting triple "
                             + "collection could not be deleted");
@@ -166,10 +166,10 @@ public class Restorer {
                 } catch (NoSuchEntityException ex) {
                     log.debug("could not remove "+graphGN.getNode()+", no such entity");
                 }
-                target.createGraph((UriRef)graphGN.getNode(), extracted);
+                target.createImmutableGraph((Iri)graphGN.getNode(), extracted);
             }
         }
-        for (Map.Entry<String, TripleCollection> pathTcPair : extractedTc.entrySet()) {
+        for (Map.Entry<String, Graph> pathTcPair : extractedTc.entrySet()) {
             Literal fileNameLit = LiteralFactory.getInstance().createTypedLiteral(
                         pathTcPair.getKey());
             Iterator<Triple> graphResIterator = metaGraph.filter(null, BACKUP.file, fileNameLit);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
index 9db6c04..f3678a7 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
@@ -45,16 +45,15 @@ 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;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
+import org.apache.commons.rdf.Literal;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -154,33 +153,29 @@ public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet>
 
 
     /**
-     * Helper: creates value element from {@link Resource} depending on its
+     * Helper: creates value element from {@link RdfTerm} depending on its
      * class
      *
      */
-    private Element createValueElement(Resource resource, Document doc) {
+    private Element createValueElement(RdfTerm resource, Document doc) {
         Element value = null;
-        if (resource instanceof UriRef) {
+        if (resource instanceof Iri) {
             value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((UriRef) resource)
+            value.appendChild(doc.createTextNode(((Iri) resource)
                     .getUnicodeString()));
-        } else if (resource instanceof TypedLiteral) {
+        } else if (resource instanceof Literal) {
             value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((TypedLiteral) resource)
+            value.appendChild(doc.createTextNode(((Literal) resource)
                     .getLexicalForm()));
-            value.setAttribute("datatype", (((TypedLiteral) resource)
+            value.setAttribute("datatype", (((Literal) resource)
                     .getDataType().getUnicodeString()));
-        } else if (resource instanceof PlainLiteral) {
-            value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((PlainLiteral) resource)
-                    .getLexicalForm()));
-            Language lang = ((PlainLiteral) resource).getLanguage();
+            Language lang = ((Literal) resource).getLanguage();
             if (lang != null) {
                 value.setAttribute("xml:lang", (lang.toString()));
             }
         } else {
             value = doc.createElement("bnode");
-            value.appendChild(doc.createTextNode(((BNode) resource).toString()));
+            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
         }
         return value;
     }
@@ -197,7 +192,7 @@ public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet>
             Element bindingElement = doc.createElement("binding");
             bindingElement.setAttribute("name", key.getName());
             bindingElement.appendChild(createValueElement(
-                    (Resource) solutionMap.get(key), doc));
+                    (RdfTerm) solutionMap.get(key), doc));
             result.appendChild(bindingElement);
         }
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
index 98e125a..fa29fde 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
@@ -26,17 +26,16 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.commons.rdf.Graph;
 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;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.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.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
@@ -45,7 +44,7 @@ import org.apache.clerezza.rdf.utils.Smusher;
 import org.osgi.service.component.ComponentContext;
 
 /**
- * Provides a method to remove duplicate noded from (aka smush) a Graph
+ * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
  * 
  * @author reto
  */
@@ -54,7 +53,7 @@ import org.osgi.service.component.ComponentContext;
 @Property(name="javax.ws.rs", boolValue=true)
 @Path("/admin/graphs/smush")
 public class Smush {
-    private final UriRef tBoxName = new UriRef("urn:x-localinstance:/tbox.graph");
+    private final Iri tBoxName = new Iri("urn:x-localinstance:/tbox.graph");
 
     @Reference
     private TcManager tcManager;
@@ -62,27 +61,27 @@ public class Smush {
     @Reference
     private RenderletManager renderletManager;
 
-    private TripleCollection tBox;
+    private Graph tBox;
 
     protected void activate(ComponentContext componentContext) {
         try {
             //getting the tBox here means no read right on Tbox is necessary
             //when smushing
-            tBox = tcManager.getTriples(tBoxName);
+            tBox = tcManager.getGraph(tBoxName);
         } catch (NoSuchEntityException e) {
-            tBox = new SimpleMGraph();
+            tBox = new SimpleGraph();
             tBox.add(new TripleImpl(FOAF.mbox, RDF.type, OWL.InverseFunctionalProperty));
             tBox.add(new TripleImpl(FOAF.mbox_sha1sum, RDF.type, OWL.InverseFunctionalProperty));
             tBox.add(new TripleImpl(PLATFORM.userName, RDF.type, OWL.InverseFunctionalProperty));
-            tBox = tcManager.createGraph(tBoxName, tBox);
+            tBox = tcManager.createImmutableGraph(tBoxName, tBox);
         }
     }
 
 
     
     @POST
-    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") UriRef graphName) {
-        MGraph mGraph = tcManager.getMGraph(graphName);
+    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+        Graph mGraph = tcManager.getGraph(graphName);
         Smusher.smush(mGraph, tBox);
         return RedirectUtil.createSeeOtherResponse("./", uriInfo);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
index 59f6e46..69f318f 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
@@ -61,18 +61,16 @@ import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPa
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Graph;
+import org.apache.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.impl.SimpleMGraph;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.sparql.ParseException;
 import org.apache.clerezza.rdf.core.sparql.QueryParser;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
@@ -83,6 +81,7 @@ import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.web.ontologies.SPARQLENDPOINT;
+import org.apache.commons.rdf.Literal;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.ProcessingInstruction;
@@ -115,18 +114,18 @@ public class SparqlEndpoint {
     protected void activate(ComponentContext componentContext) {
         URL templateURL = getClass().getResource("sparql-endpoint.ssp");
         renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
+                new Iri(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
                 null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
     }
 
     @GET
     @Path("form")
-    public GraphNode getAvailableTripleCollectionUris(@Context UriInfo uriInfo) {
+    public GraphNode getAvailableGraphUris(@Context UriInfo uriInfo) {
         AccessController.checkPermission(new SparqlEndpointAccessPermission());
         TrailingSlash.enforceNotPresent(uriInfo);
-        GraphNode graphNode = new GraphNode(new BNode(), new SimpleMGraph());
-        Set<UriRef> tripleCollections = tcManager.listTripleCollections();
-        for (UriRef uriRef : tripleCollections) {
+        GraphNode graphNode = new GraphNode(new BlankNode(), new SimpleGraph());
+        Set<Iri> tripleCollections = tcManager.listGraphs();
+        for (Iri uriRef : tripleCollections) {
             graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
         }
         graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
@@ -134,7 +133,7 @@ public class SparqlEndpoint {
     }
 
     /**
-     * Returns either a {@link Graph} or a {@link DOMSource}. A {@link Graph} is
+     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
      * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
      * successfully carried out. A {@link DOMSource} is returned if an ASK or a
      * SELECT sparql query was submitted and successfully carried out. The query
@@ -144,15 +143,15 @@ public class SparqlEndpoint {
      * @param queryString
      *            URL encoded sparql query
      * @param defaultGraphUri
-     *            URI of the default graph, an {@link UriRef} is expected
+     *            URI of the default graph, an {@link Iri} is expected
      * @param applyStyleSheet
      * @param serverSide
      * @param styleSheetUri 
-     * @return either a {@link Graph} or a {@link DOMSource}
+     * @return either a {@link ImmutableGraph} or a {@link DOMSource}
      */
     @POST
     public Object runFormQuery(@FormParam("query") String queryString,
-            @FormParam("default-graph-uri") UriRef defaultGraphUri,
+            @FormParam("default-graph-uri") Iri defaultGraphUri,
             @FormParam("apply-style-sheet") String applyStyleSheet,
             @FormParam("server-side") String serverSide,
             @FormParam("style-sheet-uri") String styleSheetUri) {
@@ -170,12 +169,12 @@ public class SparqlEndpoint {
         } else {
             applyServerSide = false;
         }
-        //TripleCollection defaultGraph = null;
+        //Graph defaultGraph = null;
         Object result = null;
         try {
             if (defaultGraphUri == null
                     || defaultGraphUri.getUnicodeString().equals("")) {
-                defaultGraphUri = new UriRef(Constants.CONTENT_GRAPH_URI_STRING);
+                defaultGraphUri = new Iri(Constants.CONTENT_GRAPH_URI_STRING);
                 //defaultGraph = contentGraph;
             } else {
                 //defaultGraph = tcManager.getTriples(defaultGraphUri);
@@ -184,8 +183,8 @@ public class SparqlEndpoint {
             //TODO use ResultSet.getResultVars instead
             Query query = QueryParser.getInstance().parse(queryString);
             result = tcManager.executeSparqlQuery(queryString, defaultGraphUri);
-            if (result instanceof Graph) {
-                return (Graph) result;
+            if (result instanceof ImmutableGraph) {
+                return (ImmutableGraph) result;
             } else if ((result instanceof ResultSet)
                     || (result instanceof Boolean)) {
                 Source source = toXmlSource(result, query, applyStyle,
@@ -199,7 +198,7 @@ public class SparqlEndpoint {
             } else {
                 throw new WebApplicationException(
                         Response.status(Status.BAD_REQUEST).entity("Only " +
-                        "queries yielding to a Graph, a ResultSet or " +
+                        "queries yielding to a ImmutableGraph, a ResultSet or " +
                         "Boolean are supported").build());
             }
         } catch (ParseException e) {
@@ -210,7 +209,7 @@ public class SparqlEndpoint {
     }
 
     /**
-     * Returns either a {@link Graph} or a {@link DOMSource}. A {@link Graph} is
+     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
      * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
      * successfully carried out. A {@link DOMSource} is returned if an ASK or a
      * SELECT sparql query was submitted and successfully carried out. The query
@@ -225,7 +224,7 @@ public class SparqlEndpoint {
      */
     @GET
     public Object runGetQuery(@QueryParam("query") String queryString,
-            @QueryParam("default-graph-uri") UriRef defaultGraphUri,
+            @QueryParam("default-graph-uri") Iri defaultGraphUri,
             @QueryParam("style-sheet-uri") String styleSheetUri,
             @QueryParam("server-side") String serverSide) {
         AccessController.checkPermission(new SparqlEndpointAccessPermission());
@@ -375,7 +374,7 @@ public class SparqlEndpoint {
                 Element bindingElement = doc.createElement("binding");
                 bindingElement.setAttribute("name", key.getName());
                 bindingElement.appendChild(createValueElement(
-                        (Resource) solutionMap.get(key), doc));
+                        (RdfTerm) solutionMap.get(key), doc));
                 result.appendChild(bindingElement);
             }
         }
@@ -383,33 +382,29 @@ public class SparqlEndpoint {
     }
 
     /**
-     * Helper: creates value element from {@link Resource} depending on its
+     * Helper: creates value element from {@link RdfTerm} depending on its
      * class
      * 
      */
-    private Element createValueElement(Resource resource, Document doc) {
+    private Element createValueElement(RdfTerm resource, Document doc) {
         Element value = null;
-        if (resource instanceof UriRef) {
+        if (resource instanceof Iri) {
             value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((UriRef) resource)
+            value.appendChild(doc.createTextNode(((Iri) resource)
                     .getUnicodeString()));
-        } else if (resource instanceof TypedLiteral) {
+        } else if (resource instanceof Literal) {
             value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((TypedLiteral) resource)
+            value.appendChild(doc.createTextNode(((Literal) resource)
                     .getLexicalForm()));
-            value.setAttribute("datatype", (((TypedLiteral) resource)
+            value.setAttribute("datatype", (((Literal) resource)
                     .getDataType().getUnicodeString()));
-        } else if (resource instanceof PlainLiteral) {
-            value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((PlainLiteral) resource)
-                    .getLexicalForm()));
-            Language lang = ((PlainLiteral) resource).getLanguage();
+            Language lang = ((Literal) resource).getLanguage();
             if (lang != null) {
                 value.setAttribute("xml:lang", (lang.toString()));
             }
         } else {
             value = doc.createElement("bnode");
-            value.appendChild(doc.createTextNode(((BNode) resource).toString()));
+            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
         }
         return value;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
index 8a95484..6a71c01 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
@@ -43,14 +43,13 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.jaxrs.utils.form.FormFile;
 import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-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.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.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.serializedform.Parser;
@@ -77,13 +76,13 @@ public class WebAccess {
     final Logger logger = LoggerFactory.getLogger(WebAccess.class);
 
     /**
-     * Gets the TripleCollection with specified name
+     * Gets the Graph with specified name
      *
      * @param name
      * @return
      */
     @GET
-    public TripleCollection getTriples(@QueryParam("name") UriRef name) {
+    public Graph getTriples(@QueryParam("name") Iri name) {
         AccessController.checkPermission(new WebAccessPermission());
         if (name == null) {
             Response r = Response.status(Response.Status.BAD_REQUEST)
@@ -91,7 +90,7 @@ public class WebAccess {
                     .type(MediaType.TEXT_PLAIN_TYPE).build();
             throw new WebApplicationException(r);
         }
-        TripleCollection result = tcManager.getTriples(name);
+        Graph result = tcManager.getGraph(name);
         logger.debug("Got graph of size {} ", result.size());
         int i = 1;
         if (logger.isDebugEnabled()) {
@@ -104,8 +103,8 @@ public class WebAccess {
     }
 
     /**
-     * Puts the triples replacing the triples of the existing MGraph with the
-     * specified name. If the graph doesn't exist creates a new <code>MGraph</code> 
+     * Puts the triples replacing the triples of the existing Graph with the
+     * specified name. If the graph doesn't exist creates a new <code>Graph</code> 
      * with the specified name and puts the triples
      * 
      *
@@ -113,13 +112,13 @@ public class WebAccess {
      * @param triples
      */
     @PUT
-    public void putTriples(@QueryParam("name") UriRef name, TripleCollection triples) {
+    public void putTriples(@QueryParam("name") Iri name, Graph triples) {
         AccessController.checkPermission(new WebAccessPermission());
-        LockableMGraph mGraph;
+        Graph mGraph;
         try {
-            mGraph = tcManager.getMGraph(name);
+            mGraph = tcManager.getGraph(name);
         } catch (NoSuchEntityException e) {
-            mGraph = tcManager.createMGraph(name);
+            mGraph = tcManager.createGraph(name);
         }
         Lock writeLock = mGraph.getLock().writeLock();
         writeLock.lock();
@@ -132,18 +131,18 @@ public class WebAccess {
     }
 
     /**
-     * Posts triples to be placed into an {@link MGraph} of the specified name.
-     * If an {@link MGraph} with this name doesn't already exist, a new one
+     * Posts triples to be placed into an {@link Graph} of the specified name.
+     * If an {@link Graph} with this name doesn't already exist, a new one
      * is created and filled with the triples posted.
      * @param form
      *        a multipart/form-data consisting of:
      *        - a {@link FormFile} labeled "graph" containing the triples and
      *            the mime-type.
-     *        - a text field labeled "name" specifying the name of the MGraph.
+     *        - a text field labeled "name" specifying the name of the Graph.
      *        - an optional text field labeled "mode" specifying the mode.
-     *            If the mode is "replace", existing triples of the MGraph will be
+     *            If the mode is "replace", existing triples of the Graph will be
      *            deleted before new triples are added. If the mode is not
-     *            specified or is "append", posted triples are added to the MGraph.
+     *            specified or is "append", posted triples are added to the Graph.
      *        - an optional text field labeled "redirection" specifying an URI
      *            which the client should be redirected to in case of success.
      * @return
@@ -152,9 +151,9 @@ public class WebAccess {
      *        satisfied, one of the following responses is returned:
      *        - SEE OTHER (303), if redirection is specified.
      *        - CREATED (201), if redirection is not specified and a new
-     *            {@link MGraph} is created.
+     *            {@link Graph} is created.
      *        - NO CONTENT (204), if redirection is not specified and no new
-     *            {@link MGraph} is created.
+     *            {@link Graph} is created.
      */
     @POST
     @Consumes("multipart/form-data")
@@ -193,14 +192,14 @@ public class WebAccess {
             mode = "append";
         }
         InputStream is = new ByteArrayInputStream(graph);
-        Graph parsedGraph = parser.parse(is, mediaType.toString());
-        UriRef graphUri = new UriRef(graphName);
-        LockableMGraph mGraph;
+        ImmutableGraph parsedGraph = parser.parse(is, mediaType.toString());
+        Iri graphUri = new Iri(graphName);
+        Graph mGraph;
         boolean newGraph = false;
         try {
-            mGraph = tcManager.getMGraph(graphUri);
+            mGraph = tcManager.getGraph(graphUri);
         } catch (NoSuchEntityException e) {
-            mGraph = tcManager.createMGraph(graphUri);
+            mGraph = tcManager.createGraph(graphUri);
             newGraph = true;
         }
         Lock writeLock = mGraph.getLock().writeLock();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
index d922d78..8964eda 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
@@ -23,17 +23,17 @@ import java.security.Permission;
 import org.apache.clerezza.permissiondescriptions.PermissionInfo;
 
 /**
- * Permission to use the Graph via Web. Note that the user
+ * Permission to use the ImmutableGraph via Web. Note that the user
  * additionally needs permission to read a graph.
  *
  * @author mir
  */
-@PermissionInfo(value="Graph via Web Access Permission", description="Grants access " +
-    "to the Graph via Web")
+@PermissionInfo(value="ImmutableGraph via Web Access Permission", description="Grants access " +
+    "to the ImmutableGraph via Web")
 public class WebAccessPermission extends Permission{
 
     public WebAccessPermission() {
-        super("Graph via Web access permission");
+        super("ImmutableGraph via Web access permission");
     }
     /**
      *
@@ -41,7 +41,7 @@ public class WebAccessPermission extends Permission{
      * @param action ignored
      */
     public WebAccessPermission(String target, String actions) {
-        super("Graph via Web access permission");
+        super("ImmutableGraph via Web access permission");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java b/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
index 6419460..a43a6a2 100644
--- a/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
+++ b/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
@@ -29,17 +29,16 @@ import java.util.Map;
 import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
-import org.apache.clerezza.rdf.core.Graph;
-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.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.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.TcProvider;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
@@ -48,6 +47,7 @@ import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
 import org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.web.ontologies.BACKUP;
+import org.apache.commons.rdf.Literal;
 import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;
@@ -62,25 +62,25 @@ public class BackupAndRestoreTest {
 
     private static String testGraphFileName = "test.graph";
 
-    private static MGraph testMGraph0 = new SimpleMGraph();
-    private static UriRef testMGraphUri0 = // the URI of testMGraph0
-            new UriRef("http://localhost/test0/"+testGraphFileName);
-    // a resource in testMGraph0
-    private    static UriRef uri0 = new UriRef("http://localhost/test0/testuri");
+    private static Graph testGraph0 = new SimpleGraph();
+    private static Iri testGraphUri0 = // the URI of testGraph0
+            new Iri("http://localhost/test0/"+testGraphFileName);
+    // a resource in testGraph0
+    private    static Iri uri0 = new Iri("http://localhost/test0/testuri");
 
-    private static MGraph testMGraph1 = new SimpleMGraph();
-    private static UriRef testMGraphUri1 = // the URI of testMGraph1
-            new UriRef("http://localhost/test1/"+testGraphFileName);
+    private static Graph testGraph1 = new SimpleGraph();
+    private static Iri testGraphUri1 = // the URI of testGraph1
+            new Iri("http://localhost/test1/"+testGraphFileName);
 
-    // a resource in testMGraph1
-    private    static UriRef uri1 = new UriRef("http://localhost/test1/testuri");
+    // a resource in testGraph1
+    private    static Iri uri1 = new Iri("http://localhost/test1/testuri");
 
-    private static Graph testGraphA;
-    private static UriRef testGraphUriA = // the URI of testGraphA
-            new UriRef("http://localhost/testA/"+testGraphFileName);
+    private static ImmutableGraph testGraphA;
+    private static Iri testGraphUriA = // the URI of testGraphA
+            new Iri("http://localhost/testA/"+testGraphFileName);
 
     // a resource in testGraphA
-    private    static UriRef uriA = new UriRef("http://localhost/testA/testuri");
+    private    static Iri uriA = new Iri("http://localhost/testA/testuri");
     
 
     private static String backupContentFileName = "triplecollections.nt";
@@ -94,24 +94,24 @@ public class BackupAndRestoreTest {
         backup.serializer = Serializer.getInstance();
         backup.serializer.bindSerializingProvider(
                 new JenaSerializerProvider());
-        testMGraph0.add(new TripleImpl(uri0, uri0, uri0));
-        testMGraph1.add(new TripleImpl(uri1, uri1, uri1));
-        MGraph graphBuilder = new SimpleMGraph();
+        testGraph0.add(new TripleImpl(uri0, uri0, uri0));
+        testGraph1.add(new TripleImpl(uri1, uri1, uri1));
+        Graph graphBuilder = new SimpleGraph();
         graphBuilder.add(new TripleImpl(uriA, uriA, uriA));
-        testGraphA = graphBuilder.getGraph();
+        testGraphA = graphBuilder.getImmutableGraph();
     }
 
     @Test
     public void testBackup() throws IOException {
-        //Graph downloadedTestGraphX = null;
-        //Graph downloadedTestGraphY = null;
-        Graph downloadedBackupContentsGraph = null;
+        //ImmutableGraph downloadedTestGraphX = null;
+        //ImmutableGraph downloadedTestGraphY = null;
+        ImmutableGraph downloadedBackupContentsGraph = null;
 
         byte[] download = backup.createBackup();
         ByteArrayInputStream bais = new ByteArrayInputStream(download);
         ZipInputStream compressedTcs = new ZipInputStream(bais);
 
-        Map<String, TripleCollection> extractedTc = new HashMap<String, TripleCollection>();
+        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
         String folder = "";
         ZipEntry entry;
         while ((entry = compressedTcs.getNextEntry()) != null) {
@@ -140,7 +140,7 @@ public class BackupAndRestoreTest {
                     downloadedBackupContentsGraph = parser.parse(serializedGraph,
                             SupportedFormat.N_TRIPLE, null);
                 } else {
-                    Graph deserializedGraph = parser.parse(serializedGraph,
+                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
                             SupportedFormat.N_TRIPLE, null);
                     extractedTc.put(entryName, deserializedGraph);
                 }
@@ -157,13 +157,13 @@ public class BackupAndRestoreTest {
     public void restoreFromBackup() throws IOException {
         byte[] backupData = backup.createBackup();
         TcProvider tcProvider = EasyMock.createMock(TcProvider.class);
-        EasyMock.expect(tcProvider.getMGraph(testMGraphUri0)).andReturn(
-                EasyMock.createNiceMock(MGraph.class));
-        EasyMock.expect(tcProvider.getMGraph(testMGraphUri1)).andReturn(
-                EasyMock.createNiceMock(MGraph.class));
-        tcProvider.deleteTripleCollection(testGraphUriA);
-        EasyMock.expect(tcProvider.createGraph(EasyMock.eq(testGraphUriA),
-                EasyMock.notNull(TripleCollection.class))).andReturn(new SimpleMGraph().getGraph());
+        EasyMock.expect(tcProvider.getGraph(testGraphUri0)).andReturn(
+                EasyMock.createNiceMock(Graph.class));
+        EasyMock.expect(tcProvider.getGraph(testGraphUri1)).andReturn(
+                EasyMock.createNiceMock(Graph.class));
+        tcProvider.deleteGraph(testGraphUriA);
+        EasyMock.expect(tcProvider.createImmutableGraph(EasyMock.eq(testGraphUriA),
+                EasyMock.notNull(Graph.class))).andReturn(new SimpleGraph().getImmutableGraph());
         EasyMock.replay(tcProvider);
         Restorer restore = new Restorer();
         restore.parser = Parser.getInstance();
@@ -171,36 +171,36 @@ public class BackupAndRestoreTest {
         EasyMock.verify(tcProvider);
     }
 
-    private void checkDownloadedGraphs(Map<String, TripleCollection> extractedTc,
-            Graph downloadedBackupContentsGraph, String folder) {
+    private void checkDownloadedGraphs(Map<String, Graph> extractedTc,
+            ImmutableGraph downloadedBackupContentsGraph, String folder) {
         Assert.assertFalse(extractedTc.isEmpty());
         Assert.assertNotNull(downloadedBackupContentsGraph);
 
         Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
-                testMGraphUri0, RDF.type, BACKUP.MGraph)));
+                testGraphUri0, RDF.type, BACKUP.Graph)));
 
         Iterator<Triple> triples = downloadedBackupContentsGraph.filter(
-                testMGraphUri0, BACKUP.file, null);
+                testGraphUri0, BACKUP.file, null);
         Assert.assertTrue(triples.hasNext());
 
-        String fileName0 = ((TypedLiteral) triples.next().getObject()).getLexicalForm();
+        String fileName0 = ((Literal) triples.next().getObject()).getLexicalForm();
         Assert.assertTrue(fileName0.startsWith(folder+testGraphFileName));
 
-        TripleCollection extracted0 = extractedTc.get(fileName0);
+        Graph extracted0 = extractedTc.get(fileName0);
         Assert.assertNotNull(extracted0);
         Assert.assertTrue(extracted0.filter(uri0, uri0, uri0).hasNext());
 
         Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
-                testMGraphUri1, RDF.type, BACKUP.MGraph)));
+                testGraphUri1, RDF.type, BACKUP.Graph)));
 
         triples = downloadedBackupContentsGraph.filter(
-                testMGraphUri1, BACKUP.file, null);
+                testGraphUri1, BACKUP.file, null);
         Assert.assertTrue(triples.hasNext());
 
-        String fileName1 = ((TypedLiteral) triples.next().getObject()).getLexicalForm();
+        String fileName1 = ((Literal) triples.next().getObject()).getLexicalForm();
         Assert.assertTrue(fileName1.startsWith(folder+testGraphFileName));
 
-        TripleCollection extracted1 = extractedTc.get(fileName1);
+        Graph extracted1 = extractedTc.get(fileName1);
         Assert.assertNotNull(extracted1);
 
         Assert.assertTrue(extracted1.filter(uri1, uri1, uri1).hasNext());
@@ -214,9 +214,9 @@ public class BackupAndRestoreTest {
                 testGraphUriA, BACKUP.file, null);
         Assert.assertTrue(triples.hasNext());
 
-        String fileNameA = ((TypedLiteral) triples.next().getObject()).getLexicalForm();
+        String fileNameA = ((Literal) triples.next().getObject()).getLexicalForm();
         Assert.assertTrue(fileNameA.startsWith(folder+testGraphFileName));
-        TripleCollection extractedA = extractedTc.get(fileNameA);
+        Graph extractedA = extractedTc.get(fileNameA);
         Assert.assertNotNull(extractedA);
 
         Assert.assertTrue(extractedA.filter(uriA, uriA, uriA).hasNext());
@@ -225,13 +225,13 @@ public class BackupAndRestoreTest {
 
     private class TestTcManager extends TcManager {
 
-        // Associates testGraphUri0 with testMGraph0 and testGraphUri1 with testGraph1
+        // Associates testGraphUri0 with testGraph0 and testGraphUri1 with testGraph1
         @Override
-        public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
-            if (name.equals(testMGraphUri0)) {
-                return testMGraph0;
-            } else if (name.equals(testMGraphUri1)) {
-                return testMGraph1;
+        public Graph getGraph(Iri name) throws NoSuchEntityException {
+            if (name.equals(testGraphUri0)) {
+                return testGraph0;
+            } else if (name.equals(testGraphUri1)) {
+                return testGraph1;
             } else if (name.equals(testGraphUriA)) {
                 return testGraphA;
             }
@@ -239,10 +239,10 @@ public class BackupAndRestoreTest {
         }
 
         @Override
-        public Set<UriRef> listTripleCollections() {
-            Set<UriRef> result = new HashSet<UriRef>();
-            result.add(testMGraphUri0);
-            result.add(testMGraphUri1);
+        public Set<Iri> listGraphs() {
+            Set<Iri> result = new HashSet<Iri>();
+            result.add(testGraphUri0);
+            result.add(testGraphUri1);
             result.add(testGraphUriA);
             return result;
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.ontologies/pom.xml b/rdf.web/rdf.web.ontologies/pom.xml
index 4585475..1713a43 100644
--- a/rdf.web/rdf.web.ontologies/pom.xml
+++ b/rdf.web/rdf.web.ontologies/pom.xml
@@ -23,8 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>rdf.web</artifactId>
-        <version>0.10</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>rdf.web.ontologies</artifactId>
@@ -36,7 +37,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
     <build>
@@ -58,7 +59,7 @@
                         </goals>
                     </execution>
                 </executions>
-                <version>0.3-incubating</version>
+                <version>1.0.0-SNAPSHOT</version>
         </plugin>
         </plugins>
     </build>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf/jena/parser/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/parser/pom.xml b/rdf/jena/parser/pom.xml
index 90572ad..d682f94 100644
--- a/rdf/jena/parser/pom.xml
+++ b/rdf/jena/parser/pom.xml
@@ -70,7 +70,11 @@
         </dependency>
     </dependencies>
     <build>
-        <plugins>    
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>  
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf/jena/serializer/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/serializer/pom.xml b/rdf/jena/serializer/pom.xml
index 9555624..1de87ce 100644
--- a/rdf/jena/serializer/pom.xml
+++ b/rdf/jena/serializer/pom.xml
@@ -33,6 +33,14 @@
     <version>1.0.0-SNAPSHOT</version>
     <name>Clerezza - RDF - Jena - Serializer</name>
     <description>A SerializingProvider based on jena</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencyManagement>
         <dependencies>
             <dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf/jena/tdb.storage/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/pom.xml b/rdf/jena/tdb.storage/pom.xml
index 11d054d..5fc86ef 100644
--- a/rdf/jena/tdb.storage/pom.xml
+++ b/rdf/jena/tdb.storage/pom.xml
@@ -31,6 +31,14 @@
     <version>1.0.0-SNAPSHOT</version>
     <name>Clerezza - RDF - Jena - TDB Storage Provider</name>
     <description>A Jena TDB based storage provider</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencyManagement>
         <dependencies>
             <dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
index d50ef64..c9733ff 100644
--- a/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
+++ b/rdf/jena/tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
@@ -324,8 +324,8 @@ public class TdbTcProvider implements WeightedTcProvider {
     @Override
     public Set<Iri> listGraphs() {
         Set<Iri> result = new HashSet<Iri>();
-        result.addAll(listGraphs());
-        result.addAll(listGraphs());
+        result.addAll(listMGraphs());
+        result.addAll(listImmutableGraphs());
         return result;
     }
 


[21/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphnodeprovider/LICENSE
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/LICENSE b/platform/graphnodeprovider/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/graphnodeprovider/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphnodeprovider/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/pom.xml b/platform/graphnodeprovider/pom.xml
new file mode 100644
index 0000000..6bdc520
--- /dev/null
+++ b/platform/graphnodeprovider/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <artifactId>platform.graphnodeprovider</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform GraphNodeProvider</name>
+    <description>A service that provided GraphNodes for URIs with as underlying BaseGraph sources considered
+    authoritative for that resource.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.users.core</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>osgi.services</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.clerezza.ext</groupId>
+          <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <sourceDirectory>src/main/scala</sourceDirectory>
+        <testSourceDirectory>src/test/scala</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+                        <Export-Package>${project.groupId}.${project.artifactId}</Export-Package>
+                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-eclipse-plugin</artifactId>
+                <configuration>
+                    <downloadSources>true</downloadSources>
+                    <downloadJavadocs>true</downloadJavadocs>
+                    <buildcommands>
+                        <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
+                    </buildcommands>
+                    <additionalProjectnatures>
+                        <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
+                    </additionalProjectnatures>
+                    <classpathContainers>
+                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
+                        </classpathContainer>
+                        <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER
+                        </classpathContainer>
+                    </classpathContainers>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphnodeprovider/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/graphnodeprovider/src/main/resources/OSGI-INF/serviceComponents.xml
new file mode 100644
index 0000000..7494186
--- /dev/null
+++ b/platform/graphnodeprovider/src/main/resources/OSGI-INF/serviceComponents.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
+
+    <scr:component enabled="true" name="org.apache.clerezza.platform.graphnodeprovider.PlatformGraphNodeProvider">
+        <implementation class="org.apache.clerezza.platform.graphnodeprovider.PlatformGraphNodeProvider"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider"/>
+        </service>
+        <reference name="tcManager" interface="org.apache.clerezza.rdf.core.access.TcManager"
+        cardinality="1..1" policy="static" bind="bindTcManager" unbind="unbindTcManager"/>
+        <reference name="platformConfig" interface="org.apache.clerezza.platform.config.PlatformConfig"
+        cardinality="1..1" policy="static" bind="bindPlatformConfig" unbind="unbindPlatformConfig"/>
+        <reference name="cggProvider" interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider"
+        cardinality="1..1" policy="static" bind="bindCgProvider" unbind="unbindCgProvider"/>
+        <reference name="webIdGraphsService" interface="org.apache.clerezza.platform.users.WebIdGraphsService"
+        cardinality="1..1" policy="static" bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
+        <reference name="userManager" interface="org.apache.clerezza.platform.usermanager.UserManager"
+        cardinality="1..1" policy="static" bind="bindUserManager" unbind="unbindUserManager"/>
+    </scr:component>
+
+</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
new file mode 100644
index 0000000..e1b4630
--- /dev/null
+++ b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
@@ -0,0 +1,245 @@
+package org.apache.clerezza.platform.graphnodeprovider
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.{HttpURLConnection, URL}
+import org.slf4j.scala._
+import org.apache.clerezza.rdf.core.access._
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.platform.config.PlatformConfig
+import org.apache.clerezza.platform.Constants
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
+import org.apache.clerezza.platform.users.WebIdGraphsService
+import org.apache.clerezza.rdf.utils.{UnionMGraph, UriMutatingTripleCollection, GraphNode}
+import java.util.concurrent.locks.Lock
+import org.apache.clerezza.platform.usermanager.UserManager
+import java.security.{PrivilegedAction, AccessController}
+import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider
+
+/**
+ * A service that returns a GraphNode for a specified named resource, the returned GraphNode has
+ * as BaseGraph the ContentGraph provided by the ContentGraphProvider and the for remote uris the
+ * Graphs they dereference to and for local URIs with a path-section starting with /user/{username}/
+ * the local-public-graph of that user.
+ */
+class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
+
+  /**
+   * Get a GraphNode for the specified resource, see class comments for details.
+   */
+  def get(uriRef: UriRef): GraphNode = {
+    val uriString = uriRef.getUnicodeString
+    val isLocal: Boolean = {
+      import scala.collection.JavaConversions._
+      //we assume all non http* uris to be local
+      !uriString.toLowerCase.startsWith("http") || platformConfig.getBaseUris.exists(baseUri => uriString.startsWith(baseUri.getUnicodeString))
+    }
+    get(uriRef, isLocal)
+  }
+
+  /**
+   * Get a GraphNode for the specified resource, The resource is assumed to be local, i.e. the method behaves like
+   * get(UriRef) for a Uri with an authority section contained in the Set retuned by
+   * <code>org.apache.clerezza.platform.config.PlatformConfig#getBaseUris()</code>
+   */
+  def getLocal(uriRef: UriRef): GraphNode = {
+    get(uriRef, true)
+  }
+    
+    
+    /**
+     *return true iff getLocal(uriRef).getNodeContext.size > 0
+     */
+    def existsLocal(uriRef: UriRef): Boolean = {
+        val cgGraph = cgProvider.getContentGraph
+        lazy val localInstanceUri = {
+            val uri = new java.net.URI(uriRef.getUnicodeString)
+      new UriRef(Constants.URN_LOCAL_INSTANCE + uri.getPath)
+    }
+        //TODO handle /user/
+        existsInGraph(uriRef,cgGraph) || existsInGraph(localInstanceUri, cgGraph)
+    }
+  
+    private[this] def existsInGraph(nodeUri: UriRef, tc: LockableMGraph): Boolean = {
+        var readLock: Lock = tc.getLock.readLock
+        readLock.lock
+        try {
+            return tc.filter(nodeUri, null, null).hasNext || tc.filter(null, null, nodeUri).hasNext
+        }
+        finally {
+            readLock.unlock
+        }
+    }
+    
+  
+  private def get(uriRef: UriRef, isLocal: Boolean): GraphNode = {
+    val uriString = uriRef.getUnicodeString
+    
+
+    val uriPath = {
+      val uri = new java.net.URI(uriString)
+      uri.getPath
+    }
+
+    lazy val uriPrefix = {
+      val uri = new java.net.URI(uriString)
+      uri.getScheme+"://"+uri.getAuthority
+    }
+
+    val anyHostUri = new UriRef(Constants.URN_LOCAL_INSTANCE + uriPath)
+
+    var mGraphs: List[TripleCollection] = Nil
+
+    def addToUnion(mGraph: LockableMGraph) {
+      //adding uncondinionately if (existsInGraph(uriRef, mGraph)) {
+      mGraphs ::= mGraph
+      //}
+      if (isLocal) {
+        if (existsInGraph(anyHostUri, mGraph)) {
+          mGraphs ::= new UriMutatingTripleCollection(mGraph, Constants.URN_LOCAL_INSTANCE, uriPrefix)
+        }
+      }
+    }
+
+    val cgGraph = cgProvider.getContentGraph
+
+    addToUnion(cgGraph)
+
+    if (isLocal && (uriPath != null) && uriPath.startsWith("/user/")) {
+      val nextSlash = uriPath.indexOf('/',6)    
+      if (nextSlash != -1) {
+        val userName = uriPath.substring(6, nextSlash)
+        val webIdOption = AccessController.doPrivileged(new PrivilegedAction[Option[UriRef]]() {
+            def run(): Option[UriRef] = {
+              val userNode: GraphNode = userManager.getUserInSystemGraph(userName)
+              if (userNode != null) {
+                userNode.getNode match {
+                  case u: UriRef => Some(u)
+                  case _ => None
+                }
+              } else {
+                None
+              }
+            }
+          }
+        )
+        webIdOption match {
+          case Some(u) => {
+            val webIdInfo = webIdGraphsService.getWebIdInfo(u)
+            addToUnion(webIdInfo.localPublicUserData)
+          }
+          case None => ;
+        }
+      }
+    }
+
+    if (!isLocal) {
+      /**
+       * As the resource might identify something other than a document we use this to find the redirect location
+       */
+      lazy val redirectLocationString = {
+        val acceptHeader = "application/rdf+xml,*/*;q.1"
+        val url = new URL(uriString)
+        val connection = url.openConnection()
+        connection match {
+          case hc : HttpURLConnection => {
+              hc.setRequestMethod("HEAD");
+              hc.setInstanceFollowRedirects(false)
+              hc.addRequestProperty("Accept",  acceptHeader)
+              hc.getResponseCode match {
+                case HttpURLConnection.HTTP_SEE_OTHER  => {
+                    val location = hc.getHeaderField("Location")
+                    if (location == null) {
+                      throw new RuntimeException("No Location Headers in 303 response")
+                    }
+                    location
+                  }
+                case _ => uriString
+              }
+            }
+          case _ => uriString
+        }
+      }
+
+      //TODO add method to WebProxy to get the graph location location
+      val graphUriString = {
+        val hashPos = uriString.indexOf('#')
+        if (hashPos != -1) {
+          uriString.substring(0, hashPos)
+        } else {
+          redirectLocationString
+        }
+      }
+      
+      addToUnion(tcManager.getMGraph(new UriRef(graphUriString)))
+    }
+
+    val unionMGraph = new UnionMGraph(mGraphs:_*);
+    new GraphNode(uriRef, unionMGraph)
+  }
+
+  private var tcManager: TcManager = null;
+
+  protected def bindTcManager(tcManager: TcManager) = {
+    this.tcManager = tcManager
+  }
+
+  protected def unbindTcManager(tcManager: TcManager) = {
+    this.tcManager = null
+  }
+
+  private var platformConfig: PlatformConfig = null;
+
+  protected def bindPlatformConfig(c: PlatformConfig) = {
+    this.platformConfig = c
+  }
+
+  protected def unbindPlatformConfig(c: PlatformConfig) = {
+    this.platformConfig = null
+  }
+
+  private var cgProvider: ContentGraphProvider = null
+  protected def bindCgProvider(p: ContentGraphProvider) {
+    this.cgProvider = p
+  }
+  protected def unbindCgProvider(p: ContentGraphProvider) {
+    this.cgProvider = null
+  }
+
+  private var webIdGraphsService: WebIdGraphsService = null
+  protected def bindWebIdGraphsService(webIdGraphsService: WebIdGraphsService): Unit = {
+    this.webIdGraphsService = webIdGraphsService
+  }
+
+  protected def unbindWebIdGraphsService(webIdGraphsService: WebIdGraphsService): Unit = {
+    this.webIdGraphsService = null
+  }
+
+  private var userManager: UserManager = null
+
+  protected def bindUserManager(userManager: UserManager): Unit = {
+    this.userManager = userManager
+  }
+
+  protected def unbindUserManager(userManager: UserManager): Unit = {
+    this.userManager = null
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphprovider.content/LICENSE
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/LICENSE b/platform/graphprovider.content/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/graphprovider.content/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphprovider.content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/pom.xml b/platform/graphprovider.content/pom.xml
new file mode 100644
index 0000000..75daca2
--- /dev/null
+++ b/platform/graphprovider.content/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.graphprovider.content</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Content-Graph Provider</name>
+    <description>A service that provides the content-graph</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
new file mode 100644
index 0000000..09c1d95
--- /dev/null
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.graphprovider.content;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import org.apache.clerezza.platform.Constants;
+
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+
+/**
+ * A service providing a method to retrieve a <code>UnionGraph</code> containing
+ * the ContentGraph and additional graphs.
+ * 
+ * Over the Configuration Admin Service additional graphs can be added
+ * permanently. With the methods <code>addTemporaryAdditionGraph</code> and
+ * <code>removeTemporaryAdditionGraph</code> graphs can be added temporarily.
+ * Temporarily means that after restarting the org.apache.clerezza.platform.graphprovider.content
+ * bundle, these graphs will no longer be returned in the <code>UnionGraph</code>.
+ * 
+ * @scr.component
+ * @scr.service interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider"
+ * 
+ * @author rbn, mir
+ */
+public class ContentGraphProvider {
+
+
+    /**
+     * Service property header, which contains the URIs of additional
+     * <code>TripleCollection</code>s that are united as read-only to the Graph
+     * returned by <code>getContentGraph</code>
+     * 
+     * @scr.property name="additions" values.name="" description="Contains
+     *               additional TripleCollections that are added to the content
+     *               graph for reading"
+     */
+    public static final String CONTENT_ADDITIONS = "additions";
+
+    /**
+     * @scr.reference
+     */
+    private TcManager tcManager;
+
+
+
+    /**
+     * The URIs of the read-only addition-<code>TripleCollection</code>s
+     */
+    private UriRef[] additions;
+
+    private ReentrantReadWriteLock configLock = new ReentrantReadWriteLock();
+
+    protected void activate(ComponentContext context) {
+        GraphNameTransitioner.renameGraphsWithOldNames(tcManager);
+        try {
+            tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
+        } catch (NoSuchEntityException nsee) {
+            tcManager.createMGraph(Constants.CONTENT_GRAPH_URI);
+        }
+        String[] additionUriStrings = (String[]) context.getProperties().get(
+                CONTENT_ADDITIONS);
+        additions = new UriRef[additionUriStrings.length];
+        for (int i = 0; i < additionUriStrings.length; i++) {
+            additions[i] = new UriRef(additionUriStrings[i]);
+
+        }
+    }
+
+    public LockableMGraph getContentGraph() {
+        configLock.readLock().lock();
+        try {
+            TripleCollection[] united = new TripleCollection[additions.length + 1];
+            int i = 0;
+            united[i++] = tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
+            for (UriRef uriRef : additions) {
+                united[i++] = tcManager.getTriples(uriRef);
+            }
+            return new UnionMGraph(united);
+        } finally {
+            configLock.readLock().unlock();
+        }
+    }
+
+    public void addTemporaryAdditionGraph(UriRef graphName) {
+        configLock.writeLock().lock();
+        try {
+            Set<UriRef> additionsSet = new HashSet<UriRef>(Arrays
+                    .asList(additions));
+            additionsSet.add(graphName);
+            additions = additionsSet.toArray(new UriRef[additionsSet.size()]);
+        } finally {
+            configLock.writeLock().unlock();
+        }
+    }
+
+    public void removeTemporaryAdditionGraph(UriRef graphName) {
+        configLock.writeLock().lock();
+        try {
+            Set<UriRef> additionsSet = new HashSet<UriRef>(Arrays
+                    .asList(additions));
+            additionsSet.remove(graphName);
+            additions = additionsSet.toArray(new UriRef[additionsSet.size()]);
+        } finally {
+            configLock.writeLock().unlock();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
new file mode 100644
index 0000000..80b904c
--- /dev/null
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.graphprovider.content;
+
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * A utility class to rename used in snapshot versions to the naming in the first released version
+ *
+ * @author reto
+ */
+public class GraphNameTransitioner {
+
+    private final static Logger logger = LoggerFactory.getLogger(GraphNameTransitioner.class);
+
+    /**
+     * a hack to prevent double execution on the same start up process
+     */
+    private static boolean alreadyExecuted = false;
+
+    synchronized static public void renameGraphsWithOldNames(TcManager tcManager) {
+        if (alreadyExecuted) {
+            return;
+        } else {
+            alreadyExecuted = true;
+        }
+
+        /*try {
+            //just to see that nothing bad happens
+            Thread.sleep(20*1000);
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+        }*/
+
+        final String OLD_SYSTEM_GRAPH_URI_STRING =
+                "http://tpf.localhost/system.graph";
+        final UriRef OLD_SYSTEM_GRAPH_URI =
+                new UriRef(OLD_SYSTEM_GRAPH_URI_STRING);
+
+        final String OLD_CONFIG_GRAPH_URI_STRING =
+                "http://tpf.localhost/config.graph";
+        final UriRef OLD_CONFIG_GRAPH_URI =
+                new UriRef(OLD_CONFIG_GRAPH_URI_STRING);
+
+        final String OLD_CONTENT_GRAPH_URI_STRING =
+                "http://tpf.localhost/content.graph";
+        final UriRef OLD_CONTENT_GRAPH_URI =
+                new UriRef(OLD_CONTENT_GRAPH_URI_STRING);
+
+        renameGraphs(tcManager, OLD_SYSTEM_GRAPH_URI, Constants.SYSTEM_GRAPH_URI);
+        renameGraphs(tcManager, OLD_CONFIG_GRAPH_URI, Constants.CONFIG_GRAPH_URI);
+        renameGraphs(tcManager, OLD_CONTENT_GRAPH_URI, Constants.CONTENT_GRAPH_URI);
+        renameGraphs(tcManager, new UriRef("http://zz.localhost/graph-access.graph"),
+                new UriRef(Constants.URN_LOCAL_INSTANCE+"/graph-access.graph"));
+
+    }
+
+    private static void renameGraphs(TcManager tcManager, UriRef oldGraphUri, UriRef graphUri) {
+        try {
+            MGraph oldMGraph = tcManager.getMGraph(oldGraphUri);
+            MGraph newMGraph = tcManager.createMGraph(graphUri);
+            logger.info("renaming "+oldGraphUri+" to "+graphUri);
+            newMGraph.addAll(oldMGraph);
+            tcManager.deleteTripleCollection(oldGraphUri);
+        } catch (NoSuchEntityException ex) {
+        } catch (EntityAlreadyExistsException ex) {
+            logger.warn("could not rename " + oldGraphUri + " to " + 
+                    graphUri + " because target graph already exists", ex);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
new file mode 100644
index 0000000..9c6c85e
--- /dev/null
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.graphprovider.content;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider;
+import org.apache.clerezza.permissiondescriptions.PermissionDescripton;
+import org.apache.clerezza.rdf.core.access.security.TcPermission;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+/**
+ * <code>PermissionDescriptionsProvider</code> implementation that provides
+ * <code>PermissionDescripton</code>s of the <code>TcPermission</code>s used to
+ * access the content graph.
+ *
+ * @author mir
+ */
+@Component
+@Service(PermissionDescriptionsProvider.class)
+public class TcPermissionDescriptionsProvider implements PermissionDescriptionsProvider {
+
+    private static final Set<PermissionDescripton> GRAPH_ACCESS_PERMISSION_DESCRIPTIONS =
+            new HashSet<PermissionDescripton>();
+    static {
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content Graph Read Permission",
+                "Grants permission to the user to read the content graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/content.graph\" \"read\")"));
+
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content Graph Read/Write Permission",
+                "Grants permission to the user to read and write the content graph", null, TcPermission.class,
+                "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/content.graph\" \"readwrite\")"));
+
+    }
+
+    @Override
+    public Set<PermissionDescripton> getPermissionDescriptors() {
+        return GRAPH_ACCESS_PERMISSION_DESCRIPTIONS;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/LICENSE
----------------------------------------------------------------------
diff --git a/platform/language/LICENSE b/platform/language/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/language/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/LICENSE b/platform/language/platform.language.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/language/platform.language.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/pom.xml b/platform/language/platform.language.core/pom.xml
new file mode 100644
index 0000000..b1733f9
--- /dev/null
+++ b/platform/language/platform.language.core/pom.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>platform.language</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.3</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.language.core</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Language Core</name>
+    <description>This bundles provides methods to manage languages in the Clerezza platform
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.language.ontologies</artifactId>
+            <version>0.3</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file


[40/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..a92ff01
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
@@ -0,0 +1,556 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.core.Response.Status;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.platform.content.WebDavUtils.PropertyMap;
+import org.apache.clerezza.platform.content.collections.CollectionCreator;
+import org.apache.clerezza.platform.content.webdav.MKCOL;
+import org.apache.clerezza.platform.content.webdav.MOVE;
+import org.apache.clerezza.platform.content.webdav.PROPFIND;
+import org.apache.clerezza.platform.content.webdav.PROPPATCH;
+
+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.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.felix.scr.annotations.Services;
+import org.slf4j.Logger;
+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.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.web.fileserver.util.MediaTypeGuesser;
+import org.osgi.service.component.ComponentContext;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This Class allows getting and putting content structured using the
+ * Discobits ontology.
+ *
+ * Is an implementation of DiscobitsHandler and additionally registers as
+ * TypeHanlder to allow HTTP GET and PUT.
+ *
+ * @author reto, tho, agron, mir
+ */
+@Component(metatype=true)
+@Service({
+    Object.class,
+    DiscobitsHandler.class
+})
+@Property(name="org.apache.clerezza.platform.typehandler", boolValue=true)
+@Reference(name="metaDataGenerator",
+    policy=ReferencePolicy.DYNAMIC,
+    cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
+    referenceInterface=MetaDataGenerator.class
+)
+@SupportedTypes(types = { "http://www.w3.org/2000/01/rdf-schema#Resource" }, prioritize = false)
+public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
+        implements DiscobitsHandler {
+@Property(value="600", label="Max-Age", description="Specifies the value of the max-age field"
+        + "set in the cache-control header of InfoDiscoBit-Responses, as per RFC 2616 this is a number of "
+        + "seconds")
+    public static final String MAX_AGE = "max-age";
+
+    @Reference
+    protected ContentGraphProvider cgProvider;
+
+    @Reference
+    PageNotFoundService notFoundPageService;
+
+    @Reference
+    GraphNodeProvider graphNodeProvider;
+
+    private static final Logger logger = LoggerFactory.getLogger(DiscobitsTypeHandler.class);
+
+    private final Set<MetaDataGenerator> metaDataGenerators =
+            Collections.synchronizedSet(new HashSet<MetaDataGenerator>());
+
+    private String cacheControlHeaderValue;
+
+    protected void activate(ComponentContext context) {
+        cacheControlHeaderValue = "max-age="+(String) context.getProperties().get(MAX_AGE);
+    }
+
+    /**
+     * TypeHandle method for rdf types "TitledContext", "InfoDiscoBit",
+     * "OrderedContent" and "XHTMLInfoDiscoBit".
+     * 
+     * @param uriInfo
+     * @return
+     */
+    @GET
+    @Produces({"*/*"})
+    public Object getResource(@Context UriInfo uriInfo) {
+        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
+            final GraphNode graphNode = getResourceAsGraphNode(uriInfo);
+        if (graphNode == null) {
+            return resourceUnavailable(uri, uriInfo);
+        }
+        InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(graphNode);
+        if (infoDiscobit != null) {
+            Response response = Response.ok().
+                    header(HttpHeaders.CACHE_CONTROL, cacheControlHeaderValue).
+                    entity(infoDiscobit).
+                    build();
+            return response;
+        } else {
+            return graphNode;
+        }
+    }
+
+    private GraphNode getResourceAsGraphNode(UriInfo uriInfo) {
+        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
+        GraphNode result = graphNodeProvider.getLocal(uri);
+        //could chck if nodeContext > 0, but this would be less efficient
+        TripleCollection tc = result.getGraph();
+        if (tc.filter(uri, null, null).hasNext()) {
+            return result;
+        }
+        if (tc.filter(null, null, uri).hasNext()) {
+            return result;
+        }
+        return null;
+    }
+
+
+    
+    /**
+     * Creates an <code>InfoDiscoBit</code> at the specified location
+     *
+     * @param uriInfo the uri of the InforDiscoBit to be created
+     * @param data the content of the upload
+     */
+    @PUT
+    public Response putInfoDiscobit(@Context UriInfo uriInfo, @Context HttpHeaders headers, byte[] data) {
+        final String contentType;
+        {
+            final List<String> contentTypeHeaders = headers.getRequestHeader(HttpHeaders.CONTENT_TYPE);
+            if (contentTypeHeaders == null) {
+                logger.warn("Content-Type not specified");
+                final MediaType guessTypeForName = MediaTypeGuesser.getInstance().
+                        guessTypeForName(uriInfo.getAbsolutePath().toString());
+                contentType = guessTypeForName == null ?
+                    MediaType.APPLICATION_OCTET_STREAM : guessTypeForName.toString();
+            } else {
+                contentType = contentTypeHeaders.get(0);
+            }
+            
+        }    
+        final UriRef infoDiscoBitUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        put(infoDiscoBitUri, MediaType.valueOf(contentType), data);
+        return Response.status(Status.CREATED).build();
+    }
+
+    /**
+     * Creates a new collection at the specified uri
+     *
+     * @param uriInfo
+     * @return
+     * <ul>
+     *    <li>201 "Created" response if method succeeded
+     *    <li>405 "Method Not Allowed" response if collection already exists
+     * </ul>
+     */
+    @MKCOL
+    public Object mkcol(@Context UriInfo uriInfo) {
+        String uriString = uriInfo.getAbsolutePath().toString();
+        if (uriString.charAt(uriString.length()-1) != '/') {
+            uriString += '/';
+        }
+        UriRef nodeUri = new UriRef(uriString);
+        final MGraph mGraph = cgProvider.getContentGraph();
+        Triple typeTriple = new TripleImpl(nodeUri, RDF.type, HIERARCHY.Collection);
+        if (mGraph.contains(typeTriple)) {
+            return Response.status(405) // Method Not Allowed
+                    .entity("Collection \"" + nodeUri.getUnicodeString()
+                    + "\" already exists.").build();
+        }
+        new CollectionCreator(mGraph).createContainingCollections(nodeUri);
+        return Response.created(uriInfo.getAbsolutePath()).build();
+    }
+
+    /**
+     * Finds all properties of a hierarchy node and returns them in a
+     * {@link DOMSource}
+     *
+     * @param uriInfo
+     * @param headers {@link HttpHeaders}
+     * @param body {@link DOMSource} containing the requested properties, can be null
+     * @return
+     * <ul>
+     *    <li>207 "Multistatus" response if method succeeded
+     *    <li>404 "Not Found" response if the hierarchy node was not found
+     *    <li>400 "Bad Request" response if the body is malformed
+     * </ul>
+     */
+    @PROPFIND
+    @Consumes({"application/xml", "text/xml", "*/*"})
+    @Produces({"application/xml", "text/xml", "*/*"})
+    public Response propfind(@Context UriInfo uriInfo,
+            @Context HttpHeaders headers, DOMSource body) {
+        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        if (!nodeAtUriExists(nodeUri)) {
+            return resourceUnavailable(nodeUri, uriInfo);
+        }
+            Map<UriRef, PropertyMap> result;
+        try {
+            String depthHeader = WebDavUtils.getHeaderAsString(headers, "Depth");
+            if (depthHeader == null) {
+                depthHeader = WebDavUtils.infinite;
+            }
+            final MGraph mGraph = cgProvider.getContentGraph();
+            GraphNode node = new GraphNode(nodeUri, mGraph);
+            if (body != null) {
+                Document requestDoc = WebDavUtils.sourceToDocument(body);
+                Node propfindNode = WebDavUtils.getNode(requestDoc, WebDavUtils.propfind);
+                Node requestNode = WebDavUtils.getFirstChild(propfindNode);
+                String requestType = requestNode.getLocalName();
+                if (requestType.equalsIgnoreCase(WebDavUtils.allprop)) {
+                    result = getAllProps(node, depthHeader);
+                } else if (requestType.equalsIgnoreCase(WebDavUtils.prop)) {
+                    result = getPropsByName(requestNode, node, depthHeader);
+                } else if (requestType.equalsIgnoreCase(WebDavUtils.propname)) {
+                    result = getPropNames(node, depthHeader);
+                } else {
+                    return Response.status(Status.BAD_REQUEST).build();
+                }
+            } else {
+                // returns all properties
+                result = getAllProps(node, depthHeader);
+            }
+            Document responseDoc = WebDavUtils.createResponseDoc(result);
+            return Response.status(207).entity(new DOMSource(responseDoc)).type(
+                    MediaType.APPLICATION_XML_TYPE).build();
+        } catch (TransformerFactoryConfigurationError e) {
+            return Response.status(Status.BAD_REQUEST).build();
+        } catch (TransformerException e) {
+            return Response.status(Status.BAD_REQUEST).build();
+        } catch (ParserConfigurationException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    Map<UriRef, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
+        Map<UriRef, PropertyMap> result = new HashMap<UriRef, PropertyMap>();
+        WebDavUtils.addNodeProperties(result, null, null, node, false);
+        return result;
+    }
+
+    Map<UriRef, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
+            String depthHeader) {
+        Map<UriRef, 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>();
+        WebDavUtils.addNodeProperties(result, null, null, node, true);
+        return result;
+    }
+
+    /**
+     * @param uriInfo
+     * @param body {@link DOMSource} containing properties which should be set
+     * or deleted
+     * @return
+     * <ul>
+     *    <li>207 "Multistatus" response if method succeeded
+     *    <li>404 "Not Found" response if the hierarchy node was not found
+     *    <li>400 "Bad Request" response if the body is malformed
+     * </ul>
+     */
+    @PROPPATCH
+    @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());
+        if (!nodeAtUriExists(nodeUri)) {
+            return resourceUnavailable(nodeUri, uriInfo);
+        }
+        try {
+            Document requestDoc = WebDavUtils.sourceToDocument(body);
+            final MGraph mGraph = cgProvider.getContentGraph();
+            GraphNode node = new GraphNode(nodeUri, mGraph);
+            NodeList propsToSet = null;
+            NodeList propsToRemove = null;
+            Node proppatchNode = WebDavUtils.getNode(requestDoc, WebDavUtils.proppatch);
+            NodeList childNodes = proppatchNode.getChildNodes();
+            for (int i = 0; i < childNodes.getLength(); i++) {
+                Node child = childNodes.item(i);
+                String localName = child.getLocalName();
+                if (localName != null) {
+                    if (localName.equals(WebDavUtils.set)) {
+                        propsToSet = child.getFirstChild().getChildNodes();
+                    } else if (localName.equals(WebDavUtils.remove)) {
+                        propsToRemove = child.getFirstChild().getChildNodes();
+                    }
+                }
+            }
+            Document responseDoc = WebDavUtils.modifyProperties(node, propsToSet, propsToRemove);
+            return Response.status(207).entity(new DOMSource(responseDoc)).type(
+                    MediaType.APPLICATION_XML_TYPE).build();
+        } catch (ParserConfigurationException ex) {
+            throw new RuntimeException(ex);
+        } catch (TransformerFactoryConfigurationError ex) {
+            return Response.status(Status.BAD_REQUEST).build();
+        } catch (TransformerException ex) {
+            return Response.status(Status.BAD_REQUEST).build();
+        } 
+    }
+
+    /**
+     * Moves or renames a hierarchy node
+     *
+     * @param uriInfo
+     * @param headers
+     * @return
+     * <ul>
+     *  <li>201 "Created" response if method succeeded
+     *  <li>412 "Precondition Failed" response if the destination URL is already
+     *    mapped to a resource
+     *  <li>404 "Not Found" response if the hierarchy node was not found
+     *  <li>403 "Forbidden" response if the source and destination resources are the same
+     *  <li>400 "Bad Request" if no "Destination" header was found
+     * </ul>
+     */
+    @MOVE
+    public Response move(@Context UriInfo uriInfo, @Context HttpHeaders headers) {
+        UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        final LockableMGraph mGraph = cgProvider.getContentGraph();
+        GraphNode node = new GraphNode(nodeUri, mGraph);
+        String targetString = WebDavUtils.getHeaderAsString(headers,
+                    "Destination");
+        UriRef targetUri = new UriRef(targetString);
+        String overwriteHeader = WebDavUtils.getHeaderAsString(headers, "Overwrite");
+        boolean overwriteTarget = "T".equalsIgnoreCase(overwriteHeader);
+        if (nodeAtUriExists(targetUri)) {
+            if (overwriteTarget) {
+                new GraphNode(targetUri, mGraph).deleteNodeContext();
+            } else {
+                return Response.status(Status.PRECONDITION_FAILED).build();
+            }
+        }
+        Lock l = mGraph.getLock().writeLock();
+        l.lock();
+        try {
+            Iterator<Triple> oldParentTripleIter
+                    = mGraph.filter(nodeUri, HIERARCHY.parent, null);
+            if (oldParentTripleIter.hasNext()) {
+                oldParentTripleIter.next();
+                oldParentTripleIter.remove();
+            }
+            while (oldParentTripleIter.hasNext()) {
+                logger.error("more than one parent statement: "+oldParentTripleIter.next());
+                oldParentTripleIter.remove();
+            }
+            Lock writeLock = node.writeLock();
+            writeLock.lock();
+            try {
+                node.replaceWith(targetUri);
+            } finally {
+                writeLock.unlock();
+            }
+            new CollectionCreator(mGraph).createContainingCollections(targetUri);
+            try {
+                return Response.created(new java.net.URI(targetUri.getUnicodeString())).build();
+            } catch (URISyntaxException ex) {
+                throw new IllegalArgumentException(ex);
+            }
+        } finally {
+            l.unlock();
+        }
+    }
+
+    /**
+     * Deletes a hierarchy node
+     *
+     * @param uriInfo
+     * @return
+     * <ul>
+     *    <li>200 "OK" response if method succeeded
+     *    <li>404 "Not Found" response if the hierarchy node was not found
+     * </ul>
+     */
+    @DELETE
+    public Response delete(@Context UriInfo uriInfo) {
+        UriRef nodeUri = new UriRef(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();
+        GraphNode node = new GraphNode(nodeUri, mGraph);
+        node.deleteNodeContext();
+        return Response.ok().build();
+    }
+
+    /**
+     * @param uriInfo
+     * @return
+     * <ul>
+     *    <li>200 "OK" response with an "Allow" and a "DAV" header. The "Allow"
+     * header contains all the possible HTTP methods that can be executed on the
+     * resource and the "DAV" header shows if the resource is WebDAV enabled
+     *    <li>404 "Not Found" response if the resource was not found
+     * </ul>
+     */
+    @OPTIONS
+    public Response options(@Context UriInfo uriInfo) {
+        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
+        if (!nodeAtUriExists(nodeUri)) {
+            return resourceUnavailable(nodeUri, uriInfo);
+        }
+            Response.ResponseBuilder builder = Response.ok();
+            builder.header("Dav", "1");
+            Set<String> allow = new HashSet<String>();
+            Method[] methods = this.getClass().getMethods();
+            for (Method method : methods) {
+                for (Annotation annotation : method.getAnnotations()) {
+                    HttpMethod httpMethod = annotation.annotationType().getAnnotation(HttpMethod.class);
+                    if (httpMethod != null) {
+                        allow.add(httpMethod.value());
+                    }
+                }
+            }
+            if (allow.isEmpty()) {
+                builder.header("Allow", "");
+            } else {
+                final Iterator<String> iterator = allow.iterator();
+                final StringBuffer buffer = new StringBuffer(iterator.next());
+                while (iterator.hasNext()) {
+                    buffer.append(", ");
+                    buffer.append(iterator.next());
+                }
+                builder.header("Allow", buffer.toString());
+            }
+        return builder.build();
+    }
+
+    protected void bindMetaDataGenerator(MetaDataGenerator generator) {
+        metaDataGenerators.add(generator);
+    }
+
+    protected void unbindMetaDataGenerator(MetaDataGenerator generator) {
+        metaDataGenerators.remove(generator);
+    }
+
+    @Override
+    protected MGraph getMGraph() {
+        return cgProvider.getContentGraph();
+    }
+
+    @Override
+    protected Set<MetaDataGenerator> getMetaDataGenerators() {
+        return metaDataGenerators;
+    }
+
+    
+
+    private boolean nodeAtUriExists(UriRef nodeUri) {
+        LockableMGraph mGraph = (LockableMGraph) getMGraph();
+        Lock readLock = mGraph.getLock().readLock();
+        readLock.lock();
+        try {
+            return mGraph.filter(nodeUri, null, null).hasNext()
+                    || mGraph.filter(null, null, nodeUri).hasNext();
+        } finally {
+            readLock.unlock();
+        }
+    }
+
+    private Response resourceUnavailable(UriRef nodeUri,
+            UriInfo uriInfo) {
+        UriRef oppositUri = makeOppositeUriRef(nodeUri);
+        if (nodeAtUriExists(oppositUri)) {
+            return RedirectUtil.createSeeOtherResponse(
+                    oppositUri.getUnicodeString(), uriInfo);
+        } else {
+            return notFoundPageService.createResponse(uriInfo);
+        }
+        //return Response.status(Status.NOT_FOUND).build();
+    }
+    /**
+     * add trailing slash if none present, remove otherwise
+     *
+     * @param uri
+     * @return
+     */
+    private static UriRef makeOppositeUriRef(UriRef uri) {
+        String uriString = uri.getUnicodeString();
+        if (uriString.endsWith("/")) {
+            return new UriRef(uriString.substring(0, uriString.length() - 1));
+        } else {
+            return new UriRef(uriString + "/");
+        }
+    }
+
+    private UriRef createAnyHostUri(UriInfo uriInfo) {
+        return new UriRef(Constants.ALL_HOSTS_URI_PREFIX+uriInfo.getPath());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..5e7940d
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/Editor.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.net.URL;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+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.osgi.framework.Bundle;
+import org.osgi.service.component.ComponentContext;
+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;
+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.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.web.fileserver.BundlePathNode;
+import org.apache.clerezza.web.fileserver.FileServer;
+import org.wymiwyg.commons.util.dirbrowser.PathNode;
+
+/**
+ * This Jax-rs root resource provides an ajax edito ro edit content structured
+ * using the Discobits ontology
+ *
+ * @author rbn
+ *
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("tools/editor")
+public class Editor extends FileServer {
+
+    @Reference
+    private ContentGraphProvider cgProvider;
+
+    @Reference
+    private TcManager tcManager;
+    
+    @Reference
+    private Serializer serializer;
+
+    
+    private static final Logger logger = LoggerFactory.getLogger(Editor.class);
+
+    private Providers providers;
+    private final String rdfXml = "application/rdf+xml";
+    
+    
+    
+    /**
+     * On activation the {@link FileServer} is prepared
+     *
+     * @param context
+     */
+    protected void activate(ComponentContext context) {
+        configure(context.getBundleContext());
+    }
+
+    
+    /**
+     * The providers are injected by the Jax-rs implementation and used to
+     * locate readers for the RDF content of the body
+     *
+     * @param providers
+     */
+    @Context
+    public void setProviders(Providers providers) {
+        this.providers = providers;
+    }
+
+
+    @GET
+    @Path("get")
+    public GraphNode getDiscobit(@QueryParam("resource") UriRef uri,
+            @QueryParam("graph") UriRef graphUri) {
+        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
+            tcManager.getMGraph(graphUri);
+        return new GraphNode(uri, mGraph);
+    }
+
+    /**
+     * replaces the subgraph serialized with RDF/XML in <code>revokedString
+     * </code> with the one from <code>assertedString</code>.
+     *
+     * @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
+     */
+    @POST
+    @Path("post")
+    public void postDiscobit(@QueryParam("graph") UriRef graphUri,
+            @FormParam("assert") String assertedString,
+            @FormParam("revoke") String revokedString,
+            @FormParam("rdfFormat") String rdfFormat) {
+        if (rdfFormat == null) {
+            rdfFormat = rdfXml;
+        }
+        MediaType mediaType = MediaType.valueOf(rdfFormat);
+        MessageBodyReader<Graph> graphReader = providers.getMessageBodyReader(Graph.class, Graph.class, null,mediaType);
+        final Graph assertedGraph;
+        final Graph 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()));
+        } catch (IOException ex) {
+            logger.error("reading graph {}", ex);
+            throw new WebApplicationException(ex, 500);
+        }
+        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
+            tcManager.getMGraph(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);
+        } catch (NoSuchSubGraphException ex) {
+            throw new RuntimeException(ex);
+        }
+        mGraph.addAll(assertedGraph);
+    }
+
+    @GET
+    //this is to work around
+    @Produces(MediaType.APPLICATION_OCTET_STREAM)
+    public PathNode getStaticFile(@Context UriInfo uriInfo) {
+        TrailingSlash.enforcePresent(uriInfo);
+        final PathNode node = getNode("disco.xhtml");
+        logger.debug("serving static {}", node);
+        return node;
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..8693216
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+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.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;
+import org.apache.clerezza.rdf.ontologies.RDF;
+
+/**
+ * Represents an InfoDiscoBit
+ *
+ * @author reto
+ */
+public class InfoDiscobit {
+
+    private GraphNode infoBit;
+
+
+    /**
+     *
+     * @param infoBit
+     * @return an instance of InfoDiscobit or null if node is not an InfoDiscoBit
+     */
+    public static InfoDiscobit createInstance(GraphNode node) {
+        Lock l = node.readLock();
+        l.lock();
+        try {
+            Iterator<Resource> types = node.getObjects(RDF.type);
+            while(types.hasNext()) {
+                if (types.next().equals(DISCOBITS.InfoDiscoBit)){
+                    return new InfoDiscobit(node);
+                }
+            }
+            return null;
+        } finally {
+            l.unlock();
+        }
+    }
+
+    InfoDiscobit(GraphNode infoBit) {
+        this.infoBit = infoBit;
+    }
+
+    public String getContentType() {
+        Lock readLock = infoBit.readLock();
+        readLock.lock();
+        try {
+            Iterator<Literal> mediaTypeLits = infoBit.getLiterals(DISCOBITS.mediaType);
+            if (mediaTypeLits.hasNext()) {
+                return mediaTypeLits.next().getLexicalForm();
+            } else {
+                throw new RuntimeException("InfoDiscobit has no media type property");
+            }
+        } finally {
+            readLock.unlock();
+        }
+    }
+    
+    public byte[] getData() {
+        byte[] result;
+        Lock readLock = infoBit.readLock();
+        readLock.lock();
+        try {
+            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);
+                }
+            } else {
+                throw new RuntimeException("InfoDiscobit has not infoBit property");
+            }
+        } finally {
+            readLock.unlock();
+        }        
+        return result;    
+    };
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
new file mode 100644
index 0000000..e3a2aa4
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+
+
+/**
+ * 
+ * @scr.component
+ * @scr.service interface="java.lang.Object"
+ * @scr.property name="javax.ws.rs" type="Boolean" value="true"
+ *
+ * @author reto
+ */
+@Provider
+@Produces("*/*")
+public class InfoDiscobitWriter implements MessageBodyWriter<InfoDiscobit> {
+
+    @Override
+    public boolean isWriteable(Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return InfoDiscobit.class.isAssignableFrom(type);
+    }
+
+    @Override
+    public long getSize(InfoDiscobit t, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return t.getData().length;
+    }
+
+    @Override
+    public void writeTo(InfoDiscobit t, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType,
+            MultivaluedMap<String, Object> httpHeaders,
+            OutputStream entityStream) throws IOException,
+            WebApplicationException {
+        httpHeaders.putSingle(HttpHeaders.CONTENT_TYPE, t.getContentType());
+        entityStream.write(t.getData());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..ccce889
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
@@ -0,0 +1,40 @@
+/*
+ *  Copyright 2010 reto.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+
+package org.apache.clerezza.platform.content;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+/**
+ * An instance of this service is called by DiscoBitHandler if a resource
+ * is not found in the content graph.
+ *
+ * @author reto
+ */
+public interface PageNotFoundService {
+
+    /**
+     * Creates a response when a resource could not be found in the Content 
+     * Graph, this is a 404 response.
+     * 
+     * @param uriInfo
+     * @return
+     */
+    public Response createResponse(UriInfo uriInfo);
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..69171ff
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import java.util.Set;
+import org.apache.clerezza.rdf.core.MGraph;
+
+/**
+ *
+ * @author reto
+ */
+class SimpleDiscobitsHandler extends AbstractDiscobitsHandler {
+    
+    private final MGraph mGraph;
+
+    public SimpleDiscobitsHandler(MGraph mGraph) {
+        this.mGraph = mGraph;
+    }
+
+    @Override
+    protected MGraph getMGraph() {
+        return mGraph;
+    }
+
+    @Override
+    protected Set<MetaDataGenerator> getMetaDataGenerators() {
+        return null;
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/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
new file mode 100644
index 0000000..094e773
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+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.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * A renderlet for rendering TitledContent. The contained elements are rendered
+ * calling back to the specified <code>Renderer</code>.
+ *
+ * This renderlet uses a thread-local variable to set the appropriate heading
+ * level (h1 - h6)
+ *
+ * @author rbn, mir
+ *
+ * @scr.component
+ * @scr.service interface="org.apache.clerezza.platform.typerendering.Renderlet"
+ */
+public class TitledContentRenderlet implements Renderlet {
+
+    private static ThreadLocal<Integer> headingLevel  = new ThreadLocal<Integer>() {
+
+        @Override
+        protected Integer initialValue() {
+            return 1;
+        }
+
+    };
+    @Override
+    public void render(GraphNode res, GraphNode context, Map<String, Object> sharedRenderingValues,
+            CallbackRenderer callbackRenderer,
+            URI renderingSpecification,
+            String mode,
+            MediaType mediaType, RequestProperties requestProperties,
+            OutputStream os) throws IOException {
+        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";
+            writer.print(nodeLabel+": titled and/or content could not be found");
+            writer.flush();
+            return;
+        }
+        writer.print(getHeaderOpen());
+        writer.flush();
+        callbackRenderer.render(
+                containedNodes.get(0),
+                context, mode, os);
+        writer.println(getHeaderClose());
+        headingLevel.set(headingLevel.get()+1);
+        writer.print("<div class='tx-content'>");
+        writer.flush();
+        callbackRenderer.render(
+                containedNodes.get(1),
+                context, mode, os);
+        headingLevel.set(headingLevel.get()-1);
+        writer.println("</div>");
+        writer.flush();
+    }
+
+
+    private List<GraphNode> getContainedNodes(GraphNode titledContent) {
+        final SortedSet<GraphNode> entries = new TreeSet<GraphNode>(new Comparator<GraphNode>() {
+
+            @Override
+            public int compare(GraphNode o1, GraphNode o2) {
+                    int pos1 = getPos(o1);
+                    int pos2 = getPos(o2);
+                    return pos1 - pos2;
+            }
+            private int getPos(GraphNode o) {
+                try {
+                    return Integer.parseInt(o.getLiterals(DISCOBITS.pos).next().getLexicalForm());
+                } catch (NullPointerException e) {
+                    return -1;
+                }
+            }
+
+        });
+        final Iterator<Resource> entriesIter = titledContent.getObjects(DISCOBITS.contains);
+        while (entriesIter.hasNext()) {
+            Resource resource = entriesIter.next();
+            entries.add(new GraphNode((NonLiteral) resource,titledContent.getGraph()));
+        }
+        final List<GraphNode> result = new ArrayList<GraphNode>();
+        for (GraphNode graphNode : entries) {
+            Iterator<Resource> holded = graphNode.getObjects(DISCOBITS.holds);
+            if (!holded.hasNext()) {
+                throw new RuntimeException(
+                        "Titled Content must contain a first element: "+graphNode.getNodeContext());
+            }
+            result.add(new GraphNode(holded.next(),
+                    titledContent.getGraph()));
+        }
+        return result;
+    }
+
+    private String getHeaderOpen() {
+        final Integer level = headingLevel.get();
+        return level < 7 ? "<h"+level+">" : "<div class = \"heading\">";
+    }
+
+    private String getHeaderClose() {
+        final Integer level = headingLevel.get();
+        return level < 7 ? "</h"+level+">" : "</div>";
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
new file mode 100644
index 0000000..aea5190
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
@@ -0,0 +1,703 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.content;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMResult;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+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.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.DCTERMS;
+import org.apache.clerezza.rdf.ontologies.HIERARCHY;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ *
+ * @author agron
+ */
+class WebDavUtils {
+
+    static final String infinite = "infinite";
+    static final String prop = "prop";
+    static final String allprop = "allprop";
+    static final String propname = "propname";
+    static final String propfind = "propfind";
+    static final String proppatch = "propertyupdate";
+    static final String set = "set";
+    static final String remove = "remove";
+    private static final String davUri = "DAV:";
+    private static final String multistat = "multistatus";
+    private static final String response = "response";
+    private static final String href = "href";
+    private static final String propstat = "propstat";
+    private static final String status = "status";
+
+    //WebDAV properties
+    private static final String creationdate = "creationdate";
+    private static final String displayname = "displayname";
+    private static final String getcontentlanguage = "getcontentlanguage";
+    private static final String getcontentlength = "getcontentlength";
+    private static final String getcontenttype = "getcontenttype";
+    private static final String getetag = "getetag";
+    private static final String getlastmodified = "getlastmodified";
+    private static final String lockdiscovery = "lockdiscovery";
+    private static final String resourcetype = "resourcetype";
+    private static final String supportedlock = "supportedlock";
+
+    private static final List<String> davProps = new ArrayList<String>(Arrays.asList(
+            creationdate, displayname, getcontentlanguage, getcontentlength,
+            getcontenttype, getetag, getlastmodified, lockdiscovery,
+            resourcetype, supportedlock));
+    
+    private static final List<String> protectedProps = new ArrayList<String>(Arrays.asList(
+            creationdate, getcontentlength, getetag, getlastmodified,
+            lockdiscovery, resourcetype, supportedlock));
+
+
+    /**
+     * Returns the {@link Node} from a given {@link Document}
+     * @param doc
+     * @param nodeName
+     * @return null if Node wasen't found
+     */
+    static Node getNode(Document doc, String nodeName){
+        NodeList nodes = doc.getElementsByTagNameNS(davUri, nodeName);
+        if(nodes.getLength() == 1){
+            return nodes.item(0);
+        }
+        return null;
+    }
+
+    /**
+     * @param node
+     * @return returns the first non Text node or null
+     */
+    static Node getFirstChild(Node node){
+        NodeList nodeList = node.getChildNodes();
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            if(nodeList.item(i).getLocalName() != null){
+                return nodeList.item(i);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Converts a {@link Source} to a {@link Document}
+     *
+     * @throws ParserConfigurationException
+     * @throws TransformerFactoryConfigurationError
+     * @throws TransformerException
+     */
+    static Document sourceToDocument(Source body)
+            throws ParserConfigurationException,
+            TransformerFactoryConfigurationError, TransformerException {
+        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+                .newDocument();
+        Transformer transformer = TransformerFactory.newInstance().newTransformer();
+        DOMResult result = new DOMResult(doc);
+        transformer.transform(body, result);
+        return (Document) result.getNode();
+    }
+
+    /**
+     * Returns the content of a requested header as a {@link String}
+     *
+     * @param headers
+     * @param header
+     *            header to be returned
+     * @return returns <code>null</code> if the requested header is empty
+     */
+    static String getHeaderAsString(HttpHeaders headers, String header) {
+        List<String> requestedHeader = headers.getRequestHeader(header);
+        if(requestedHeader == null){
+            return null;
+        }
+        Iterator<String> headerIterator = requestedHeader.iterator();
+        if (headerIterator.hasNext()) {
+            return headerIterator.next();
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * @param clazz
+     * @return returns an ok Response with a DAV: and an ALLOW: header
+     */
+    static Response options(Class<?> clazz){
+        Response.ResponseBuilder builder = Response.ok();
+        builder.header("Dav", "1");
+        Set<String> allow = new HashSet<String>();
+        Method[] methods = clazz.getMethods();
+        for (Method method : methods){
+            for (Annotation annotation : method.getAnnotations()){
+                HttpMethod httpMethod = annotation.annotationType()
+                        .getAnnotation(HttpMethod.class);
+                if(httpMethod != null){
+                    allow.add(httpMethod.value());
+                }
+            }
+        }
+        if (allow.isEmpty()) {
+            builder.header("Allow", "");
+        } else {
+            final Iterator<String> iterator = allow.iterator();
+            final StringBuffer buffer = new StringBuffer(iterator.next());
+            while (iterator.hasNext()) {
+                buffer.append(", ");
+                buffer.append(iterator.next());
+            }
+            builder.header("Allow", buffer.toString());
+        }
+        return builder.build();
+    }
+
+    /*------------------------------------------*
+     * Putting the properties in a DOM Document *
+     *------------------------------------------*/
+
+    static Document createResponseDoc(Map<UriRef, PropertyMap> resultMap)
+            throws ParserConfigurationException {
+        Document responseDoc = DocumentBuilderFactory.newInstance().
+                newDocumentBuilder().newDocument();
+        Set<UriRef> nodeNameSet = resultMap.keySet();
+
+        Element multistatElement = responseDoc.createElementNS(davUri,"D:" + multistat);
+        // add multistat element to response
+        responseDoc.appendChild(multistatElement);
+        for (UriRef nodeName : nodeNameSet) {
+            Element responseElement = responseDoc.createElementNS(davUri, "D:" + response);
+            // add response element to response Document
+            multistatElement.appendChild(responseElement);
+            PropertyMap propertyMap = resultMap.get(nodeName);
+            addElementsToResponse(propertyMap, responseElement, responseDoc, nodeName);
+        }
+        return responseDoc;
+    }
+
+    private static void addElementsToResponse(PropertyMap propertyMap,
+            Element responseElement, Document responseDoc, UriRef nodeName) {
+        Element hrefElement = responseDoc.createElementNS(davUri, "D:" + href);
+        hrefElement.setTextContent(nodeName.getUnicodeString());
+        // add hrefElement element to responseElement
+        responseElement.appendChild(hrefElement);
+        addPropsToPropstat(responseElement, propertyMap, responseDoc);
+
+    }
+
+    private static void addPropsToPropstat(Element responseElement, PropertyMap propertyMap,
+            Document responseDoc) {
+        Set<Property> props = propertyMap.keySet();
+        Element propFoundElement = responseDoc.createElementNS(davUri, "D:" + prop);
+        Element propNotFoundElement = responseDoc.createElementNS(davUri, "D:" + prop);
+        for(Property propVal : props){
+            String propName = propVal.prop;
+            String ns = propVal.ns;
+            String prf = ns.equalsIgnoreCase(davUri) ? "D:":"R:";
+            String value = propertyMap.get(propVal);
+            Element resultElement = responseDoc.createElementNS(ns, prf + propName);
+            if(value != null){
+                if (!(value.isEmpty())){
+                    if (value.equals("collection")) {
+                        resultElement.appendChild(responseDoc.createElementNS(
+                                davUri, "D:collection"));
+                    } else {
+                        resultElement.setTextContent(value);
+                    }
+                }
+                propFoundElement.appendChild(resultElement);
+            } else {
+                propNotFoundElement.appendChild(resultElement);
+            }
+        }
+        Element propstatFoundElement = responseDoc.createElementNS(davUri,
+                "D:" + propstat);
+        Element statusFoundElement = responseDoc.createElementNS(davUri,
+                "D:" + status);
+        propstatFoundElement.appendChild(propFoundElement);
+        statusFoundElement.setTextContent("HTTP/1.1 200 OK");
+        propstatFoundElement.appendChild(statusFoundElement);
+        responseElement.appendChild(propstatFoundElement);
+        if(propNotFoundElement.hasChildNodes()){
+            Element propstatNotFoundElement = responseDoc.createElementNS(davUri,
+                    "D:" + propstat);
+            Element statusNotFoundElement = responseDoc.createElementNS(davUri,
+                    "D:" + status);
+            propstatNotFoundElement.appendChild(propNotFoundElement);
+            statusNotFoundElement.setTextContent("HTTP/1.1 404 Not Found");
+            propstatNotFoundElement.appendChild(statusNotFoundElement);
+            responseElement.appendChild(propstatNotFoundElement);
+        }
+
+    }
+
+    /*------------------------------------------------------------*
+     * Get the properties from the CollectionNode and its members *
+     *------------------------------------------------------------*/
+
+    static Map<UriRef, PropertyMap> getPropsByName(NodeList children,
+            GraphNode node, String depthHeader, boolean includeValues) {
+        List<Property> requestedUserProps = new ArrayList<Property>();
+        List<Property> requestedDavProps = new ArrayList<Property>();
+
+        for (int i = 0; i < children.getLength(); i++) {
+            Node child = children.item(i);
+            String localName = child.getLocalName();
+            if(localName == null){
+                continue;
+            }
+            String nsUri = child.getNamespaceURI();
+            if (nsUri.equals(davUri)) {
+                requestedDavProps.add(new Property(nsUri, localName));
+            } else {
+                requestedUserProps.add(new Property(nsUri, localName));
+            }
+        }
+        Map<UriRef, PropertyMap> allprops = new HashMap<UriRef, PropertyMap>();
+
+        if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
+            return getCollectionProps(allprops, requestedUserProps, requestedDavProps,
+                    node, depthHeader, includeValues);
+        }else{
+            addNodeProperties(allprops, requestedUserProps, requestedDavProps,
+                    node, includeValues);
+            return allprops;
+        }
+
+    }
+    
+    static Map<UriRef, PropertyMap> getCollectionProps(Map<UriRef, PropertyMap> allprops,
+            List<Property> requestedUserProps, List<Property> requestedDavProps,
+            GraphNode collection, String depthHeader, boolean includeValues) {
+        if(allprops == null){
+            allprops = new HashMap<UriRef, PropertyMap>();
+        }
+        addNodeProperties(allprops, requestedUserProps, requestedDavProps, collection,
+                includeValues);
+        if (depthHeader.equals("1") || depthHeader.equals(infinite)) {
+            Iterator<GraphNode> membersIter = collection.getSubjectNodes(HIERARCHY.parent);
+            List<GraphNode> members = new ArrayList<GraphNode>();
+            while (membersIter.hasNext()) {
+                members.add(membersIter.next());
+            }
+            addMemberProps(allprops, requestedUserProps, requestedDavProps, members,
+                    depthHeader, includeValues);
+        }
+        return allprops;
+    }
+
+    private static void addMemberProps(Map<UriRef, PropertyMap> allprops,
+            List<Property> requestedUserProps, List<Property> requestedDavProps,
+            List<GraphNode> members, String depthHeader, boolean includeValues) {
+        for (GraphNode member : members) {
+            if (depthHeader.equals(infinite) && member.hasProperty(RDF.type, HIERARCHY.Collection)) {
+                getCollectionProps(allprops, requestedUserProps, requestedDavProps,
+                        member, depthHeader, includeValues);
+            } else {
+                addNodeProperties(allprops, requestedUserProps, requestedDavProps,
+                        member,    includeValues);
+            }
+        }
+    }
+
+    static void addNodeProperties(Map<UriRef, PropertyMap> allprops,
+            List<Property> requestedUserProps, List<Property> requestedDavProps,
+            GraphNode node,    boolean includeValues) {
+
+        if (requestedDavProps == null) {
+            requestedDavProps = new ArrayList<Property>();
+            for(String st : davProps){
+                requestedDavProps.add(new Property(davUri, st));
+            }
+        }
+        PropertyMap propertyMap = new PropertyMap();
+        if (includeValues) {
+            addDavProps(node, propertyMap, requestedDavProps);
+            addUserProps(node, propertyMap, requestedUserProps);
+        } else {
+            addDavPropsWithoutValues(propertyMap);
+            addUserPropsWithoutValues(node, propertyMap);
+        }
+        allprops.put((UriRef) node.getNode(), propertyMap);
+
+    }
+
+    private static void addUserProps(GraphNode node, PropertyMap propertyMap,
+            List<Property> requestedProps) {
+        Iterator<UriRef> userPropsIter;
+        Lock readLock = node.readLock();
+        readLock.lock(); 
+        try {
+            userPropsIter = node.getProperties();
+        } finally {
+            readLock.unlock();
+        }
+        Set<UriRef> userProps = new HashSet<UriRef>();
+        while (userPropsIter.hasNext()) {
+            userProps.add(userPropsIter.next());
+        }
+        userProps.remove(HIERARCHY.members);
+        if (requestedProps != null) {
+            for (Property requestedProp : requestedProps) {
+                UriRef predicate = new UriRef(requestedProp.value());
+                if (userProps.contains(predicate)) {
+                    readLock.lock();
+                    try {
+                        Iterator<Resource> value = node.getObjects(predicate);
+                        if (value.hasNext()) {
+                            propertyMap.put(requestedProp, getValue(value.next()));
+                        } else {
+                            propertyMap.put(requestedProp, "");
+                        }
+                    } finally {
+                        readLock.unlock();
+                    }
+                } else {
+                    propertyMap.put(requestedProp, null);
+                }
+            }
+        } else {
+            for (UriRef uri : userProps) {
+                String userProp = uri.getUnicodeString();
+                int index = userProp.lastIndexOf("#");
+                if (index == -1) {
+                    index = userProp.lastIndexOf("/");
+                }
+                Property property = new Property(userProp.substring(0, index + 1),
+                        userProp.substring(index + 1));
+
+                Iterator<Resource> value = node.getObjects(uri);
+                readLock.lock();
+                try {
+                    if (value.hasNext()) {
+                        propertyMap.put(property, getValue(value.next()));
+                    } else {
+                        propertyMap.put(property, "");
+                    }
+                } finally {
+                    readLock.unlock();
+                }
+            }
+        }
+    }
+
+    private static void addUserPropsWithoutValues(GraphNode node,
+            PropertyMap propertyMap) {
+        Iterator<UriRef> userPropsIter;
+        Lock readLock = node.readLock();
+        readLock.lock();
+        try {
+            userPropsIter = node.getProperties();
+        } finally {
+            readLock.unlock();
+        }
+        Set<UriRef> userProps = new HashSet<UriRef>();
+        while (userPropsIter.hasNext()) {
+            userProps.add(userPropsIter.next());
+        }
+        userProps.remove(HIERARCHY.members);
+        for (UriRef uri : userProps) {
+            String userProp = uri.getUnicodeString();
+            int index = userProp.lastIndexOf("#");
+            if (index == -1) {
+                index = userProp.lastIndexOf("/");
+            }
+            Property property = new Property(userProp.substring(0, index + 1),
+                    userProp.substring(index + 1));
+            propertyMap.put(property, "");
+        }
+    }
+
+    /**
+     * @param resource
+     * @return returns the unicode string of an UriRef or the lexical form of a
+     * Literal or the return value of a toString() on a BNode
+     */
+    private static String getValue(Resource resource){
+        if(resource instanceof UriRef){
+            return ((UriRef)resource).getUnicodeString();
+        }else if(resource instanceof Literal){
+            return ((Literal)resource).getLexicalForm();
+        }else {
+            return resource.toString();
+        }
+    }
+
+    /**
+     * FIXME find better implementation
+     * @param node
+     * @param propertyMap
+     * @param includeValues
+     * @param requestedProps
+     */
+    private static void addDavProps(GraphNode node, PropertyMap propertyMap,
+            List<Property> requestedProps) {
+        for (Property property : requestedProps) {
+            if (davProps.contains(property.prop)) {
+                if (property.prop.equalsIgnoreCase(displayname)) {
+                    propertyMap.put(property, getLastSection(((UriRef)node.getNode()).getUnicodeString()));
+                } else if (property.prop.equalsIgnoreCase(resourcetype)) {
+                    if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
+                        propertyMap.put(property, "collection");
+                    } else {
+                        propertyMap.put(property, "");
+                    }
+                } else if(property.prop.equalsIgnoreCase(creationdate)){
+                    Lock readLock = node.readLock();
+                    readLock.lock();
+                    try {
+                        Iterator<Resource> date = node.getObjects(DCTERMS.dateSubmitted);
+                        if (date.hasNext()) {
+                            String st = getValue(date.next());
+                            propertyMap.put(property, st);
+                        } else {
+                            propertyMap.put(property, "");
+                        }
+                    } finally {
+                        readLock.unlock();
+                    }
+                } else if(property.prop.equalsIgnoreCase(getlastmodified)){
+                    Lock readLock = node.readLock();
+                    readLock.lock();
+                    try {
+                        Iterator<Resource> date = node.getObjects(DCTERMS.modified);
+                        if (date.hasNext()) {
+                            String st = getValue(date.next());
+                            propertyMap.put(property, st);
+                        } else {
+                            propertyMap.put(property, "");
+                        }
+                    } finally {
+                        readLock.unlock();
+                    }
+                } else if(property.prop.equalsIgnoreCase(getcontenttype)){
+                    Lock readLock = node.readLock();
+                    readLock.lock();
+                    try {
+                        Iterator<Resource> mediaType = node.getObjects(DCTERMS.MediaType);
+                        if (mediaType.hasNext()) {
+                            String st = getValue(mediaType.next());
+                            propertyMap.put(property, st);
+                        } else {
+                            propertyMap.put(property, "");
+                        }
+                    } finally {
+                        readLock.unlock();
+                    }
+                } else {
+                    propertyMap.put(property, "");
+                }
+            } else {
+                propertyMap.put(property, null);
+            }
+        }
+    }
+
+    private static void addDavPropsWithoutValues(PropertyMap propertyMap) {
+        for (String property : davProps) {
+                propertyMap.put(new Property(davUri, property), "");
+        }
+    }
+
+    /*-------------------*
+     * Proppatch methods *
+     *-------------------*/
+
+    static Document modifyProperties(GraphNode hierarchyNode, NodeList propsToSet,
+            NodeList propsToRemove) throws ParserConfigurationException {
+        Document responseDoc = DocumentBuilderFactory.newInstance()
+                    .newDocumentBuilder().newDocument();
+        UriRef subject = (UriRef) hierarchyNode.getNode();
+        Element hrefElement = responseDoc.createElementNS(davUri, href);
+        hrefElement.setTextContent(subject.getUnicodeString());
+        Element multistatus = responseDoc.createElementNS(davUri, multistat);
+        Element responseElement = responseDoc.createElementNS(davUri, response);
+        Element propOk = responseDoc.createElementNS(davUri, prop);
+        Element propForbidden = responseDoc.createElementNS(davUri, prop);
+
+        responseDoc.appendChild(multistatus);
+        multistatus.appendChild(responseElement);
+        responseElement.appendChild(hrefElement);
+
+        Map<Property, String> setMap = getNodeListAsMap(propsToSet);
+        Map<Property, String> removeMap = getNodeListAsMap(propsToRemove);
+        TripleCollection contentGraph = hierarchyNode.getGraph();
+        for(Map.Entry<Property, String> entry : setMap.entrySet()){
+            Property property = entry.getKey();
+            if(property.ns.equalsIgnoreCase(davUri)){
+                if(protectedProps.contains(property.prop)){
+                    propForbidden.appendChild(responseDoc
+                            .createElementNS(davUri, property.prop));
+                } else {
+                    UriRef predicate = new UriRef(property.value());
+                    Lock writeLock = hierarchyNode.writeLock();
+                    writeLock.lock();
+                    try {
+                        Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                        replaceProp(subject, predicate, valIter, contentGraph, entry);
+                    } finally {
+                        writeLock.unlock();
+                    }
+                    propOk.appendChild(responseDoc.createElementNS(davUri, property.prop));
+                }
+            } else {
+                UriRef predicate = new UriRef(property.value());
+                Lock writeLock = hierarchyNode.writeLock();
+                writeLock.lock();
+                try {
+                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                    replaceProp(subject, predicate, valIter, contentGraph, entry);
+                } finally {
+                    writeLock.unlock();
+                }
+                propOk.appendChild(responseDoc.createElementNS(property.ns, "R:" + property.prop));
+            }
+        }
+
+        for(Map.Entry<Property, String> entry : removeMap.entrySet()){
+            Property property = entry.getKey();
+            if(davProps.contains(property.prop)){
+                propForbidden.appendChild(responseDoc
+                            .createElementNS(davUri, property.prop));
+            } else {
+                UriRef predicate = new UriRef(property.value());
+                Lock writeLock = hierarchyNode.writeLock();
+                writeLock.lock();
+                try {
+                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                    Set<Triple> triplesToBeRemoved = new HashSet<Triple>();
+                    while (valIter.hasNext()) {
+                        triplesToBeRemoved.add(new TripleImpl(subject, predicate, valIter.next()));
+                    }
+                    contentGraph.removeAll(triplesToBeRemoved);
+                } finally {
+                    writeLock.unlock();
+                }
+                propOk.appendChild(responseDoc.createElementNS(property.ns, property.prop));
+
+            }
+        }
+
+        if(propOk.hasChildNodes()){
+            Element propstatOk = responseDoc.createElementNS(davUri, propstat);
+            Element statusOk = responseDoc.createElementNS(davUri, status);
+            responseElement.appendChild(propstatOk);
+            propstatOk.appendChild(propOk);
+            propstatOk.appendChild(statusOk);
+            statusOk.setTextContent("HTTP/1.1 200 OK");
+        }
+        if(propForbidden.hasChildNodes()){
+            Element propstatForbidden = responseDoc.createElementNS(davUri, propstat);
+            Element statusForbidden = responseDoc.createElementNS(davUri, status);
+            responseElement.appendChild(propstatForbidden);
+            propstatForbidden.appendChild(propForbidden);
+            propstatForbidden.appendChild(statusForbidden);
+            statusForbidden.setTextContent("HTTP/1.1 403 Forbidden");
+        }
+
+        return responseDoc;
+    }
+
+    private static Map<Property, String> getNodeListAsMap(NodeList nodeList) {
+        if (nodeList == null) {
+            return new HashMap<Property, String>();
+        }
+        Map<Property, String> result = new HashMap<Property, String>();
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            String propName = node.getLocalName();
+            if (propName != null) {
+                String nsUri = node.getNamespaceURI();
+                result.put(new Property(nsUri, propName), node.getTextContent());
+            }
+        }
+        return result;
+    }
+
+    private static void replaceProp(UriRef subject, UriRef predicate,
+            Iterator<Resource> valIter, TripleCollection contentGraph,
+            Map.Entry<Property, String> entry) {
+        LiteralFactory fac = LiteralFactory.getInstance();
+        Set<Triple> triplesToBeRemoved = new HashSet<Triple>();
+        if (valIter.hasNext()) {
+            triplesToBeRemoved.add(new TripleImpl(subject, predicate, valIter.next()));
+        }
+        contentGraph.removeAll(triplesToBeRemoved);
+        contentGraph.add(new TripleImpl(subject, predicate,
+                fac.createTypedLiteral(entry.getValue())));
+    }
+
+    private static String getLastSection(String s) {
+        return s.substring(s.lastIndexOf('/', s.length()-2));
+    }
+
+    /**
+     * Helper class whicht is a {@link HashMap} that maps {@link Property} to a {@link String}
+     * @author ali
+     */
+    @SuppressWarnings("serial")
+    static class PropertyMap extends HashMap<Property, String> {
+    }
+
+    static class Property {
+        final String ns;
+        final String prop;
+
+        public Property(String ns, String prop) {
+            this.ns = ns;
+            this.prop = prop;
+        }
+
+        public String value(){
+            return ns+prop;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
new file mode 100644
index 0000000..012d917
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.content.collections;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.HIERARCHY;
+import org.apache.clerezza.rdf.ontologies.RDF;
+
+/**
+ * Creates the collections containing a resource in an underlying MGraph
+ *
+ * @author reto
+ */
+public class CollectionCreator {
+
+    private MGraph mGraph;
+
+    public CollectionCreator(MGraph mGraph) {
+        this.mGraph = mGraph;
+    }
+
+    public void createContainingCollections(UriRef uriRef) {
+        try {
+            URI uri = new URI(uriRef.getUnicodeString());
+            if (uri.getHost() == null) {
+                throw new IllegalArgumentException("Host name missing in " + uriRef);
+            }
+            String[] pathSections = uri.getRawPath().split("/");
+            for (int i = pathSections.length - 1; i >= 0 ; i--) {
+                String section = pathSections[i];
+                if (section.length() == 0) {
+                    if (i == 0) {
+                        return;
+                    } else {
+                        throw new IllegalArgumentException(
+                                uriRef+" contains consequtive slashes in path section");
+                    }
+                }
+                final String unicodeString = uriRef.getUnicodeString();
+                int lastIndexOf = unicodeString.lastIndexOf(section);
+                UriRef parentUriRef = new UriRef(unicodeString.substring(0, lastIndexOf));
+                mGraph.add(new TripleImpl(uriRef, HIERARCHY.parent, parentUriRef));
+                mGraph.add(new TripleImpl(parentUriRef, RDF.type, HIERARCHY.Collection));
+                uriRef = parentUriRef;
+
+            }
+        } catch (URISyntaxException ex) {
+            throw new IllegalArgumentException(ex);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
new file mode 100644
index 0000000..7881a34
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.genericmetadata;
+
+import java.util.Date;
+import javax.ws.rs.core.MediaType;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.core.TypedLiteral;
+import org.apache.clerezza.rdf.ontologies.DCTERMS;
+
+/**
+ * This class generates metadata about assets.
+ *
+ * @author tio
+ */
+@Component()
+@Service(MetaDataGenerator.class)
+public class GenericMetaDataGenerator implements MetaDataGenerator {
+
+    @Override
+    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
+        TypedLiteral dateLiteral = LiteralFactory.getInstance()
+                    .createTypedLiteral(new Date());
+        if(node.getObjects(DCTERMS.dateSubmitted).hasNext()) {
+            if(node.getObjects(DCTERMS.modified).hasNext()) {
+                node.deleteProperties(DCTERMS.modified);
+            }
+            node.addProperty(DCTERMS.modified, dateLiteral);
+        } else {
+            node.addProperty(DCTERMS.dateSubmitted, dateLiteral);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
new file mode 100644
index 0000000..9b7c666
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP COPY requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("COPY")
+public @interface COPY {
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
new file mode 100644
index 0000000..8fb4630
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP LOCK requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("LOCK")
+public @interface LOCK {
+
+}


[32/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon-round.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon-round.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon-round.png
new file mode 100644
index 0000000..597b334
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon-round.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon.png
new file mode 100644
index 0000000..156e74c
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/disco-icon.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/discostyle.css
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/discostyle.css b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/discostyle.css
new file mode 100644
index 0000000..3977035
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/discostyle.css
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+img {
+	border: 0;
+}
+
+ol {
+	padding-left: 0;
+}
+
+.titledContent {
+	list-style-type: none;
+}
+
+.titledContent .content {
+	padding-left: 1em;
+}
+
+.titledContent .title .typeWidget {
+	font-size: 200%;
+	color: red;
+}
+	
+.titledContent .titledContent  .title .typeWidget {
+	font-size: 150%;
+}
+
+
+.titledContent .titledContent .titledContent .title .typeWidget {
+	font-size: 130%;
+	color: black;
+}
+
+.titledContent .titledContent .titledContent .titledContent .title .typeWidget {
+	font-size: 100%;
+}
+
+.orderedContent {
+	padding-left: 2em;
+}
+.controlArea {
+	float: right;
+}
+
+.sourceEdit {
+	background-color: grey;
+	position: absolute; top: 10%; right: 10%; left: 10%; bottom: 10%
+}
+
+.sourceEdit textarea {
+	width: 100%;
+	height: 90%
+}
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/favicon.ico
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/favicon.ico b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/favicon.ico
new file mode 100644
index 0000000..4cb26c1
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/style/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
----------------------------------------------------------------------
diff --git a/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java b/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
new file mode 100644
index 0000000..7e5b242
--- /dev/null
+++ b/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.collections;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.HIERARCHY;
+import org.apache.clerezza.rdf.ontologies.RDF;
+
+
+/**
+ * @author mir, rbn
+ */
+public class CollectionsCreatorTest{
+
+    private static UriRef root = new UriRef("http://localhost:8282/");
+    private UriRef foo = new UriRef("http://localhost:8282/foo/");
+    private UriRef fooResource = new UriRef("http://localhost:8282/foo/resource");
+    private UriRef fooTest = new UriRef("http://localhost:8282/foo/test/");
+    private UriRef fooTestResource4 = new UriRef("http://localhost:8282/foo/test/resource4");
+        
+    @Test
+    public void listPositionTest() throws Exception {
+        MGraph mGraph = new SimpleMGraph();
+        CollectionCreator collectionCreator = new CollectionCreator(mGraph);
+        collectionCreator.createContainingCollections(fooTestResource4);
+        Assert.assertTrue(mGraph.contains(new TripleImpl(fooTest, RDF.type, HIERARCHY.Collection)));
+        Assert.assertTrue(mGraph.contains(new TripleImpl(fooTestResource4, HIERARCHY.parent, fooTest)));
+        Assert.assertTrue(mGraph.contains(new TripleImpl(foo, HIERARCHY.parent, root)));
+        Assert.assertTrue(mGraph.contains(new TripleImpl(root, RDF.type, HIERARCHY.Collection)));
+        collectionCreator.createContainingCollections(fooResource);
+        Assert.assertTrue(mGraph.contains(new TripleImpl(fooResource, HIERARCHY.parent, foo)));
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/cris/LICENSE
----------------------------------------------------------------------
diff --git a/platform/cris/LICENSE b/platform/cris/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/cris/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/cris/pom.xml
----------------------------------------------------------------------
diff --git a/platform/cris/pom.xml b/platform/cris/pom.xml
new file mode 100644
index 0000000..4585ac3
--- /dev/null
+++ b/platform/cris/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.cris</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform CRIS service for the content graph</name>
+    <description>
+        A composite resource index service for resources described in the content graph
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.cris.ontologies</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.cris.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.lucene</groupId>
+            <artifactId>lucene-memory</artifactId>
+            <version>4.1.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.osgi.framework; version="[1,2)", 
+                            org.osgi.service.component; version="[1,2)",*</Import-Package>
+                        <Export-Package>org.apache.clerezza.platform.cris.*</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/cris/src/main/java/org/apache/clerezza/platform/cris/IndexService.java
----------------------------------------------------------------------
diff --git a/platform/cris/src/main/java/org/apache/clerezza/platform/cris/IndexService.java b/platform/cris/src/main/java/org/apache/clerezza/platform/cris/IndexService.java
new file mode 100644
index 0000000..a3cb10e
--- /dev/null
+++ b/platform/cris/src/main/java/org/apache/clerezza/platform/cris/IndexService.java
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.cris;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.locks.Lock;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.cris.Condition;
+import org.apache.clerezza.rdf.cris.FacetCollector;
+import org.apache.clerezza.rdf.cris.GraphIndexer;
+import org.apache.clerezza.rdf.cris.IndexDefinitionManager;
+import org.apache.clerezza.rdf.cris.ResourceFinder;
+import org.apache.clerezza.rdf.cris.SortSpecification;
+import org.apache.clerezza.rdf.cris.VirtualProperty;
+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;
+import org.apache.lucene.queryparser.classic.ParseException;
+import org.apache.lucene.store.FSDirectory;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Service to index and find resources from the content graph.
+ * 
+ * @author tio
+ */
+@Component(metatype=true)
+@Service(IndexService.class)
+public class IndexService extends ResourceFinder {
+
+    @Property(intValue=0, label="The delay in minutes until the first index optimization is invoked.", 
+            description="This allows to set the time of the first invocation. 0 Is the lowest acceptable value and means run instantly.")
+    static final String OPTIMIZE_DELAY = "org.apache.clerezza.platform.cris.optimizedelay";
+    
+    @Property(intValue=0, label="The period in minutes between index optimizations.", 
+            description="When a new value is set, the first invocation will happen after the specified delay and the old schedule will be canceled instantly. The minimum acceptable value is 1 (min). A value of 0 turns off optimizations.")
+    static final String OPTIMIZE_PERIOD = "org.apache.clerezza.platform.cris.optimizeperiod";
+    
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+
+    IndexDefinitionManager indexDefinitionManager = null;
+
+    GraphIndexer graphIndexer  = null;
+
+    @Reference
+    ContentGraphProvider cgProvider;
+
+    @Reference
+    TcManager tcManager;
+
+    UriRef definitionGraphUri = new UriRef("http://zz.localhost/cris.definitions.graph");
+
+    LockableMGraph definitionGraph = null;
+
+    Integer optimizePeriod = 0;
+    Integer optimizeDelay = 0;
+    
+    protected void activate(ComponentContext context) {
+
+        optimizePeriod = (Integer) context.getProperties().get(OPTIMIZE_PERIOD);
+        optimizeDelay = (Integer) context.getProperties().get(OPTIMIZE_DELAY);
+        if(optimizeDelay == null || optimizeDelay < 0) {
+            optimizeDelay = 0;
+        }
+        
+        try {
+            definitionGraph = tcManager.getMGraph(definitionGraphUri);
+        } catch (NoSuchEntityException ex) {
+            definitionGraph = tcManager.createMGraph(definitionGraphUri);
+        }
+        File luceneIndexDir = context.getBundleContext().getDataFile("lucene-index");
+        boolean createNewIndex = luceneIndexDir.exists();
+        logger.info("Create new index: {}", !createNewIndex);
+
+        indexDefinitionManager = new IndexDefinitionManager(definitionGraph);
+        try {
+            graphIndexer = new GraphIndexer(definitionGraph, cgProvider.getContentGraph(),
+                    FSDirectory.open(luceneIndexDir), !createNewIndex);
+            if(optimizePeriod != null && optimizePeriod >= 1) {
+                long period = optimizePeriod * 60000;
+                long delay = optimizeDelay * 60000;
+                logger.info("Scheduling optimizations with delay {} min and period {} min", delay, period);
+                graphIndexer.scheduleIndexOptimizations(delay, period);
+            }
+        } catch (IOException ex) {
+            logger.error("Could not open lucene index directory.");
+            throw new IllegalStateException(ex);
+        }
+    }
+
+    protected void deactivate(ComponentContext context) {
+        if(optimizePeriod >= 1) {
+            graphIndexer.terminateIndexOptimizationSchedule();
+        }
+        optimizeDelay = 0;
+        optimizePeriod = 0;
+        graphIndexer.closeLuceneIndex();
+        graphIndexer = null;
+
+    }
+    
+    @Override
+    public List<NonLiteral> findResources(List<? extends Condition> conditions, 
+            SortSpecification sortSpecification, FacetCollector... facetCollectors) {
+        try {
+            return graphIndexer.findResources(conditions, sortSpecification, facetCollectors);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+    
+    @Override
+    public List<NonLiteral> findResources(List<? extends Condition> conditions, 
+            FacetCollector... facetCollectors) {
+        try {
+            return graphIndexer.findResources(conditions, facetCollectors);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+
+    @Override
+    public List<NonLiteral> findResources(List<? extends Condition> conditions) {
+        try {
+            return graphIndexer.findResources(conditions);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+
+    @Override
+    public List<NonLiteral> findResources(UriRef uriRef, String pattern) {
+        try {
+            return graphIndexer.findResources(uriRef, pattern);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+    
+    @Override
+    public List<NonLiteral> findResources(UriRef uriRef, String pattern, 
+            boolean escapePattern) {
+        
+        try {
+            return graphIndexer.findResources(uriRef, pattern, escapePattern);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+    
+    @Override
+    public List<NonLiteral> findResources(UriRef uriRef, String pattern, 
+            boolean escapePattern, FacetCollector... facetCollectors) {
+        
+        try {
+            return graphIndexer.findResources(uriRef, pattern, escapePattern, facetCollectors);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+    
+    @Override
+    public List<NonLiteral> findResources(UriRef uriRef, String pattern, 
+            boolean escapePattern, SortSpecification sortSpecification, 
+            FacetCollector... facetCollectors) {
+        
+        try {
+            return graphIndexer.findResources(uriRef, pattern, escapePattern, 
+                    sortSpecification, facetCollectors);
+        } catch (ParseException ex) {
+            throw new RuntimeException(ex.getMessage());
+        }
+    }
+    
+    @Override
+    public void reCreateIndex() {
+        graphIndexer.reCreateIndex();
+    }
+
+    @Override
+    public void optimizeIndex() {
+        graphIndexer.optimizeIndex();
+    }
+
+    public void addDefintion(UriRef propertyType, List<UriRef> predicates) {
+        Lock lock = definitionGraph.getLock().writeLock();
+        lock.lock();
+        try {
+            indexDefinitionManager.addDefinition(propertyType, predicates);
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    public void addDefinitionVirtual(UriRef propertyType, List<VirtualProperty> predicates) {
+        Lock lock = definitionGraph.getLock().writeLock();
+        lock.lock();
+        try {
+            indexDefinitionManager.addDefinitionVirtual(propertyType, predicates);
+        } finally {
+            lock.unlock();
+        }
+
+    }
+
+    public void deleteDefintion(UriRef propertyType) {
+        Lock lock = definitionGraph.getLock().writeLock();
+        lock.lock();
+        try {
+            indexDefinitionManager.deleteDefinition(propertyType);
+        } finally {
+            lock.unlock();
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/LICENSE
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/LICENSE b/platform/curieprefixmanager/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/curieprefixmanager/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/LICENSE b/platform/curieprefixmanager/core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/curieprefixmanager/core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/pom.xml b/platform/curieprefixmanager/core/pom.xml
new file mode 100644
index 0000000..d45ecc1
--- /dev/null
+++ b/platform/curieprefixmanager/core/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.curieprefixmanager</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.curieprefixmanager.core</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - CURIE prefix manager core</name>
+    <description>
+        Skeleton Core
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.curieprefixmanager.ontologies</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/CuriePrefixRecommender.java
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/CuriePrefixRecommender.java b/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/CuriePrefixRecommender.java
new file mode 100644
index 0000000..e03a19a
--- /dev/null
+++ b/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/CuriePrefixRecommender.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.curieprefixmanager;
+
+/**
+ *
+ * Describes a service that recommends a CURIE prefix given an IRI prefix
+ *
+ * @author reto
+ */
+public interface CuriePrefixRecommender {
+
+    /**
+     * 
+     * @param iriPrefix that part of the iri that will be replaced by the return value n the CURIE
+     * @return the suggested prefix or null if no suggestion is available
+     */
+    public String getRecommendedPrefix(String iriPrefix);
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/impl/CuriePrefixManager.java
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/impl/CuriePrefixManager.java b/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/impl/CuriePrefixManager.java
new file mode 100644
index 0000000..cf8d22e
--- /dev/null
+++ b/platform/curieprefixmanager/core/src/main/java/org/apache/clerezza/platform/curieprefixmanager/impl/CuriePrefixManager.java
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.curieprefixmanager.impl;
+
+import java.net.URISyntaxException;
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.curieprefixmanager.CuriePrefixRecommender;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.platform.curieprefixmanager.ontologies.CURIE;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.utils.RdfList;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+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;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.service.component.ComponentContext;
+
+
+/**
+ * Allows to mana a set of CURIE prefix bindings. Multiple URI-Prefix can point
+ * to the same prefix, but per uri-prefix only one suggested prefix is supported.
+ * 
+ * @author reto
+ */
+@Component
+@Services({
+    @Service(Object.class), 
+    @Service(CuriePrefixRecommender.class)
+})
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/admin/curie-prefix/manager")
+public class CuriePrefixManager implements CuriePrefixRecommender {
+    private static final LiteralFactory literalFactory = LiteralFactory.getInstance();
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    @Reference
+    private ContentGraphProvider cgProvider;
+
+    public void activate(ComponentContext context) throws URISyntaxException {
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(getClass().getResource(
+                "curie-prefix-naked.ssp").toURI().toString()),
+                CURIE.CuriePrefixBinding, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(getClass().getResource(
+                "curie-prefix-list-naked.ssp").toURI().toString()),
+                CURIE.CuriePrefixBindingList, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+    }
+
+    @GET
+    @Path("new")
+    public GraphNode emptyPrefixBinding() {
+        MGraph resultMGraph = new SimpleMGraph();
+        GraphNode result = new GraphNode(new BNode(), resultMGraph);
+        result.addProperty(RDF.type, CURIE.CuriePrefixBinding);
+        result.addProperty(CURIE.prefix,
+                literalFactory.createTypedLiteral("foaf"));
+        result.addProperty(CURIE.binding,
+                literalFactory.createTypedLiteral("http://xmlns.com/foaf/0.1/"));
+        result.addProperty(RDF.type, PLATFORM.HeadedPage);
+        return result;
+    }
+
+    /**
+     * Saves a PrefixBiding, replacing an existing binding to the same value and
+     * if oldBinding is not null then it is removed
+     */
+    @POST
+    @Path("save")
+    public Response savePrefixBinding(@Context UriInfo uriInfo,
+            @FormParam("prefix") String prefix,
+            @FormParam("binding") String bindingValue,
+             @FormParam("oldBinding") String oldBindingValue) {
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        Lock l = contentGraph.getLock().writeLock();
+        l.lock();
+        
+        try {
+            NonLiteral binding = getBindingWithValue(bindingValue, contentGraph);
+            if (binding == null) {
+                binding = new BNode();
+            }
+            GraphNode bindingNode;
+            if (oldBindingValue != null) {
+                NonLiteral oldBinding = getBindingWithValue(oldBindingValue, contentGraph);
+                if (oldBinding != null) {
+                    GraphNode oldBindingNode = new GraphNode(oldBinding, contentGraph);
+                    oldBindingNode.replaceWith(binding);
+                }
+            }
+            bindingNode = new GraphNode(binding, contentGraph);
+            bindingNode.addProperty(RDF.type, CURIE.CuriePrefixBinding);
+            bindingNode.deleteProperties(CURIE.prefix);
+            bindingNode.addProperty(CURIE.prefix, literalFactory.createTypedLiteral(prefix));
+            bindingNode.deleteProperties(CURIE.binding);
+            bindingNode.addProperty(CURIE.binding, literalFactory.createTypedLiteral(bindingValue));
+        } finally {
+            l.unlock();
+        }
+        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
+    }
+
+    @POST
+    @Path("delete")
+    public Response delete(@Context UriInfo uriInfo,
+            @FormParam("binding") String bindingValue) {
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        Lock l = contentGraph.getLock().writeLock();
+        l.lock();
+        try {
+            NonLiteral binding = getBindingWithValue(bindingValue, contentGraph);
+            GraphNode bindingNode = new GraphNode(binding, contentGraph);
+            bindingNode.deleteProperty(RDF.type, CURIE.CuriePrefixBinding);
+            bindingNode.deleteProperties(CURIE.prefix);
+            bindingNode.deleteProperties(CURIE.binding);
+        } finally {
+            l.unlock();
+        }
+        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
+    }
+
+    @GET
+    public GraphNode list(@Context UriInfo uriInfo) {
+        TrailingSlash.enforcePresent(uriInfo);
+        TripleCollection resultGraph = new SimpleMGraph();
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        GraphNode result = new GraphNode(new BNode(), new UnionMGraph(resultGraph, contentGraph));
+        RdfList list = new RdfList(result);        
+        Lock l = contentGraph.getLock().readLock();
+        l.lock();
+        try {
+            Iterator<Triple> greetings = contentGraph.filter(null, RDF.type, CURIE.CuriePrefixBinding);
+            while (greetings.hasNext()) {
+                list.add(greetings.next().getSubject());
+            }
+        } finally {
+            l.unlock();
+        }
+        result.addProperty(RDF.type, CURIE.CuriePrefixBindingList);
+        result.addProperty(RDF.type, PLATFORM.HeadedPage);
+        return result;
+    }
+
+    @GET
+    @Path("get")
+    public GraphNode getSingle(@QueryParam("binding") String bindingValue) {
+        TripleCollection resultGraph = new SimpleMGraph();
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        MGraph unionMGraph = new UnionMGraph(resultGraph, contentGraph);
+        Lock l = contentGraph.getLock().readLock();
+        l.lock();
+        try {
+            GraphNode result = new GraphNode(getBindingWithValue(bindingValue, contentGraph), unionMGraph);
+            result.addProperty(RDF.type, PLATFORM.HeadedPage);
+            return result;
+        } finally {
+            l.unlock();
+        }
+    }
+
+    private static NonLiteral getBindingWithValue(String bindingValue, LockableMGraph graph) {
+        Iterator<Triple> triples = graph.filter(null, CURIE.binding,
+                literalFactory.createTypedLiteral(bindingValue));
+        if (triples.hasNext()) {
+            return triples.next().getSubject();
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public String getRecommendedPrefix(String iriPrefix) {
+        LockableMGraph contentGraph = cgProvider.getContentGraph();
+        Lock l = contentGraph.getLock().readLock();
+        l.lock();
+        try {
+            NonLiteral binding = getBindingWithValue(iriPrefix, contentGraph);
+            if (binding == null) {
+                return null;
+            }
+            GraphNode graphNode = new GraphNode(binding, contentGraph);
+            return ((Literal)graphNode.getObjects(CURIE.prefix).next()).getLexicalForm();
+        } finally {
+            l.unlock();
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-list-naked.ssp
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-list-naked.ssp b/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-list-naked.ssp
new file mode 100644
index 0000000..416cffe
--- /dev/null
+++ b/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-list-naked.ssp
@@ -0,0 +1,46 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def curie(s: Any) = new UriRef("http://clerezza.apache.org/platform/curieprefix#" + s)
+
+<div id="tx-content">
+	<h3>The following IRI bases are bound to a CURIE Prefix:</h3>
+	<table>
+
+		<tr><th>IRI prefix</th>
+		<th>CURIE Prefix</th>
+		<th></th></tr>
+	{for (binding <- res!!) yield <tr>
+	<td><a href={"get?binding="+(binding/curie("binding")*)}>{binding/curie("binding")*}</a></td>
+	<td>{binding/curie("prefix")*}</td>
+	<td><form action="delete" method="post">
+		<input name="binding" type="hidden" value={binding/curie("binding")*}/>
+		<a class="tx-icon tx-icon-delete" href="#" onclick="this.parentNode.submit(); return false">Delete</a></form></td>
+	</tr>}
+	</table>
+	<h3>Add new Prefix Binding:</h3>
+	<form action="save" method="post">
+		<label for="prefix">Prefix:</label><input name="prefix" type="text" value=""/><br/>
+		<label for="binding">Expanded form:</label><input name="binding" type="text" size="80" value=""/><br/>
+		<input type="submit" name="add"/>
+	</form>
+
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-naked.ssp
----------------------------------------------------------------------
diff --git a/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-naked.ssp b/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-naked.ssp
new file mode 100644
index 0000000..74d2b47
--- /dev/null
+++ b/platform/curieprefixmanager/core/src/main/resources/org/apache/clerezza/platform/curieprefixmanager/impl/curie-prefix-naked.ssp
@@ -0,0 +1,31 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def curie(s: Any) = new UriRef("http://clerezza.apache.org/platform/curieprefix#" + s)
+
+<div id="tx-content">
+	<h3>A CURIE Prefix Binding:</h3>
+	<form method="post" action="save">
+		<input type="text" name="prefix" value={res/curie("prefix")*}/><br/>
+		<input type="text" name="binding" value={res/curie("binding")*}/><br/>
+		<input type="submit" name="Save"/>
+	</form>
+</div>


[59/87] [abbrv] clerezza git commit: CLEREZZA-989: All bundle and components in linked data launchers satisfied, some runtime problems

Posted by re...@apache.org.
CLEREZZA-989: All bundle and components in linked data launchers satisfied, some runtime problems

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

Branch: refs/heads/master
Commit: c8c34941b1c8505ff9c5e30d0af74bae25270c5b
Parents: 9677f50
Author: Reto Gmuer <re...@apache.org>
Authored: Tue Mar 24 10:33:40 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Tue Mar 24 10:33:40 2015 +0000

----------------------------------------------------------------------
 jaxrs.rdf.providers/pom.xml                     |   4 +-
 .../jaxrs/rdf/providers/GraphNodeWriter.java    |  46 +++----
 .../jaxrs/rdf/providers/GraphReader.java        |  12 +-
 .../jaxrs/rdf/providers/GraphWriter.java        |  10 +-
 .../rdf/providers/ImmutableGraphReader.java     |  66 ++++++++++
 .../rdf/providers/TripleCollectionReader.java   |  66 ----------
 .../ResultSetCsvMessageBodyWriter.java          |  27 ++---
 .../ResultSetJsonMessageBodyWriter.java         |  35 +++---
 .../ResultSetTsvMessageBodyWriter.java          |  27 ++---
 .../ResultSetXmlMessageBodyWriter.java          |  31 ++---
 platform/config/pom.xml                         |  14 +++
 platform/graphnodeprovider/pom.xml              |   6 +-
 .../PlatformGraphNodeProvider.scala             |  39 +++---
 platform/graphprovider.content/pom.xml          |   8 ++
 .../content/ContentGraphProvider.java           |   8 +-
 platform/typehandlerspace.jaxrs2/pom.xml        |   8 +-
 .../jaxrs/TypeHandlerSpace.java                 |  24 ++--
 platform/typehandlerspace/pom.xml               |  16 ++-
 .../typehandlerspace/TypeHandlerDiscovery.java  |   4 +-
 .../impl/TypeHandlerDiscoveryImpl.java          |  18 +--
 .../typehandlerspace/GraphWriterDummy.java      |  12 +-
 .../typehandlerspace/TypeHandlerSpaceTest.java  |  54 ++-------
 platform/typepriority/pom.xml                   |   4 +
 platform/typerendering.scalaserverpages/pom.xml |   8 ++
 .../platform.typerendering.core/pom.xml         |   8 ++
 platform/usermanager/pom.xml                    |   4 +
 .../launchers/linked-data-launcher/pom.xml      |  20 ++--
 provisioning/rdf.web/pom.xml                    |  17 ++-
 provisioning/rdf/pom.xml                        |   2 +-
 provisioning/security/pom.xml                   |   2 +-
 provisioning/typehandlerspace/pom.xml           |  12 +-
 rdf.storage.web/src/main/scala/WebProxy.scala   |   4 +-
 rdf.web/pom.xml                                 |   8 +-
 rdf.web/rdf.web.core/pom.xml                    |  33 +++--
 .../apache/clerezza/rdf/web/core/Backup.java    |  10 +-
 .../rdf/web/core/BackupMessageBodyWriter.java   |  37 +++---
 .../clerezza/rdf/web/core/BackupPermission.java |   4 +-
 .../apache/clerezza/rdf/web/core/Delete.java    |  16 +--
 .../clerezza/rdf/web/core/GraphManagement.java  |  28 ++---
 .../web/core/GraphManagementAppPermission.java  |  12 +-
 .../apache/clerezza/rdf/web/core/Restorer.java  |  36 +++---
 .../web/core/ResultSetMessageBodyWriter.java    |  35 +++---
 .../org/apache/clerezza/rdf/web/core/Smush.java |  25 ++--
 .../clerezza/rdf/web/core/SparqlEndpoint.java   |  75 ++++++------
 .../apache/clerezza/rdf/web/core/WebAccess.java |  53 ++++----
 .../rdf/web/core/WebAccessPermission.java       |  10 +-
 .../rdf/web/core/BackupAndRestoreTest.java      | 120 +++++++++----------
 rdf.web/rdf.web.ontologies/pom.xml              |   9 +-
 rdf/jena/parser/pom.xml                         |   6 +-
 rdf/jena/serializer/pom.xml                     |   8 ++
 rdf/jena/tdb.storage/pom.xml                    |   8 ++
 .../rdf/jena/tdb/storage/TdbTcProvider.java     |   4 +-
 52 files changed, 593 insertions(+), 560 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/pom.xml
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/pom.xml b/jaxrs.rdf.providers/pom.xml
index 2845b48..527f922 100644
--- a/jaxrs.rdf.providers/pom.xml
+++ b/jaxrs.rdf.providers/pom.xml
@@ -36,12 +36,12 @@
         <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.utils</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/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 ceaff14..bde5c83 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
@@ -38,11 +38,11 @@ import javax.ws.rs.core.UriInfo;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-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.SimpleMGraph;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -98,17 +98,17 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
         this.uriInfo = uriInfo;
     }
 
-    private TripleCollection getExpandedContext(GraphNode node) {
-        final TripleCollection result = new SimpleMGraph(node.getNodeContext());
-        final Set<Resource> expandedResources = new HashSet<Resource>();
+    private Graph getExpandedContext(GraphNode node) {
+        final Graph result = new SimpleGraph(node.getNodeContext());
+        final Set<RdfTerm> expandedResources = new HashSet<RdfTerm>();
         expandedResources.add(node.getNode());
         while (true) {
-            Set<Resource> additionalExpansionRes = getAdditionalExpansionResources(result);
+            Set<RdfTerm> additionalExpansionRes = getAdditionalExpansionResources(result);
             additionalExpansionRes.removeAll(expandedResources);
             if (additionalExpansionRes.size() == 0) {
                 return result;
             }
-            for (Resource resource : additionalExpansionRes) {
+            for (RdfTerm resource : additionalExpansionRes) {
                 final GraphNode additionalNode = new GraphNode(resource, node.getGraph());
                 result.addAll(additionalNode.getNodeContext());
                 expandedResources.add(resource);
@@ -116,14 +116,14 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
         }
     }
 
-    private Set<Resource> getAdditionalExpansionResources(TripleCollection tc) {
-        final Set<UriRef> subjectExpansionProperties = getSubjectExpansionProperties();
-        final Set<UriRef> objectExpansionProperties = getObjectExpansionProperties();
-        final Set<Resource> result = new HashSet<Resource>();
+    private Set<RdfTerm> getAdditionalExpansionResources(Graph tc) {
+        final Set<Iri> subjectExpansionProperties = getSubjectExpansionProperties();
+        final Set<Iri> objectExpansionProperties = getObjectExpansionProperties();
+        final Set<RdfTerm> result = new HashSet<RdfTerm>();
         if ((subjectExpansionProperties.size() > 0)
                 || (objectExpansionProperties.size() > 0)) {
             for (Triple triple : tc) {
-                final UriRef predicate = triple.getPredicate();
+                final Iri predicate = triple.getPredicate();
                 if (subjectExpansionProperties.contains(predicate)) {
                     result.add(triple.getSubject());
                 }
@@ -135,28 +135,28 @@ public class GraphNodeWriter implements MessageBodyWriter<GraphNode> {
         return result;
     }
 
-    private Set<UriRef> getSubjectExpansionProperties() {
+    private Set<Iri> getSubjectExpansionProperties() {
         final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
         final List<String> paramValues = queryParams.get(SUBJ_EXP_PARAM);
         if (paramValues == null) {
-            return new HashSet<UriRef>(0);
+            return new HashSet<Iri>(0);
         }
-        final Set<UriRef> result = new HashSet<UriRef>(paramValues.size());
+        final Set<Iri> result = new HashSet<Iri>(paramValues.size());
         for (String uriString : paramValues) {
-            result.add(new UriRef(uriString));
+            result.add(new Iri(uriString));
         }
         return result;
     }
 
-    private Set<UriRef> getObjectExpansionProperties() {
+    private Set<Iri> getObjectExpansionProperties() {
         final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
         final List<String> paramValues = queryParams.get(OBJ_EXP_PARAM);
         if (paramValues == null) {
-            return new HashSet<UriRef>(0);
+            return new HashSet<Iri>(0);
         }
-        final Set<UriRef> result = new HashSet<UriRef>(paramValues.size());
+        final Set<Iri> result = new HashSet<Iri>(paramValues.size());
         for (String uriString : paramValues) {
-            result.add(new UriRef(uriString));
+            result.add(new Iri(uriString));
         }
         return result;
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/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 a53fae3..b1c4922 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
@@ -28,9 +28,11 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.Provider;
+
+import org.apache.commons.rdf.Graph;
+import org.apache.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.clerezza.rdf.core.Graph;
 
 /**
  * @scr.component
@@ -49,6 +51,7 @@ public class GraphReader implements MessageBodyReader<Graph> {
      * @scr.reference
      */
     private Parser parser;
+    
     @Override
     public boolean isReadable(Class<?> type, Type genericType,
             Annotation[] annotations, MediaType mediaType) {
@@ -56,11 +59,8 @@ public class GraphReader implements MessageBodyReader<Graph> {
     }
 
     @Override
-    public Graph readFrom(Class<Graph> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType,
-            MultivaluedMap<String, String> httpHeaders,
-            InputStream entityStream)
-            throws IOException, WebApplicationException {
+    public Graph readFrom(Class<Graph> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException {
+        Graph result = new SimpleGraph();
         return parser.parse(entityStream, mediaType.toString());
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/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 7d6ed0c..9bcc33a 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
@@ -30,7 +30,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 
@@ -46,7 +46,7 @@ import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 @Produces({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
     SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
     SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
-public class GraphWriter implements MessageBodyWriter<TripleCollection> {
+public class GraphWriter implements MessageBodyWriter<Graph> {
 
     /**
      * @scr.reference
@@ -56,17 +56,17 @@ public class GraphWriter implements MessageBodyWriter<TripleCollection> {
     @Override
     public boolean isWriteable(Class<?> type, Type genericType, 
             Annotation[] annotations, MediaType mediaType) {
-        return TripleCollection.class.isAssignableFrom(type);
+        return Graph.class.isAssignableFrom(type);
     }
 
     @Override
-    public long getSize(TripleCollection t, Class<?> type, Type genericType, 
+    public long getSize(Graph t, Class<?> type, Type genericType, 
             Annotation[] annotations, MediaType mediaType) {
         return -1;
     }
 
     @Override
-    public void writeTo(TripleCollection t, Class<?> type, Type genericType,
+    public void writeTo(Graph t, Class<?> type, Type genericType,
             Annotation[] annotations, MediaType mediaType,
             MultivaluedMap<String, Object> httpHeaders,
             OutputStream entityStream) throws IOException, WebApplicationException {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/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
new file mode 100644
index 0000000..c2af5a8
--- /dev/null
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/ImmutableGraphReader.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.jaxrs.rdf.providers;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+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.commons.rdf.ImmutableGraph;
+
+/**
+ * @scr.component
+ * @scr.service interface="java.lang.Object"
+ * @scr.property name="javax.ws.rs" type="Boolean" value="true"
+ * 
+ * @author reto
+ */
+@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
+     */
+    private Parser parser;
+    @Override
+    public boolean isReadable(Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return type.isAssignableFrom(ImmutableGraph.class);
+    }
+
+    @Override
+    public ImmutableGraph readFrom(Class<ImmutableGraph> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType,
+            MultivaluedMap<String, String> httpHeaders,
+            InputStream entityStream)
+            throws IOException, WebApplicationException {
+        return parser.parse(entityStream, mediaType.toString());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/TripleCollectionReader.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/TripleCollectionReader.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/TripleCollectionReader.java
deleted file mode 100644
index 7be80fa..0000000
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/TripleCollectionReader.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.jaxrs.rdf.providers;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyReader;
-import javax.ws.rs.ext.Provider;
-
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-
-/**
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
- * 
- * @author reto
- */
-@Provider
-@Consumes({SupportedFormat.N3, SupportedFormat.N_TRIPLE,
-    SupportedFormat.RDF_XML, SupportedFormat.TURTLE,
-    SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
-public class TripleCollectionReader implements MessageBodyReader<TripleCollection> {
-
-    /**
-     * @scr.reference
-     */
-    private Parser parser;
-    
-    @Override
-    public boolean isReadable(Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return type.isAssignableFrom(TripleCollection.class);
-    }
-
-    @Override
-    public TripleCollection readFrom(Class<TripleCollection> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException {
-        TripleCollection result = new SimpleMGraph();
-        return parser.parse(entityStream, mediaType.toString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
index 848ace0..a9b549e 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetCsvMessageBodyWriter.java
@@ -32,13 +32,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
+import org.apache.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
@@ -180,7 +179,7 @@ public class ResultSetCsvMessageBodyWriter implements MessageBodyWriter<ResultSe
       if( !first ) {
         outputStream.write( separator );
       }
-      Resource resource = lineData.get( header );
+      RdfTerm resource = lineData.get( header );
       if( resource != null ) {
         writeEscaped( outputStream, getResourceValue( resource ) );
       }
@@ -190,17 +189,15 @@ public class ResultSetCsvMessageBodyWriter implements MessageBodyWriter<ResultSe
   }
 
   /**
-   * Helper to get the proper string representation for the given Resource.
+   * Helper to get the proper string representation for the given RdfTerm.
    */
-  private String getResourceValue( Resource resource ) {
+  private String getResourceValue( RdfTerm resource ) {
     StringBuilder value = new StringBuilder();
-    if( resource instanceof UriRef ) {
-      value.append( ((UriRef) resource).getUnicodeString() );
-    } else if( resource instanceof TypedLiteral ) {
-      value.append( ((TypedLiteral) resource).getLexicalForm() );
-    } else if( resource instanceof PlainLiteral ) {
-      value.append( ((PlainLiteral) resource).getLexicalForm() );
-    } else if( resource instanceof BNode ) {
+    if( resource instanceof Iri ) {
+      value.append( ((Iri) resource).getUnicodeString() );
+    } else if( resource instanceof Literal ) {
+      value.append( ((Literal) resource).getLexicalForm() );
+    } else if( resource instanceof BlankNode ) {
       value.append( "/" );
     } else {
       value.append( resource.toString() );

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
index 8a7f7cc..f80f4a8 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetJsonMessageBodyWriter.java
@@ -32,15 +32,14 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
+import org.apache.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
@@ -115,27 +114,27 @@ public class ResultSetJsonMessageBodyWriter implements MessageBodyWriter<ResultS
 	}
 
 	/**
-	 * Helper: creates value element from {@link Resource} depending on its
+	 * Helper: creates value element from {@link RdfTerm} depending on its
 	 * class
 	 *
 	 */
-	private JSONObject createResultElement(Resource resource) {
+	private JSONObject createResultElement(RdfTerm resource) {
 		JSONObject element = new JSONObject();
-		if (resource instanceof UriRef) {
+		if (resource instanceof Iri) {
 			element.put("type", "uri");
-			element.put("value", UriRef.class.cast(resource).getUnicodeString());
-		} else if (resource instanceof PlainLiteral) {
+			element.put("value", Iri.class.cast(resource).getUnicodeString());
+		} else if (resource instanceof Literal) {
 			element.put("type", "literal");
-			element.put("value", PlainLiteral.class.cast(resource).getLexicalForm());
-			Language lang = PlainLiteral.class.cast(resource).getLanguage();
+			element.put("value", Literal.class.cast(resource).getLexicalForm());
+			Language lang = Literal.class.cast(resource).getLanguage();
 			if (lang != null) {
 				element.put("xml:lang", lang.toString());
 			}
-		} else if (resource instanceof TypedLiteral) {
+		} else if (resource instanceof Literal) {
 			element.put("type", "typed-literal");
-			element.put("datatype", TypedLiteral.class.cast(resource).getDataType().getUnicodeString());
-			element.put("value", TypedLiteral.class.cast(resource).getLexicalForm());
-		} else if (resource instanceof BNode) {
+			element.put("datatype", Literal.class.cast(resource).getDataType().getUnicodeString());
+			element.put("value", Literal.class.cast(resource).getLexicalForm());
+		} else if (resource instanceof BlankNode) {
 			element.put("type", "bnode");
 			element.put("value", "/");
 		} else {
@@ -152,7 +151,7 @@ public class ResultSetJsonMessageBodyWriter implements MessageBodyWriter<ResultS
 		JSONObject result = new JSONObject();
 		Set<Variable> keys = solutionMap.keySet();
 		for (Variable key : keys) {
-			result.put(key.getName(), createResultElement((Resource) solutionMap.get(key)));
+			result.put(key.getName(), createResultElement((RdfTerm) solutionMap.get(key)));
 		}
 		return result;
 	}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
index bf9dcd4..22ebc7c 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetTsvMessageBodyWriter.java
@@ -32,13 +32,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
+import org.apache.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
@@ -180,7 +179,7 @@ public class ResultSetTsvMessageBodyWriter implements MessageBodyWriter<ResultSe
       if( !first ) {
         outputStream.write( separator );
       }
-      Resource resource = lineData.get( header );
+      RdfTerm resource = lineData.get( header );
       if( resource != null ) {
         writeEscaped( outputStream, getResourceValue( resource ) );
       }
@@ -190,21 +189,17 @@ public class ResultSetTsvMessageBodyWriter implements MessageBodyWriter<ResultSe
   }
 
   /**
-   * Helper to get the proper string representation for the given Resource.
+   * Helper to get the proper string representation for the given RdfTerm.
    */
-  private String getResourceValue( Resource resource ) {
+  private String getResourceValue( RdfTerm resource ) {
     StringBuilder value = new StringBuilder();
-    if( resource instanceof UriRef ) {
+    if( resource instanceof Iri ) {
       value.append( resource.toString() );
-    } else if( resource instanceof TypedLiteral ) {
+    } else if( resource instanceof Literal ) {
       value.append( "\"" );
-      value.append( escapedDQuotes(((TypedLiteral) resource).getLexicalForm()) );
+      value.append( escapedDQuotes(((Literal) resource).getLexicalForm()) );
       value.append( "\"" );
-    } else if( resource instanceof PlainLiteral ) {
-      value.append( "\"" );
-      value.append( escapedDQuotes(((PlainLiteral) resource).getLexicalForm()) );
-      value.append( "\"" );
-    } else if( resource instanceof BNode ) {
+    } else if( resource instanceof BlankNode ) {
       value.append( "/" );
     } else {
       value.append( resource.toString() );

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
index 074b829..8d2657a 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/sparql/providers/ResultSetXmlMessageBodyWriter.java
@@ -40,14 +40,13 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
+import org.apache.commons.rdf.Literal;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
@@ -148,27 +147,23 @@ public class ResultSetXmlMessageBodyWriter implements MessageBodyWriter<ResultSe
 
 
 	/**
-	 * Helper: creates value element from {@link Resource} depending on its
+	 * Helper: creates value element from {@link RdfTerm} depending on its
 	 * class
 	 *
 	 */
-	private Element createValueElement(Resource resource, Document doc) {
+	private Element createValueElement(RdfTerm resource, Document doc) {
 		Element value = null;
-		if (resource instanceof UriRef) {
+		if (resource instanceof Iri) {
 			value = doc.createElement("uri");
-			value.appendChild(doc.createTextNode(((UriRef) resource)
+			value.appendChild(doc.createTextNode(((Iri) resource)
 					.getUnicodeString()));
-		} else if (resource instanceof TypedLiteral) {
+		} else if (resource instanceof Literal) {
 			value = doc.createElement("literal");
-			value.appendChild(doc.createTextNode(((TypedLiteral) resource)
+			value.appendChild(doc.createTextNode(((Literal) resource)
 					.getLexicalForm()));
-			value.setAttribute("datatype", (((TypedLiteral) resource)
+			value.setAttribute("datatype", (((Literal) resource)
 					.getDataType().getUnicodeString()));
-		} else if (resource instanceof PlainLiteral) {
-			value = doc.createElement("literal");
-			value.appendChild(doc.createTextNode(((PlainLiteral) resource)
-					.getLexicalForm()));
-			Language lang = ((PlainLiteral) resource).getLanguage();
+			Language lang = ((Literal) resource).getLanguage();
 			if (lang != null) {
 				value.setAttribute("xml:lang", (lang.toString()));
 			}
@@ -191,7 +186,7 @@ public class ResultSetXmlMessageBodyWriter implements MessageBodyWriter<ResultSe
 			Element bindingElement = doc.createElement("binding");
 			bindingElement.setAttribute("name", key.getName());
 			bindingElement.appendChild(createValueElement(
-					(Resource) solutionMap.get(key), doc));
+					(RdfTerm) solutionMap.get(key), doc));
 			result.appendChild(bindingElement);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/config/pom.xml
----------------------------------------------------------------------
diff --git a/platform/config/pom.xml b/platform/config/pom.xml
index 7537a21..c726a0b 100644
--- a/platform/config/pom.xml
+++ b/platform/config/pom.xml
@@ -36,6 +36,20 @@
     provides a service to access configuration default values, and a GUI to
     edit such values.
     </description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <!-- a problem with more recent versions and combined targets target="(&amp;(foo=bar)(name=foo)"  -->
+                <version>2.5.0</version>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/graphnodeprovider/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/pom.xml b/platform/graphnodeprovider/pom.xml
index fdd198f..cd5535d 100644
--- a/platform/graphnodeprovider/pom.xml
+++ b/platform/graphnodeprovider/pom.xml
@@ -65,7 +65,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.usermanager</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -103,6 +103,10 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
index e1b4630..8d12669 100644
--- a/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
+++ b/platform/graphnodeprovider/src/main/scala/org/apache/clerezza/platform/graphnodeprovider/PlatformGraphNodeProvider.scala
@@ -20,6 +20,7 @@ package org.apache.clerezza.platform.graphnodeprovider
  */
 
 import java.net.{HttpURLConnection, URL}
+import org.apache.commons.rdf._
 import org.slf4j.scala._
 import org.apache.clerezza.rdf.core.access._
 import org.apache.clerezza.rdf.core._
@@ -27,10 +28,12 @@ import org.apache.clerezza.platform.config.PlatformConfig
 import org.apache.clerezza.platform.Constants
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
 import org.apache.clerezza.platform.users.WebIdGraphsService
-import org.apache.clerezza.rdf.utils.{UnionMGraph, UriMutatingTripleCollection, GraphNode}
 import java.util.concurrent.locks.Lock
 import org.apache.clerezza.platform.usermanager.UserManager
 import java.security.{PrivilegedAction, AccessController}
+import org.apache.clerezza.rdf.utils.GraphNode
+import org.apache.clerezza.rdf.utils.UnionGraph
+import org.apache.clerezza.rdf.utils.UriMutatingGraph
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider
 
 /**
@@ -44,7 +47,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
   /**
    * Get a GraphNode for the specified resource, see class comments for details.
    */
-  def get(uriRef: UriRef): GraphNode = {
+  def get(uriRef: Iri): GraphNode = {
     val uriString = uriRef.getUnicodeString
     val isLocal: Boolean = {
       import scala.collection.JavaConversions._
@@ -56,10 +59,10 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
 
   /**
    * Get a GraphNode for the specified resource, The resource is assumed to be local, i.e. the method behaves like
-   * get(UriRef) for a Uri with an authority section contained in the Set retuned by
+   * get(Iri) for a Uri with an authority section contained in the Set retuned by
    * <code>org.apache.clerezza.platform.config.PlatformConfig#getBaseUris()</code>
    */
-  def getLocal(uriRef: UriRef): GraphNode = {
+  def getLocal(uriRef: Iri): GraphNode = {
     get(uriRef, true)
   }
     
@@ -67,17 +70,17 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
     /**
      *return true iff getLocal(uriRef).getNodeContext.size > 0
      */
-    def existsLocal(uriRef: UriRef): Boolean = {
+    def existsLocal(uriRef: Iri): Boolean = {
         val cgGraph = cgProvider.getContentGraph
         lazy val localInstanceUri = {
             val uri = new java.net.URI(uriRef.getUnicodeString)
-      new UriRef(Constants.URN_LOCAL_INSTANCE + uri.getPath)
+      new Iri(Constants.URN_LOCAL_INSTANCE + uri.getPath)
     }
         //TODO handle /user/
         existsInGraph(uriRef,cgGraph) || existsInGraph(localInstanceUri, cgGraph)
     }
   
-    private[this] def existsInGraph(nodeUri: UriRef, tc: LockableMGraph): Boolean = {
+    private[this] def existsInGraph(nodeUri: Iri, tc: Graph): Boolean = {
         var readLock: Lock = tc.getLock.readLock
         readLock.lock
         try {
@@ -89,7 +92,7 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
     }
     
   
-  private def get(uriRef: UriRef, isLocal: Boolean): GraphNode = {
+  private def get(uriRef: Iri, isLocal: Boolean): GraphNode = {
     val uriString = uriRef.getUnicodeString
     
 
@@ -103,17 +106,17 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
       uri.getScheme+"://"+uri.getAuthority
     }
 
-    val anyHostUri = new UriRef(Constants.URN_LOCAL_INSTANCE + uriPath)
+    val anyHostUri = new Iri(Constants.URN_LOCAL_INSTANCE + uriPath)
 
-    var mGraphs: List[TripleCollection] = Nil
+    var mGraphs: List[Graph] = Nil
 
-    def addToUnion(mGraph: LockableMGraph) {
+    def addToUnion(mGraph: Graph) {
       //adding uncondinionately if (existsInGraph(uriRef, mGraph)) {
       mGraphs ::= mGraph
       //}
       if (isLocal) {
         if (existsInGraph(anyHostUri, mGraph)) {
-          mGraphs ::= new UriMutatingTripleCollection(mGraph, Constants.URN_LOCAL_INSTANCE, uriPrefix)
+          mGraphs ::= new UriMutatingGraph(mGraph, Constants.URN_LOCAL_INSTANCE, uriPrefix)
         }
       }
     }
@@ -126,12 +129,12 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
       val nextSlash = uriPath.indexOf('/',6)    
       if (nextSlash != -1) {
         val userName = uriPath.substring(6, nextSlash)
-        val webIdOption = AccessController.doPrivileged(new PrivilegedAction[Option[UriRef]]() {
-            def run(): Option[UriRef] = {
+        val webIdOption = AccessController.doPrivileged(new PrivilegedAction[Option[Iri]]() {
+            def run(): Option[Iri] = {
               val userNode: GraphNode = userManager.getUserInSystemGraph(userName)
               if (userNode != null) {
                 userNode.getNode match {
-                  case u: UriRef => Some(u)
+                  case u: Iri => Some(u)
                   case _ => None
                 }
               } else {
@@ -188,11 +191,11 @@ class PlatformGraphNodeProvider extends GraphNodeProvider with Logging {
         }
       }
       
-      addToUnion(tcManager.getMGraph(new UriRef(graphUriString)))
+      addToUnion(tcManager.getGraph(new Iri(graphUriString)))
     }
 
-    val unionMGraph = new UnionMGraph(mGraphs:_*);
-    new GraphNode(uriRef, unionMGraph)
+    val unionGraph = new UnionGraph(mGraphs:_*);
+    new GraphNode(uriRef, unionGraph)
   }
 
   private var tcManager: TcManager = null;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/graphprovider.content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/pom.xml b/platform/graphprovider.content/pom.xml
index cecf185..437bdaf 100644
--- a/platform/graphprovider.content/pom.xml
+++ b/platform/graphprovider.content/pom.xml
@@ -35,6 +35,14 @@
     <packaging>bundle</packaging>
     <name>Clerezza - Platform Graph Provider Content</name>
     <description>A service that provides the content-graph</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
index de3b483..8d6ace8 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -30,6 +30,8 @@ import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.utils.UnionGraph;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
 
 /**
  * A service providing a method to retrieve a <code>UnionGraph</code> containing
@@ -41,11 +43,9 @@ import org.apache.clerezza.rdf.utils.UnionGraph;
  * Temporarily means that after restarting the org.apache.clerezza.platform.graphprovider.content
  * bundle, these graphs will no longer be returned in the <code>UnionGraph</code>.
  * 
- * @scr.component
- * @scr.service interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider"
- * 
- * @author rbn, mir
  */
+@Component
+@Service(ContentGraphProvider.class)
 public class ContentGraphProvider {
 
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace.jaxrs2/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/pom.xml b/platform/typehandlerspace.jaxrs2/pom.xml
index c7aed18..b82c6de 100644
--- a/platform/typehandlerspace.jaxrs2/pom.xml
+++ b/platform/typehandlerspace.jaxrs2/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.typehandlerspace.jaxrs</artifactId>
@@ -40,7 +40,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typehandlerspace</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>
@@ -50,7 +50,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.graphnodeprovider</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
index 75e91f8..84e3e85 100644
--- a/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
+++ b/platform/typehandlerspace.jaxrs2/src/main/java/org/apache/clerezza/platform/typehandlerspace/jaxrs/TypeHandlerSpace.java
@@ -31,8 +31,8 @@ import javax.ws.rs.core.UriInfo;
 
 import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.felix.scr.annotations.Component;
@@ -89,13 +89,13 @@ public class TypeHandlerSpace {
     }
 
     private Object getTypeHandler(String absoluteUriPath) {
-        UriRef uri = new UriRef(absoluteUriPath);
+        Iri uri = new Iri(absoluteUriPath);
         if (gnp.existsLocal(uri)) {
             GraphNode node = gnp.getLocal(uri);
             Lock lock =node.readLock();
             lock.lock();
             try {
-                Set<UriRef> rdfTypes = getRdfTypesOfUriRef(node);
+                Set<Iri> rdfTypes = getRdfTypesOfIri(node);
                 return typeHandlerDiscovery.getTypeHandler(rdfTypes);
             } finally {
                 lock.unlock();
@@ -105,17 +105,17 @@ public class TypeHandlerSpace {
         return null;
     }
 
-    private Set<UriRef> getRdfTypesOfUriRef(GraphNode node) {
-        Set<UriRef> rdfTypes = new HashSet<UriRef>();
-        Iterator<Resource> types = node.getObjects(RDF.type);
+    private Set<Iri> getRdfTypesOfIri(GraphNode node) {
+        Set<Iri> rdfTypes = new HashSet<Iri>();
+        Iterator<RdfTerm> types = node.getObjects(RDF.type);
         while (types.hasNext()) {
-            Resource typeStmtObj = types.next();
-            if (!(typeStmtObj instanceof UriRef)) {
+            RdfTerm typeStmtObj = types.next();
+            if (!(typeStmtObj instanceof Iri)) {
                 throw new RuntimeException(
                         "RDF type is expected to be a URI but is " + typeStmtObj
                         + "(of " + node.getNode() + ")");
             }
-            UriRef rdfType = (UriRef) typeStmtObj;
+            Iri rdfType = (Iri) typeStmtObj;
             rdfTypes.add(rdfType);
         }
         
@@ -127,8 +127,8 @@ public class TypeHandlerSpace {
         @GET
         public Object getDescription(@Context UriInfo uriInfo){
             String absoluteUriPath = uriInfo.getAbsolutePath().toString();
-            //MGraph contentMGraph = cgp.getContentGraph();
-                UriRef uri = new UriRef(absoluteUriPath.substring(0,
+            //Graph contentGraph = cgp.getContentGraph();
+                Iri uri = new Iri(absoluteUriPath.substring(0,
                         absoluteUriPath.length() - DESCRIPTION_SUFFIX.length()));
                 GraphNode graphNode = gnp.getLocal(uri);
                 return graphNode.getNodeContext();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/pom.xml b/platform/typehandlerspace/pom.xml
index 43756c3..1586dd7 100644
--- a/platform/typehandlerspace/pom.xml
+++ b/platform/typehandlerspace/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.typehandlerspace</artifactId>
@@ -40,22 +40,22 @@
         <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.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.typepriority</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <!--  
         <dependency>
@@ -73,6 +73,10 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
                 <groupId>org.codehaus.xsite</groupId>
                 <artifactId>xsite-maven-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
index 5b2c929..2db91ee 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerDiscovery.java
@@ -20,7 +20,7 @@ package org.apache.clerezza.platform.typehandlerspace;
 
 import java.util.Set;
 
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * Implementations of this interface map RDF-types to type handlers. A type
@@ -41,6 +41,6 @@ public interface TypeHandlerDiscovery {
      *            be handled
      * @return the type handler for most important rdf-type in the set
      */
-    public Object getTypeHandler(Set<UriRef> rdfTypes);
+    public Object getTypeHandler(Set<Iri> rdfTypes);
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
index 57b89f1..789cc4d 100644
--- a/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
+++ b/platform/typehandlerspace/src/main/java/org/apache/clerezza/platform/typehandlerspace/impl/TypeHandlerDiscoveryImpl.java
@@ -35,7 +35,7 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typehandlerspace.SupportedTypes;
 import org.apache.clerezza.platform.typehandlerspace.TypeHandlerDiscovery;
 import org.apache.clerezza.platform.typepriority.TypePrioritizer;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.ontologies.RDFS;
 import org.apache.felix.scr.annotations.ReferencePolicy;
 
@@ -56,8 +56,8 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
     @Reference
     private TypePrioritizer typePrioritizer;
 
-    private final Map<UriRef, Object> typeHandlerMap = Collections.synchronizedMap(
-            new HashMap<UriRef, Object>());
+    private final Map<Iri, Object> typeHandlerMap = Collections.synchronizedMap(
+            new HashMap<Iri, Object>());
     
     protected void bindTypeHandler(Object typeHandler) {
         SupportedTypes supportedTypes = typeHandler.getClass()
@@ -66,17 +66,17 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
             return;
         }
         for (String typeUriString : supportedTypes.types()) {
-            UriRef typeUri = new UriRef(typeUriString);
+            Iri typeUri = new Iri(typeUriString);
             typeHandlerMap.put(typeUri, typeHandler);
         }
     }
         
     protected void unbindTypeHandler(Object typeHandler) {
-        Iterator<UriRef> keys = typeHandlerMap.keySet().iterator();
-        Set<UriRef> toRemove = new HashSet<UriRef>(typeHandlerMap.size());
+        Iterator<Iri> keys = typeHandlerMap.keySet().iterator();
+        Set<Iri> toRemove = new HashSet<Iri>(typeHandlerMap.size());
         synchronized(typeHandlerMap) {
             while (keys.hasNext()) {
-                UriRef uriRef = keys.next();
+                Iri uriRef = keys.next();
                 if(typeHandlerMap.get(uriRef) == typeHandler) {
                     toRemove.add(uriRef);
                 }
@@ -89,12 +89,12 @@ public class TypeHandlerDiscoveryImpl implements TypeHandlerDiscovery {
     }
 
     @Override
-    public Object getTypeHandler(final Set<UriRef> types) {
+    public Object getTypeHandler(final Set<Iri> types) {
         return AccessController.doPrivileged(new PrivilegedAction<Object>() {
 
             @Override
             public Object run() {
-                Iterator<UriRef> prioritizedTypes = typePrioritizer.iterate(types);
+                Iterator<Iri> prioritizedTypes = typePrioritizer.iterate(types);
                 while (prioritizedTypes.hasNext()) {
                     Object result = typeHandlerMap.get(prioritizedTypes.next());
                     if (result != null) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
index 4552132..31222a7 100644
--- a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
+++ b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/GraphWriterDummy.java
@@ -31,7 +31,7 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.commons.rdf.Graph;
 
 /**
  * 
@@ -40,26 +40,26 @@ import org.apache.clerezza.rdf.core.TripleCollection;
  */
 @Provider
 @Produces("application/rdf+xml")
-public class GraphWriterDummy implements MessageBodyWriter<TripleCollection> {
+public class GraphWriterDummy implements MessageBodyWriter<Graph> {
 
     @Override
     public boolean isWriteable(Class<?> type, Type genericType, 
             Annotation[] annotations, MediaType mediaType) {
-        return TripleCollection.class.isAssignableFrom(type);
+        return Graph.class.isAssignableFrom(type);
     }
 
     @Override
-    public long getSize(TripleCollection t, Class<?> type, Type genericType, 
+    public long getSize(Graph t, Class<?> type, Type genericType, 
             Annotation[] annotations, MediaType mediaType) {
         return -1;
     }
 
     @Override
-    public void writeTo(TripleCollection t, Class<?> type, Type genericType,
+    public void writeTo(Graph t, Class<?> type, Type genericType,
             Annotation[] annotations, MediaType mediaType,
             MultivaluedMap<String, Object> httpHeaders,
             OutputStream entityStream) throws IOException, WebApplicationException {
-        entityStream.write("Graph writer".getBytes());
+        entityStream.write("ImmutableGraph writer".getBytes());
         entityStream.close();
     }
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
----------------------------------------------------------------------
diff --git a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
index 645ba8a..1e89023 100644
--- a/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
+++ b/platform/typehandlerspace/src/test/java/org/apache/clerezza/platform/typehandlerspace/TypeHandlerSpaceTest.java
@@ -18,40 +18,8 @@
  */
 package org.apache.clerezza.platform.typehandlerspace;
 
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import java.util.concurrent.locks.ReadWriteLock;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Application;
-
-import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.event.FilterTriple;
-import org.apache.clerezza.rdf.core.event.GraphListener;
-//import org.apache.clerezza.jaxrs.testutils.TestWebServer;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.RDF;
 
 /**
  * @author mir
@@ -64,9 +32,9 @@ public class TypeHandlerSpaceTest {
     }
     
 //    
-//    private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
+//    private static LockableGraph mGraph = new LockableGraphWrapper(new SimpleGraph());
 //
-//    UriRef myType = new UriRef("org.example/myType");
+//    Iri myType = new Iri("org.example/myType");
 //    
 //    @Path("/myTypeHandler")
 //    public static class MyTypeHandler {
@@ -106,7 +74,7 @@ public class TypeHandlerSpaceTest {
 //        
 //        int port = createTestWebServer().getPort();
 //
-//        UriRef uri = new UriRef("http://localhost:" + port + "/test");
+//        Iri uri = new Iri("http://localhost:" + port + "/test");
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
 //        mGraph.add(triple);
@@ -141,7 +109,7 @@ public class TypeHandlerSpaceTest {
 //    public void testGet() throws IOException {
 //        
 //        int port = createTestWebServer().getPort();        
-//        UriRef uri = new UriRef("http://localhost:" + port + "/test");
+//        Iri uri = new Iri("http://localhost:" + port + "/test");
 //        
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
@@ -170,7 +138,7 @@ public class TypeHandlerSpaceTest {
 //    public void testGetDescription() throws IOException {
 //        
 //        int port = createTestWebServer().getPort();
-//        UriRef uri = new UriRef("http://localhost:" + port + "/test");
+//        Iri uri = new Iri("http://localhost:" + port + "/test");
 //        
 //        // Setup mGraph
 //        Triple triple = new TripleImpl(uri, RDF.type, myType);
@@ -188,7 +156,7 @@ public class TypeHandlerSpaceTest {
 //        for (int ch = requestInput.read(); ch != -1; ch = requestInput.read()) {
 //            baos.write(ch);
 //        }
-//        Assert.assertEquals("Graph writer", baos.toString());
+//        Assert.assertEquals("ImmutableGraph writer", baos.toString());
 //    }
 //
 //    private TestWebServer createTestWebServer() {
@@ -209,8 +177,8 @@ public class TypeHandlerSpaceTest {
 //                TypeHandlerSpace typeHandlerSpace = new TypeHandlerSpace();
 //                typeHandlerSpace.tcManager = new TcManager(){
 //                    @Override
-//                    public LockableMGraph getMGraph(UriRef name) {
-//                        return new LockableMGraph() {
+//                    public LockableGraph getGraph(Iri name) {
+//                        return new LockableGraph() {
 //
 //                            @Override
 //                            public ReadWriteLock getLock() {
@@ -218,12 +186,12 @@ public class TypeHandlerSpaceTest {
 //                            }
 //
 //                            @Override
-//                            public Graph getGraph() {
+//                            public ImmutableGraph getGraph() {
 //                                return mGraph.getGraph();
 //                            }
 //
 //                            @Override
-//                            public Iterator<Triple> filter(NonLiteral subject, UriRef predicate, Resource object) {
+//                            public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
 //                                return mGraph.filter(subject, predicate, object);
 //                            }
 //
@@ -313,7 +281,7 @@ public class TypeHandlerSpaceTest {
 //                typeHandlerSpace.typeHandlerDiscovery = new TypeHandlerDiscovery() {
 //
 //                    @Override
-//                    public Object getTypeHandler(Set<UriRef> rdfTypes) {
+//                    public Object getTypeHandler(Set<Iri> rdfTypes) {
 //                        if (rdfTypes.contains(myType)){
 //                            return typeHandler;
 //                        }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typepriority/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typepriority/pom.xml b/platform/typepriority/pom.xml
index 519811a..1d0810c 100644
--- a/platform/typepriority/pom.xml
+++ b/platform/typepriority/pom.xml
@@ -80,6 +80,10 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
                 <groupId>org.codehaus.xsite</groupId>
                 <artifactId>xsite-maven-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/typerendering.scalaserverpages/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/pom.xml b/platform/typerendering.scalaserverpages/pom.xml
index 7d5cdc6..3a9d3e7 100644
--- a/platform/typerendering.scalaserverpages/pom.xml
+++ b/platform/typerendering.scalaserverpages/pom.xml
@@ -31,6 +31,14 @@
     <version>1.0.0-SNAPSHOT</version>
     <name>Clerezza - Platform ScalaServerPages Renderlet</name>
     <description>Renderlet implementation wrapping org.apache.clerezza.scala</description>
+    <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/c8c34941/platform/typerendering/platform.typerendering.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering/platform.typerendering.core/pom.xml b/platform/typerendering/platform.typerendering.core/pom.xml
index bc6f83f..2b14401 100644
--- a/platform/typerendering/platform.typerendering.core/pom.xml
+++ b/platform/typerendering/platform.typerendering.core/pom.xml
@@ -35,6 +35,14 @@
     <description>
     This project provides a JAX-RS MessageBodyWriter to render GraphNodes. Rendering requests are delegated to registered renderlets. 
     </description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/platform/usermanager/pom.xml
----------------------------------------------------------------------
diff --git a/platform/usermanager/pom.xml b/platform/usermanager/pom.xml
index ba579d7..e8d6151 100644
--- a/platform/usermanager/pom.xml
+++ b/platform/usermanager/pom.xml
@@ -80,6 +80,10 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
                 <groupId>org.codehaus.xsite</groupId>
                 <artifactId>xsite-maven-plugin</artifactId>
                 <configuration>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/provisioning/launchers/linked-data-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/linked-data-launcher/pom.xml b/provisioning/launchers/linked-data-launcher/pom.xml
index 5e0acb0..35eb3ab 100644
--- a/provisioning/launchers/linked-data-launcher/pom.xml
+++ b/provisioning/launchers/linked-data-launcher/pom.xml
@@ -19,8 +19,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.provisioning</groupId>
     <artifactId>linked-data-launcher</artifactId>
@@ -205,7 +205,7 @@
             <!-- The Apache Stanbol launchpad -->
             <groupId>org.apache.stanbol</groupId>
             <artifactId>org.apache.stanbol.commons.launchpad</artifactId>
-            <version>0.11.0</version>
+            <version>0.12.0</version>
         </dependency>
         <dependency>
             <!-- maven-launchpad-plugin builds on the launchpad.base app -->
@@ -218,7 +218,7 @@
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>felixosgi</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
         <dependency>
@@ -230,21 +230,21 @@
        <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>rdf</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
 		
         <dependency>
              <groupId>org.apache.clerezza.provisioning</groupId>
              <artifactId>rdf.tdb</artifactId>
-             <version>0.1</version>
+             <version>1.0.0-SNAPSHOT</version>
              <type>partialbundlelist</type>
          </dependency>
 		 
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>platform.graphnodeprovider</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
       <dependency>
@@ -256,19 +256,19 @@
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>typehandlerspace</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>typerendering</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.provisioning</groupId>
             <artifactId>rdf.web</artifactId>
-            <version>0.1</version>
+            <version>1.0.0-SNAPSHOT</version>
             <type>partialbundlelist</type>
         </dependency>
     </dependencies>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/provisioning/rdf.web/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf.web/pom.xml b/provisioning/rdf.web/pom.xml
index f503b5a..4254294 100644
--- a/provisioning/rdf.web/pom.xml
+++ b/provisioning/rdf.web/pom.xml
@@ -23,10 +23,10 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../../parent</relativePath>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     
     <groupId>org.apache.clerezza.provisioning</groupId>
@@ -47,17 +47,17 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>jaxrs.rdf.providers</artifactId>
-            <version>0.15</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.web.core</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.web.ontologies</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -65,6 +65,11 @@
             <version>0.9</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.json.simple</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.globalmenu.api</artifactId>
             <version>0.3</version>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/provisioning/rdf/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf/pom.xml b/provisioning/rdf/pom.xml
index 2d97a87..ce10945 100644
--- a/provisioning/rdf/pom.xml
+++ b/provisioning/rdf/pom.xml
@@ -175,7 +175,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.file.storage</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.ext</groupId>            

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/provisioning/security/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/security/pom.xml b/provisioning/security/pom.xml
index b5cf21f..f8202c0 100644
--- a/provisioning/security/pom.xml
+++ b/provisioning/security/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+?<xml version="1.0" encoding="UTF-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/provisioning/typehandlerspace/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/typehandlerspace/pom.xml b/provisioning/typehandlerspace/pom.xml
index 459f4fc..7af1994 100644
--- a/provisioning/typehandlerspace/pom.xml
+++ b/provisioning/typehandlerspace/pom.xml
@@ -23,10 +23,10 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../../parent</relativePath>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
 
     <groupId>org.apache.clerezza.provisioning</groupId>
@@ -44,19 +44,19 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typepriority</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency> 	
  
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typehandlerspace.jaxrs</artifactId>
-            <version>0.9</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>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf.storage.web/src/main/scala/WebProxy.scala b/rdf.storage.web/src/main/scala/WebProxy.scala
index 8c8ec54..3a03e3b 100644
--- a/rdf.storage.web/src/main/scala/WebProxy.scala
+++ b/rdf.storage.web/src/main/scala/WebProxy.scala
@@ -148,8 +148,8 @@ class WebProxy extends WeightedTcProvider with Logging {
 
   def listGraphs: java.util.Set[Iri] = {
     var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
-    result.addAll(listGraphs)
-    result.addAll(listGraphs)
+    result.addAll(listMGraphs)
+    result.addAll(listImmutableGraphs)
     return result
   }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/pom.xml b/rdf.web/pom.xml
index 73ea91d..7dc74da 100644
--- a/rdf.web/pom.xml
+++ b/rdf.web/pom.xml
@@ -24,15 +24,15 @@
     <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>rdf.web</artifactId>
     <packaging>pom</packaging>
     <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - SCB Web Access</name>
-    <description>Allows access to SCB graphs over HTTP with JAX-RS</description>
+    <name>Clerezza - RDF Web Access</name>
+    <description>Allows access to Clerezza graphs over HTTP with JAX-RS</description>
     <modules>
         <module>rdf.web.core</module>
         <module>rdf.web.ontologies</module>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/pom.xml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/pom.xml b/rdf.web/rdf.web.core/pom.xml
index 772fd5a..2cad597 100644
--- a/rdf.web/rdf.web.core/pom.xml
+++ b/rdf.web/rdf.web.core/pom.xml
@@ -18,20 +18,29 @@
  specific language governing permissions and limitations
  under the License.
 
--->
+    -->
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>rdf.web</artifactId>
-        <version>0.10</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>rdf.web.core</artifactId>
     <packaging>bundle</packaging>
     <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - SCB Web Access Core</name>
-    <description>The core part of SCB Web Access</description>
+    <name>Clerezza - RDF Web Access Core</name>
+    <description>The core part of Clerezza RDF  Web Access</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>junit</groupId>
@@ -41,29 +50,29 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </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.core</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.serializer</artifactId>
             <scope>test</scope>
-            <version>0.11</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.parser</artifactId>
             <scope>test</scope>
-            <version>0.12</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
@@ -82,12 +91,12 @@
         <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>rdf.web.ontologies</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/c8c34941/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
index cfb0a64..440e877 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
@@ -22,10 +22,10 @@ import org.apache.clerezza.platform.Constants;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
 import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Graph;
 import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.web.ontologies.BACKUP;
@@ -128,8 +128,8 @@ public class Backup implements GlobalMenuItemsProvider {
 
     @GET
     public GraphNode overviewPage() {
-        MGraph resultGraph = new SimpleMGraph();
-        GraphNode result = new GraphNode(new BNode(), resultGraph);
+        Graph resultGraph = new SimpleGraph();
+        GraphNode result = new GraphNode(new BlankNode(), resultGraph);
         result.addProperty(RDF.type, BACKUP.BackupAdminPage);
         result.addProperty(RDF.type, PLATFORM.HeadedPage);
         return result;


[44/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
new file mode 100644
index 0000000..f30cc14
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/selected-concepts.js
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function SelectedConcepts(){};
+
+SelectedConcepts.exists = function (concept) {
+	var exists = false;
+	$("input[name='concepts']").each( function () {
+		if ($(this).val() == concept) {
+			exists = true;
+		}
+	});
+	return exists;
+}
+
+SelectedConcepts.addConcept = function (prefLabel, uri) {
+	var div = $("<div/>");
+	ConceptFinder.createConceptWidgets(prefLabel, uri).appendTo(div);
+	SelectedConcepts.createDeleteButton(prefLabel, uri).appendTo(div);
+	$("<br />").appendTo(div);
+	$("<br />").appendTo(div);
+	$("#selected-concepts").append(div);
+}
+
+/**
+ * Creates a button that allows to delete a concept.
+ */
+SelectedConcepts.createDeleteButton = function(prefLabel, uri) {
+	var deleteLink = $("<a/>").attr("href", "#");
+	deleteLink.addClass("tx-icon tx-icon-delete").text("Delete");
+	deleteLink.click(function() {
+		deleteLink.parent().remove();
+		ConceptFinder.createSystemFoundConcept(prefLabel, uri)
+	});
+	return deleteLink;
+}
+
+
+$(document).ready(function () {
+	$(".tx-icon-delete").click(function() {
+		$(this).parent().remove();
+	});
+});

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
new file mode 100644
index 0000000..fe8d6fe
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/style/form.css
@@ -0,0 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+input, select, textarea {
+	width: 32em;
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java b/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
new file mode 100644
index 0000000..c73da54
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerTest.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.util.Arrays;
+import java.util.List;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.RuntimeDelegate;
+import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
+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.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.wink.common.internal.runtime.RuntimeDelegateImpl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class tests the functionality of a SimpleConceptProviderManager.
+ *
+ * @author hasan
+ */
+public class ConceptProviderManagerTest {
+
+    private class TestConceptProvider implements ConceptProvider {
+        @Override
+        public Graph retrieveConcepts(String searchTerm) {
+            return null;
+        }
+    }
+
+    private class TestedConceptProviderManager extends SimpleConceptProviderManager {
+        public void fillConceptProviderList() {
+            ConceptProvider CP1 = new TestConceptProvider();
+            ConceptProvider CP2 = new TestConceptProvider();
+            getConceptProviders().add(CP1);
+            getConceptProviders().add(CP2);
+        }
+    }
+
+    private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
+
+    private TestedConceptProviderManager testedConceptProviderManager;
+
+    @Before
+    public void setUp() {
+        RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
+        testedConceptProviderManager = new TestedConceptProviderManager();
+        testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
+
+            @Override
+            public LockableMGraph getContentGraph() {
+                return mGraph;
+            }
+        };
+    }
+
+    @Test
+    public void testUpdateConceptProviders() {
+        testedConceptProviderManager.fillConceptProviderList();
+        List<ConceptProvider> cpl = testedConceptProviderManager
+                .getConceptProviders();
+        Assert.assertTrue(cpl.get(0) instanceof TestConceptProvider);
+        Assert.assertTrue(cpl.get(1) instanceof TestConceptProvider);
+        Assert.assertTrue(cpl.size()==2);
+        List<String> types = Arrays.asList(
+                CONCEPTS.LocalConceptProvider.getUnicodeString(),
+                CONCEPTS.RemoteConceptProvider.getUnicodeString());
+        List<String> sparqlEndPoint = Arrays.asList(
+                "", "http://example.org/sparql");
+        List<String> defaultGraphs = Arrays.asList(
+                "", "http://example.org/graph");
+        List<String> queryTemplates = Arrays.asList(
+                "", "CONSTRUCT {?a ?b ?c .} WHERE {?a ?b ?c .}");
+        List<String> conceptSchemes = Arrays.asList(
+                "http://localhost:8080/default", "");
+        Response response = testedConceptProviderManager.updateConceptProviders(
+                types, sparqlEndPoint, defaultGraphs, queryTemplates,
+                conceptSchemes);
+        cpl = testedConceptProviderManager.getConceptProviders();
+        Assert.assertTrue(cpl.get(0) instanceof LocalConceptProvider);
+        Assert.assertTrue(cpl.get(1) instanceof RemoteConceptProvider);
+        Assert.assertTrue(cpl.size()==2);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java b/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
new file mode 100644
index 0000000..ef63d25
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/test/java/org/apache/clerezza/platform/concepts/core/ConceptsFinderTest.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.util.Arrays;
+import java.util.List;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.concepts.ontologies.QUERYRESULT;
+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.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.LockableMGraphWrapper;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.OWL;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.SKOS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class tests the functionality of a ConceptsFinder.
+ *
+ * @author hasan
+ */
+public class ConceptsFinderTest {
+
+    private final UriRef concept1a = new UriRef("http://example.org/concept1a");
+    private final UriRef concept1b = new UriRef("http://example.org/concept1b");
+    private final UriRef concept1c = new UriRef("http://example.org/concept1c");
+    private final UriRef concept1d = new UriRef("http://example.org/concept1d");
+
+    private final UriRef concept2a = new UriRef("http://example.org/concept2a");
+    private final UriRef concept2b = new UriRef("http://example.org/concept2b");
+    private final UriRef concept2c = new UriRef("http://example.org/concept2c");
+    private final UriRef concept2d = new UriRef("http://example.org/concept2d");
+
+    private final List<UriRef> concepts1 = Arrays.asList(
+            concept1a, concept1b, concept1c, concept1d);
+    private final List<UriRef> concepts2 = Arrays.asList(
+            concept2a, concept2b, concept2c, concept2d);
+
+    private class TestConceptProvider implements ConceptProvider {
+        MGraph conceptGraph = new SimpleMGraph();
+
+        public TestConceptProvider(List<UriRef> myConcepts,
+                List<UriRef> yourConcepts, List<Integer> sameAs) {
+            Assert.assertTrue(myConcepts.size()==4);
+            Assert.assertTrue(yourConcepts.size()==4);
+            for (UriRef concept : myConcepts) {
+                conceptGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
+            }
+            for (Integer index : sameAs) {
+                conceptGraph.add(new TripleImpl(myConcepts.get(index), OWL.sameAs,
+                    yourConcepts.get(index)));
+            }
+        }
+
+        @Override
+        public Graph retrieveConcepts(String searchTerm) {
+            return conceptGraph.getGraph();
+        }
+    }
+
+    private class TestedConceptProviderManager extends SimpleConceptProviderManager {
+        public void fillConceptProviderList() {
+            ConceptProvider CP1 = new TestConceptProvider(concepts1, concepts2,
+                    Arrays.asList(1,3));
+            ConceptProvider CP2 = new TestConceptProvider(concepts2, concepts1,
+                    Arrays.asList(2,3));
+            getConceptProviders().add(CP1);
+            getConceptProviders().add(CP2);
+        }
+    }
+
+    private class TestedConceptsFinder extends ConceptsFinder {
+    }
+
+    private static LockableMGraph mGraph = new LockableMGraphWrapper(new SimpleMGraph());
+    private TestedConceptProviderManager testedConceptProviderManager;
+    private TestedConceptsFinder testedConceptsFinder;
+
+    @Before
+    public void setUp() {
+        final PlatformConfig platformConfig = new PlatformConfig() {
+
+            @Override
+            public UriRef getDefaultBaseUri() {
+                return new UriRef("http://testing.localhost/");
+            }
+            
+        };
+        final ContentGraphProvider cgProvider = new ContentGraphProvider() {
+
+            @Override
+            public LockableMGraph getContentGraph() {
+                return new LockableMGraphWrapper(new SimpleMGraph());
+            }
+
+        };
+
+        testedConceptProviderManager = new TestedConceptProviderManager();
+        testedConceptProviderManager.cgProvider = new ContentGraphProvider() {
+            @Override
+            public LockableMGraph getContentGraph() {
+                return mGraph;
+            }
+        };
+        testedConceptsFinder = new TestedConceptsFinder() {
+            {
+                bindPlatformConfig(platformConfig);
+                bindCgProvider(cgProvider);
+            }
+        };
+        testedConceptsFinder.conceptProviderManager =
+                testedConceptProviderManager;
+
+    }
+
+    @Test
+    public void testFindConcepts() {
+        testedConceptProviderManager.fillConceptProviderList();
+        GraphNode proposals = testedConceptsFinder.findConcepts("any");
+        Assert.assertEquals(5, proposals.countObjects(QUERYRESULT.concept));
+        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1a));
+        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1b));
+        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1c));
+        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept1d));
+        Assert.assertTrue(proposals.hasProperty(QUERYRESULT.concept, concept2a));
+        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2b));
+        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2c));
+        Assert.assertFalse(proposals.hasProperty(QUERYRESULT.concept, concept2d));
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.ontologies/LICENSE b/platform/concepts/platform.concepts.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/concepts/platform.concepts.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.ontologies/pom.xml b/platform/concepts/platform.concepts.ontologies/pom.xml
new file mode 100644
index 0000000..d266140
--- /dev/null
+++ b/platform/concepts/platform.concepts.ontologies/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.concepts</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.concepts.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Concepts Ontologies</name>
+    <description>
+        Ontologies for Platform Concepts Core
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf b/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
new file mode 100644
index 0000000..a8cb5e4
--- /dev/null
+++ b/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/concepts.rdf
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xmlns="http://clerezza.org/2010/01/concepts#"
+	xml:base="http://clerezza.org/2010/01/concepts"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2010/01/concepts#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Concepts
+	</dc:title>
+</owl:Ontology>
+
+<!-- Classes -->
+
+<rdfs:Class rdf:about="#ConceptsPage">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Concepts Page</rdfs:label>
+	<skos:definition xml:lang="en">
+		A web page containing a list of concept entries and associated information.
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ManageConceptProvidersPage">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Manage Concept Providers Page</rdfs:label>
+	<skos:definition xml:lang="en">
+		A web page for managing all concept providers
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#SearchTerm">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Search Term</rdfs:label>
+	<skos:definition xml:lang="en">A search term</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ConceptProvider">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Concept Provider</rdfs:label>
+	<skos:definition xml:lang="en">
+		A Provider for retrieving concepts
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#LocalConceptProvider">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:subClassOf rdf:resource="ConceptProvider"/>
+	<rdfs:label xml:lang="en">Local Concept Provider</rdfs:label>
+	<skos:definition xml:lang="en">
+		A Concept Provider for retrieving concepts from a graph in localhost
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#RemoteConceptProvider">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Remote Concept Provider</rdfs:label>
+	<rdfs:subClassOf rdf:resource="ConceptProvider"/>
+	<skos:definition xml:lang="en">
+		A Concept Provider for retrieving concepts via a sparql endpoint
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ConceptProviderList">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Concept Provider List</rdfs:label>
+	<skos:definition xml:lang="en">
+		A list of Concept Providers
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ConceptCache">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Concept Cache</rdfs:label>
+	<skos:definition xml:lang="en">A cache for all concepts retrieved from a
+		specific Graph managed by a specific SPARQL End Point.
+	</skos:definition>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#GenericResourcePage">
+	<rdf:type rdf:resource="owl:Class"/>
+	<rdfs:label xml:lang="en">Generic Resource Page</rdfs:label>
+	<skos:definition xml:lang="en">
+		A web page containing a resource and selected concepts.
+	</skos:definition>
+</rdfs:Class>
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="#selectedScheme">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">selected concept scheme</rdfs:label>
+	<skos:definition xml:lang="en">Points to the selected concept scheme.</skos:definition>
+	<rdfs:domain rdf:resource="#ConceptsPage"/>
+	<rdfs:domain rdf:resource="#ConceptProvider"/>
+	<rdfs:range rdf:resource="skos:ConceptScheme"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#queryTemplate">
+	<rdf:type rdf:resource="owl:DatatypeProperty"/>
+	<rdfs:label xml:lang="en">query template</rdfs:label>
+	<skos:definition xml:lang="en">
+		Points to a template containing a sparql query string which will
+		be applied by the subject to retrieve concepts.
+	</skos:definition>
+	<rdfs:domain rdf:resource="#ConceptProvider"/>
+	<rdfs:range rdf:resource="xsd:string"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#searchTerm">
+	<rdf:type rdf:resource="owl:DatatypeProperty"/>
+	<rdfs:label xml:lang="en">search Term</rdfs:label>
+	<skos:definition xml:lang="en">Points to a string as a term to be
+		searched in concept labels.</skos:definition>
+	<rdfs:domain rdf:resource="#SearchTerm"/>
+	<rdfs:range rdf:resource="xsd:string"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#searchResult">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">search Result</rdfs:label>
+	<skos:definition xml:lang="en">Points to a concept which is a result of
+		a search using the term represented by the subject.
+	</skos:definition>
+	<rdfs:domain rdf:resource="#SearchTerm"/>
+	<rdfs:range rdf:resource="skos:Concept"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#sparqlEndPoint">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">Sparql End Point</rdfs:label>
+	<skos:definition xml:lang="en">
+		Points to a UriRef of a sparql endpoint.
+	</skos:definition>
+	<rdfs:domain rdf:resource="#RemoteConceptProvider"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#defaultGraph">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">default Graph</rdfs:label>
+	<skos:definition xml:lang="en">Points to a graph against which the subject
+		performs its queries.</skos:definition>
+	<rdfs:domain rdf:resource="#ConceptProvider"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#cacheEntry">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">cache Entry</rdfs:label>
+	<skos:definition xml:lang="en">Points to a resource which describes
+		cached search results for a search term.
+	</skos:definition>
+	<rdfs:domain rdf:resource="#ConceptCache"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#resource">
+	<rdf:type rdf:resource="owl:ObjectProperty"/>
+	<rdfs:label xml:lang="en">Resource</rdfs:label>
+	<skos:definition xml:lang="en">Points to a resource.</skos:definition>
+	<rdfs:domain rdf:resource="#GenericConceptScheme"/>
+</rdf:Property>
+
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf b/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
new file mode 100644
index 0000000..4b298b0
--- /dev/null
+++ b/platform/concepts/platform.concepts.ontologies/src/main/resources/org/apache/clerezza/platform/concepts/ontologies/queryresult.rdf
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:skos="http://www.w3.org/2008/05/skos#"
+    xmlns="http://clerezza.org/2010/04/queryresult#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+  xml:base="http://clerezza.org/2010/04/queryresult">
+  <owl:Ontology rdf:about="#">
+    <owl:versionInfo>Revision: 0.1</owl:versionInfo>
+    <dc:title xml:lang="en">
+		Ontology for describing the result of a Query for Concepts
+	</dc:title>
+  </owl:Ontology>
+  <rdfs:Class rdf:ID="QueryResult">
+    <rdfs:label xml:lang="en">Query Result</rdfs:label>
+    <skos:definition xml:lang="en">
+		The result of a query for concepts.
+	</skos:definition>
+    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+  </rdfs:Class>
+  <rdf:Property rdf:ID="concept">
+    <rdfs:label xml:lang="en">concept</rdfs:label>
+    <skos:definition xml:lang="en">Points to a concept matching the query yielding to the subject.</skos:definition>
+    <rdfs:domain rdf:resource="#QueryResult"/>
+    <rdfs:range rdf:resource="http://www.w3.org/2008/05/skos#Concept"/>
+    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
+  </rdf:Property>
+  <rdf:Property rdf:ID="creationOfNewFreeConceptSuggested">
+    <rdfs:label xml:lang="en">creationOfNewFreeConceptSuggested</rdfs:label>
+    <skos:definition xml:lang="en">Points to a boolean value that indicates whether 
+    consumers of the subject are suggested to create new concepts with a query as 
+    preferred label.</skos:definition>
+    <rdfs:domain rdf:resource="#QueryResult"/>
+    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+  </rdf:Property>
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/pom.xml
----------------------------------------------------------------------
diff --git a/platform/concepts/pom.xml b/platform/concepts/pom.xml
new file mode 100644
index 0000000..7133468
--- /dev/null
+++ b/platform/concepts/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.concepts</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Concepts</name>
+    <description>Provides services for tagging resources with SKOS concepts.</description>
+    <modules>
+        <module>platform.concepts.ontologies</module>
+        <module>platform.concepts.core</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/LICENSE
----------------------------------------------------------------------
diff --git a/platform/config.gui/LICENSE b/platform/config.gui/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/config.gui/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/pom.xml
----------------------------------------------------------------------
diff --git a/platform/config.gui/pom.xml b/platform/config.gui/pom.xml
new file mode 100644
index 0000000..96493dc
--- /dev/null
+++ b/platform/config.gui/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.config.gui</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Configuration GUI</name>
+    <description>This bundles initializes a GUI to
+        edit configuration options.
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
----------------------------------------------------------------------
diff --git a/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java b/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
new file mode 100644
index 0000000..a341bc5
--- /dev/null
+++ b/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/ConfigGuiAccessPermission.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.config.gui;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Permission to use the Config GUI. Note that the user
+ * additionally needs permission write into the system graph.
+ *
+ * @author tio
+ */
+@PermissionInfo(value="Config GUI Access Permission", description="Grants access " +
+    "to the Config GUI")
+public class ConfigGuiAccessPermission extends Permission{
+
+    public ConfigGuiAccessPermission() {
+        super("Config GUI Access permission");
+    }
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public ConfigGuiAccessPermission(String target, String actions) {
+        super("Config GUI Access permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 2177987;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
----------------------------------------------------------------------
diff --git a/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java b/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
new file mode 100644
index 0000000..647a0e6
--- /dev/null
+++ b/platform/config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.config.gui;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.config.SystemConfig;
+
+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;
+import org.apache.felix.scr.annotations.Services;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.osgi.framework.Bundle;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.UriRef;
+
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.clerezza.rdf.core.access.security.TcPermission;
+
+import org.apache.clerezza.rdf.ontologies.*;
+import org.apache.clerezza.web.fileserver.BundlePathNode;
+import org.apache.clerezza.web.fileserver.FileServer;
+import org.wymiwyg.commons.util.dirbrowser.PathNode;
+
+/**
+ * Provides a GUI to change platform default values.
+ *
+ * @author osr
+ */
+@Component
+@Services({
+    @Service(value = Object.class),
+    @Service(value = GlobalMenuItemsProvider.class)
+})
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/admin/configuration")
+public class PlatformConfigGui implements GlobalMenuItemsProvider {
+
+    private final static char SLASH = '/';
+    @Reference
+    private PlatformConfig platformConfig;
+    @Reference
+    private RenderletManager renderletManager;
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+    private final UriRef CONFIG_PAGE = new UriRef("http://clerezza.org/2009/08/platform#ConfigPage");
+    private FileServer fileServer;
+
+    protected void activate(ComponentContext context) throws IOException,
+            URISyntaxException {
+        Bundle bundle = context.getBundleContext().getBundle();
+        URL resourceDir = getClass().getResource("staticweb");
+        PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
+
+        logger.debug("Initializing file server for {} ({})", resourceDir,
+                resourceDir.getFile());
+
+        fileServer = new FileServer(pathNode);
+
+        URL template = getClass().getResource(
+                "config.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(template.toURI().toString()),
+                CONFIG_PAGE, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+    }
+
+    protected void deactivate(ComponentContext context) {
+        fileServer = null;
+    }
+
+    /**
+     * Returns a headed page listing RSS Feeds. The optional parameter query is a
+     * search term, which tests if the term is contained in thee title or uri
+     * of the feed.
+     *
+     * @param query an optional parameter which specifies a search term criteria.
+     * The search term will be tested if contained in the title or the uri of the feed.
+     *
+     * @return {@link GraphNode}
+     *
+     */
+    @GET
+    public GraphNode getConfig() {
+        AccessController.checkPermission(new ConfigGuiAccessPermission());
+        GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
+        node.addProperty(RDF.type, CONFIG_PAGE);
+        node.addProperty(RDF.type, PLATFORM.HeadedPage);
+        node.addProperty(PLATFORM.defaultBaseUri, platformConfig.getDefaultBaseUri());
+        return node;
+
+    }
+
+    @POST
+    public Response setConfig(@FormParam(value = "defaultBaseUri") String defaultBaseUri,
+            @Context UriInfo uriInfo) {
+        AccessController.checkPermission(new ConfigGuiAccessPermission());
+        logger.debug("Setting base-uri to {}", defaultBaseUri);
+        if (defaultBaseUri.charAt(defaultBaseUri.length() - 1) != SLASH) {
+            defaultBaseUri += SLASH;
+        }
+        UriRef uri = new UriRef(defaultBaseUri);
+        GraphNode node = platformConfig.getPlatformInstance();
+        LockableMGraph sysGraph = (LockableMGraph) node.getGraph();
+        Lock writeLock = sysGraph.getLock().writeLock();
+        writeLock.lock();
+        try {
+            node.deleteProperties(PLATFORM.defaultBaseUri);
+            node.addProperty(PLATFORM.defaultBaseUri, uri);
+        } finally {
+            writeLock.unlock();
+        }
+        return Response.status(Response.Status.ACCEPTED).build();
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        try {
+            AccessController.checkPermission(new ConfigGuiAccessPermission());
+            AccessController.checkPermission(
+                    new TcPermission(SystemConfig.SYSTEM_GRAPH_URI.toString(),
+                    TcPermission.READWRITE));
+        } catch (AccessControlException e) {
+            return items;
+        }
+        items.add(new GlobalMenuItem("/admin/configuration", "Configuration", "Configuration", 2,
+                "Administration"));
+        return items;
+    }
+
+    /**
+     * Returns a PathNode of a static file from the staticweb folder.
+     *
+     * @param path specifies the path parameter
+     * @return {@link PathNode}
+     */
+    @GET
+    @Path("{path:.+}")
+    public PathNode getStaticFile(
+            @PathParam("path") String path) {
+        return fileServer.getNode(path);
+
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
----------------------------------------------------------------------
diff --git a/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp b/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
new file mode 100644
index 0000000..627cf18
--- /dev/null
+++ b/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/config.ssp
@@ -0,0 +1,49 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
+resultDocModifier.addStyleSheet("style/form.css");
+resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
+resultDocModifier.addScriptReference("/admin/configuration/js/platformconfig.js");
+resultDocModifier.addStyleSheet("/yui/2/container/assets/container-core.css");
+resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
+resultDocModifier.addScriptReference("/yui/2/element/element-min.js");
+resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
+resultDocModifier.addScriptReference("/scripts/alert-message.js");
+resultDocModifier.addScriptReference("/scripts/ajax-options.js");
+resultDocModifier.addScriptReference("/scripts/modification-status.js");
+resultDocModifier.addScripts("ModificationStatus.watchElements(\"input\");");
+
+resultDocModifier.setTitle("Apache Clerezza Configuration");
+resultDocModifier.addNodes2Elem("tx-module", <h1>Apache Clerezza Configuration</h1>);
+resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a class="tx-button tx-button-create " id="saveButton" href="#">Save</a></li>);
+<div id="tx-content">
+	<fieldset>
+		<legend></legend>
+		<ol>
+			<li class="tx-line">
+				<label for="defaultBaseUri">Default Base URI</label>
+				<input id="defaultBaseUri" name="defaultBaseUri" value={res/platform("defaultBaseUri")*}/>
+
+			</li>
+		</ol>
+	</fieldset>
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
----------------------------------------------------------------------
diff --git a/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js b/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
new file mode 100644
index 0000000..5e922a1
--- /dev/null
+++ b/platform/config.gui/src/main/resources/org/apache/clerezza/platform/config/gui/staticweb/js/platformconfig.js
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+$(document).ready(function() {
+    $('#saveButton').click(function(){
+
+        if(isUrl($('#defaultBaseUri').val())){
+            var q = "Are you sure you want to change the URI to "+$('#defaultBaseUri').val();
+            AlertMessage.show(function(){
+
+                var data = "defaultBaseUri=" + encodeURIComponent($("#defaultBaseUri").val());
+                var options = new AjaxOptions("platform-config", "Save Config", function() {
+					ModificationStatus.isModified = false;
+				});
+                options.type = "POST";
+                options.url = "/admin/configuration/";
+                options.data = data;
+                $.ajax(options);
+            }, q , "Change Config?");
+            
+        }else {
+            AlertMessage.show(function(){}, " No valid URL ", "Error", "OK");
+        }
+
+
+
+
+    })
+})
+
+
+
+function isUrl(s) {
+    var regexp = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
+    return regexp.test(s);
+}
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/config/LICENSE
----------------------------------------------------------------------
diff --git a/platform/config/LICENSE b/platform/config/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/config/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


[39/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
new file mode 100644
index 0000000..dfeccd3
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MKCOL.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP MKCOL requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("MKCOL")
+public @interface MKCOL {
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MOVE.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MOVE.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MOVE.java
new file mode 100644
index 0000000..34fa8e9
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/MOVE.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP MOVE requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("MOVE")
+public @interface MOVE {
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPFIND.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPFIND.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPFIND.java
new file mode 100644
index 0000000..c819fb6
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPFIND.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP PROPFIND requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("PROPFIND")
+public @interface PROPFIND {
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPPATCH.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPPATCH.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPPATCH.java
new file mode 100644
index 0000000..6799e22
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/PROPPATCH.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP PROPPATCH requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("PROPPATCH")
+public @interface PROPPATCH {
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/UNLOCK.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/UNLOCK.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/UNLOCK.java
new file mode 100644
index 0000000..ff52904
--- /dev/null
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/webdav/UNLOCK.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.content.webdav;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.ws.rs.HttpMethod;
+
+/**
+ * Indicates that the annotated method responds to HTTP UNLOCK requests
+ * @author ali
+ */
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@HttpMethod("UNLOCK")
+public @interface UNLOCK {
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/META-INF/documentation.nt b/platform/content/src/main/resources/META-INF/documentation.nt
new file mode 100644
index 0000000..07d24f4
--- /dev/null
+++ b/platform/content/src/main/resources/META-INF/documentation.nt
@@ -0,0 +1,59 @@
+<bundle:///discobits-editor-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///discobits-editor-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78eb .
+_:A7186a206X3aX12390722930X3aXX2dX78ea <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:A7186a206X3aX12390722930X3aXX2dX78ea <http://discobits.org/ontology#pos> "1" .
+_:A7186a206X3aX12390722930X3aXX2dX78ea <http://discobits.org/ontology#holds> <bundle:///platform-content-content-el/1> .
+_:A7186a206X3aX12390722930X3aXX2dX78eb <http://discobits.org/ontology#holds> <bundle:///discobits-editor-content-el/0> .
+_:A7186a206X3aX12390722930X3aXX2dX78eb <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78eb <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///discobits-editor-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///discobits-editor-content-el/0> <http://discobits.org/ontology#infoBit> "The discobits editor allow editing stuctured content. The overall structure is stored in RDF the actual bits of rich text are stored in the XHTML format. The editor refects this by providing widgets for editing the structure and an XHTML editor (mozile) for editing bits of XHTML."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///platform-content-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78ea .
+<bundle:///platform-content-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e9 .
+<bundle:///platform-content-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+_:A7186a206X3aX12390722930X3aXX2dX78e8 <http://discobits.org/ontology#holds> <bundle:///discobits-editor-title> .
+_:A7186a206X3aX12390722930X3aXX2dX78e8 <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78e8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///platform-content-content-el/1-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///platform-content-content-el/1-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e7 .
+<bundle:///platform-content-content-el/1-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///platform-content-content-el/1-content-el/0> <http://discobits.org/ontology#infoBit> "The attribute \"binary\" may sound a bit confusing when referring to content as all content stored on a computer is binary. We use the term here for arbitrary content which can be stored on the platform and retrieved as binary identical copy. For example if an RDF/XML file is uploaded as binary content one will be able to retrieve a copy that is identical to the original file, i.e. including comments and possible syntax error, would the same file be uploaded as graph (rather than binary content) the file would be parsed on upload (producing an exception in the case of syntax error) and one will be able to access a serialization of that graph in any supported RDF format, the downloaded documents will describe the same graph but not (necessarily) be binary identical to the uploaded document."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+_:A7186a206X3aX12390722930X3aXX2dX78e7 <http://discobits.org/ontology#holds> <bundle:///platform-content-content-el/1-content-el/0> .
+_:A7186a206X3aX12390722930X3aXX2dX78e7 <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78e7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///platform-content-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///platform-content-content-el/0> <http://discobits.org/ontology#infoBit> "The Platform Content Module (Bundle-ID: org.apache.clerezza.platform.content) provides tools to upload, view and edit structured and binary content. It provides basic templates for displaying content as well as an editor (<a xmlns=\"http://www.w3.org/1999/xhtml\" bitly=\"BITLY_PROCESSED\" href=\"bundle:///discobits-editor\">the Discobits Editor</a>) to edit content. It also allows putting binary content using tools that support HTTP PUT (such as curl)."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+_:A7186a206X3aX12390722930X3aXX2dX78e6 <http://discobits.org/ontology#holds> <bundle:///platform-content-content-el/1-content> .
+_:A7186a206X3aX12390722930X3aXX2dX78e6 <http://discobits.org/ontology#pos> "1" .
+_:A7186a206X3aX12390722930X3aXX2dX78e6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///platform-content-content-el/1> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e6 .
+<bundle:///platform-content-content-el/1> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e5 .
+<bundle:///platform-content-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///discobits-editor-title> <http://discobits.org/ontology#infoBit> "The Discobits Editor"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///discobits-editor-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///platform-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///platform-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e4 .
+<bundle:///platform-content> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e3 .
+<bundle:///platform-content-content-el/1-title> <http://discobits.org/ontology#infoBit> "Uploading Binary Content"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///platform-content-content-el/1-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+_:A7186a206X3aX12390722930X3aXX2dX78e9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:A7186a206X3aX12390722930X3aXX2dX78e9 <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78e9 <http://discobits.org/ontology#holds> <bundle:///platform-content-content-el/0> .
+_:A7186a206X3aX12390722930X3aXX2dX78e2 <http://discobits.org/ontology#holds> <bundle:///discobits-editor-content> .
+_:A7186a206X3aX12390722930X3aXX2dX78e2 <http://discobits.org/ontology#pos> "1" .
+_:A7186a206X3aX12390722930X3aXX2dX78e2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:A7186a206X3aX12390722930X3aXX2dX78e4 <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78e4 <http://discobits.org/ontology#holds> <bundle:///platform-content-title> .
+_:A7186a206X3aX12390722930X3aXX2dX78e5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:A7186a206X3aX12390722930X3aXX2dX78e5 <http://discobits.org/ontology#pos> "0" .
+_:A7186a206X3aX12390722930X3aXX2dX78e5 <http://discobits.org/ontology#holds> <bundle:///platform-content-content-el/1-title> .
+_:A7186a206X3aX12390722930X3aXX2dX78e4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+<bundle:///discobits-editor> <http://clerezza.org/2009/08/documentation#after> <bundle:///platform-content> .
+<bundle:///discobits-editor> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e2 .
+<bundle:///discobits-editor> <http://discobits.org/ontology#contains> _:A7186a206X3aX12390722930X3aXX2dX78e8 .
+<bundle:///discobits-editor> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+_:A7186a206X3aX12390722930X3aXX2dX78e3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
+_:A7186a206X3aX12390722930X3aXX2dX78e3 <http://discobits.org/ontology#holds> <bundle:///platform-content-content> .
+_:A7186a206X3aX12390722930X3aXX2dX78e3 <http://discobits.org/ontology#pos> "1" .
+<bundle:///platform-content-title> <http://discobits.org/ontology#infoBit> "Platform Content Module"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///platform-content-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/OrderedContent_naked.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/OrderedContent_naked.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/OrderedContent_naked.xhtml
new file mode 100644
index 0000000..7751b6b
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/OrderedContent_naked.xhtml
@@ -0,0 +1,4 @@
+${ns:discobits=http://discobits.org/ontology#}
+${loop sort asc discobits:contains/discobits:pos}
+	<div>${render(discobits:contains/discobits:holds, "naked")}</div>
+${/loop}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource.xhtml
new file mode 100644
index 0000000..2d891b6
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource.xhtml
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
+	<head>
+		<link type="text/css" href="/style/style.css" rel="stylesheet" />
+		<meta content="noindex, nofollow" name="robots"/>
+		<title>Untitled Content</title>
+	</head>
+	<body>
+			${render(., "naked")}
+	</body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource_naked.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource_naked.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource_naked.xhtml
new file mode 100644
index 0000000..ed10718
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/Resource_naked.xhtml
@@ -0,0 +1 @@
+${.}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/TitledContent.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/TitledContent.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/TitledContent.xhtml
new file mode 100644
index 0000000..1da56e0
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/TitledContent.xhtml
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+${ns:discobits=http://discobits.org/ontology#}
+<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
+	${loop sort asc discobits:contains/discobits:pos}
+		${if lexicalForm(discobits:contains/discobits:pos) = "0"}
+			<head>
+				<link type="text/css" href="/style/style.css" rel="stylesheet" />
+				<title>${render(discobits:contains/discobits:holds, "naked")}</title>
+			</head>
+		${/if}
+	${/loop}
+	<body>
+		${render(., "naked")}
+	</body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/XHTML_InfoDiscoBit_naked.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/XHTML_InfoDiscoBit_naked.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/XHTML_InfoDiscoBit_naked.xhtml
new file mode 100644
index 0000000..2b3cfa3
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/XHTML_InfoDiscoBit_naked.xhtml
@@ -0,0 +1 @@
+${ns:discobits=http://discobits.org/ontology#}${discobits:infoBit}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/XmlLiteral.ssp
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/XmlLiteral.ssp b/platform/content/src/main/resources/org/apache/clerezza/platform/content/XmlLiteral.ssp
new file mode 100644
index 0000000..51872c7
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/XmlLiteral.ssp
@@ -0,0 +1,35 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+import _root_.scala.xml._
+
+{
+	var elem:Elem = null
+	val lexicalForm:String = res*;
+	try {		
+		elem = XML.loadString(lexicalForm)
+		elem
+	} catch {
+	  case e: Exception =>
+		val elem:Elem = XML.loadString("<span>" + lexicalForm + "</span>")
+		elem
+	}
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp b/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
new file mode 100644
index 0000000..bca6d6f
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
@@ -0,0 +1,38 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def hierarchy(s: Any) = new UriRef("http://clerezza.org/2009/09/hierarchy#" + s)
+<div id="tx-content">
+	<h3>{res*}</h3>
+	{ifx ((res/hierarchy("parent")).length != 0){
+	<h4>Parent: <a href={res/hierarchy("parent")*}>{res/hierarchy("parent")*}</a></h4>
+	}
+	}
+	{if ((res/-hierarchy("parent")).length != 0){
+	<ul>
+		{for (member <- (res/-hierarchy("parent"))) yield
+			{
+			<li><a href={member*}>{member*}</a></li>
+			}
+		}
+	</ul>} else {}
+	}
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/disco.xhtml
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/disco.xhtml b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/disco.xhtml
new file mode 100644
index 0000000..a1cca0b
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/disco.xhtml
@@ -0,0 +1,171 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11-flat.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Discobits Editor</title>
+    <link type="text/css" href="style/discostyle.css" rel="stylesheet" />
+	<link type="text/css" href="/style/style.css" rel="stylesheet" />
+    <script type="text/javascript" src="discoscripts/mozile/mozile.js"></script>
+    <script src="discoscripts/util.js" type="text/javascript"></script>
+    <script src="discoscripts/uri.js" type="text/javascript"></script>
+    <script src="discoscripts/term.js" type="text/javascript"></script>
+    <script src="discoscripts/match.js" type="text/javascript"></script>
+    <script src="discoscripts/rdfparser.js" type="text/javascript"></script>
+    <script src="discoscripts/identity.js" type="text/javascript"></script>
+
+    <script src="discoscripts/log.js" type="text/javascript"></script>
+
+    <script src="discoscripts/widget-factory.js" type="text/javascript"></script>
+    <script src="discoscripts/rdfxmlserializer.js" type="text/javascript"></script>
+    <script type="text/javascript" src="discoscripts/parameters.js" />
+    <script type="text/javascript" src="scripts/tria-disco.js" />
+    <script type="text/javascript">
+        /* here some custom methods could be inserted:
+                        WidgetFactory.createURIderefURL =;
+                        WidgetFactory.putData = ;
+         */
+
+
+        var init = function() {
+            WidgetFactory.root = "discoscripts/"
+            var parameters = new Parameters();
+            var uriParam = parameters.getField("uri");
+            var uri;
+            if (!uriParam) {
+                uri = document.location.toString().substring(
+				0, document.location.toString().indexOf('/', 9)+1);
+            } else {
+                uri = uriParam;
+            }
+            var discobitURIElem = document.getElementById('discobitURI');
+            discobitURIElem.value = uri;
+            discobitURIElem.disabled = false;
+            var changeLink = document.getElementById('changeLink');
+            changeLink.style.display = "none";
+
+            var loadParam = parameters.getField("load");
+            if (loadParam == "auto") {
+                setURI();
+            }
+			initGraphSelection();
+        }
+
+		var initGraphSelection = function() {
+			var graphUriField = document.getElementById('graphUri');
+            graphUriField.disabled = true;
+			var graphTypeCustomRadio = document.getElementById('graphTypeCustom');
+			var enableDisableFunction = function() {
+				graphUriField.disabled = !graphTypeCustomRadio.checked
+			}
+			graphTypeCustomRadio.onchange = enableDisableFunction
+			document.getElementById('graphTypeDefault').onchange = enableDisableFunction
+
+		}
+
+        var unload = function() {
+            var beforeunload = window.onbeforeunload();
+            if (beforeunload) {
+                if (!confirm(beforeunload)) {
+                    return;
+                }
+            }
+            WidgetFactory.openWidgets = new Array();
+            var place = document.getElementById('place');
+            while (place.firstChild) {
+                place.removeChild(place.firstChild);
+            }
+            var discobitURIElem = document.getElementById('discobitURI');
+            var loadButton = document.getElementById('loadButton');
+            var changeLink = document.getElementById('changeLink');
+            loadButton.disabled = false;
+            discobitURIElem.disabled = false;
+            changeLink.style.display = "none";
+        }
+
+        var setURI = function() {
+            var place = document.getElementById('place');
+            while (place.firstChild) {
+                place.removeChild(place.firstChild);
+            }
+            var discobitURIElem = document.getElementById('discobitURI');
+            var body = document.getElementsByTagNameNS(xhtmlNS,"body")[0];
+            var origCursor = body.style.cursor;
+            body.style.cursor = 'progress';
+			var graphUriField = document.getElementById('graphUri');
+			var graphTypeCustomRadio = document.getElementById('graphTypeCustom');
+			if (graphTypeCustomRadio.checked) {
+				TriaDisco.graphUri = graphUriField.value
+			} else {
+				TriaDisco.graphUri = null
+			}
+            WidgetFactory.createBackground(
+            function() {
+                body.style.cursor = origCursor;
+            },
+            new RDFSymbol(discobitURIElem.value),
+            place);
+            var loadButton = document.getElementById('loadButton');
+            loadButton.disabled = true;
+
+            discobitURIElem.disabled = true;
+            var changeLink = document.getElementById('changeLink');
+            changeLink.style.display = "";
+        }
+
+        var origSerializer = RDFXMLSerializer.serialize;
+
+        RDFXMLSerializer.serialize = function(store, uri) {
+            return origSerializer(store, "");
+        }
+
+        WidgetFactory.putData = TriaDisco.putData;
+
+    </script>
+
+  </head>
+  <body onload="init()">
+    <h1><a href="http://discobits.org/"><img src="style/disco-icon.png" width="63" height="53" alt="DiscoBits icon"  /></a>
+    Discobits Editor</h1>
+    <p>Edit discobits resources.</p>
+    <h2>Deprecation note</h2>
+    <p>This editor does not work with more recent browsers. A replacement is provided by 
+        the platform.editor bundle. If this bundle is installed you can edit
+        resources in the content-graph by adding "?mode=edit" to the URI of the resource
+        you want to edit.
+    </p>
+    <div>
+	  Graph: <input type="radio" name="graphType" value="default" id="graphTypeDefault" checked="checked"/> default
+			 <input type="radio" name="graphType" value="custom" id="graphTypeCustom" />
+			 <input type="text" size="80" name="graphUri" id="graphUri"/><br />
+      Resource: <input type="text" id="discobitURI" size="80"/>
+      <button id="loadButton" onclick="setURI()">Load</button>
+      <a href="#" onclick="unload()" id="changeLink" >change</a>
+    </div>
+    <div id="place" />
+
+
+    <div id="copyright" class="small"> &copy; 2007 Reto Bachmann-Gmür and Danny Ayers </div>
+  </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/identity.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/identity.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/identity.js
new file mode 100644
index 0000000..96f026f
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/identity.js
@@ -0,0 +1,399 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+//  Identity management for RDF
+//
+// This file sees that things which are identical 
+// according to owl:sameAs or an owl:InverseFunctionalProperty
+// or an owl:FunctionalProperty
+//
+// Missing: Equating predicates will not propagate these actions
+//
+
+// String for hashing. The literal one maybe is slow?
+
+/*jsl:option explicit*/ // Turn on JavaScriptLint variable declaration checking
+
+owl_ns = "http://www.w3.org/2002/07/owl#";
+link_ns = "http://www.w3.org/2006/link#";
+
+/* hashString functions are used as array indeces. This
+** is done to avoid conflict with existing properties of arrays such as length and map.
+** See issue 139.
+*/
+RDFLiteral.prototype.hashString = RDFLiteral.prototype.toNT;
+RDFSymbol.prototype.hashString = RDFSymbol.prototype.toNT;
+RDFBlankNode.prototype.hashString = RDFBlankNode.prototype.toNT;
+RDFCollection.prototype.hashString = RDFCollection.prototype.toNT;
+
+RDFIndexedFormula.prototype = new RDFFormula();
+RDFIndexedFormula.prototype.constructor = RDFIndexedFormula;
+// RDFIndexedFormula.superclass = RDFFormula.prototype;
+
+RDFArrayRemove = function(a, x) {  //removes all elements equal to x from a
+    var i;
+    for(i=0; i<a.length; i++) {
+	if (a[i] == x) {
+            a.splice(i,1);
+            return;
+	}
+    }
+    alert("RDFArrayRemove: Array did not contain "+x);
+};
+
+//Stores an associative array that maps URIs to functions
+function RDFIndexedFormula() {
+    this.statements = [];    // As in RDFFormula
+    this.propertyAction = []; // What to do when getting statement with {s X o}
+    //maps <uri> to f(F,s,p,o)
+    this.classAction = [];   // What to do when adding { s type X }
+    this.redirection = [];   // redirect to lexically smaller equivalent symbol
+    this.subjectIndex = [];  // Array of statements with this X as subject
+    this.predicateIndex = [];  // Array of statements with this X as subject
+    this.objectIndex = [];  // Array of statements with this X as object
+    this.namespaces = {} // Dictionary of namespace prefixes
+
+    // Callbackify?
+    
+    function handleRDFType(formula, subj, pred, obj, why) {
+        if (typeof formula.typeCallback != 'undefined')
+            formula.typeCallback(formula, obj, why);
+
+        var x = formula.classAction[obj.hashString()];
+        if (x) return x(formula, subj, pred, obj);
+        return false; // statement given is needed
+    } //handleRDFType
+
+    //If the predicate is #type, use handleRDFType to create a typeCallback on the object
+    this.propertyAction[
+	'<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'] = handleRDFType;
+
+    // Assumption: these terms are not redirected @@fixme
+    this.propertyAction['<http://www.w3.org/2002/07/owl#sameAs>'] =
+	function(formula, subj, pred, obj, why) {
+            formula.equate(subj,obj);
+            return false; // statement given is needed e.g. when dereferencing
+	}; //sameAs -> equate & don't add to index
+    
+    this.propertyAction['<http://www.w3.org/2006/link#obsoletes>'] =
+	function(formula, subj, pred, obj, why) {
+            formula.replaceWith(obj, subj);
+            return false; // statement given IS needed
+	}; //sameAs -> equate & don't add to index
+    
+    function newPropertyAction(formula, pred, action) {
+	fyi("newPropertyAction:  "+pred);
+        formula.propertyAction[pred] = action;
+	var fixEndA = formula.statementsMatching(undefined, pred, undefined);
+	var i;
+	for (i=0; i<fixEndA.length; i++) { // NOT optimized - sort fixEndA etc
+//	    fyi("nePropertyAction: retrospective action for "+st)
+	    if (action(formula, fixEndA[i].subject, pred, fixEndA[i].object)) {
+//@@		kb.remove(st); /// messing up the list we are iterating over?? @@
+		fyi("newPropertyAction: NOT removing "+fixEndA[i]);
+	    }
+	}
+	return false;
+    }
+
+    this.classAction["<"+owl_ns+"InverseFunctionalProperty>"] =
+	function(formula, subj, pred, obj, addFn) {
+	    return newPropertyAction(formula, subj, handle_IFP); // yes subj not pred!
+	}; //IFP -> handle_IFP, do add to index
+
+    this.classAction["<"+owl_ns+"FunctionalProperty>"] =
+	function(formula, subj, proj, obj, addFn) {
+	    return newPropertyAction(formula, subj, handle_FP);
+	}; //FP => handleFP, do add to index
+
+    function handle_IFP(formula, subj, pred, obj)  {
+        var s1 = formula.any(undefined, pred, obj);
+        if (typeof s1 == 'undefined') return false; // First time with this value
+        formula.equate(s1, subj);
+        return true;
+    } //handle_IFP
+
+    function handle_FP(formula, subj, pred, obj)  {
+        var o1 = formula.any(subj, pred, undefined);
+        if (typeof o1 == 'undefined') return false; // First time with this value
+        formula.equate(o1, obj);
+        return true ;
+    } //handle_FP
+    
+} /* end RDFIndexedFormula */
+
+
+RDFIndexedFormula.prototype.register = function(prefix, nsuri) {
+    this.namespaces[prefix] = nsuri
+}
+
+
+/** simplify graph in store when we realize two identifiers are equal
+
+We replace the bigger with the smaller.
+
+*/
+RDFIndexedFormula.prototype.equate = function(u1, u2) {
+    // fyi("Equating "+s+" and "+o)
+    var d = u1.compareTerm(u2);
+    if (!d) return true; // No information in {a = a}
+    var big, small;
+    if (d < 0)  {  // u1 less than u2
+	return this.replaceWith(u2, u1);
+    } else {
+	return this.replaceWith(u1, u2);
+    }
+}
+
+// Replace big with small, obsoleted with obsoleting.
+//
+RDFIndexedFormula.prototype.replaceWith = function(big, small) {
+
+    var i, matches, fixEndA, hash;
+    fixEndA = this.statementsMatching(big, undefined, undefined);
+    matches = fixEndA.length;
+
+    for (i=0; i<matches; i++) {
+        fixEndA[i].subject = small;
+	hash = small.hashString();
+        if (typeof this.subjectIndex[hash] == 'undefined')
+                this.subjectIndex[hash] = [];
+        this.subjectIndex[hash].push(fixEndA[i]);
+    }
+    delete this.subjectIndex[big.hashString()];
+
+    // If we allow equating predicates we must index them.
+    fixEndA = this.statementsMatching(undefined, big, undefined);
+    matches = fixEndA.length;
+    
+    for (i=0; i<matches; i++) {
+	fixEndA[i].predicate = small;
+	hash = small.hashString();
+	if (typeof this.predicateIndex[hash] == 'undefined')
+	    this.predicateIndex[hash] = [];
+	this.predicateIndex[hash].push(fixEndA[i]);
+    }
+    delete this.predicateIndex[big.hashString()];
+    
+    fixEndA = this.statementsMatching(undefined, undefined, big);
+    matches = fixEndA.length;
+
+    for (i=0; i<matches; i++) {
+        //  RDFArrayRemove(this.objectIndex[big], st)
+        fixEndA[i].object = small;
+	hash = small.hashString()
+        if (typeof this.objectIndex[hash] == 'undefined')
+                this.objectIndex[hash] = [];
+        this.objectIndex[hash].push(fixEndA[i]);
+    }
+    delete this.objectIndex[big.hashString()];
+    
+    this.redirection[big.hashString()] = small;
+
+    /* merge actions @@ assumes never > 1 action*/
+    var action = this.classAction[big.hashString()];
+    if ((typeof action != 'undefined') &&
+	(typeof this.classAction[small.hashString()] == 'undefined')) {
+	    this.classAction[small.hashString()] = action;
+    }
+    
+    action = this.propertyAction[big.hashString()];
+    if ((typeof action != 'undefined') &&
+	(typeof this.propertyAction[small.hashString()] == 'undefined')) {
+	    this.propertyAction[small.hashString()] = action;
+	    alert("copying action on "+big+" to "+small)
+    }
+    
+    fyi("Equate done. "+big+" to be known as "+small)    
+    return false;
+};
+
+
+// On input parameters, do redirection and convert constants to terms
+// We do not redirect literals
+function RDFMakeTerm(formula,val) {
+    if (typeof val != 'object') {   
+	if (typeof val == 'string') {
+	    return new RDFLiteral(val);
+	} else if (typeof val == 'undefined') {
+	    return undefined;
+	} else {   // @@ add converting of dates and numbers
+	    alert("Can't make term from " + val + " of type " + typeof val); 
+	}
+    }
+    if (typeof formula.redirection == 'undefined') 
+	alert('formula: '+ formula+', term: '+val);
+    var y = formula.redirection[val.hashString()];
+    if (typeof y == 'undefined') return val;
+//    fyi(" redirecting "+val+" to "+y)
+    return y;
+}
+
+// add a triple to the store
+RDFIndexedFormula.prototype.add = function(subj, pred, obj, why) {
+    var action, st, hashS, hashP, hashO;
+    subj = RDFMakeTerm(this, subj);
+    pred = RDFMakeTerm(this, pred);
+    obj = RDFMakeTerm(this, obj);
+    why = RDFMakeTerm(this, why);
+    
+    var hashS = subj.hashString();
+    var hashP = pred.hashString();
+    var hashO = obj.hashString();
+    
+    // Check we don't already know it -- esp when working with dbview
+    st = this.anyStatementMatching(subj,pred,obj) // @@@@@@@ temp fix <====WATCH OUT!
+    if (typeof st != 'undefined') return; // already in store
+    //    fyi("\nActions for "+s+" "+p+" "+o+". size="+this.statements.length)
+    if (typeof this.predicateCallback != 'undefined')
+	this.predicateCallback(this, pred, why);
+	
+    // Action return true if the statement does not need to be added
+    action = this.propertyAction[hashP];
+    if (action && action(this, subj, pred, obj, why)) return;
+    
+    st = new RDFStatement(subj, pred, obj, why);
+    if (typeof this.subjectIndex[hashS] =='undefined') this.subjectIndex[hashS] = [];
+    this.subjectIndex[hashS].push(st); // Set of things with this as subject
+    
+    if (typeof this.predicateIndex[hashP] =='undefined') this.predicateIndex[hashP] = [];
+    this.predicateIndex[hashP].push(st); // Set of things with this as subject
+    
+    if (typeof this.objectIndex[hashO] == 'undefined') this.objectIndex[hashO] = [];
+    this.objectIndex[hashO].push(st); // Set of things with this as object
+    
+    this.statements.push(st);
+}; //add
+
+
+RDFIndexedFormula.prototype.anyStatementMatching = function(subj,pred,obj,why) {
+    var x = this.statementsMatching(subj,pred,obj,why,true);
+    if (!x || x == []) return undefined;
+    return x[0];
+};
+
+// return statements matching a pattern
+// ALL CONVENIENCE LOOKUP FUNCTIONS RELY ON THIS!
+RDFIndexedFormula.prototype.statementsMatching = function(subj,pred,obj,why,justOne) {
+    var results = [];
+    var candidates;
+    fyi("\nMatching {"+subj+" "+pred+" "+obj+"}");
+    subj = RDFMakeTerm(this, subj);
+    pred = RDFMakeTerm(this, pred);
+    obj = RDFMakeTerm(this, obj);
+    why = RDFMakeTerm(this, why);
+
+    if (typeof(pred) != 'undefined' && this.redirection[pred.hashString()])
+	pred = this.redirection[pred.hashString()];
+
+    if (typeof(obj) != 'undefined' && this.redirection[obj.hashString()])
+	obj = this.redirection[obj.hashString()];
+
+	//looks for candidate statements matching a given s/p/o
+    if (typeof(subj) =='undefined') {
+        if (typeof(obj) =='undefined') {
+	    if (typeof(pred) == 'undefined') { 
+		candidates = this.statements; //all wildcards
+	    } else {
+		candidates = this.predicateIndex[pred.hashString()];
+//		fyi("@@Trying predciate "+p+" length "+candidates.length)
+
+		if (typeof candidates == 'undefined') return [];
+		fyi("Trying predicate "+pred+" index of: "+candidates.length +
+			    " for {"+subj+" "+pred+" "+obj+" @ "+why+"}");
+	    }
+    //      fyi("Trying all "+candidates.length+" statements")
+        } else { // subj undefined, obj defined
+            candidates = this.objectIndex[obj.hashString()];
+            if (typeof candidates == 'undefined') return [];
+            if ((typeof pred == 'undefined') &&
+		(typeof why == 'undefined')) {
+                // fyi("Returning all statements for object")
+                return candidates ;
+            }
+            // fyi("Trying only "+candidates.length+" object statements")
+        }
+    } else {  // s defined
+        if (this.redirection[subj.hashString()])
+            subj = this.redirection[subj.hashString()];
+        candidates = this.subjectIndex[subj.hashString()];
+        if (typeof candidates == 'undefined') return [];
+        if (typeof(obj) =='undefined') {
+	    if ((typeof pred == 'undefined') && (typeof why == 'undefined')) {
+		// fyi("Trying all "+candidates.length+" subject statements")
+		return candidates;
+	    }
+	} else { // s and o defined ... unusual in practice?
+            var oix = this.objectIndex[obj.hashString()];
+            if (typeof oix == 'undefined') return [];
+	    if (oix.length < candidates.length) {
+		candidates = oix;
+//		fyi("Wow!  actually used object index instead of subj");
+	    }
+	
+        }
+        // fyi("Trying only "+candidates.length+" subject statements")
+    }
+    
+    if (typeof candidates == 'undefined') return [];
+//    fyi("Matching {"+s+" "+p+" "+o+"} against "+n+" stmts")
+    var i;
+    var st;
+    for(i=0; i<candidates.length; i++) {
+        st = candidates[i]; //for each candidate, match terms of candidate with input, then return all
+        // fyi("  Matching against st=" + st +" why="+st.why);
+        if (RDFTermMatch(pred, st.predicate) &&  // first as simplest
+            RDFTermMatch(subj, st.subject) &&
+            RDFTermMatch(obj, st.object) &&
+            RDFTermMatch(why, st.why)) {
+            // fyi("   Found: "+st)
+            if (justOne) return [st];
+            results.push(st);
+        }
+    }
+    return results;
+}; // statementsMatching
+
+
+/** remove a particular statement from the bank **/
+RDFIndexedFormula.prototype.remove = function (st) {
+  fyi("entering remove w/ st=" + st);
+  var subj = st.subject, pred = st.predicate, obj = st.object;
+  if (typeof this.subjectIndex[subj.hashString()] == 'undefined') twarn ("statement not in sbj index: "+st);
+  if (typeof this.predicateIndex[pred.hashString()] == 'undefined') twarn ("statement not in pred index: "+st);
+  if (typeof this.objectIndex[obj.hashString()] == 'undefined') twarn ("statement not in obj index: " +st);
+
+  RDFArrayRemove(this.subjectIndex[subj.hashString()], st);
+  RDFArrayRemove(this.predicateIndex[pred.hashString()], st);
+  RDFArrayRemove(this.objectIndex[obj.hashString()], st);
+  RDFArrayRemove(this.statements, st);
+}; //remove
+
+/** remove all statements matching args (within limit) **/
+RDFIndexedFormula.prototype.removeMany = function (subj, pred, obj, why, limit) {
+  fyi("entering removeMany w/ subj,pred,obj,why,limit = " + subj +", "+ pred+", " + obj+", " + why+", " + limit);
+  var statements = this.statementsMatching (subj, pred, obj, why, false);
+  if (limit) statements = statements.slice(0, limit);
+  for (var st in statements) this.remove(statements[st]);
+}; //removeMany
+
+// ends
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/log.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/log.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/log.js
new file mode 100644
index 0000000..8dfa038
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/log.js
@@ -0,0 +1,104 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/////////////////////////  Logging
+//
+//bitmask levels
+TNONE = 0; 
+TERROR = 1;
+TWARN = 2;
+TMESG = 4;
+TSUCCESS = 8;
+TINFO = 16;
+TDEBUG = 32;
+TALL = 63;
+logging = {
+    ascending : false, 
+    level : TERROR | TWARN //default
+};
+
+function escapeForXML(str) {
+    return str.replace(/&/g, '&amp;').replace(/</g, '&lt;')
+}
+
+// t is for tabulator
+//log a message where type is mesg|warning|error|debug|info|good
+function tmsg(msg)  { tlog(msg, TMESG, 'mesg') };
+function tinfo(msg)  { tlog(msg, TINFO, 'info') };
+function twarn(msg) { tlog(msg, TWARN, 'warn') };
+function terror(msg) { tlog(msg, TERROR, 'eror') };
+function tdebug(msg) { tlog(msg, TDEBUG, 'dbug') };
+function tsuccess(msg) { tlog(msg, TSUCCESS, 'good') };
+function tlog(str, type, typestr)
+{
+    if (!type) { type = TMESG; typestr = 'mesg'};
+    if (!(logging.level & type)) return; //bitmask
+    var log_area = document.getElementById('status');
+    
+    var addendum = document.createElement("span");
+    addendum.setAttribute('class', typestr);
+    var now = new Date();
+    addendum.innerHTML = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds()
+            + " [" + typestr + "] "+ escapeForXML(str) + "<br/>";
+    if (logging.ascending)
+        log_area.appendChild(addendum);
+    else
+        log_area.insertBefore(addendum, log_area.firstChild);
+} //tlog
+fyi = tdebug;
+log = {}
+log.msg = tmsg
+log.warn = twarn
+log.debug = tdebug
+log.info = tinfo
+log.error = terror
+log.success = tsuccess
+
+/** clear the log window **/
+function clearStatus(str) {
+    var x = document.getElementById('status');
+    if (!x) return;
+    //x.innerHTML = "";
+    emptyNode(x);
+} //clearStatus
+
+/** set the logging level **/
+function setLogging(x) {
+    logging.level = TALL;
+    fyi("Logging "+x);
+    logging.level = x;
+}
+
+function dumpStore() {
+    var l = logging.level;
+    logging.level = TALL;
+    fyi("\nStore:\n" + kb + "__________________\n");
+    tdebug("subject index: " + kb.subjectIndex[0] + kb.subjectIndex[1]);
+    tdebug("object index: " + kb.objectIndex[0] + kb.objectIndex[1]);
+    logging.level = l;
+}
+
+function dumpHTML() {
+    var l = logging.level;
+    logging.level = TALL;
+    fyi(document.innerHTML);
+    logging.level = l
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/match.js
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/match.js b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/match.js
new file mode 100644
index 0000000..16c57b4
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/match.js
@@ -0,0 +1,192 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+// Matching a statement against a formula
+//
+//
+// W3C open source licence 2005.
+//
+// We retpresent a set as an associative array whose value for
+// each member is set to true.
+
+/* Not used, bogus. See identity.js for the ones really used.
+RDFFormula.prototype.statementsMatching = function(s,p,o,w) {
+    var results = []
+    var i
+    var ls = this.statements.length
+    for (i=0; i<ls; i++) {
+	var st = this.statements[i]
+	if (RDFTermMatch(p, st.predicate) &&  // first as simplest
+	    RDFTermMatch(s, st.subject) &&
+	    RDFTermMatch(o, st.object) &&
+	    RDFTermMatch(w, st.why)) {
+		results[st] = true          @@@@ sould use numeric indexed array
+	}
+	    
+    }
+    return results
+}
+
+RDFFormula.prototype.anyStatementMatching = function(s,p,o,w) {
+    var ls = this.statements.length
+    var i
+    for (i=0; i<ls; i++) {
+	var st = this.statements[i]
+	if (RDFTermMatch(p, st.predicate) &&  // first as simplest
+	    RDFTermMatch(s, st.subject) &&
+	    RDFTermMatch(o, st.object) &&
+	    RDFTermMatch(w, st.why)) {
+		return st
+	}
+	    
+    }
+    return undefined
+}
+
+*/
+
+function RDFTermMatch(pattern, term) {
+    if (typeof pattern == 'undefined') return true;
+    return pattern.sameTerm(term)
+}
+
+RDFSymbol.prototype.sameTerm = function(other) {
+    if (!other) { return false }
+    return ((this.termType == other.termType) && (this.uri == other.uri))
+}
+
+RDFBlankNode.prototype.sameTerm = function(other) {
+    if (!other) { return false }
+    return ((this.termType == other.termType) && (this.id == other.id))
+}
+
+RDFLiteral.prototype.sameTerm = function(other) {
+    if (!other) { return false }
+    return ((this.termType == other.termType)
+	    && (this.value == other.value)
+	    && (this.lang == other.lang) &&
+	    ((!this.datatype && !other.datatype)
+	     || this.datatype.sameTerm(other.datatype)))
+}
+
+RDFVariable.prototype.sameTerm = function (other) {
+    if (!other) { return false }
+    return((this.termType == other.termType) && (this.uri == other.uri))
+}
+
+RDFCollection.prototype.sameTerm = RDFBlankNode.prototype.sameTerm
+
+//  Comparison for ordering
+//
+// These compare with ANY term
+//
+//
+// When we smush nodes we take the lowest value. This is not
+// arbitrary: we want the value actually used to be the literal
+// (or list or formula). 
+
+RDFLiteral.prototype.classOrder = 1
+// RDFList.prototype.classOrder = 2
+// RDFSet.prototype.classOrder = 3
+RDFCollection.prototype.classOrder = 3
+RDFFormula.prototype.classOrder = 4
+RDFSymbol.prototype.classOrder = 5
+RDFBlankNode.prototype.classOrder = 6
+
+//  Compaisons return  sign(self - other)
+//  Literals must come out before terms for smushing
+
+RDFLiteral.prototype.compareTerm = function(other) {
+    if (this.classOrder < other.classOrder) return -1
+    if (this.classOrder > other.classOrder) return +1
+    if (this.value < other.value) return -1
+    if (this.value > other.value) return +1
+    return 0
+} 
+
+RDFSymbol.prototype.compareTerm = function(other) {
+    if (this.classOrder < other.classOrder) return -1
+    if (this.classOrder > other.classOrder) return +1
+    if (this.uri < other.uri) return -1
+    if (this.uri > other.uri) return +1
+    return 0
+} 
+
+RDFBlankNode.prototype.compareTerm = function(other) {
+    if (this.classOrder < other.classOrder) return -1
+    if (this.classOrder > other.classOrder) return +1
+    if (this.id < other.id) return -1
+    if (this.id > other.id) return +1
+    return 0
+} 
+
+RDFCollection.prototype.compareTerm = RDFBlankNode.prototype.compareTerm
+
+//  Convenience routines
+
+// Only one of s p o can be undefined, and w is optional.
+RDFFormula.prototype.each = function(s,p,o,w) {
+    var results = []
+    var st, sts = this.statementsMatching(s,p,o,w)
+    var i, n=sts.length
+    if (typeof s == 'undefined') {
+	for (i=0; i<n; i++) {st=sts[i]; results.push(st.subject)}
+    } else if (typeof p == 'undefined') {
+	for (i=0; i<n; i++) {st=sts[i]; results.push(st.predicate)}
+    } else if (typeof o == 'undefined') {
+	for (i=0; i<n; i++) {st=sts[i]; results.push(st.object)}
+    } else if (typeof w == 'undefined') {
+	for (i=0; i<n; i++) {st=sts[i]; results.push(st.why)}
+    }
+    return results
+}
+
+RDFFormula.prototype.any = function(s,p,o,w) {
+    var st = this.anyStatementMatching(s,p,o,w)
+    if (typeof st == 'undefined') return undefined
+    
+    if (typeof s == 'undefined') return st.subject;
+    if (typeof p == 'undefined') return st.predicate;
+    if (typeof o == 'undefined') return st.object;
+
+    return undefined
+}
+
+RDFFormula.prototype.the = function(s,p,o,w) {
+    // the() should contain a check there is only one
+    var x = this.any(s,p,o,w)
+    if (typeof x == 'undefined')
+	terror("No value found for the(){" + s + " " + p + " " + o + "}.")
+    return x
+}
+ 
+// Not a method. For use in sorts
+function RDFComparePredicateObject(self, other) {
+    var x = self.predicate.compareTerm(other.predicate)
+    if (x !=0) return x
+    return self.object.compareTerm(other.object)
+}
+function RDFComparePredicateSubject(self, other) {
+    var x = self.predicate.compareTerm(other.predicate)
+    if (x !=0) return x
+    return self.subject.compareTerm(other.subject)
+}
+// ends


[64/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
deleted file mode 100644
index f3678a7..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Provider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.ext.Providers;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-
-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;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.sparql.ResultSet;
-import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
-import org.apache.clerezza.rdf.core.sparql.query.Variable;
-import org.apache.commons.rdf.Literal;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * MessageBodyWirter for <code>ResultSet</code>.
- * 
- * @author mir, reto
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Produces({"application/xml", "text/xml", "application/sparql-results+xml"})
-@Provider
-public class ResultSetMessageBodyWriter implements MessageBodyWriter<ResultSet> {
-
-    @Reference
-    TcManager tcManager;
-
-
-    private Providers providers;
-
-    final Logger logger = LoggerFactory.getLogger(ResultSetMessageBodyWriter.class);
-
-    @Override
-    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
-            MediaType mediaType) {
-        return ResultSet.class.isAssignableFrom(type);
-    }
-
-    @Override
-    public long getSize(ResultSet t, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return -1;
-    }
-
-    @Override
-    public void writeTo(ResultSet resultSet, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,
-            Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException {
-
-        Source source = toXmlSource(resultSet);
-        MessageBodyWriter<Source> sourceMessageBodyWriter = 
-                providers.getMessageBodyWriter(Source.class, null, null, mediaType);
-        sourceMessageBodyWriter.writeTo(source, Source.class, null, null, mediaType,
-                httpHeaders, entityStream);
-    }
-
-    @Context
-    public void setProviders(Providers providers) {
-        this.providers = providers;
-    }
-
-    /**
-     * Helper: transforms a {@link ResultSet} or a {@link Boolean} to a
-     * {@link DOMSource}
-     *
-     * @param queryResult
-     * @param query
-     * @param applyStyle
-     */
-    private Source toXmlSource(ResultSet queryResult) {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        try {
-            Document doc = dbf.newDocumentBuilder().newDocument();
-            // adding root element
-            Element root = doc.createElement("sparql");
-            root.setAttribute("xmlns", "http://www.w3.org/2005/sparql-results#");
-            doc.appendChild(root);
-            Element head = doc.createElement("head");
-            root.appendChild(head);
-            Set<Object> variables = new HashSet<Object>();
-            Element results = doc.createElement("results");
-            SolutionMapping solutionMapping = null;
-            while (queryResult.hasNext()) {
-                solutionMapping = queryResult.next();                
-                createResultElement(solutionMapping, results, doc);                
-            }
-            createVariable(solutionMapping, head, doc);
-            root.appendChild(results);
-
-            DOMSource source = new DOMSource(doc);
-            return source;
-
-        } catch (ParserConfigurationException e) {
-            throw createWebApplicationException(e);
-        }
-    }
-
-    /**
-     * Creates a WebApplicationexception and prints a logger entry
-     */
-    private WebApplicationException createWebApplicationException(Exception e) {
-        return new WebApplicationException(Response.status(Status.BAD_REQUEST)
-                .entity(e.getMessage().replace("<", "&lt;").replace("\n",
-                        "<br/>")).build());
-    }
-
-
-    /**
-     * Helper: creates value element from {@link RdfTerm} depending on its
-     * class
-     *
-     */
-    private Element createValueElement(RdfTerm resource, Document doc) {
-        Element value = null;
-        if (resource instanceof Iri) {
-            value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((Iri) resource)
-                    .getUnicodeString()));
-        } else if (resource instanceof Literal) {
-            value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((Literal) resource)
-                    .getLexicalForm()));
-            value.setAttribute("datatype", (((Literal) resource)
-                    .getDataType().getUnicodeString()));
-            Language lang = ((Literal) resource).getLanguage();
-            if (lang != null) {
-                value.setAttribute("xml:lang", (lang.toString()));
-            }
-        } else {
-            value = doc.createElement("bnode");
-            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
-        }
-        return value;
-    }
-
-    /**
-     * Helper: creates results element from ResultSet
-     *
-     */
-    private void createResultElement(SolutionMapping solutionMap, Element results, Document doc) {
-        Set<Variable> keys = solutionMap.keySet();
-        Element result = doc.createElement("result");
-        results.appendChild(result);
-        for (Variable key : keys) {
-            Element bindingElement = doc.createElement("binding");
-            bindingElement.setAttribute("name", key.getName());
-            bindingElement.appendChild(createValueElement(
-                    (RdfTerm) solutionMap.get(key), doc));
-            result.appendChild(bindingElement);
-        }
-    }
-
-    private void createVariable(SolutionMapping solutionMap, Element head, Document doc) {
-        Set<Variable> keys = solutionMap.keySet();
-        for (Variable key : keys) {
-            Element varElement = doc.createElement("variable");
-            varElement.setAttribute("name", key.getName());
-            head.appendChild(varElement);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
deleted file mode 100644
index fa29fde..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.commons.rdf.Graph;
-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;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.FOAF;
-import org.apache.clerezza.rdf.ontologies.OWL;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.Smusher;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
- * 
- * @author reto
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("/admin/graphs/smush")
-public class Smush {
-    private final Iri tBoxName = new Iri("urn:x-localinstance:/tbox.graph");
-
-    @Reference
-    private TcManager tcManager;
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    private Graph tBox;
-
-    protected void activate(ComponentContext componentContext) {
-        try {
-            //getting the tBox here means no read right on Tbox is necessary
-            //when smushing
-            tBox = tcManager.getGraph(tBoxName);
-        } catch (NoSuchEntityException e) {
-            tBox = new SimpleGraph();
-            tBox.add(new TripleImpl(FOAF.mbox, RDF.type, OWL.InverseFunctionalProperty));
-            tBox.add(new TripleImpl(FOAF.mbox_sha1sum, RDF.type, OWL.InverseFunctionalProperty));
-            tBox.add(new TripleImpl(PLATFORM.userName, RDF.type, OWL.InverseFunctionalProperty));
-            tBox = tcManager.createImmutableGraph(tBoxName, tBox);
-        }
-    }
-
-
-    
-    @POST
-    public Response smush(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
-        Graph mGraph = tcManager.getGraph(graphName);
-        Smusher.smush(mGraph, tBox);
-        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
deleted file mode 100644
index 69f318f..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-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;
-import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.clerezza.rdf.core.sparql.ParseException;
-import org.apache.clerezza.rdf.core.sparql.QueryParser;
-import org.apache.clerezza.rdf.core.sparql.ResultSet;
-import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
-import org.apache.clerezza.rdf.core.sparql.query.Query;
-import org.apache.clerezza.rdf.core.sparql.query.SelectQuery;
-import org.apache.clerezza.rdf.core.sparql.query.Variable;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.web.ontologies.SPARQLENDPOINT;
-import org.apache.commons.rdf.Literal;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.ProcessingInstruction;
-
-/**
- * Provides methods to query a graph over the web.
- * 
- * @author ali, hasan
- * 
- */
-@Component
-@Service(Object.class)
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/sparql")
-public class SparqlEndpoint {
-
-    private final Logger logger = LoggerFactory.getLogger(getClass());
-    
-    
-    @Reference
-    TcManager tcManager;
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    /**
-     * The activate method is called when SCR activates the component configuration.
-     * @param componentContext
-     */
-    protected void activate(ComponentContext componentContext) {
-        URL templateURL = getClass().getResource("sparql-endpoint.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new Iri(templateURL.toString()), SPARQLENDPOINT.SparqlEndpoint,
-                null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
-    }
-
-    @GET
-    @Path("form")
-    public GraphNode getAvailableGraphUris(@Context UriInfo uriInfo) {
-        AccessController.checkPermission(new SparqlEndpointAccessPermission());
-        TrailingSlash.enforceNotPresent(uriInfo);
-        GraphNode graphNode = new GraphNode(new BlankNode(), new SimpleGraph());
-        Set<Iri> tripleCollections = tcManager.listGraphs();
-        for (Iri uriRef : tripleCollections) {
-            graphNode.addProperty(SPARQLENDPOINT.tripleCollection, uriRef);
-        }
-        graphNode.addProperty(RDF.type, SPARQLENDPOINT.SparqlEndpoint);
-        return graphNode;
-    }
-
-    /**
-     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
-     * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
-     * successfully carried out. A {@link DOMSource} is returned if an ASK or a
-     * SELECT sparql query was submitted and successfully carried out. The query
-     * is performed against a specified graph with the URI
-     * <code>defaultGrapfUri</code>
-     * 
-     * @param queryString
-     *            URL encoded sparql query
-     * @param defaultGraphUri
-     *            URI of the default graph, an {@link Iri} is expected
-     * @param applyStyleSheet
-     * @param serverSide
-     * @param styleSheetUri 
-     * @return either a {@link ImmutableGraph} or a {@link DOMSource}
-     */
-    @POST
-    public Object runFormQuery(@FormParam("query") String queryString,
-            @FormParam("default-graph-uri") Iri defaultGraphUri,
-            @FormParam("apply-style-sheet") String applyStyleSheet,
-            @FormParam("server-side") String serverSide,
-            @FormParam("style-sheet-uri") String styleSheetUri) {
-        AccessController.checkPermission(new SparqlEndpointAccessPermission());
-        logger.info("Executing SPARQL Query: " + queryString);
-        boolean applyStyle;
-        if (applyStyleSheet != null && applyStyleSheet.equals("on")) {
-            applyStyle = true;
-        } else {
-            applyStyle = false;
-        }
-        boolean applyServerSide;
-        if (serverSide != null && serverSide.equals("on")){
-            applyServerSide = true;
-        } else {
-            applyServerSide = false;
-        }
-        //Graph defaultGraph = null;
-        Object result = null;
-        try {
-            if (defaultGraphUri == null
-                    || defaultGraphUri.getUnicodeString().equals("")) {
-                defaultGraphUri = new Iri(Constants.CONTENT_GRAPH_URI_STRING);
-                //defaultGraph = contentGraph;
-            } else {
-                //defaultGraph = tcManager.getTriples(defaultGraphUri);
-            }
-            //this is now only used to get the variable names
-            //TODO use ResultSet.getResultVars instead
-            Query query = QueryParser.getInstance().parse(queryString);
-            result = tcManager.executeSparqlQuery(queryString, defaultGraphUri);
-            if (result instanceof ImmutableGraph) {
-                return (ImmutableGraph) result;
-            } else if ((result instanceof ResultSet)
-                    || (result instanceof Boolean)) {
-                Source source = toXmlSource(result, query, applyStyle,
-                        applyServerSide, styleSheetUri);
-                if (applyStyle && applyServerSide) {
-                    Response.ResponseBuilder rb = Response.ok(source).type(
-                            MediaType.APPLICATION_XHTML_XML_TYPE);
-                    return rb.build();
-                }
-                return source;
-            } else {
-                throw new WebApplicationException(
-                        Response.status(Status.BAD_REQUEST).entity("Only " +
-                        "queries yielding to a ImmutableGraph, a ResultSet or " +
-                        "Boolean are supported").build());
-            }
-        } catch (ParseException e) {
-            throw createWebApplicationException(e);
-        } catch (NoSuchEntityException e) {
-            throw createWebApplicationException(e);
-        }
-    }
-
-    /**
-     * Returns either a {@link ImmutableGraph} or a {@link DOMSource}. A {@link ImmutableGraph} is
-     * returned if a CONSTRUCT or a DESCRIBE sparql query was submitted and
-     * successfully carried out. A {@link DOMSource} is returned if an ASK or a
-     * SELECT sparql query was submitted and successfully carried out. The query
-     * is performed against a specified graph with the URI
-     * <code>defaultGrapfUri</code>
-     * 
-     * @param queryString
-     * @param defaultGraphUri
-     * @param styleSheetUri
-     * @param serverSide
-     * @return
-     */
-    @GET
-    public Object runGetQuery(@QueryParam("query") String queryString,
-            @QueryParam("default-graph-uri") Iri defaultGraphUri,
-            @QueryParam("style-sheet-uri") String styleSheetUri,
-            @QueryParam("server-side") String serverSide) {
-        AccessController.checkPermission(new SparqlEndpointAccessPermission());
-        String applyStyleSheet = null;
-        if(styleSheetUri != null){
-            applyStyleSheet = "on";
-        }
-        if(serverSide != null && serverSide.equals("true")){
-            serverSide = "on";
-        }
-        return runFormQuery(queryString, defaultGraphUri, applyStyleSheet,
-                serverSide,    styleSheetUri);
-    }
-
-    /**
-     * Helper: returns the variables of a sparql {@link SelectQuery}
-     * 
-     * @param queryString
-     * @return
-     */
-    private List<Variable> getVariables(Query query) {
-        if (query instanceof SelectQuery) {
-            return ((SelectQuery) query).getSelection();
-        } else {
-            return new ArrayList<Variable>();
-        }
-    }
-
-    /**
-     * Helper: transforms a {@link ResultSet} or a {@link Boolean} to a
-     * {@link DOMSource}
-     * 
-     * @param queryResult
-     * @param query
-     * @param applyStyle 
-     */
-    private Source toXmlSource(Object queryResult, Query query,
-            boolean applyStyle, boolean applyServerSide, String styleSheetUri) {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        try {
-            Document doc = dbf.newDocumentBuilder().newDocument();
-            // adding root element
-            Element root = doc.createElement("sparql");
-            root.setAttribute("xmlns", "http://www.w3.org/2005/sparql-results#");
-            doc.appendChild(root);
-            Element head = doc.createElement("head");
-            root.appendChild(head);
-            if (queryResult instanceof Boolean) {
-                Element booleanElement = doc.createElement("boolean");
-                booleanElement.appendChild(doc.createTextNode(queryResult
-                        .toString()));
-                root.appendChild(booleanElement);
-            } else {
-                List<Variable> variables = getVariables(query);
-                for (Variable var : variables) {
-                    Element varElement = doc.createElement("variable");
-                    varElement.setAttribute("name", var.getName());
-                    head.appendChild(varElement);
-                }
-                root.appendChild(createResultsElement((ResultSet) queryResult,
-                        doc));
-            }
-            DOMSource source = new DOMSource(doc);
-            if (applyStyle) {
-                ProcessingInstruction instruction = doc
-                        .createProcessingInstruction("xml-stylesheet",
-                                "type=\"text/xsl\" href=\"" + styleSheetUri + "\"");
-                doc.insertBefore(instruction, root);
-                if (applyServerSide) {
-                    return applyStyleServerSide(source, styleSheetUri);
-                }
-            }
-            return source;
-
-        } catch (ParserConfigurationException e) {
-            throw createWebApplicationException(e);
-        }
-    }
-
-    /**
-     * Applies a style sheet to a XML on server side
-     * @param source
-     *            XML result
-     * @param styleSheetUri
-     *            URI of the style sheet
-     * @return
-     * @throws TransformerException
-     * @throws IOException
-     */
-    private Source applyStyleServerSide(final DOMSource source,
-            final String styleSheetUri) {
-        return AccessController.doPrivileged(new PrivilegedAction<DOMSource>() {
-            @Override
-            public DOMSource run() {
-                try {
-                    StreamResult streamResult = new StreamResult(
-                            new ByteArrayOutputStream());
-                    final TransformerFactory tf = TransformerFactory
-                            .newInstance();
-                    Transformer transformer = tf.newTransformer();
-                    transformer.transform(source, streamResult);
-                    final URL stylesheet = new URL(styleSheetUri);
-                    Source streamSource = new StreamSource(
-                            new ByteArrayInputStream(
-                            ((ByteArrayOutputStream) streamResult
-                                    .getOutputStream()).toByteArray()));
-                    DOMResult domResult = new DOMResult();
-                    StreamSource xslFileSource = new StreamSource(stylesheet
-                            .openStream());
-                    Transformer xslTransformer = tf.newTransformer(xslFileSource);
-                    xslTransformer.transform(streamSource, domResult);
-                    return new DOMSource(domResult.getNode());
-                } catch (TransformerConfigurationException ex) {
-                    throw createWebApplicationException(ex);
-                } catch (TransformerException ex) {
-                    throw createWebApplicationException(ex);
-                } catch (IOException ex) {
-                    throw createWebApplicationException(ex);
-                }
-            }
-        });
-    }
-
-    /**
-     * Creates a WebApplicationexception and prints a logger entry
-     */
-    private WebApplicationException createWebApplicationException(Exception e) {
-        logger.info(e.getClass().getSimpleName() + ": {}", e.getMessage());
-        return new WebApplicationException(Response.status(Status.BAD_REQUEST)
-                .entity(e.getMessage().replace("<", "&lt;").replace("\n",
-                        "<br/>")).build());
-    }
-
-    /**
-     * Helper: creates results element from ResultSet
-     * 
-     */
-    private Element createResultsElement(ResultSet resultSet, Document doc) {
-        Element results = doc.createElement("results");
-        while (resultSet.hasNext()) {
-            SolutionMapping solutionMap = resultSet.next();
-            Set<Variable> keys = solutionMap.keySet();
-            Element result = doc.createElement("result");
-            results.appendChild(result);
-
-            for (Variable key : keys) {
-                Element bindingElement = doc.createElement("binding");
-                bindingElement.setAttribute("name", key.getName());
-                bindingElement.appendChild(createValueElement(
-                        (RdfTerm) solutionMap.get(key), doc));
-                result.appendChild(bindingElement);
-            }
-        }
-        return results;
-    }
-
-    /**
-     * Helper: creates value element from {@link RdfTerm} depending on its
-     * class
-     * 
-     */
-    private Element createValueElement(RdfTerm resource, Document doc) {
-        Element value = null;
-        if (resource instanceof Iri) {
-            value = doc.createElement("uri");
-            value.appendChild(doc.createTextNode(((Iri) resource)
-                    .getUnicodeString()));
-        } else if (resource instanceof Literal) {
-            value = doc.createElement("literal");
-            value.appendChild(doc.createTextNode(((Literal) resource)
-                    .getLexicalForm()));
-            value.setAttribute("datatype", (((Literal) resource)
-                    .getDataType().getUnicodeString()));
-            Language lang = ((Literal) resource).getLanguage();
-            if (lang != null) {
-                value.setAttribute("xml:lang", (lang.toString()));
-            }
-        } else {
-            value = doc.createElement("bnode");
-            value.appendChild(doc.createTextNode(((BlankNode) resource).toString()));
-        }
-        return value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
deleted file mode 100644
index 4dd93a3..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpointAccessPermission.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.rdf.web.core;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permission to use the Sparql Endpoint GUI. Note that the user
- * additionally needs permission to read a graph.
- *
- * @author tio
- */
-@PermissionInfo(value="Sparql Endpoint Access Permission", description="Grants access " +
-    "to the Sparql Endpoint")
-public class SparqlEndpointAccessPermission extends Permission{
-
-    public SparqlEndpointAccessPermission() {
-        super("Sparql Endpoint Access permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public SparqlEndpointAccessPermission(String target, String actions) {
-        super("Sparql Endpoint Access permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 577987;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
deleted file mode 100644
index 6a71c01..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.
- * See the NOTICE file distributed with this work for additional
- * information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.security.AccessController;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-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;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.jaxrs.utils.form.FormFile;
-import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.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.serializedform.Parser;
-import org.apache.clerezza.web.fileserver.util.MediaTypeGuesser;
-
-/**
- * Provides methods to GET, PUT, and POST an SCB graph over the web.
- * To be deployed in a JAX-RS runtime.
- * 
- * @author hasan
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("/graph")
-public class WebAccess {
-
-    @Reference
-    TcManager tcManager;
-
-    @Reference
-    private Parser parser;
-
-    final Logger logger = LoggerFactory.getLogger(WebAccess.class);
-
-    /**
-     * Gets the Graph with specified name
-     *
-     * @param name
-     * @return
-     */
-    @GET
-    public Graph getTriples(@QueryParam("name") Iri name) {
-        AccessController.checkPermission(new WebAccessPermission());
-        if (name == null) {
-            Response r = Response.status(Response.Status.BAD_REQUEST)
-                    .entity("must specify a graph name")
-                    .type(MediaType.TEXT_PLAIN_TYPE).build();
-            throw new WebApplicationException(r);
-        }
-        Graph result = tcManager.getGraph(name);
-        logger.debug("Got graph of size {} ", result.size());
-        int i = 1;
-        if (logger.isDebugEnabled()) {
-            for (Triple triple : result) {
-                logger.debug("({}) with triples {}", i++, triple.toString());
-            }
-            logger.debug("returning");
-        }
-        return result;
-    }
-
-    /**
-     * Puts the triples replacing the triples of the existing Graph with the
-     * specified name. If the graph doesn't exist creates a new <code>Graph</code> 
-     * with the specified name and puts the triples
-     * 
-     *
-     * @param name
-     * @param triples
-     */
-    @PUT
-    public void putTriples(@QueryParam("name") Iri name, Graph triples) {
-        AccessController.checkPermission(new WebAccessPermission());
-        Graph mGraph;
-        try {
-            mGraph = tcManager.getGraph(name);
-        } catch (NoSuchEntityException e) {
-            mGraph = tcManager.createGraph(name);
-        }
-        Lock writeLock = mGraph.getLock().writeLock();
-        writeLock.lock();
-        try {
-            mGraph.clear();
-            mGraph.addAll(triples);
-        } finally {
-            writeLock.unlock();
-        }
-    }
-
-    /**
-     * Posts triples to be placed into an {@link Graph} of the specified name.
-     * If an {@link Graph} with this name doesn't already exist, a new one
-     * is created and filled with the triples posted.
-     * @param form
-     *        a multipart/form-data consisting of:
-     *        - a {@link FormFile} labeled "graph" containing the triples and
-     *            the mime-type.
-     *        - a text field labeled "name" specifying the name of the Graph.
-     *        - an optional text field labeled "mode" specifying the mode.
-     *            If the mode is "replace", existing triples of the Graph will be
-     *            deleted before new triples are added. If the mode is not
-     *            specified or is "append", posted triples are added to the Graph.
-     *        - an optional text field labeled "redirection" specifying an URI
-     *            which the client should be redirected to in case of success.
-     * @return
-     *        {@link Response}. A response with status code BAD REQUEST (400) is
-     *        returned if the required data are missing. If the request can be
-     *        satisfied, one of the following responses is returned:
-     *        - SEE OTHER (303), if redirection is specified.
-     *        - CREATED (201), if redirection is not specified and a new
-     *            {@link Graph} is created.
-     *        - NO CONTENT (204), if redirection is not specified and no new
-     *            {@link Graph} is created.
-     */
-    @POST
-    @Consumes("multipart/form-data")
-    public Response postTriples(MultiPartBody form, @Context UriInfo uriInfo) {
-
-        AccessController.checkPermission(new WebAccessPermission());
-        FormFile[] formFiles = form.getFormFileParameterValues("graph");
-        if (formFiles.length == 0) {
-            responseWithBadRequest("form file parameter 'graph' is missing");
-        }
-        FormFile formFile = formFiles[0];
-        byte[] graph = formFile.getContent();
-        if (graph == null || (graph.length == 0)) {
-            responseWithBadRequest("no triples uploaded");
-        }
-        MediaType mediaType = formFile.getMediaType();
-        if (mediaType == null) {
-            responseWithBadRequest("mime-type not specified");
-        }
-        if (mediaType.equals(MediaType.APPLICATION_OCTET_STREAM_TYPE)) {
-            MediaType guessedType = MediaTypeGuesser.getInstance().guessTypeForName(formFile.getFileName());
-            if (guessedType != null) {
-                mediaType = guessedType;
-            }
-        }
-        String graphName = getFirstTextParameterValue(form, "name", true);
-        if (graphName == null) {
-            responseWithBadRequest("graph name not specified");
-        }
-        String mode = getFirstTextParameterValue(form, "mode", false);
-        if (mode != null) {
-            if (!(mode.equals("replace") || mode.equals("append"))) {
-                responseWithBadRequest("unknown mode");
-            }
-        } else {
-            mode = "append";
-        }
-        InputStream is = new ByteArrayInputStream(graph);
-        ImmutableGraph parsedGraph = parser.parse(is, mediaType.toString());
-        Iri graphUri = new Iri(graphName);
-        Graph mGraph;
-        boolean newGraph = false;
-        try {
-            mGraph = tcManager.getGraph(graphUri);
-        } catch (NoSuchEntityException e) {
-            mGraph = tcManager.createGraph(graphUri);
-            newGraph = true;
-        }
-        Lock writeLock = mGraph.getLock().writeLock();
-        writeLock.lock();
-        try {
-            if (!newGraph && mode.equals("replace")) {
-                mGraph.clear();
-            }
-            mGraph.addAll(parsedGraph);
-        } finally {
-            writeLock.unlock();
-        }
-        String redirection = getFirstTextParameterValue(form, "redirection", false);
-        if (redirection == null) {
-            if (newGraph) {
-                return Response.status(Status.CREATED).build();
-            } else {
-                return Response.status(Status.NO_CONTENT).build();
-            }
-        }
-        return RedirectUtil.createSeeOtherResponse(redirection, uriInfo);
-    }
-
-    @GET
-    @Path("upload-form")
-    @Produces("application/xhtml+xml")
-    public InputStream getUploadForm() {
-        AccessController.checkPermission(new WebAccessPermission());
-        return getClass().getResourceAsStream("upload-form.xhtml");
-    }
-
-    private void responseWithBadRequest(String message) {
-        logger.warn(message);
-        throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
-                .entity(message).build());
-    }
-
-    private String getFirstTextParameterValue(MultiPartBody form,
-            String parameterName, boolean mandatory) {
-        String[] paramValues = form.getTextParameterValues(parameterName);
-        if (paramValues.length == 0) {
-            if (mandatory) {
-                responseWithBadRequest("text parameter '" + parameterName +
-                        "' is missing");
-            }
-            return null;
-        }
-        return paramValues[0];
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
deleted file mode 100644
index 8964eda..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccessPermission.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.rdf.web.core;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permission to use the ImmutableGraph via Web. Note that the user
- * additionally needs permission to read a graph.
- *
- * @author mir
- */
-@PermissionInfo(value="ImmutableGraph via Web Access Permission", description="Grants access " +
-    "to the ImmutableGraph via Web")
-public class WebAccessPermission extends Permission{
-
-    public WebAccessPermission() {
-        super("ImmutableGraph via Web access permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public WebAccessPermission(String target, String actions) {
-        super("ImmutableGraph via Web access permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 477987;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
deleted file mode 100644
index 3187d42..0000000
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/utils/ResultSetsWrapper.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *  Copyright 2010 mir.
- * 
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- * 
- *       http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *  under the License.
- */
-package org.apache.clerezza.rdf.web.core.utils;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import org.apache.clerezza.rdf.core.sparql.ResultSet;
-import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
-
-/**
- * Wrapps a set of <code>ResultSet</code>s so it acts like a single ResultSet.
- *
- * @author mir
- */
-public class ResultSetsWrapper implements ResultSet {
-
-    private Iterator<ResultSet> resultSetsIter;
-    private ResultSet currentResultSet;
-    private List<String> varNames;
-
-    public ResultSetsWrapper(Set<ResultSet> resultSets) {
-        this.resultSetsIter = resultSets.iterator();
-        this.currentResultSet = resultSetsIter.next();
-
-        Set<String> uniqueVarNames = new HashSet<String>();
-        for (ResultSet resultSet : resultSets) {
-			uniqueVarNames.addAll(resultSet.getResultVars());
-		}
-    	this.varNames = new ArrayList<String>(uniqueVarNames);
-    }
-
-    @Override
-    public boolean hasNext() {
-        if (currentResultSet.hasNext()) {
-            return true;
-        } else {
-            if (resultSetsIter.hasNext()) {
-                currentResultSet = resultSetsIter.next();
-                return hasNext();
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public SolutionMapping next() {
-        hasNext();
-        return currentResultSet.next();
-    }
-
-    @Override
-    public void remove() {
-        currentResultSet.remove();
-    }
-    
-    @Override
-    public List<String> getResultVars() {
-    	return varNames;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/resources/META-INF/documentation.nt b/rdf.web/rdf.web.core/src/main/resources/META-INF/documentation.nt
deleted file mode 100644
index daf3e2e..0000000
--- a/rdf.web/rdf.web.core/src/main/resources/META-INF/documentation.nt
+++ /dev/null
@@ -1,52 +0,0 @@
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://discobits.org/ontology#pos> "1" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 <http://discobits.org/ontology#holds> <bundle:///scb-web-content> .
-<bundle:///scb-web-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-title> <http://discobits.org/ontology#infoBit> "SCB Web"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 .
-<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 .
-<bundle:///scb-web-content> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 .
-<bundle:///scb-web-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://discobits.org/ontology#pos> "2" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2> .
-<bundle:///scb-web-content-el/0-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-content-el/0-title> <http://discobits.org/ontology#infoBit> "Upload Triples with a POST Request"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e98 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-<bundle:///scb-web-content-el/2> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 .
-<bundle:///scb-web-content-el/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///scb-web-content-el/2> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 .
-<bundle:///scb-web-content-el/1> <http://discobits.org/ontology#infoBit> "The bundle SCB Web allows access to SCB graphs over HTTP with JAX-RS."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///scb-web-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///scb-web-content-el/0> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 .
-<bundle:///scb-web-content-el/0> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2-content> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://discobits.org/ontology#pos> "1" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e94 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-<bundle:///scb-web-content-el/0-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-content-el/0-content> <http://discobits.org/ontology#infoBit> "To upload triples with a POST request, a client can use the URI path \"/graph\" and place the triples and other required information into the body as multipart/form-data which consists of\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>a file labeled \"graph\" containing the triples and specifying the mime-type.</li>\n<li>a text field labeled \"name\" specifying the name of the MGraph. If an MGraph with this name does not already exist, a new one will be created.</li>\n<li>an optional text field labeled \"mode\" specifying the mode. If the mode is \"replace\", existing triples of the MGraph will be deleted before new triples are added. If the mode is not specified or is \"append\", posted triples will be added to the MGraph.</li>\n<li>an optional text field labeled \"redirection\" specifying an URI which the client should be redirected to in case of success.</li>\n</ul>\nA response with the status co
 de BAD REQUEST (400) is returned if the required data are missing. If the request can be satisfied, one of the following responses is returned:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>SEE OTHER (303), if redirection is specified.</li>\n<li>CREATED (201), if redirection is not specified and a new MGraph is created.</li>\n<li>NO CONTENT (204), if redirection is not specified and no new MGraph is created.</li>\n</ul>\n<p xmlns=\"http://www.w3.org/1999/xhtml\">\nFor your convenience you may access a web-form at the Uri-Path <code>/graph/upload-form</code>.</p>\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///scb-web-content-el/2-title> <http://discobits.org/ontology#infoBit> "Backup of Triple Collections"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///scb-web-content-el/2-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-content-el/2-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///scb-web-content-el/2-content> <http://discobits.org/ontology#infoBit> "The platform allows the current user to download all triple collections that he has access to through the URI path \"/admin/backup/download\". The resulted file is a compressed archive in zip format. All triple collections in this file are serialized in N-Triples format. Furthermore, a file called \"triplecollections.nt\" is contained in backup.zip, which describes the mapping of file names to triple collection names.\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://discobits.org/ontology#pos> "1" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e97 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://discobits.org/ontology#pos> "0" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e95 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/2-title> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0-title> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://discobits.org/ontology#pos> "0" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e93 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://discobits.org/ontology#pos> "1" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e92 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/0-content> .
-<bundle:///scb-web> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e99 .
-<bundle:///scb-web> <http://discobits.org/ontology#contains> _:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 .
-<bundle:///scb-web> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://discobits.org/ontology#pos> "0" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e96 <http://discobits.org/ontology#holds> <bundle:///scb-web-content-el/1> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://discobits.org/ontology#pos> "0" .
-_:AX2dX5ddb458X3aX126d34f9135X3aXX2dX7e91 <http://discobits.org/ontology#holds> <bundle:///scb-web-title> .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp b/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
deleted file mode 100644
index 0c43b13..0000000
--- a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/backup-management.ssp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-resultDocModifier.setTitle("Backup and restore");
-
-<div class="tx-content">
-	<p>
-		<form method="get" action="/admin/backup/download">
-    Retrieve a backup of all graphs. WARNING: while creating the backup parts of clerezza migh be irresponsive.
-			<input type="submit" value="Retrieve Backup" />
-		</form>
-	</p>
-	<p>
-		<form method="post" action="/admin/backup/restore" enctype="multipart/form-data">
-			<input type="file" name="file" />
-			<input type="submit" value="Restore from backup" />
-		</form>
-	</p>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp b/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
deleted file mode 100644
index 0b71676..0000000
--- a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/graph-management.ssp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def gm(s: Any) = new UriRef("http://clerezza.org/2010/03/graph-management#"+s)
-def rdf(s: Any) = new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#"+s)
-def tcp(s: Any) = new UriRef("http://clerezza.org/2009/06/tcprovider#"+s)
-
-resultDocModifier.setTitle("Manage Triple Collections");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Manage Triple Collections</h1>);
-
-import org.apache.clerezza.rdf.scala.utils.RichGraphNode
-
-<div id="tx-content">
-<table>
-	<tr><th>Name</th><th>Size</th><th>type</th><th colspan="3">Actions</th></tr>
-				{for (tc <- (res/gm("tripleCollection")).sortBy(tc => tc*)) yield
-					<tr>
-						<td>{tc*}</td>
-						<td>{tc/gm("size")*}</td>
-						<td>{if ((tc/rdf("type")).indexOf(new RichGraphNode(
-						new GraphNode(tcp("MGraph"), res.getGraph))) != -1) {
-						<span>MGraph</span> } else {
-						<span>Graph</span>
-						}
-						}
-						</td>
-						<td>{ifx ((tc/rdf("type")).indexOf(new RichGraphNode(
-						new GraphNode(tcp("MGraph"), res.getGraph))) != -1) {<form action="smush" method="post"><div>
-							<input type="hidden" name="graphName" value={tc*} />
-						<input type="submit" value="smush" /></div></form>}
-						}</td>
-                                                <td><form action="delete" method="post" onsubmit="return confirm('Are you sure you want to delete this graph?');"><div>
-							<input type="hidden" name="graphName" value={tc*} />
-						<input type="submit" value="delete" /></div></form>
-						</td>
-						<td><form action="/graph" method="get"><div>
-							<input type="hidden" name="name" value={tc*} />
-						<input type="submit" value="get" /></div></form>
-						</td>
-					</tr>
-				}
-</table>
-<p><a href="/graph/upload-form">UploadGraph</a></p>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp b/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
deleted file mode 100644
index 1e6e233..0000000
--- a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/sparql-endpoint.ssp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def se(s: Any) = new UriRef("http://clerezza.org/2009/11/sparql-endpoint#"+s)
-<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
-	<head>
-		<title>SPARQL Endpoint</title>
-		<script type="text/javascript">
-			function toggle(checkbox){{
-				var uri = document.getElementById('stylesheeturi');
-				var urilable = document.getElementById('urilable');
-				var server = document.getElementById('server');
-				var serverlabel = document.getElementById('serverlabel');
-				if (checkbox.checked){{
-					uri.style.visibility = 'visible';
-					urilable.style.visibility = 'visible';
-					server.style.visibility = 'visible';
-					serverlabel.style.visibility = 'visible';
-				}} else {{
-					uri.style.visibility = 'hidden';
-					urilable.style.visibility = 'hidden';
-					server.style.visibility = 'hidden';
-					serverlabel.style.visibility = 'hidden';
-				}}
-			}}
-		</script>
-	</head>
-	<body>
-		<h1>SPARQL Endpoint</h1>
-		<hr />
-		<h4>SPARQL Query</h4>
-		<form method="post" action="../sparql">
-			<lable for="query">Type in your query:</lable>
-			<br />
-			<textarea cols="70" rows="10" name="query" >
-PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-PREFIX disco: &lt;http://discobits.org/ontology#>
-SELECT ?c where {{?c rdf:type disco:TitledContent}}
-			</textarea>
-			<br />
-			<br />
-			<label for="default-graph-uri">Select a graph URI:</label>
-			<select	name="default-graph-uri">
-				{for (tc <- (res/se("tripleCollection"))) yield
-					<option>{tc*}</option>
-				}
-			</select>
-			<br />
-			<lable for="apply-style-sheet">Add XSLT style sheet on the result: </lable>
-			<input type="checkbox" name="apply-style-sheet" id="checkbox" onclick="toggle(this)" />
-			<br />
-			<label for="style-sheet-uri" id="urilable" style="visibility:hidden">URI of XSLT style sheet</label>
-			<input type="text" name="style-sheet-uri" id="stylesheeturi" style="width:350px;visibility:hidden" value="http://www.w3.org/TR/rdf-sparql-XMLres/result-to-html.xsl" />
-			<label id="serverlabel" style="visibility:hidden">Add stylesheet on server side</label>
-			<input type="checkbox" name="server-side" id="server" checked="checked" style="visibility:hidden"/>
-			<br />
-			<br />
-			<input type="submit" value="Submit Query" />
-		</form>
-	</body>
-</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml b/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
deleted file mode 100644
index f2d1283..0000000
--- a/rdf.web/rdf.web.core/src/main/resources/org/apache/clerezza/rdf/web/core/upload-form.xhtml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>Upload triples</title>
-    </head>
-    <body>
-        
-            <form method="post" enctype="multipart/form-data" action="/graph">
-				<div>
-				<label for="graph">RDF File: </label><input id="graph" type="file" name="graph" /><br/>
-				<label for="name">Graph Name: </label>
-				<input type="text" id="name" name="name" value="urn:x-localinstance:/content.graph" size="80"/><br/>
-				<label for="mode">Insertion Mode (for existing Graphs): </label><select name="mode">
-					<option value="append">Append</option>
-					<option value="replace">Replace</option>
-				</select>
-				<input type="hidden" name="redirection" value="/graph/upload-form" /><br/>
-				<input type="submit" />
-				</div>
-			</form>
-
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java b/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
deleted file mode 100644
index a43a6a2..0000000
--- a/rdf.web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.rdf.web.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.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.TcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
-import org.apache.clerezza.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
-import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
-import org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.web.ontologies.BACKUP;
-import org.apache.commons.rdf.Literal;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Tests backup functionality.
- *
- * @author hasan
- */
-public class BackupAndRestoreTest {
-
-    private static String testGraphFileName = "test.graph";
-
-    private static Graph testGraph0 = new SimpleGraph();
-    private static Iri testGraphUri0 = // the URI of testGraph0
-            new Iri("http://localhost/test0/"+testGraphFileName);
-    // a resource in testGraph0
-    private    static Iri uri0 = new Iri("http://localhost/test0/testuri");
-
-    private static Graph testGraph1 = new SimpleGraph();
-    private static Iri testGraphUri1 = // the URI of testGraph1
-            new Iri("http://localhost/test1/"+testGraphFileName);
-
-    // a resource in testGraph1
-    private    static Iri uri1 = new Iri("http://localhost/test1/testuri");
-
-    private static ImmutableGraph testGraphA;
-    private static Iri testGraphUriA = // the URI of testGraphA
-            new Iri("http://localhost/testA/"+testGraphFileName);
-
-    // a resource in testGraphA
-    private    static Iri uriA = new Iri("http://localhost/testA/testuri");
-    
-
-    private static String backupContentFileName = "triplecollections.nt";
-    private static BackupMessageBodyWriter backup;
-    private static Parser parser = Parser.getInstance();
-
-    @Before
-    public void setUp() {
-        backup = new BackupMessageBodyWriter();
-        backup.tcManager = new TestTcManager();
-        backup.serializer = Serializer.getInstance();
-        backup.serializer.bindSerializingProvider(
-                new JenaSerializerProvider());
-        testGraph0.add(new TripleImpl(uri0, uri0, uri0));
-        testGraph1.add(new TripleImpl(uri1, uri1, uri1));
-        Graph graphBuilder = new SimpleGraph();
-        graphBuilder.add(new TripleImpl(uriA, uriA, uriA));
-        testGraphA = graphBuilder.getImmutableGraph();
-    }
-
-    @Test
-    public void testBackup() throws IOException {
-        //ImmutableGraph downloadedTestGraphX = null;
-        //ImmutableGraph downloadedTestGraphY = null;
-        ImmutableGraph downloadedBackupContentsGraph = null;
-
-        byte[] download = backup.createBackup();
-        ByteArrayInputStream bais = new ByteArrayInputStream(download);
-        ZipInputStream compressedTcs = new ZipInputStream(bais);
-
-        Map<String, Graph> extractedTc = new HashMap<String, Graph>();
-        String folder = "";
-        ZipEntry entry;
-        while ((entry = compressedTcs.getNextEntry()) != null) {
-            String entryName = entry.getName();
-            if (entry.isDirectory()) {
-                folder = entryName;
-            } else {
-                Assert.assertTrue(entryName.startsWith(folder+testGraphFileName)
-                        || entryName.equals(backupContentFileName));
-                ByteArrayOutputStream baos = new ByteArrayOutputStream(download.length);
-                int count;
-                byte buffer[] = new byte[2048];
-                while ((count = compressedTcs.read(buffer, 0, 2048)) != -1) {
-                    baos.write(buffer, 0, count);
-                }
-                ByteArrayInputStream serializedGraph = new ByteArrayInputStream(
-                        baos.toByteArray());
-                /*if (entryName.equals(folder+testGraphFileName + ".nt")) {
-                    downloadedTestGraphX = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                } else if (entryName.startsWith(folder+testGraphFileName)) {
-                    downloadedTestGraphY = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                }*/
-                if (entryName.equals(backupContentFileName)) {
-                    downloadedBackupContentsGraph = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                } else {
-                    ImmutableGraph deserializedGraph = parser.parse(serializedGraph,
-                            SupportedFormat.N_TRIPLE, null);
-                    extractedTc.put(entryName, deserializedGraph);
-                }
-                baos.flush();
-                baos.close();
-            }
-        }
-        compressedTcs.close();
-        checkDownloadedGraphs(extractedTc,
-                downloadedBackupContentsGraph, folder);
-    }
-
-    @Test
-    public void restoreFromBackup() throws IOException {
-        byte[] backupData = backup.createBackup();
-        TcProvider tcProvider = EasyMock.createMock(TcProvider.class);
-        EasyMock.expect(tcProvider.getGraph(testGraphUri0)).andReturn(
-                EasyMock.createNiceMock(Graph.class));
-        EasyMock.expect(tcProvider.getGraph(testGraphUri1)).andReturn(
-                EasyMock.createNiceMock(Graph.class));
-        tcProvider.deleteGraph(testGraphUriA);
-        EasyMock.expect(tcProvider.createImmutableGraph(EasyMock.eq(testGraphUriA),
-                EasyMock.notNull(Graph.class))).andReturn(new SimpleGraph().getImmutableGraph());
-        EasyMock.replay(tcProvider);
-        Restorer restore = new Restorer();
-        restore.parser = Parser.getInstance();
-        restore.restore(new ByteArrayInputStream(backupData), tcProvider);
-        EasyMock.verify(tcProvider);
-    }
-
-    private void checkDownloadedGraphs(Map<String, Graph> extractedTc,
-            ImmutableGraph downloadedBackupContentsGraph, String folder) {
-        Assert.assertFalse(extractedTc.isEmpty());
-        Assert.assertNotNull(downloadedBackupContentsGraph);
-
-        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
-                testGraphUri0, RDF.type, BACKUP.Graph)));
-
-        Iterator<Triple> triples = downloadedBackupContentsGraph.filter(
-                testGraphUri0, BACKUP.file, null);
-        Assert.assertTrue(triples.hasNext());
-
-        String fileName0 = ((Literal) triples.next().getObject()).getLexicalForm();
-        Assert.assertTrue(fileName0.startsWith(folder+testGraphFileName));
-
-        Graph extracted0 = extractedTc.get(fileName0);
-        Assert.assertNotNull(extracted0);
-        Assert.assertTrue(extracted0.filter(uri0, uri0, uri0).hasNext());
-
-        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
-                testGraphUri1, RDF.type, BACKUP.Graph)));
-
-        triples = downloadedBackupContentsGraph.filter(
-                testGraphUri1, BACKUP.file, null);
-        Assert.assertTrue(triples.hasNext());
-
-        String fileName1 = ((Literal) triples.next().getObject()).getLexicalForm();
-        Assert.assertTrue(fileName1.startsWith(folder+testGraphFileName));
-
-        Graph extracted1 = extractedTc.get(fileName1);
-        Assert.assertNotNull(extracted1);
-
-        Assert.assertTrue(extracted1.filter(uri1, uri1, uri1).hasNext());
-    
-
-
-        Assert.assertTrue(downloadedBackupContentsGraph.contains(new TripleImpl(
-                testGraphUriA, RDF.type, BACKUP.Graph)));
-
-        triples = downloadedBackupContentsGraph.filter(
-                testGraphUriA, BACKUP.file, null);
-        Assert.assertTrue(triples.hasNext());
-
-        String fileNameA = ((Literal) triples.next().getObject()).getLexicalForm();
-        Assert.assertTrue(fileNameA.startsWith(folder+testGraphFileName));
-        Graph extractedA = extractedTc.get(fileNameA);
-        Assert.assertNotNull(extractedA);
-
-        Assert.assertTrue(extractedA.filter(uriA, uriA, uriA).hasNext());
-
-    }
-
-    private class TestTcManager extends TcManager {
-
-        // Associates testGraphUri0 with testGraph0 and testGraphUri1 with testGraph1
-        @Override
-        public Graph getGraph(Iri name) throws NoSuchEntityException {
-            if (name.equals(testGraphUri0)) {
-                return testGraph0;
-            } else if (name.equals(testGraphUri1)) {
-                return testGraph1;
-            } else if (name.equals(testGraphUriA)) {
-                return testGraphA;
-            }
-            return null;
-        }
-
-        @Override
-        public Set<Iri> listGraphs() {
-            Set<Iri> result = new HashSet<Iri>();
-            result.add(testGraphUri0);
-            result.add(testGraphUri1);
-            result.add(testGraphUriA);
-            return result;
-        }
-    }
-}
\ No newline at end of file


[62/87] [abbrv] clerezza git commit: CLEREZZA-966: moved ported rdf.* modules to hierarchy

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/storage.web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/storage.web/pom.xml b/rdf/storage.web/pom.xml
new file mode 100644
index 0000000..4315683
--- /dev/null
+++ b/rdf/storage.web/pom.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <artifactId>rdf.storage.web</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - RDF Storage Web (Caching Web Storage Provider)</name>
+    <description>A (currently read-only) storage provider retrieving graphs from the web. It
+        implements a caching proxy, relying on another provider for storing triples.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>osgi.services</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+          <groupId>org.scala-lang</groupId>
+          <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.clerezza.ext</groupId>
+          <artifactId>slf4j-scala-api</artifactId>
+            <version>1.6.3</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <sourceDirectory>src/main/scala</sourceDirectory>
+        <testSourceDirectory>src/test/scala</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
+                        <Export-Package>${project.groupId}.${project.artifactId}</Export-Package>
+                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-eclipse-plugin</artifactId>
+                <configuration>
+                    <downloadSources>true</downloadSources>
+                    <downloadJavadocs>true</downloadJavadocs>
+                    <buildcommands>
+                        <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand>
+                    </buildcommands>
+                    <additionalProjectnatures>
+                        <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature>
+                    </additionalProjectnatures>
+                    <classpathContainers>
+                        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
+                        </classpathContainer>
+                        <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER
+                        </classpathContainer>
+                    </classpathContainers>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
----------------------------------------------------------------------
diff --git a/rdf/storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml b/rdf/storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
new file mode 100644
index 0000000..e1bd1fb
--- /dev/null
+++ b/rdf/storage.web/src/main/resources/OSGI-INF/metatype/metatype.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0" localization="OSGI-INF/metatype/metatype">
+    <OCD id="org.apache.clerezza.rdf.storage.web.WebProxy"
+         name="Clerezza SCB Web Storage Provider"
+         description="%org.apache.clerezza.rdf.storage.web.WebProxy.description">
+        <AD id="network-timeout" type="int" default="false" name="Network Timeout" description="Specifies the network timeout in ms."/>
+    </OCD>
+    <Designate pid="org.apache.clerezza.rdf.storage.web.WebProxy">
+        <Object ocdref="org.apache.clerezza.rdf.storage.web.WebProxy"/>
+    </Designate>
+</metatype:MetaData>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/rdf/storage.web/src/main/resources/OSGI-INF/serviceComponents.xml b/rdf/storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
new file mode 100644
index 0000000..ff9b296
--- /dev/null
+++ b/rdf/storage.web/src/main/resources/OSGI-INF/serviceComponents.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
+
+    <scr:component enabled="true" name="org.apache.clerezza.rdf.storage.web.WebProxy">
+        <implementation class="org.apache.clerezza.rdf.storage.web.WebProxy"/>
+        <service servicefactory="false">
+            <provide interface="org.apache.clerezza.rdf.storage.web.WebProxy"/>
+            <provide interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"/>
+        </service>
+        <!-- hard coded <property name="weight" type="Integer" value="0"/> -->
+        <reference name="weightedTcProvider" interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"
+                   cardinality="1..n" policy="dynamic" bind="bindWeightedTcProvider" unbind="unbindWeightedTcProvider"/>
+        <reference name="parser" interface="org.apache.clerezza.rdf.core.serializedform.Parser"
+        cardinality="1..1" policy="static" bind="bindParser" unbind="unbindParser"/>
+        <property name="network-timeout" value="3000" type="Integer"/>
+    </scr:component>
+
+</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/storage.web/src/main/scala/WebProxy.scala
----------------------------------------------------------------------
diff --git a/rdf/storage.web/src/main/scala/WebProxy.scala b/rdf/storage.web/src/main/scala/WebProxy.scala
new file mode 100644
index 0000000..3a03e3b
--- /dev/null
+++ b/rdf/storage.web/src/main/scala/WebProxy.scala
@@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.rdf.storage.web
+
+
+import org.apache.commons.rdf.ImmutableGraph
+import org.apache.commons.rdf.Iri
+import org.apache.commons.rdf._
+import org.apache.commons.rdf.impl.utils.AbstractGraph
+import org.osgi.service.component.ComponentContext
+import java.io.IOException
+import java.net.{HttpURLConnection, URL}
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat
+import org.apache.clerezza.rdf.core.serializedform.Parser
+import java.security.{PrivilegedExceptionAction, PrivilegedActionException, AccessController}
+
+import org.slf4j.scala._
+import org.apache.clerezza.rdf.core.access._
+import org.apache.clerezza.rdf.core._
+import java.sql.Time
+
+/**
+ * The Web Proxy Service enables applications to request remote (and local) graphs.
+ * It keeps cached version of the remote graphs in store for faster delivery.
+ *
+ */
+class WebProxy extends WeightedTcProvider with Logging {
+
+  val networkTimeoutKey = "network-timeout"
+
+  private var networkTimeout: Int = _
+
+  private var tcProvider: TcProviderMultiplexer = new TcProviderMultiplexer
+
+  /**
+   * Register a provider
+   *
+   * @param provider
+   *            the provider to be registered
+   */
+  protected def bindWeightedTcProvider(provider: WeightedTcProvider): Unit = {
+    tcProvider.addWeightedTcProvider(provider)
+  }
+
+  /**
+   * Deregister a provider
+   *
+   * @param provider
+   *            the provider to be deregistered
+   */
+  protected def unbindWeightedTcProvider(provider: WeightedTcProvider): Unit = {
+    tcProvider.removeWeightedTcProvider(provider)
+  }
+
+  /**OSGI method, called on activation */
+  protected def activate(context: ComponentContext) = {
+    networkTimeout = Integer.parseInt(context.getProperties.get(networkTimeoutKey).toString)
+  }
+
+
+  private var parser: Parser = null
+
+  protected def bindParser(p: Parser) = {
+    parser = p
+  }
+
+  protected def unbindParser(p: Parser) = {
+    parser = null
+  }
+
+  def getWeight: Int = {
+    return 0
+  }
+
+  /**
+   * Any Graph is available as ImmutableGraph as well as immutable Graph
+   *
+   * @param name
+   * @return
+   * @throws NoSuchEntityException
+   */
+  def getMGraph(name: Iri): Graph = {
+    val graph = getImmutableGraph(name)
+    return new AbstractGraph() {
+      protected def performFilter(subject: BlankNodeOrIri, predicate: Iri, `object` : RdfTerm): java.util.Iterator[Triple] = {
+        graph.filter(subject, predicate, `object`)
+      }
+
+      def performSize = graph.size
+    }
+  }
+
+  def getImmutableGraph(name: Iri): ImmutableGraph = {
+    try {
+      getGraph(name, Cache.Fetch)
+    } catch {
+      case e: IOException => {
+          logger.debug("could not get graph by dereferencing uri", e)
+          throw new NoSuchEntityException(name)
+      }
+
+    }
+  }
+
+  def getGraph(name: Iri): Graph = {
+    return getMGraph(name)
+  }
+
+  def createGraph(name: Iri): Graph = {
+    throw new UnsupportedOperationException
+  }
+
+  def createImmutableGraph(name: Iri, triples: Graph): ImmutableGraph = {
+    throw new UnsupportedOperationException
+  }
+
+  def deleteGraph(name: Iri): Unit = {
+    throw new UnsupportedOperationException
+  }
+
+  def getNames(graph: ImmutableGraph): java.util.Set[Iri] = {
+    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
+    import collection.JavaConversions._
+    for (name <- listGraphs) {
+      if (getImmutableGraph(name).equals(graph)) {
+        result.add(name)
+      }
+    }
+    return result
+  }
+
+  def listGraphs: java.util.Set[Iri] = {
+    var result: java.util.Set[Iri] = new java.util.HashSet[Iri]
+    result.addAll(listMGraphs)
+    result.addAll(listImmutableGraphs)
+    return result
+  }
+
+  def listMGraphs: java.util.Set[Iri] = {
+    //or should we list graphs for which we have a cached version?
+    return java.util.Collections.emptySet[Iri]
+  }
+
+  def listImmutableGraphs: java.util.Set[Iri] = {
+    return java.util.Collections.emptySet[Iri]
+  }
+
+  /**
+   * The semantics of this resource
+   * @param update if a remote URI, update information on the resource first
+   */
+  def getGraph(name: Iri, updatePolicy: Cache.Value): ImmutableGraph = {
+    logger.debug("getting graph " + name)
+    if (name.getUnicodeString.indexOf('#') != -1) {
+      logger.debug("not dereferencing URI with hash sign. Please see CLEREZZA-533 for debate.")
+      throw new NoSuchEntityException(name)
+    }
+    if (name.getUnicodeString.startsWith("urn")) {
+      //these are not dereferenceable
+      throw new NoSuchEntityException(name)
+    }
+    val cacheGraphName = new Iri("urn:x-localinstance:/cache/" + name.getUnicodeString)
+    //todo: follow redirects and keep track of them
+    //todo: keep track of headers especially date and etag. test for etag similarity
+    //todo: for https connection allow user to specify his webid and send his key: ie allow web server to be an agent
+    //todo: add GRDDL functionality, so that other return types can be processed too
+    //todo: enable ftp and other formats (though content negotiation won't work there)
+    def updateGraph() {
+      val url = new URL(name.getUnicodeString)
+      val connection = url.openConnection()
+      connection match {
+        case hc: HttpURLConnection => {
+          hc.addRequestProperty("Accept", acceptHeader)
+          hc.setReadTimeout(networkTimeout)
+          hc.setConnectTimeout(networkTimeout)
+        };
+      }
+      connection.connect()
+      val in = connection.getInputStream()
+      val mediaType = connection.getContentType()
+      val remoteTriples = parser.parse(in, mediaType, name)
+      tcProvider.synchronized {
+        try {
+          tcProvider.deleteGraph(cacheGraphName)
+        } catch {
+          case e: NoSuchEntityException =>;
+        }
+        tcProvider.createImmutableGraph(cacheGraphName, remoteTriples)
+      }
+    }
+    try {
+      //the logic here is not quite right, as we don't look at time of previous fetch.
+      updatePolicy match {
+        case Cache.Fetch => try {
+          tcProvider.getImmutableGraph(cacheGraphName)
+        } catch {
+          case e: NoSuchEntityException => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
+        }
+        case Cache.ForceUpdate => updateGraph(); tcProvider.getImmutableGraph(cacheGraphName)
+        case Cache.CacheOnly => tcProvider.getImmutableGraph(cacheGraphName)
+      }
+    } catch {
+      case ex: PrivilegedActionException => {
+        var cause: Throwable = ex.getCause
+        if (cause.isInstanceOf[UnsupportedOperationException]) {
+          throw cause.asInstanceOf[UnsupportedOperationException]
+        }
+        if (cause.isInstanceOf[EntityAlreadyExistsException]) {
+          throw cause.asInstanceOf[EntityAlreadyExistsException]
+        }
+        if (cause.isInstanceOf[RuntimeException]) {
+          throw cause.asInstanceOf[RuntimeException]
+        }
+        throw new RuntimeException(cause)
+      }
+    }
+  }
+
+
+  private lazy val acceptHeader = {
+
+    import scala.collection.JavaConversions._
+
+    (for (f <- parser.getSupportedFormats) yield {
+      val qualityOfFormat = {
+        f match {
+          //the default, well established format
+          case SupportedFormat.RDF_XML => "1.0";
+          //n3 is a bit less well defined and/or many parsers supports only subsets
+          case SupportedFormat.N3 => "0.6";
+          //we prefer most dedicated formats to (X)HTML, not because those are "better",
+          //but just because it is quite likely that the pure RDF format will be
+          //lighter (contain less presentation markup), and it is also possible that HTML does not
+          //contain any RDFa, but just points to another format.
+          case SupportedFormat.XHTML => "0.5";
+          //we prefer XHTML over html, because parsing (should) be easier
+          case SupportedFormat.HTML => "0.4";
+          //all other formats known currently are structured formats
+          case _ => "0.8"
+        }
+      }
+      f + "; q=" + qualityOfFormat + ","
+    }).mkString + " *; q=.1" //is that for GRDDL?
+  }
+}
+
+object Cache extends Enumeration {
+  /**fetch if not in cache, if version in cache is out of date, or return cache */
+  val Fetch = Value
+  /**fetch from source whatever is in cache */
+  val ForceUpdate = Value
+  /**only get cached version. If none exists return empty graph */
+  val CacheOnly = Value
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/LICENSE
----------------------------------------------------------------------
diff --git a/rdf/web/LICENSE b/rdf/web/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rdf/web/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/web/pom.xml b/rdf/web/pom.xml
new file mode 100644
index 0000000..7dc74da
--- /dev/null
+++ b/rdf/web/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>rdf.web</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - RDF Web Access</name>
+    <description>Allows access to Clerezza graphs over HTTP with JAX-RS</description>
+    <modules>
+        <module>rdf.web.core</module>
+        <module>rdf.web.ontologies</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/LICENSE
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/LICENSE b/rdf/web/rdf.web.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rdf/web/rdf.web.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/nbactions.xml
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/nbactions.xml b/rdf/web/rdf.web.core/nbactions.xml
new file mode 100644
index 0000000..49e8307
--- /dev/null
+++ b/rdf/web/rdf.web.core/nbactions.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+    <action>
+        <actionName>CUSTOM-deploy to localhost:8080</actionName>
+        <displayName>deploy to localhost:8080</displayName>
+        <goals>
+            <goal>install</goal>
+            <goal>org.apache.sling:maven-sling-plugin:install</goal>
+        </goals>
+    </action>
+</actions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/pom.xml b/rdf/web/rdf.web.core/pom.xml
new file mode 100644
index 0000000..2cad597
--- /dev/null
+++ b/rdf/web/rdf.web.core/pom.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>rdf.web.core</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - RDF Web Access Core</name>
+    <description>The core part of Clerezza RDF  Web Access</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.serializer</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.jena.parser</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.web.ontologies</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
new file mode 100644
index 0000000..440e877
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import org.apache.clerezza.platform.Constants;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.rdf.core.access.security.TcPermission;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.web.ontologies.BACKUP;
+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;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.ws.rs.core.Response.Status;
+import java.net.URL;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * This JAX-RS resource provides a method to retrieve a zip file containing
+ * all triple collections that the use may access. The triple collection are
+ * serialized in N-Triples format. The URI path of this resource is
+ * "/admin/backup".
+ *
+ * This class adds a global menu-item for users that can read the system graph
+ * (as there's currently no dedicated backup-permission).
+ *
+ * @author hasan, reto
+ */
+@Component
+@Service({Object.class, GlobalMenuItemsProvider.class})
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/admin/backup")
+public class Backup implements GlobalMenuItemsProvider {
+
+    final Logger logger = LoggerFactory.getLogger(Backup.class);
+    @Reference
+    private ScalaServerPagesService scalaServerPagesService;
+    private Set<ServiceRegistration> serviceRegistrations = new HashSet<ServiceRegistration>();
+
+    /**
+     * The activate method is called when SCR activates the component configuration.
+     *
+     * @param componentContext
+     */
+    protected void activate(ComponentContext componentContext) {
+        URL templateURL = getClass().getResource("backup-management.ssp");
+        serviceRegistrations.add(scalaServerPagesService.registerScalaServerPage(templateURL, BACKUP.BackupAdminPage, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE));
+    }
+
+    protected void deactivate(ComponentContext context) {
+        for (ServiceRegistration r : serviceRegistrations) {
+            r.unregister();
+        }
+    }
+
+    /**
+     * Get a zipped file containing all triple collections which the
+     * user may access. The resource is accessible through the URI path
+     * "/admin/backup/download".
+     * The triple collections are serialized in N-Triples format before being
+     * archived in a single zipped file.
+     * A mapping of the names of the files in the archive to triple collection
+     * names is available as well in the archive as a text file named
+     * triplecollections.nt.
+     *
+     * @return a response that will cause the creation of a zipped file
+     */
+    @GET
+    @Path("download")
+    @Produces("application/zip")
+    public Response download() {
+        AccessController.checkPermission(new BackupPermission());
+        return AccessController.doPrivileged(new PrivilegedAction<Response>() {
+
+            @Override
+            public Response run() {
+                ResponseBuilder responseBuilder = Response.status(Status.OK).
+                        entity(Backup.this);
+                responseBuilder.header("Content-Disposition",
+                        "attachment; filename=backup" + getCurrentDate() + ".zip");
+                return responseBuilder.build();
+            }
+        });
+
+    }
+
+    @GET
+    public GraphNode overviewPage() {
+        Graph resultGraph = new SimpleGraph();
+        GraphNode result = new GraphNode(new BlankNode(), resultGraph);
+        result.addProperty(RDF.type, BACKUP.BackupAdminPage);
+        result.addProperty(RDF.type, PLATFORM.HeadedPage);
+        return result;
+    }
+
+    private String getCurrentDate() {
+        DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
+        Date date = new Date();
+        return dateFormat.format(date);
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        //need backup or restore permission for the menu item to be shown
+        Set<GlobalMenuItem> result = new HashSet<GlobalMenuItem>();
+        try {
+            AccessController.checkPermission(new BackupPermission());
+        } catch (AccessControlException e) {
+            try {
+                AccessController.checkPermission(new RestorePermission());
+            } catch (AccessControlException e1) {
+                return result;
+            }
+        }
+        result.add(new GlobalMenuItem("/admin/backup",
+                "BCK", "Backup and Restore", 5, "Administration"));
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
new file mode 100644
index 0000000..5029eea
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupMessageBodyWriter.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+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;
+import org.apache.commons.rdf.Graph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.web.ontologies.BACKUP;
+
+/**
+ * This does the actual work of producing a backup
+ * 
+ * @author hasan, reto
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Produces("application/zip")
+@Provider
+public class BackupMessageBodyWriter implements MessageBodyWriter<Backup> {
+
+    @Reference
+    TcManager tcManager;
+
+    @Reference
+    Serializer serializer;
+
+    final Logger logger = LoggerFactory.getLogger(BackupMessageBodyWriter.class);
+
+    private final String folder = "graphs/";
+
+
+    byte[] createBackup() {
+        ByteArrayOutputStream result = new ByteArrayOutputStream();
+        writeBackup(result);
+        return result.toByteArray();
+    }
+
+    private void archive(ZipOutputStream compressedTcs, 
+            Graph tripleCollection,
+            String fileName) throws IOException, UnsupportedFormatException {
+        Lock readLock = null;
+        compressedTcs.putNextEntry(new ZipEntry(fileName));
+        if (tripleCollection instanceof Graph) {
+            readLock = ((Graph) tripleCollection).getLock().readLock();
+            readLock.lock();
+        }
+        try {
+            serializer.serialize(compressedTcs, tripleCollection,
+                    SupportedFormat.N_TRIPLE);
+        } finally {
+            if (readLock != null) {
+                readLock.unlock();
+            }
+        }
+    }
+
+    private String getTcFileName(Iri tcUri, String extension,
+            Map<String, Integer> fileNameCount) {
+        String fileName = tcUri.getUnicodeString();
+        fileName = fileName.substring(fileName.lastIndexOf("/")+1);
+        Integer count = fileNameCount.get(fileName);
+        if (count == null) {
+            fileNameCount.put(fileName, 0);
+        } else {
+            count++;
+            fileNameCount.put(fileName, count);
+            fileName = fileName.concat("_" + count);
+        }
+        return  fileName.concat(extension);
+    }
+
+    private void writeBackup(OutputStream result) {
+        Map<String, Integer> fileNameCount = new HashMap<String, Integer>();
+        Graph backupContents = new SimpleGraph();
+        try {
+            ZipOutputStream compressedTcs = new ZipOutputStream(result);
+
+            compressedTcs.putNextEntry(new ZipEntry(folder));
+
+            Set<Iri> tripleCollections = tcManager.listGraphs();
+            Iterator<Iri> tcIris = tripleCollections.iterator();
+            while (tcIris.hasNext()) {
+                Iri tcUri = tcIris.next();
+                String fileName = folder + getTcFileName(tcUri, ".nt",
+                        fileNameCount);
+                Graph tripleCollection = tcManager.getGraph(tcUri);
+                archive(compressedTcs, tripleCollection, fileName);
+                if (tripleCollection instanceof Graph) {
+                    backupContents.add(new TripleImpl(tcUri, RDF.type,
+                            BACKUP.Graph));
+                } else {
+                    backupContents.add(new TripleImpl(tcUri, RDF.type,
+                            BACKUP.Graph));
+                }
+                backupContents.add(new TripleImpl(tcUri, BACKUP.file,
+                        LiteralFactory.getInstance().createTypedLiteral(
+                        fileName)));
+            }
+            archive(compressedTcs, backupContents, "triplecollections.nt");
+            compressedTcs.close();
+
+        } catch (UnsupportedFormatException ufe) {
+            throw new WebApplicationException(Response.status(
+                    Status.NOT_ACCEPTABLE).entity(ufe.getMessage()).build());
+        } catch (IOException ex) {
+            throw new WebApplicationException(ex);
+        }
+    }
+
+    @Override
+    public boolean isWriteable(Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return Backup.class.isAssignableFrom(type);
+    }
+
+    @Override
+    public long getSize(Backup t, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType) {
+        return -1;
+    }
+
+    @Override
+    public void writeTo(Backup t, Class<?> type, Type genericType,
+            Annotation[] annotations, MediaType mediaType,
+            MultivaluedMap<String, Object> httpHeaders,
+            OutputStream entityStream) throws IOException, WebApplicationException {
+        writeBackup(entityStream);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
new file mode 100644
index 0000000..caf5d18
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/BackupPermission.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+import java.security.Permission;
+
+/**
+ * Permission to retrieve a backup copy of all graphs provided by TcManager
+ *
+ * @author reto
+ */
+@PermissionInfo(value="Backup Permission", description="Permission " +
+    "to retrieve a backup of all Triple Collections")
+public class BackupPermission extends Permission {
+
+
+    public BackupPermission() {
+        super("ImmutableGraph Management permission");
+    }
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public BackupPermission(String target, String actions) {
+        super("ImmutableGraph Management permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 77988;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
new file mode 100644
index 0000000..c00bf1b
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Delete.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Graph;
+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;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.FOAF;
+import org.apache.clerezza.rdf.ontologies.OWL;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.Smusher;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * Provides a method to remove duplicate noded from (aka smush) a ImmutableGraph
+ * 
+ * @author reto
+ */
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/admin/graphs/delete")
+public class Delete {
+    
+    @Reference
+    private TcManager tcManager;
+
+    
+    @POST
+    public Response delete(@Context UriInfo uriInfo, @FormParam("graphName") Iri graphName) {
+        tcManager.deleteGraph(graphName);
+        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
new file mode 100644
index 0000000..886d1e7
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.net.URL;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.util.HashSet;
+import java.util.Set;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.commons.rdf.Graph;
+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;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.TCPROVIDER;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.web.ontologies.GRAPHMANAGEMENT;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This JAX-RS resource provides an interface designed to allow various management
+ * functions on triple collections. The URI path of this resource is
+ * "/admin/graph-management".
+ * 
+ * @author reto
+ */
+@Component
+@Service({Object.class, GlobalMenuItemsProvider.class})
+@Property(name="javax.ws.rs", boolValue=true)
+@Path("/admin/graphs")
+public class GraphManagement implements GlobalMenuItemsProvider {
+
+    @Reference
+    private TcManager tcManager;
+
+    @Reference
+    private RenderletManager renderletManager;
+
+    protected void activate(ComponentContext componentContext) {
+        URL templateURL = getClass().getResource("graph-management.ssp");
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new Iri(templateURL.toString()), GRAPHMANAGEMENT.GraphManagementPage,
+                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
+    }
+
+    @GET
+    public GraphNode mainPage(@Context UriInfo uriInfo) {
+        AccessController.checkPermission(new GraphManagementAppPermission());
+        TrailingSlash.enforcePresent(uriInfo);
+        final SimpleGraph resultGraph = new SimpleGraph();
+        GraphNode graphNode = new GraphNode(new BlankNode(), resultGraph);
+        Set<Iri> tripleCollections = tcManager.listGraphs();
+        for (Iri uriRef : tripleCollections) {
+            graphNode.addProperty(GRAPHMANAGEMENT.tripleCollection, uriRef);
+            final Graph tripleCollection = tcManager.getGraph(uriRef);
+            resultGraph.add(new TripleImpl(uriRef,GRAPHMANAGEMENT.size,
+                    LiteralFactory.getInstance().createTypedLiteral(
+                    tripleCollection.size())));
+            if (tripleCollection instanceof ImmutableGraph) {
+                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
+            } else {
+                resultGraph.add(new TripleImpl(uriRef,RDF.type, TCPROVIDER.Graph));
+            }
+        }
+        graphNode.addProperty(RDF.type, GRAPHMANAGEMENT.GraphManagementPage);
+        graphNode.addProperty(RDF.type, PLATFORM.HeadedPage);
+        return graphNode;
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        try {
+            AccessController.checkPermission(
+                    new GraphManagementAppPermission());
+        } catch (AccessControlException e) {
+            return items;
+        }
+        String path = "/admin/graphs";
+        items.add(new GlobalMenuItem(path, "GM", "Graphs", 5,"Administration"));
+        return items;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
new file mode 100644
index 0000000..09ec04d
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagementAppPermission.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Permission to use the ImmutableGraph-Management page. Nothe that the user
+ * additioonally needs permssion on the Graphs they manipulate.
+ *
+ * @author reto
+ */
+@PermissionInfo(value="ImmutableGraph Management Access Permission", description="Grants access " +
+    "to the ImmutableGraph Management page")
+public class GraphManagementAppPermission extends Permission {
+
+
+    public GraphManagementAppPermission() {
+        super("ImmutableGraph Management permission");
+    }
+    /**
+     * 
+     * @param target ignored
+     * @param action ignored
+     */
+    public GraphManagementAppPermission(String target, String actions) {
+        super("ImmutableGraph Management permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 77985;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
new file mode 100644
index 0000000..2d96602
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/PlatformRestorer.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.rdf.web.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.jaxrs.utils.form.FormFile;
+import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
+import org.apache.clerezza.rdf.core.access.TcManager;
+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;
+
+/**
+ * A service to restore the triple collections of a clerezza platform instance
+ *
+ * @author reto
+ */
+@Component
+@Service({Object.class, PlatformRestorer.class})
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/admin/backup/restore")
+public class PlatformRestorer {
+
+    @Reference
+    private Restorer restorer;
+
+    @Reference
+    private TcManager tcManager;
+
+    /**
+     * Restores the triple collection of TcManager from a backup
+     *
+     * @param backupData the backup data
+     */
+    public void restore(InputStream backupData) throws IOException {
+        restorer.restore(backupData, tcManager);
+    }
+
+    @POST
+    public Response restore(MultiPartBody body, @Context final UriInfo uriInfo) 
+            throws Throwable {
+        AccessController.checkPermission(new RestorePermission());
+        FormFile[] files = body.getFormFileParameterValues("file");
+        if (files.length != 1) {
+            throw new RuntimeException("Must submit exactly one file");
+        }
+        final FormFile file = files[0];
+        try {
+            return AccessController.doPrivileged(new PrivilegedExceptionAction<Response>() {
+
+                @Override
+                public Response run() throws IOException {
+                    restore(new ByteArrayInputStream(file.getContent()));
+                    return RedirectUtil.createSeeOtherResponse("/admin/backup", uriInfo);
+                }
+            });
+        } catch (PrivilegedActionException ex) {
+            throw ex.getCause();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/d0f43e94/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
new file mode 100644
index 0000000..6080df9
--- /dev/null
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/RestorePermission.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.rdf.web.core;
+
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+import java.security.Permission;
+
+/**
+ * Permission to restore all graphs provided by TcManager from a backup copy.
+ *
+ * This a very powerfull permission as it allows to write to all graphs.
+ *
+ * @author reto
+ */
+@PermissionInfo(value="Restore Permission", description="Permission " +
+    "to replace all triple collections with the contents of backup file")
+public class RestorePermission extends Permission {
+
+
+    public RestorePermission() {
+        super("Restore permission");
+    }
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public RestorePermission(String target, String actions) {
+        super("Restore permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 77965;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+
+}


[04/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala b/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
deleted file mode 100644
index 40bfb21..0000000
--- a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/DirectoryOverlay.scala
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-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.utils.IteratorMerger
-import org.wymiwyg.commons.util.dirbrowser.PathNode
-import java.util.Iterator
-
-class DirectoryOverlay(pathNode: PathNode, base: TripleCollection)
-  extends AbstractTripleCollection {
-
-  
-
-  import collection.JavaConversions._
-
-  
-
-  override def performFilter(s: NonLiteral, p: UriRef,
-    o: Resource): Iterator[Triple] = {
-    val addedTriples = new SimpleMGraph()
-
-    PathNode2MGraph.describeInGraph(pathNode, addedTriples)
-    
-    val subjects = (for (triple <- addedTriples; subject = triple.getSubject) yield {
-      subject
-    }).toSet
-  
-    class FilteringIterator(baseIter: Iterator[Triple]) extends Iterator[Triple] {
-      var nextElem: Triple = null
-      def prepareNext {
-        nextElem = if (baseIter.hasNext) baseIter.next else null
-        if ((nextElem != null) && 
-          (subjects.contains(nextElem.getSubject))) {
-            //println("skipping "+nextElem)
-            prepareNext
-        }
-      }
-      prepareNext
-  
-      override def next = {
-        val result = nextElem
-        prepareNext
-        result
-      }
-      override def hasNext = nextElem != null
-      override def remove = throw new UnsupportedOperationException
-    }
-      
-    new IteratorMerger(new FilteringIterator(base.filter(s, p, o)), addedTriples.filter(s,p, o))
-  }
-
-  /**
-   * returns an upper bound of the size (removals in abse are not deducted)
-   */
-  override def size = {
-    val addedTriples = new SimpleMGraph()
-
-      PathNode2MGraph.describeInGraph(pathNode, addedTriples)
-
-   base.size+addedTriples.size 
-  }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala b/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
deleted file mode 100644
index 684992a..0000000
--- a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/Logger.scala
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.content.fsadaptor
-
-import org.slf4j.LoggerFactory
-//import org.slf4j.ext.LoggerWrapper
-
-trait Logger {
-
-  private val slf4jLogger = LoggerFactory.getLogger(this.getClass)
-//  val logger: org.slf4j.Logger = new LoggerWrapper(slf4jLogger, this.getClass.getName)
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
----------------------------------------------------------------------
diff --git a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala b/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
deleted file mode 100644
index 8a62774..0000000
--- a/platform/platform.content.fsadaptor/src/main/scala/org/apache/clerezza/platform/content/fsadaptor/PathNode2MGraph.scala
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-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.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
-import org.apache.clerezza.rdf.utils.GraphNode
-import org.apache.clerezza.web.fileserver.util.MediaTypeGuesser
-import org.wymiwyg.commons.util.dirbrowser.PathNode
-
-
-/**
- *
- * @author reto
- */
-object PathNode2MGraph {
-
-  private val URI_PREFIX = Constants.URN_LOCAL_INSTANCE
-
-  private val literalFactory = LiteralFactory.getInstance
-
-  private def getMediaType(file: PathNode) = {
-    val guessedMediaType: MediaType = MediaTypeGuesser.getInstance().guessTypeForName(file.getPath());
-    if (guessedMediaType != null) {
-      guessedMediaType.toString
-    } else {
-      "application/octet-stream"
-    }
-
-  }
-
-  private def getData(file: PathNode) = {
-    val baos = new ByteArrayOutputStream
-    val in = file.getInputStream()
-    val buffer = new Array[Byte](4096)
-    var read = in.read(buffer)
-    while (read != -1) {
-      baos.write(buffer, 0, read)
-      read = in.read(buffer)
-    }
-    in.close()
-    baos.toByteArray
-  }
-
-  def describeInGraph(directory: PathNode, mGraph: MGraph) {
-    val basePathLength = directory.getPath.length
-    def createUriRef(file: PathNode, isDirectory: Boolean) = {
-      def addSlashIfNeeded(s: String) = {
-         if (s.endsWith("/")) {
-           s
-         } else {
-           s+'/'
-         }
-      }
-      val path =  if (isDirectory) {
-        addSlashIfNeeded(file.getPath.substring(basePathLength))
-      } else {
-        file.getPath.substring(basePathLength)
-      }
-      new UriRef(URI_PREFIX+path)
-    }
-    def processDirectory(directory: PathNode) {
-      val directoryResource = createUriRef(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)
-        mGraph.add(new TripleImpl(resource, HIERARCHY.parent, directoryResource))
-        if (isDirectory) {
-          processDirectory(file)
-        } else {
-          mGraph.add(new TripleImpl(resource, RDF.`type`, DISCOBITS.InfoDiscoBit))
-          val data = getData(file)
-          mGraph.add(new TripleImpl(resource, DISCOBITS.infoBit, literalFactory.createTypedLiteral(data)))
-          mGraph.add(new TripleImpl(resource, DISCOBITS.mediaType,
-                        literalFactory.createTypedLiteral(getMediaType(file))));
-        }
-      }
-    }
-    processDirectory(directory)
-  }
-
-  def removeNodesFromGraph(directory: PathNode, mGraph: MGraph) {
-    val basePathLength = directory.getPath.length
-    def createUriRef(file: PathNode, isDirectory: Boolean) = {
-      def addSlashIfNeeded(s: String) = {
-         if (s.endsWith("/")) {
-           s
-         } else {
-           s+'/'
-         }
-      }
-      val path =  if (isDirectory) {
-        addSlashIfNeeded(file.getPath.substring(basePathLength))
-      } else {
-        file.getPath.substring(basePathLength)
-      }
-      new UriRef(URI_PREFIX+path)
-    }
-    def processDirectory(directory: PathNode) {
-      val directoryResource = createUriRef(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 node = new GraphNode(resource, mGraph)
-        if (isDirectory) {
-          processDirectory(file)
-        }
-        node.deleteProperties(HIERARCHY.parent)
-        node.deleteProperties(RDF.`type`)
-        node.deleteProperties(DISCOBITS.infoBit)
-        node.deleteProperties(DISCOBITS.mediaType)
-      }
-    }
-    processDirectory(directory)
-  }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.imagemetadata/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.imagemetadata/LICENSE b/platform/platform.content.imagemetadata/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.imagemetadata/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.imagemetadata/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.imagemetadata/pom.xml b/platform/platform.content.imagemetadata/pom.xml
deleted file mode 100644
index 6b82b03..0000000
--- a/platform/platform.content.imagemetadata/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>clerezza</artifactId>
-        <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.imagemetadata</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content Image Metadata</name>
-    <description>Provides a Meta Data Generator that generates metadata for
-    images.</description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>utils.imageprocessing</artifactId>
-            <version>0.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.metadata</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
----------------------------------------------------------------------
diff --git a/platform/platform.content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java b/platform/platform.content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
deleted file mode 100644
index b49bffc..0000000
--- a/platform/platform.content.imagemetadata/src/main/java/org/apache/clerezza/platform/content/imagemetadata/ImageMetaDataGenerator.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.imagemetadata;
-
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import org.apache.clerezza.rdf.ontologies.EXIF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.utils.imageprocessing.ImageReaderService;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-
-/**
- * This class generates metadata about image data.
- *
- * @author mir, hasan
- */
-@Component(metatype=true)
-@Service(MetaDataGenerator.class)
-public class ImageMetaDataGenerator implements MetaDataGenerator {
-
-    @Reference
-    private ImageReaderService imageReaderService;
-        
-    @Override
-    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
-
-        if (mediaType.getType().startsWith("image")) {
-            try {
-                BufferedImage buffImage = imageReaderService.getBufferedImage(
-                                        new ByteArrayInputStream(data));
-                node.deleteProperties(EXIF.width);
-                node.deleteProperties(EXIF.height);
-                node.addProperty(EXIF.width, LiteralFactory.getInstance().
-                        createTypedLiteral(Integer.valueOf(buffImage.getWidth())));
-                node.addProperty(EXIF.height, LiteralFactory.getInstance().
-                        createTypedLiteral(Integer.valueOf(buffImage.getHeight())));
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/LICENSE b/platform/platform.content.representations/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.representations/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.core/LICENSE b/platform/platform.content.representations/platform.content.representations.core/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.representations/platform.content.representations.core/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.core/pom.xml b/platform/platform.content.representations/platform.content.representations.core/pom.xml
deleted file mode 100644
index 996e2a0..0000000
--- a/platform/platform.content.representations/platform.content.representations.core/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>platform.content.representations</artifactId>
-        <groupId>org.apache.clerezza</groupId>
-        <version>0.2</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.representations.core</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content Representations Core</name>
-    <description>Provides a Meta Data Generator that generates alternative
-        representations for data of    various media types</description>
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.metadata</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>utils.imageprocessing</artifactId>
-            <version>0.8</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.content</artifactId>
-            <version>0.14</version>
-        </dependency>
-<!--
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.resources.style</artifactId>
-        </dependency>
--->
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.content.representations.ontologies</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java b/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
deleted file mode 100644
index f7e5f57..0000000
--- a/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/AlternativeRepresentationGenerator.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.representations.core;
-
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.concurrent.locks.Lock;
-import javax.imageio.ImageIO;
-import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.platform.content.DiscobitsHandler;
-import org.apache.clerezza.platform.content.InfoDiscobit;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import org.apache.clerezza.rdf.ontologies.DISCOBITS;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.utils.imageprocessing.ImageProcessor;
-import org.apache.clerezza.utils.imageprocessing.ImageReaderService;
-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;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * This class provides a method that generates a thumbnail for specified data
- * if the specified media type is supported. The supported media types are "image/*".
- * The generated thumbnail is added as a property to the specified
- * <code>GraphNode</code>. The property URI is
- * "http://discobits.org/ontology#thumbnail".
- *
- * @author mir
- */
-@Component(metatype=true)
-@Service({
-    MetaDataGenerator.class,
-    AlternativeRepresentationGenerator.class
-})
-
-public class AlternativeRepresentationGenerator implements MetaDataGenerator {
-
-    private static class Resolution {
-
-        private int width;
-
-        private int height;
-        /**
-         * Takes a String, which contains a resoultion in the format
-         * [width]x[height].
-         *
-         * @param resoulutionString
-         */
-        public Resolution(String resoulutionString) {
-            String[] widthAndHeight = resoulutionString.split("x");
-            width = new Integer(widthAndHeight[0]);
-            height = new Integer(widthAndHeight[1]);
-        }
-
-        /**
-         * A Resolution with the specified width and height.
-         *
-         * @param width
-         * @param height
-         */
-        public Resolution(int width, int height) {
-            this.width = width;
-            this.height = height;
-        }
-
-        public int getHeight() {
-            return height;
-        }
-
-        public int getWidth() {
-            return width;
-        }
-    }
-    final static String EXACT_APPENDIX = "-exact";
-
-    @Reference
-    private ImageProcessor imageProcessor;
-        
-        @Reference
-    private ImageReaderService imageReaderService;
-
-    @Property(value="100x100,200x200", description="Specifies the resolutions of alternative" +
-            " representations in the format [width]x[height]. Multiple resolutions" +
-            " are separated by comma (e.g. 100x100,30x30)")
-    public static final String RESOLUTIONS = "resolutions";
-
-    @Property(value="100x100,200x200", description="Specifies the exact resolutions of alternative" +
-            " representations in the format [width]x[height]. Multiple resolutions" +
-            " are separated by comma (e.g. 100x100,30x30). The image will be cropped if it has not " +
-            "the needed proportions")
-    public static final String EXACT_RESOLUTIONS = "exact_resolutions";
-    
-    private volatile ServiceTracker discobitTracker;
-    private Resolution[] resolutions;
-    private Resolution[] exactResolutions;
-
-    /**
-     * Indicates if data given to the AlternativeRepresentationGenerator is a
-     * alternative representation itself and therefore does not have to have a
-     * alternative representation generated for it.
-     */
-    private ThreadLocal<Boolean> isAltRepresentation = new ThreadLocal<Boolean>() {
-
-        @Override
-        protected Boolean initialValue() {
-            return false;
-        }
-    };
-
-    protected void activate(ComponentContext context) {
-        resolutions = createResolutionArray((String) context.getProperties().get(RESOLUTIONS));
-        exactResolutions = createResolutionArray((String) context.getProperties().get(EXACT_RESOLUTIONS));
-        discobitTracker = new ServiceTracker(context.getBundleContext(),
-                DiscobitsHandler.class.getName(), null);
-        new Thread() {
-            @Override
-            public void run() {
-                discobitTracker.open();
-            }
-        }.start();
-    }
-
-    private Resolution[] createResolutionArray(String resolutionsString) {
-        String[] resoultionStrings = resolutionsString.split(",");
-        Resolution[] resolutionArray = new Resolution[resoultionStrings.length];
-        for (int i = 0; i < resoultionStrings.length; i++) {
-            resolutionArray[i] = new Resolution(resoultionStrings[i].trim());
-        }
-        return resolutionArray;
-    }
-
-    protected void deactivate(ComponentContext context) {
-        discobitTracker.close();
-        discobitTracker = null;
-    }
-
-    @Override
-    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
-        if (isAltRepresentation.get()) {
-            return;
-        }
-        if (mediaType.getType().startsWith("image")) {
-            generateAlternativeImages(data, mediaType, node);
-        }
-    }
-
-    /**
-     * Generates an alternative image of the image at the specified infoBitNode.
-     * The parameters width and height specify the dimensions the generated
-     * image should have. The image will be resized to fit the specified
-     * dimensions (height and width of the generated image will be smaller
-     * or equals the specified width and height). Returns the URI of the
-     * generated image.
-     *
-     * @param infoBitNode an infoDiscoBit of media type image
-     * @param width the width the generated image should have
-     * @param height the height the generated image should have
-     * @return the URI of the generated image
-     */
-    public UriRef generateAlternativeImage(GraphNode infoBitNode, int width, int height) {
-        return generateAlternativeImage(infoBitNode, width, height, false);
-    }
-
-    /**
-     * Generates an alternative image of the image at the specified infoBitNode.
-     * The parameters width and height specify the dimensions the generated
-     * image should have. If exact is true, then the generated image will be
-     * resized and cropped to match the specified width and height exactly. If
-     * exact is false, then the image will be resized to fit the specified
-     * dimensions (height and width of the generated image will be smaller
-     * or equals the specified width and height). Returns the URI of the
-     * generated image.
-     *
-     * @param infoBitNode an infoDiscoBit of media type image
-     * @param width the width the generated image should have
-     * @param height the height the generated image should have
-     * @param exact specifies if the generated image must have the exact
-     *        width and height or not.
-     * @return the URI of the generated image
-     */
-    public UriRef generateAlternativeImage(GraphNode infoBitNode, int width, int height, 
-            boolean exact) {
-        try {
-            isAltRepresentation.set(Boolean.TRUE);
-            InfoDiscobit infoBit = InfoDiscobit.createInstance(infoBitNode);
-            BufferedImage buffImage = imageReaderService.getBufferedImage(
-                                new ByteArrayInputStream(infoBit.getData()));
-            return generateAlternativeImage(buffImage, new Resolution(width, height), 
-                    MediaType.valueOf(infoBit.getContentType()), infoBitNode, exact);
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        } finally {
-            isAltRepresentation.set(Boolean.FALSE);
-        }
-    }
-
-    private void generateAlternativeImages(byte[] data, MediaType mediaType,
-            GraphNode node) throws RuntimeException {
-        try {
-            isAltRepresentation.set(Boolean.TRUE);
-            BufferedImage buffImage = imageReaderService.getBufferedImage(
-                                new ByteArrayInputStream(data));
-            int imgWidth = buffImage.getWidth();
-            int imgHeigth = buffImage.getHeight();
-            for (Resolution resolution : resolutions) {
-                if (imgWidth > resolution.getWidth() || imgHeigth > resolution.getHeight()) {
-                    generateAlternativeImage(buffImage, resolution, mediaType, node, false);
-                }
-            }
-            for (Resolution resolution : exactResolutions) {
-                if (imgWidth > resolution.getWidth() && imgHeigth > resolution.getHeight()) {
-                    generateAlternativeImage(buffImage, resolution, mediaType, node, true);
-                }
-            }
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        } finally {
-            isAltRepresentation.set(Boolean.FALSE);
-        }
-    }
-
-    private UriRef generateAlternativeImage(BufferedImage buffImage, Resolution resolution,
-            MediaType mediaType, GraphNode node, boolean extact) throws IOException {
-        BufferedImage alternativeImage;
-        if (extact) {
-            alternativeImage = resizeAndCrop(resolution, buffImage);
-            if (alternativeImage == null) {
-                return null;
-            }
-        } else {
-            alternativeImage = imageProcessor.makeAThumbnail(buffImage,
-                    resolution.getWidth(), resolution.getHeight());
-        }
-        byte[] alternativeImageBytes = bufferedImage2ByteArray(alternativeImage, mediaType);
-        DiscobitsHandler contentHandler = (DiscobitsHandler) discobitTracker.getService();
-        
-        UriRef thumbnailUri = createThumbnailUri((UriRef) node.getNode(), alternativeImage, extact);
-        contentHandler.put(thumbnailUri, mediaType, alternativeImageBytes);
-        Lock writeLock = node.writeLock();
-        writeLock.lock();
-        try {
-            node.addProperty(DISCOBITS.thumbnail, thumbnailUri);
-            return thumbnailUri;
-        } finally {
-            writeLock.unlock();
-        }
-    }
-    
-        private BufferedImage resizeAndCrop(Resolution resolution, BufferedImage buffImage) {
-        BufferedImage alternativeImage;
-        int imageHeight = 0;
-        int imageWidth = 0;
-        int widthDiff = buffImage.getWidth() - resolution.getWidth() ;
-        int heightDiff = buffImage.getHeight() - resolution.getHeight();
-        // resize if both dimension are bigger than the dimensions of the needed resolution
-        if (widthDiff >= 0 && heightDiff >= 0) {
-            if (widthDiff < heightDiff) {
-                imageWidth = resolution.getWidth();
-            } else {
-                imageHeight = resolution.getHeight();
-            }
-            alternativeImage = imageProcessor.resizeProportional(buffImage, imageWidth, imageHeight);
-        } else {
-            return null;
-        }
-        // crop image to fit exact the resolution
-        if (widthDiff < heightDiff) {
-            heightDiff = alternativeImage.getHeight() - resolution.getHeight();
-            alternativeImage = alternativeImage.getSubimage(0, heightDiff/2, resolution.getWidth(),
-                    resolution.getHeight());
-        } else {
-            widthDiff = alternativeImage.getWidth() - resolution.getWidth();
-            alternativeImage = alternativeImage.getSubimage(widthDiff/2, 0, resolution.getWidth(),
-                    resolution.getHeight());
-        }
-        return alternativeImage;
-    }
-
-    private byte[] bufferedImage2ByteArray(BufferedImage image,
-            MediaType mediaType) throws IOException {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ImageIO.write(image, mediaType.getSubtype(), baos);
-        byte[] bytes = baos.toByteArray();
-        baos.flush();
-        return bytes;
-    }
-
-    private UriRef createThumbnailUri(UriRef uriRef, BufferedImage img, boolean exact) {
-        String resolution = "-" + img.getWidth() + "x" + img.getHeight() + (exact ? EXACT_APPENDIX: "");
-        String oldUri = uriRef.getUnicodeString();
-        String newUri;
-        int lastIndexOfDot = oldUri.lastIndexOf(".");
-        int lastIndexOfSlash = oldUri.lastIndexOf("/");
-        // 6 characters to keep the extension at the end.
-        if (lastIndexOfSlash < lastIndexOfDot &&
-                lastIndexOfDot >= (oldUri.length() - 6)) {
-            String firstPart = oldUri.substring(0, lastIndexOfDot);
-            String lastPart = oldUri.substring(lastIndexOfDot, oldUri.length());
-            newUri = firstPart + resolution + lastPart;
-        } else {
-            newUri = oldUri + resolution;
-        }
-        return new UriRef(newUri);
-    }
-}


[87/87] [abbrv] clerezza git commit: CLEREZZA-960: fixed test to reflect lowercasing of languages (this test should be in rdf-core project anyway)

Posted by re...@apache.org.
CLEREZZA-960: fixed test to reflect lowercasing of languages (this test should be in rdf-core project anyway)

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

Branch: refs/heads/master
Commit: 9e95aae0efed21eff37c50e95bd5c721c07456da
Parents: ae73d1f
Author: Reto Gmuer <re...@apache.org>
Authored: Tue Apr 14 10:29:19 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Tue Apr 14 10:29:19 2015 +0000

----------------------------------------------------------------------
 .../test/java/org/apache/clerezza/rdf/core/LanguageTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e95aae0/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
index e5a42fa..21d53c3 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/LanguageTest.java
@@ -20,8 +20,9 @@ package org.apache.clerezza.rdf.core;
 
 
 import org.apache.clerezza.commons.rdf.Language;
+import org.junit.Assert;
 import org.junit.Test;
-import junit.framework.Assert;
+
 
 /**
  *
@@ -41,7 +42,7 @@ public class LanguageTest {
     
     @Test
     public void toStringTest() {
-        final String id = "DE";
+        final String id = "de";
         Language lang1 = new Language(id);
         Assert.assertEquals(lang1.toString(), id);
     }


[38/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/LICENSE.txt
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/LICENSE.txt b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/LICENSE.txt
new file mode 100644
index 0000000..8b324c6
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/LICENSE.txt
@@ -0,0 +1,1446 @@
+Mozile is available under the Mozilla Public License version 1.1, the GNU 
+General Public Licence version 2, the GNU Lesser General Public License 
+version 2.1, and the Apache License version 2.0. As the recipient of Mozile 
+you may choose which license to accept this code under. Some modules and 
+included content may be licensed under different terms, as explicitly 
+specified in their respective COPYING or LICENSE files in the directories 
+in which they are found and in the files themselves.
+
+The full text of the MPL 1.1, GPL 2, LPGL 2.1, and Apache 2.0 licenses is 
+reproduced below.
+
+**********************************************************************
+
+
+
+                          MOZILLA PUBLIC LICENSE
+                                Version 1.1
+
+                              ---------------
+
+1. Definitions.
+
+     1.0.1. "Commercial Use" means distribution or otherwise making the
+     Covered Code available to a third party.
+
+     1.1. "Contributor" means each entity that creates or contributes to
+     the creation of Modifications.
+
+     1.2. "Contributor Version" means the combination of the Original
+     Code, prior Modifications used by a Contributor, and the Modifications
+     made by that particular Contributor.
+
+     1.3. "Covered Code" means the Original Code or Modifications or the
+     combination of the Original Code and Modifications, in each case
+     including portions thereof.
+
+     1.4. "Electronic Distribution Mechanism" means a mechanism generally
+     accepted in the software development community for the electronic
+     transfer of data.
+
+     1.5. "Executable" means Covered Code in any form other than Source
+     Code.
+
+     1.6. "Initial Developer" means the individual or entity identified
+     as the Initial Developer in the Source Code notice required by Exhibit
+     A.
+
+     1.7. "Larger Work" means a work which combines Covered Code or
+     portions thereof with code not governed by the terms of this License.
+
+     1.8. "License" means this document.
+
+     1.8.1. "Licensable" means having the right to grant, to the maximum
+     extent possible, whether at the time of the initial grant or
+     subsequently acquired, any and all of the rights conveyed herein.
+
+     1.9. "Modifications" means any addition to or deletion from the
+     substance or structure of either the Original Code or any previous
+     Modifications. When Covered Code is released as a series of files, a
+     Modification is:
+          A. Any addition to or deletion from the contents of a file
+          containing Original Code or previous Modifications.
+
+          B. Any new file that contains any part of the Original Code or
+          previous Modifications.
+
+     1.10. "Original Code" means Source Code of computer software code
+     which is described in the Source Code notice required by Exhibit A as
+     Original Code, and which, at the time of its release under this
+     License is not already Covered Code governed by this License.
+
+     1.10.1. "Patent Claims" means any patent claim(s), now owned or
+     hereafter acquired, including without limitation,  method, process,
+     and apparatus claims, in any patent Licensable by grantor.
+
+     1.11. "Source Code" means the preferred form of the Covered Code for
+     making modifications to it, including all modules it contains, plus
+     any associated interface definition files, scripts used to control
+     compilation and installation of an Executable, or source code
+     differential comparisons against either the Original Code or another
+     well known, available Covered Code of the Contributor's choice. The
+     Source Code can be in a compressed or archival form, provided the
+     appropriate decompression or de-archiving software is widely available
+     for no charge.
+
+     1.12. "You" (or "Your")  means an individual or a legal entity
+     exercising rights under, and complying with all of the terms of, this
+     License or a future version of this License issued under Section 6.1.
+     For legal entities, "You" includes any entity which controls, is
+     controlled by, or is under common control with You. For purposes of
+     this definition, "control" means (a) the power, direct or indirect,
+     to cause the direction or management of such entity, whether by
+     contract or otherwise, or (b) ownership of more than fifty percent
+     (50%) of the outstanding shares or beneficial ownership of such
+     entity.
+
+2. Source Code License.
+
+     2.1. The Initial Developer Grant.
+     The Initial Developer hereby grants You a world-wide, royalty-free,
+     non-exclusive license, subject to third party intellectual property
+     claims:
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Initial Developer to use, reproduce,
+          modify, display, perform, sublicense and distribute the Original
+          Code (or portions thereof) with or without Modifications, and/or
+          as part of a Larger Work; and
+
+          (b) under Patents Claims infringed by the making, using or
+          selling of Original Code, to make, have made, use, practice,
+          sell, and offer for sale, and/or otherwise dispose of the
+          Original Code (or portions thereof).
+
+          (c) the licenses granted in this Section 2.1(a) and (b) are
+          effective on the date Initial Developer first distributes
+          Original Code under the terms of this License.
+
+          (d) Notwithstanding Section 2.1(b) above, no patent license is
+          granted: 1) for code that You delete from the Original Code; 2)
+          separate from the Original Code;  or 3) for infringements caused
+          by: i) the modification of the Original Code or ii) the
+          combination of the Original Code with other software or devices.
+
+     2.2. Contributor Grant.
+     Subject to third party intellectual property claims, each Contributor
+     hereby grants You a world-wide, royalty-free, non-exclusive license
+
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Contributor, to use, reproduce, modify,
+          display, perform, sublicense and distribute the Modifications
+          created by such Contributor (or portions thereof) either on an
+          unmodified basis, with other Modifications, as Covered Code
+          and/or as part of a Larger Work; and
+
+          (b) under Patent Claims infringed by the making, using, or
+          selling of  Modifications made by that Contributor either alone
+          and/or in combination with its Contributor Version (or portions
+          of such combination), to make, use, sell, offer for sale, have
+          made, and/or otherwise dispose of: 1) Modifications made by that
+          Contributor (or portions thereof); and 2) the combination of
+          Modifications made by that Contributor with its Contributor
+          Version (or portions of such combination).
+
+          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+          effective on the date Contributor first makes Commercial Use of
+          the Covered Code.
+
+          (d)    Notwithstanding Section 2.2(b) above, no patent license is
+          granted: 1) for any code that Contributor has deleted from the
+          Contributor Version; 2)  separate from the Contributor Version;
+          3)  for infringements caused by: i) third party modifications of
+          Contributor Version or ii)  the combination of Modifications made
+          by that Contributor with other software  (except as part of the
+          Contributor Version) or other devices; or 4) under Patent Claims
+          infringed by Covered Code in the absence of Modifications made by
+          that Contributor.
+
+3. Distribution Obligations.
+
+     3.1. Application of License.
+     The Modifications which You create or to which You contribute are
+     governed by the terms of this License, including without limitation
+     Section 2.2. The Source Code version of Covered Code may be
+     distributed only under the terms of this License or a future version
+     of this License released under Section 6.1, and You must include a
+     copy of this License with every copy of the Source Code You
+     distribute. You may not offer or impose any terms on any Source Code
+     version that alters or restricts the applicable version of this
+     License or the recipients' rights hereunder. However, You may include
+     an additional document offering the additional rights described in
+     Section 3.5.
+
+     3.2. Availability of Source Code.
+     Any Modification which You create or to which You contribute must be
+     made available in Source Code form under the terms of this License
+     either on the same media as an Executable version or via an accepted
+     Electronic Distribution Mechanism to anyone to whom you made an
+     Executable version available; and if made available via Electronic
+     Distribution Mechanism, must remain available for at least twelve (12)
+     months after the date it initially became available, or at least six
+     (6) months after a subsequent version of that particular Modification
+     has been made available to such recipients. You are responsible for
+     ensuring that the Source Code version remains available even if the
+     Electronic Distribution Mechanism is maintained by a third party.
+
+     3.3. Description of Modifications.
+     You must cause all Covered Code to which You contribute to contain a
+     file documenting the changes You made to create that Covered Code and
+     the date of any change. You must include a prominent statement that
+     the Modification is derived, directly or indirectly, from Original
+     Code provided by the Initial Developer and including the name of the
+     Initial Developer in (a) the Source Code, and (b) in any notice in an
+     Executable version or related documentation in which You describe the
+     origin or ownership of the Covered Code.
+
+     3.4. Intellectual Property Matters
+          (a) Third Party Claims.
+          If Contributor has knowledge that a license under a third party's
+          intellectual property rights is required to exercise the rights
+          granted by such Contributor under Sections 2.1 or 2.2,
+          Contributor must include a text file with the Source Code
+          distribution titled "LEGAL" which describes the claim and the
+          party making the claim in sufficient detail that a recipient will
+          know whom to contact. If Contributor obtains such knowledge after
+          the Modification is made available as described in Section 3.2,
+          Contributor shall promptly modify the LEGAL file in all copies
+          Contributor makes available thereafter and shall take other steps
+          (such as notifying appropriate mailing lists or newsgroups)
+          reasonably calculated to inform those who received the Covered
+          Code that new knowledge has been obtained.
+
+          (b) Contributor APIs.
+          If Contributor's Modifications include an application programming
+          interface and Contributor has knowledge of patent licenses which
+          are reasonably necessary to implement that API, Contributor must
+          also include this information in the LEGAL file.
+
+               (c)    Representations.
+          Contributor represents that, except as disclosed pursuant to
+          Section 3.4(a) above, Contributor believes that Contributor's
+          Modifications are Contributor's original creation(s) and/or
+          Contributor has sufficient rights to grant the rights conveyed by
+          this License.
+
+     3.5. Required Notices.
+     You must duplicate the notice in Exhibit A in each file of the Source
+     Code.  If it is not possible to put such notice in a particular Source
+     Code file due to its structure, then You must include such notice in a
+     location (such as a relevant directory) where a user would be likely
+     to look for such a notice.  If You created one or more Modification(s)
+     You may add your name as a Contributor to the notice described in
+     Exhibit A.  You must also duplicate this License in any documentation
+     for the Source Code where You describe recipients' rights or ownership
+     rights relating to Covered Code.  You may choose to offer, and to
+     charge a fee for, warranty, support, indemnity or liability
+     obligations to one or more recipients of Covered Code. However, You
+     may do so only on Your own behalf, and not on behalf of the Initial
+     Developer or any Contributor. You must make it absolutely clear than
+     any such warranty, support, indemnity or liability obligation is
+     offered by You alone, and You hereby agree to indemnify the Initial
+     Developer and every Contributor for any liability incurred by the
+     Initial Developer or such Contributor as a result of warranty,
+     support, indemnity or liability terms You offer.
+
+     3.6. Distribution of Executable Versions.
+     You may distribute Covered Code in Executable form only if the
+     requirements of Section 3.1-3.5 have been met for that Covered Code,
+     and if You include a notice stating that the Source Code version of
+     the Covered Code is available under the terms of this License,
+     including a description of how and where You have fulfilled the
+     obligations of Section 3.2. The notice must be conspicuously included
+     in any notice in an Executable version, related documentation or
+     collateral in which You describe recipients' rights relating to the
+     Covered Code. You may distribute the Executable version of Covered
+     Code or ownership rights under a license of Your choice, which may
+     contain terms different from this License, provided that You are in
+     compliance with the terms of this License and that the license for the
+     Executable version does not attempt to limit or alter the recipient's
+     rights in the Source Code version from the rights set forth in this
+     License. If You distribute the Executable version under a different
+     license You must make it absolutely clear that any terms which differ
+     from this License are offered by You alone, not by the Initial
+     Developer or any Contributor. You hereby agree to indemnify the
+     Initial Developer and every Contributor for any liability incurred by
+     the Initial Developer or such Contributor as a result of any such
+     terms You offer.
+
+     3.7. Larger Works.
+     You may create a Larger Work by combining Covered Code with other code
+     not governed by the terms of this License and distribute the Larger
+     Work as a single product. In such a case, You must make sure the
+     requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+     If it is impossible for You to comply with any of the terms of this
+     License with respect to some or all of the Covered Code due to
+     statute, judicial order, or regulation then You must: (a) comply with
+     the terms of this License to the maximum extent possible; and (b)
+     describe the limitations and the code they affect. Such description
+     must be included in the LEGAL file described in Section 3.4 and must
+     be included with all distributions of the Source Code. Except to the
+     extent prohibited by statute or regulation, such description must be
+     sufficiently detailed for a recipient of ordinary skill to be able to
+     understand it.
+
+5. Application of this License.
+
+     This License applies to code to which the Initial Developer has
+     attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+     6.1. New Versions.
+     Netscape Communications Corporation ("Netscape") may publish revised
+     and/or new versions of the License from time to time. Each version
+     will be given a distinguishing version number.
+
+     6.2. Effect of New Versions.
+     Once Covered Code has been published under a particular version of the
+     License, You may always continue to use it under the terms of that
+     version. You may also choose to use such Covered Code under the terms
+     of any subsequent version of the License published by Netscape. No one
+     other than Netscape has the right to modify the terms applicable to
+     Covered Code created under this License.
+
+     6.3. Derivative Works.
+     If You create or use a modified version of this License (which you may
+     only do in order to apply it to code which is not already Covered Code
+     governed by this License), You must (a) rename Your license so that
+     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+     "MPL", "NPL" or any confusingly similar phrase do not appear in your
+     license (except to note that your license differs from this License)
+     and (b) otherwise make it clear that Your version of the license
+     contains terms which differ from the Mozilla Public License and
+     Netscape Public License. (Filling in the name of the Initial
+     Developer, Original Code or Contributor in the notice described in
+     Exhibit A shall not of themselves be deemed to be modifications of
+     this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+     8.1.  This License and the rights granted hereunder will terminate
+     automatically if You fail to comply with terms herein and fail to cure
+     such breach within 30 days of becoming aware of the breach. All
+     sublicenses to the Covered Code which are properly granted shall
+     survive any termination of this License. Provisions which, by their
+     nature, must remain in effect beyond the termination of this License
+     shall survive.
+
+     8.2.  If You initiate litigation by asserting a patent infringement
+     claim (excluding declatory judgment actions) against Initial Developer
+     or a Contributor (the Initial Developer or Contributor against whom
+     You file such action is referred to as "Participant")  alleging that:
+
+     (a)  such Participant's Contributor Version directly or indirectly
+     infringes any patent, then any and all rights granted by such
+     Participant to You under Sections 2.1 and/or 2.2 of this License
+     shall, upon 60 days notice from Participant terminate prospectively,
+     unless if within 60 days after receipt of notice You either: (i)
+     agree in writing to pay Participant a mutually agreeable reasonable
+     royalty for Your past and future use of Modifications made by such
+     Participant, or (ii) withdraw Your litigation claim with respect to
+     the Contributor Version against such Participant.  If within 60 days
+     of notice, a reasonable royalty and payment arrangement are not
+     mutually agreed upon in writing by the parties or the litigation claim
+     is not withdrawn, the rights granted by Participant to You under
+     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+     the 60 day notice period specified above.
+
+     (b)  any software, hardware, or device, other than such Participant's
+     Contributor Version, directly or indirectly infringes any patent, then
+     any rights granted to You by such Participant under Sections 2.1(b)
+     and 2.2(b) are revoked effective as of the date You first made, used,
+     sold, distributed, or had made, Modifications made by that
+     Participant.
+
+     8.3.  If You assert a patent infringement claim against Participant
+     alleging that such Participant's Contributor Version directly or
+     indirectly infringes any patent where such claim is resolved (such as
+     by license or settlement) prior to the initiation of patent
+     infringement litigation, then the reasonable value of the licenses
+     granted by such Participant under Sections 2.1 or 2.2 shall be taken
+     into account in determining the amount or value of any payment or
+     license.
+
+     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
+     all end user license agreements (excluding distributors and resellers)
+     which have been validly granted by You or any distributor hereunder
+     prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+     The Covered Code is a "commercial item," as that term is defined in
+     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+     software" and "commercial computer software documentation," as such
+     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+     all U.S. Government End Users acquire Covered Code with only those
+     rights set forth herein.
+
+11. MISCELLANEOUS.
+
+     This License represents the complete agreement concerning subject
+     matter hereof. If any provision of this License is held to be
+     unenforceable, such provision shall be reformed only to the extent
+     necessary to make it enforceable. This License shall be governed by
+     California law provisions (except to the extent applicable law, if
+     any, provides otherwise), excluding its conflict-of-law provisions.
+     With respect to disputes in which at least one party is a citizen of,
+     or an entity chartered or registered to do business in the United
+     States of America, any litigation relating to this License shall be
+     subject to the jurisdiction of the Federal Courts of the Northern
+     District of California, with venue lying in Santa Clara County,
+     California, with the losing party responsible for costs, including
+     without limitation, court costs and reasonable attorneys' fees and
+     expenses. The application of the United Nations Convention on
+     Contracts for the International Sale of Goods is expressly excluded.
+     Any law or regulation which provides that the language of a contract
+     shall be construed against the drafter shall not apply to this
+     License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+     As between Initial Developer and the Contributors, each party is
+     responsible for claims and damages arising, directly or indirectly,
+     out of its utilization of rights under this License and You agree to
+     work with Initial Developer and Contributors to distribute such
+     responsibility on an equitable basis. Nothing herein is intended or
+     shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+     Initial Developer may designate portions of the Covered Code as
+     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
+     Developer permits you to utilize portions of the Covered Code under
+     Your choice of the NPL or the alternative licenses, if any, specified
+     by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+     ``The contents of this file are subject to the Mozilla Public License
+     Version 1.1 (the "License"); you may not use this file except in
+     compliance with the License. You may obtain a copy of the License at
+     http://www.mozilla.org/MPL/
+
+     Software distributed under the License is distributed on an "AS IS"
+     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+     License for the specific language governing rights and limitations
+     under the License.
+
+     The Original Code is ______________________________________.
+
+     The Initial Developer of the Original Code is ________________________.
+     Portions created by ______________________ are Copyright (C) ______
+     _______________________. All Rights Reserved.
+
+     Contributor(s): ______________________________________.
+
+     Alternatively, the contents of this file may be used under the terms
+     of the _____ license (the  "[___] License"), in which case the
+     provisions of [______] License are applicable instead of those
+     above.  If you wish to allow use of your version of this file only
+     under the terms of the [____] License and not to allow others to use
+     your version of this file under the MPL, indicate your decision by
+     deleting  the provisions above and replace  them with the notice and
+     other provisions required by the [___] License.  If you do not delete
+     the provisions above, a recipient may use your version of this file
+     under either the MPL or the [___] License."
+
+     [NOTE: The text of this Exhibit A may differ slightly from the text of
+     the notices in the Source Code files of the Original Code. You should
+     use the text of this Exhibit A rather than the text found in the
+     Original Code Source Code for Your Modifications.]
+
+
+
+
+**********************************************************************
+
+
+
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+
+
+**********************************************************************
+
+
+
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+
+
+
+**********************************************************************
+
+
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/README
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/README b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/README
new file mode 100644
index 0000000..cf21b4b
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/README
@@ -0,0 +1,119 @@
+Mozile Editor
+-------------
+
+http://mozile.mozdev.org
+mozile@mozdev.org
+
+Mozile adds what-you-see-is-what-you-get (WYSIWYG) editing to your web pages. 
+It uses JavaScript and is compatible with current Mozilla Firefox and 
+Internet Explorer web browsers.
+
+
+Getting Started
+---------------
+
+To use Mozile, first download the latest version from our web site 
+<http://mozile.mozdev.org>. Unzip the archive to a directory on your web 
+server.
+
+You include Mozile in your web page by adding a script tag like this to the 
+<head> section:
+
+	<script type="text/javascript" src="path/to/mozile.js"></script>
+
+You can then configure Mozile with a second <script>, like this:
+	
+	<script type="text/javascript" src="path/to/mozile.js"></script>
+	<script type="text/javascript">
+		window.onload = function() {
+			mozile.editElements("editor");
+			mozile.useSchema("../lib/xhtml.rng");
+		}
+	</script>
+
+For details on configuration options, visit 
+
+	http://mozile.mozdev.org/0.8/doc/html/index.html
+
+In this example configuration all elements that have their their "class" 
+attribute set to "editor" will be editable by Mozile. For example:
+
+	<div class="editor">
+		<p>This paragraph is editable.</p>
+	</div>
+
+Instead of using the 'mozile.editElements("editor")' command, you can set the
+"contentEditable" attribute of the elements you want to edit to "true", like
+this:
+
+	<div contentEditable="true">
+		<p>This paragraph is editable.</p>
+	</div>
+
+Either method will work, so choose whichever one you prefer. You can now edit 
+your web page with Mozile!
+
+For information about how to save the pages that Mozile has edited, see:
+
+	http://mozile.mozdev.org/0.8/doc/html/index.html
+
+
+Compatibility
+-------------
+
+Our goal is for Mozile to work in as many modern browsers as possible. At the 
+current stage of development Mozile works in:
+
+- Mozilla Firefox 1.5
+- Internet Explorer 6
+
+
+Documentation and Getting Help
+------------------------------
+
+The place to start looking for help or more information is our home page:
+
+	http://mozile.mozdev.org
+
+For information specific to Mozile 0.8 visit:
+
+	http://mozile.mozdev.org/0.8/index.html
+
+For information on using and configuring Mozile, see the documentation at:
+
+	http://mozile.mozdev.org/0.8/doc/html/index.html
+
+Developer documentation on our APIs is available at:
+
+	http://mozile.mozdev.org/0.8/doc/jsdoc/index.html
+
+You can send email to our mailing list, or browse the archives for answers to 
+your questions:
+
+	http://mozile.mozdev.org/list.html
+
+We also have an IRC chat room where you get immediate feedback from Mozile's 
+developers:
+
+	irc.freenode.net #mozile
+
+
+Mozile Source Code
+------------------
+
+You can access to the latest Mozile source code in our CVS repository. For 
+instructions see:
+
+	http://mozile.mozdev.org/source.html
+
+If you want to create a custom mozile.js file using your own list of Mozile 
+modules, our Apache Ant build script can help you. Ant version 1.6.x is 
+required (http://ant.apache.org). The tools/build.xml file contains the logic 
+and the tools/build.properties file contains user modifiable settings. Get 
+started by reading the help information:
+
+	%> cd tools
+	%> ant help
+
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/Mozile-16.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/Mozile-16.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/Mozile-16.png
new file mode 100644
index 0000000..c091927
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/Mozile-16.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-down.gif
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-down.gif b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-down.gif
new file mode 100644
index 0000000..e021f13
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-down.gif differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-right.gif
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-right.gif b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-right.gif
new file mode 100644
index 0000000..dce39ae
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/arrow-right.gif differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/COPYING
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/COPYING b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/COPYING
new file mode 100644
index 0000000..ce9ccf7
--- /dev/null
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/COPYING
@@ -0,0 +1 @@
+The images in this directory belong to the "Silk" icon set, created by Mark James and available at <http://www.famfamfam.com/lab/icons/silk/>. The copyright belongs to Mark James, and the images are distributed under a Creative Commons Attribution 2.5 License <http://creativecommons.org/licenses/by/2.5/>.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_redo.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_redo.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_redo.png
new file mode 100755
index 0000000..fdc394c
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_redo.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_undo.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_undo.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_undo.png
new file mode 100755
index 0000000..6972c5e
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/arrow_undo.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/bug.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/bug.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/bug.png
new file mode 100755
index 0000000..2d5fb90
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/bug.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/cut.png
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/cut.png b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/cut.png
new file mode 100755
index 0000000..f215d6f
Binary files /dev/null and b/platform/content/src/main/resources/org/apache/clerezza/platform/content/staticweb/discoscripts/mozile/images/silk/cut.png differ


[22/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
new file mode 100644
index 0000000..4db9729
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
@@ -0,0 +1,7 @@
+//     Underscore.js 1.5.0
+//     http://underscorejs.org
+//     (c) 2009-2011 Jeremy Ashkenas, DocumentCloud Inc.
+//     (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Underscore may be freely distributed under the MIT license.
+!function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,v=e.reduce,h=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,w=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.5.0";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(j.has(n,a)&&t.call(e,n[a],a,n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,
 e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduceRight===h)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,fu
 nction(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.va
 lue},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return j.isFunction(n)?n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=F(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index<t.index?-1:1}),"value")};var k=function(n,t,r,e){var u={},i=F(null==t?j.identity:t);return A(n,function(t,a){var o=i.call(r,t,a,n);e(u,o,t)}),u};j.groupBy=function(n,t,r){return k(n,t,r,function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)})},j.countBy=function(n,t,r){return k(n,t,r,function(n,t){j.has(
 n,t)||(n[t]=0),n[t]++})},j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:F(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var R=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return R(n,t,[])},j.without=function(n){return j.differen
 ce(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){return j.unzip.apply(j,o.call(arguments))},j.unzip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e
 ]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var M=function(){};j.bind=function(n,t){var r,e;if(w&&n.bind===w)return w.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));M.prototype=n.prototype;var u=new M;M.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){
 var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u=null;return function(){var i=this,a=arguments,o=function(){u=null,r||(e=n.apply(i,a))},c=r&&!u;return clearTimeout(u),u=setTimeout(o,t),c&&(e=n.apply(i,a)),e}},j.once=function(n)
 {var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push(n[r]);return t},j.pairs=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push([r,n[r]]);return t},j.invert=function(n){var t={};for(var r in n)j.has(n,r)&&(t[n[r]]=r);return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){va
 r t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(
 r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=
 typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){retu
 rn I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(z,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),
 i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var D=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this);
+//# sourceMappingURL=underscore-min.map
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css b/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
new file mode 100644
index 0000000..cd820ba
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
@@ -0,0 +1,43 @@
+body {
+    padding-top: 3cm;
+}
+
+/* === Editor === */
+.etch-editor-panel { display: none; padding: 5px; position: absolute; z-index: 10000;
+    background: #dadada; border: 1px solid #bdbdbd; color: #535353; text-shadow: 0 1px 0 #fff;
+    background-image: -moz-linear-gradient(center bottom, #ccc 0%, #ddd 100%);
+    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ddd), to(#ccc));
+    -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
+    -webkit-box-shadow: inset 1px 0 0 #dfdfdf, inset 0 1px 0 #dfdfdf, inset -1px 0 0 #dfdfdf, inset 0 -1px 0 #dfdfdf, 0 0 5px rgba(0,0,0,.3);
+ }
+.etch-editor-button { display: block; float: left; margin-right: 3px; position: relative; text-decoration: none;
+    display: block; width: 27px; height: 27px; background: #dadada; border: 1px solid #aaa; color: #535353; text-shadow: 0 1px 0 #fff;
+    background: -moz-linear-gradient(center bottom, #e1e1e1 0%, #efefef 100%);
+    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fFfFfF), to(#f1f1f1));
+    -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
+     }
+
+.etch-editor-button:last-child { margin-right: 0; }
+.etch-editor-button:hover { background: #fff; border-color: #999; }
+.etch-editor-button span:active { box-shadow: inset 0 0 15px rgba(0,0,0,.5); border-color: #999; }
+
+.etch-editor-button span,
+.etch-editor-button span { background: url('images/editor_icons.png') no-repeat;
+    display: block; height: 100%; width: 100%;
+}
+
+.etch-editor-panel .etch-bold span { background-position: 0 0; }
+.etch-editor-panel .etch-italic span { background-position: -30px 0; }
+.etch-editor-panel .etch-underline span { background-position: -60px 0; }
+.etch-editor-panel .etch-unordered-list span { background-position: -90px 0; }
+.etch-editor-panel .etch-ordered-list span { background-position: -120px 0; }
+.etch-editor-panel .etch-image span { background-position: -150px 0; }
+.etch-editor-panel .etch-link span { background-position: -180px 0; }
+.etch-editor-panel .etch-save span { background-position: -210px 0; }
+.etch-editor-panel .etch-justify-left span { background-position: -240px 0; }
+.etch-editor-panel .etch-justify-center span { background-position: -270px 0; }
+.etch-editor-panel .etch-justify-right span { background-position: -300px 0; }
+.etch-editor-panel .etch-cite span { background-position: -330px 0; }
+.etch-editor-panel .etch-heading span { background-position: -360px 0; }
+.etch-editor-panel .etch-clear-formatting span { background-position: -390px 0; }
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png b/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png
new file mode 100644
index 0000000..f94f5a6
Binary files /dev/null and b/platform/editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
new file mode 100644
index 0000000..e8e6665
--- /dev/null
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.clerezza.platform.editor
+
+import javax.ws.rs.GET;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
+import org.apache.clerezza.rdf.core.Graph
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
+
+@Component
+@Service(Array(classOf[Object]))
+@Property(name="javax.ws.rs", boolValue=Array(true))
+@Path("/tools/editor/create")
+class Manager {
+  
+  @Reference
+  var cgp: ContentGraphProvider = null;
+  
+  @GET
+  def sayHello = "Size of content graph: "+cgp.getContentGraph.size
+  
+  @PUT
+  def putData(graph: Graph) = {
+    //TODO implement
+    graph
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
new file mode 100644
index 0000000..36c5d15
--- /dev/null
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
@@ -0,0 +1,277 @@
+package org.apache.clerezza.platform.editor
+
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering.TypeRenderlet
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DISCOBITS
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;import scala.xml.Unparsed
+import scala.xml._
+import scala.xml.transform._
+
+
+
+abstract class DiscobitsContentEtch extends SRenderlet {
+    
+  override val getMediaType = MediaType.TEXT_HTML_TYPE
+
+  override def getModePattern = "edit"
+
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+        val initScript = """
+            var discoBitsCollection = new Backbone.Collection();
+            $(function() {
+                
+                GreenRdfStore.getGraph(document, function(origGraph) {
+                    //now that we have the orig graph we no longer need the content atr
+                    $("span[property='disco:infoBit']").removeAttr("content");
+                    var InfoBit = Backbone.Model.extend({
+                        defaults: {
+                            "@type": 'disco:XHTMLInfoDiscoBit',
+                            "disco:infoBit": 'Some content'
+                        },
+                        initialize: function() {
+                            console.log('This model has been initialized.');
+                            var m = this;
+                            this.on('change', function(msg) {
+                                console.log('A value for this model has changed: ');
+                                console.log(m.changed);
+                                console.log(m.get("@id"));
+                                console.log('A value for this model has changed: '+m.hasChanged(null));
+                                m.foo = "bar"
+                            });
+                        }
+                    });
+                    function saveAllModified() {
+                        GreenRdfStore.getGraph(document, function(newGraph) {
+                            //alert("orig: "+origGraph.toNT());
+                            //alert("new: "+ newGraph.toNT());
+                            $.post( "/tools/editor/post", { assert: newGraph.toNT(), revoke: origGraph.toNT(), rdfFormat: 'text/turtle' }, function( data ) {
+                                alert("saved");
+                                origTurtle = newTurtle;
+                              }) .fail(function( data) {
+                                errdata = data
+                                alert( "error: " + data.statusText);
+                              });
+                        });
+
+                    }
+                    var InfoBitView = Backbone.View.extend({
+                        initialize: function() {
+                            _.bindAll(this, 'save')
+                            this.model.bind('save', this.save);
+                            var infoBit = $(this.el).find('[property="disco:infoBit"]').html()
+                            console.log(this.model.hasChanged(null))
+                            //this.model.set("disco:infoBit", infoBit)
+                            console.log(this.model.hasChanged(null))
+                            this.stickit();
+                        },
+                        events: {
+                            'mousedown .editable': 'editableClick'
+                        },
+                        bindings: {
+                            '[property="disco:infoBit"]': 'disco:infoBit'
+                        },
+                        editableClick: etch.editableInit,
+                        save: function() {
+
+                            // normally you would call model.save() here but this is a demo
+                            // $(this.el).find('.editable').effect('highlight', {color: 'yellow'});
+                            // $('.save-event').fadeIn('fast', function() {
+                            //     setTimeout($(this).fadeOut('slow'), 10000);
+                            // });
+                            console.log("this modified: ");
+                            console.log(this.model.get("@id"));
+                            console.log(this.model.changed);
+                            console.log("this is modified: "+this.model.hasChanged(null));
+                            saveAllModified();
+                        }
+
+                    });
+                    //$article = $('[property="disco:infoBit"]');
+                    $('[property="disco:infoBit"]').addClass("editable")
+                    $('[property="disco:infoBit"]').attr("data-button-class", "all")
+                    //this ensure two way binding with stickit
+                    $('[property="disco:infoBit"]').attr("contenteditable", "true")
+                    $article = $('[typeof="disco:XHTMLInfoDiscoBit"]');
+                    _.forEach($article, function(art) {
+                        console.log(art);
+                        var infoBit = $(art).find('[property="disco:infoBit"]').html()
+                        var about = $(art).attr('about')
+                        var model = new InfoBit({
+                            "@id": about,
+                            "disco:infoBit": infoBit
+                        });
+                        new InfoBitView({model: model, el: art, tagName: art.tagName});
+                        discoBitsCollection.add(model)
+                    });
+                    
+                    
+                    
+                });
+                /*var store = rdfstore.create();
+                
+                    CallbackProcessor.prototype = new RDFaProcessor();
+                    CallbackProcessor.prototype.constructor=RDFaProcessor;
+                    function CallbackProcessor() {
+                       RDFaProcessor.call(this);
+                    }
+
+                    CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+                       alert("New triple: "+subject+", predicate "+predicate+", object "+object.value+", "+object.language+", "+object.type);
+                       //RDFaProcessor.prototype.addTriple.call(this, origin, subject, predicate, object);
+                       //graph.add(env.createTriple())
+                    }*/
+                    //var gp = new GraphRDFaProcessor();
+                    /*function WrappedGraphProcessor() {
+                        GraphRDFaProcessor.call(this)
+                    }
+                    WrappedGraphProcessor.prototype = new GraphRDFaProcessor();
+                    WrappedGraphProcessor.prototype.addTriple= function(origin,subject,predicate,object) {
+                            alert("uff "+origin+","+subject+","+predicate+","+object);
+                            if (origin.getAttribute("content")) {
+                                object.value = origin.getAttribute("content");
+                            }
+                            GraphRDFaProcessor.prototype.addTriple.call(this, origin, subject, predicate, object);
+                        }
+                    var gp = new WrappedGraphProcessor();
+                    //var gp = new CallbackProcessor();
+                    gp.target.graph = new RDFaGraph();
+                    gp.process(document);
+                    var origTurtle = gp.target.graph.toString();
+                    alert(origTurtle);*/
+                    
+                            
+                //});
+                
+
+                
+
+                
+                //var view = new articleView({model: model, el: $article[0], tagName: $article[0].tagName});
+
+            });
+        
+            Backbone.on('all', function(s) {
+                console.log('Handling all: ' + s);
+            });
+        
+            
+        
+            /*document.addEventListener(
+              "rdfa.loaded",
+              function() {
+                 _.forEach(document.getElementsByType("http://discobits.org/ontology#Entry"), function(e) {
+                  $(e).css('background-color', 'blue');
+                });
+                console.log('all colored');
+                //console.log('activating: '+RDFaProcessor);
+                CallbackProcessor.prototype = new RDFaProcessor();
+                CallbackProcessor.prototype.constructor=RDFaProcessor;
+                function CallbackProcessor() {
+                   RDFaProcessor.call(this);
+                }
+
+                CallbackProcessor.prototype.newSubjectOrigin = function(origin,subject) {
+                   console.log("New origin for "+subject);
+                }
+
+                CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
+                   console.log("New triple: "+subject+", predicate "+predicate+
+                               ", object "+object.value+", "+object.language+", "+object.type);
+                }
+                console.log('activated: '+CallbackProcessor);
+                processor = new CallbackProcessor();
+                processor.finishedHandlers.push(
+                    function(node) {
+                       alert("Done!");
+                    }
+                 );
+                 processor.process(document);
+                 console.log('done');
+              },
+              false
+            );*/
+            """
+        val html = <html xmlns:disco="http://discobits.org/ontology#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
+          
+            <head>
+                <link type="text/css" href="/style/style.css" rel="stylesheet" />
+                <link rel="stylesheet" href="/tools/editor/styles/etch.css" />
+                {for (part <- res/DISCOBITS.contains;  if ((part/DISCOBITS.pos*) == "0")) yield
+                <title>Editing: {part/DISCOBITS.holds/DISCOBITS.infoBit*}</title> }
+                <script src="/tools/editor/scripts/RDFaProcessor.1.3.0.js"></script>
+                <script src="/tools/editor/scripts/RDFa.1.3.0.js"></script>
+            </head>
+          <body>
+            {render(res, "rdfa-naked")}
+            <script src="/tools/editor/scripts/jquery.min.js"></script>
+            <script src="/tools/editor/scripts/underscore-min.js"></script>
+            <script src="/tools/editor/scripts/backbone-min.js"></script>
+            <script src="/tools/editor/scripts/etch.js"></script>
+            <script src="/tools/editor/scripts/backbone.stickit.js"></script>
+            <script src="/tools/editor/scripts/rdfstore.js" type="text/javascript"></script>
+            <script src="/tools/editor/scripts/greenrdfstore.js"></script>
+            <script>
+              {Unparsed(initScript)}
+            </script>
+          </body>
+        </html>
+        
+        //From: http://www.w3.org/TR/html5/syntax.html#syntax     
+        //"A single newline may be placed immediately after the start tag of pre 
+        //and textarea elements. If the element's contents are intended to 
+        //start with a newline, two consecutive newlines thus need to be 
+        //included by the author."
+        object preRule extends RewriteRule {
+          override def transform(n: Node): Seq[Node] = n match {
+            case e:Elem
+            	if(e.label == "pre") => e.child(0) match   {
+            		case t : Text =>
+            		  if (t.text(0) == '\n') {
+             				val newText = Text("\n"+t.text)
+     					    	e.copy(child = newText ++ e.child.tail)
+     					    } else {
+     					    	e
+     					    }
+     					  case _ => e
+     					}
+            case other => other
+          }
+        }
+        
+        object htmlLineBreaks extends RuleTransformer(preRule)
+
+        htmlLineBreaks(html)
+      }
+    }
+  }
+
+}
+
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class TitledContentEtch extends DiscobitsContentEtch {
+
+  val getRdfType = DISCOBITS.TitledContent 
+}
+            
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class HtmlInfoDiscobitEtch extends DiscobitsContentEtch {
+
+  override val getRdfType = DISCOBITS.XHTMLInfoDiscoBit 
+    
+}
+
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class OrderedContentDiscobitEtch extends DiscobitsContentEtch {
+
+  override val getRdfType = DISCOBITS.OrderedContent
+    
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
new file mode 100644
index 0000000..5e64b41
--- /dev/null
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
@@ -0,0 +1,34 @@
+package org.apache.clerezza.platform.editor
+
+
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering.TypeRenderlet
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DISCOBITS
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;import scala.xml.Unparsed
+
+
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class HtmlInfoDicobitRDFaNaked extends SRenderlet {
+
+  val getRdfType = DISCOBITS.XHTMLInfoDiscoBit 
+    
+  override val getMediaType = MediaType.TEXT_HTML_TYPE
+
+  override def getModePattern = "rdfa-naked"
+
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+              <div typeof="disco:XHTMLInfoDiscoBit" about={res*}>
+                <span property="disco:infoBit" content={(res/DISCOBITS.infoBit*).replace("\n","\\n")} datatype="rdf:XMLLiteral">{Unparsed(res/DISCOBITS.infoBit*)}</span>
+              </div>
+      }
+    }
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
new file mode 100644
index 0000000..e8e00f5
--- /dev/null
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
@@ -0,0 +1,38 @@
+package org.apache.clerezza.platform.editor
+
+
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering.TypeRenderlet
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DISCOBITS
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class OrderedContentRDFaNaked extends SRenderlet {
+
+  val getRdfType = DISCOBITS.OrderedContent
+    
+  override val getMediaType = MediaType.TEXT_HTML_TYPE
+
+  override def getModePattern = "rdfa-naked"
+
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+              <div about={res*} typeof="disco:OrderedContent">
+                {for (part <- (res/DISCOBITS.contains).sortBy(part => (part/DISCOBITS.pos*).toInt)) 
+                  yield <div property="disco:contains" typeof="disco:Entry">
+                       <div property="disco:pos" style="display: none">{part/DISCOBITS.pos*}</div>
+                       <div property="disco:holds" resource={part/DISCOBITS.holds*}>{render(part/DISCOBITS.holds, "rdfa-naked")}</div>
+                    </div>
+                }
+              </div>
+      }
+    }
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
new file mode 100644
index 0000000..94e29fd
--- /dev/null
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
@@ -0,0 +1,42 @@
+package org.apache.clerezza.platform.editor
+
+
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering.TypeRenderlet
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DISCOBITS
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+
+@Component
+@Service(Array(classOf[TypeRenderlet]))
+class TitledContentRDFaNaked extends SRenderlet {
+
+  val getRdfType = DISCOBITS.TitledContent 
+    
+  override val getMediaType = MediaType.TEXT_HTML_TYPE
+
+  override def getModePattern = "rdfa-naked"
+
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+              <div typeof="disco:TitledContent" about={res*}>
+              {for (part <- res/DISCOBITS.contains;  if ((part/DISCOBITS.pos*) == "0")) 
+                yield <span property="disco:contains" typeof="disco:Entry">
+                   <span property="disco:pos" style="display: none">0</span>
+                   <h1 resource={part/DISCOBITS.holds*} property="disco:holds">{render(part/DISCOBITS.holds, "rdfa-naked")}</h1>
+                  </span>}
+              {for (part <- res/DISCOBITS.contains;  if ((part/DISCOBITS.pos*) == "1")) 
+                yield <div property="disco:contains" typeof="disco:Entry">
+                       <div property="disco:pos" style="display: none">{part/DISCOBITS.pos*}</div>
+                       <div property="disco:holds" resource={part/DISCOBITS.holds*}>{render(part/DISCOBITS.holds, "rdfa-naked")}</div>
+                    </div>}
+              </div>
+      }
+    }
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/enrichment/LICENSE
----------------------------------------------------------------------
diff --git a/platform/enrichment/LICENSE b/platform/enrichment/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/enrichment/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/enrichment/pom.xml
----------------------------------------------------------------------
diff --git a/platform/enrichment/pom.xml b/platform/enrichment/pom.xml
new file mode 100644
index 0000000..f844156
--- /dev/null
+++ b/platform/enrichment/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.enrichment</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform RDF Enrichment</name>
+    <description>Provides a Content-Graph Extension using Enrichers</description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.enrichment</artifactId>
+            <version>0.2</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
----------------------------------------------------------------------
diff --git a/platform/enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java b/platform/enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
new file mode 100644
index 0000000..56bf615
--- /dev/null
+++ b/platform/enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.rdf.enrichment;
+
+import java.security.Permission;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+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.TripleCollection;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
+import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
+import org.apache.clerezza.rdf.core.access.LockableMGraph;
+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.enrichment.Enricher;
+import org.apache.clerezza.rdf.enrichment.EnrichmentTriples;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.ReferencePolicy;
+import org.apache.felix.scr.annotations.References;
+import org.apache.felix.scr.annotations.Service;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * Provides a read-only MGraph with the name urn:x-localinstance:/enrichment.graph
+ * containing the enrichments provided by all available services of type 
+ * Enricher on the content graph.
+ *
+ * For performance reasons EnrichmentTcProvider gets the content-graph from
+ * TcManager and doesn't do access control check on every request, to prevent
+ * deductions about the content of the content graph by unauthorized users
+ * the required permissions on the enrichment graph are set to those on the
+ * content graph.
+ *
+ *
+ * @author reto
+ */
+@Component
+@Service(WeightedTcProvider.class)
+@References(
+    {
+        @Reference(referenceInterface=Enricher.class, name="enricher",
+                cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
+                policy=ReferencePolicy.DYNAMIC)
+    }
+)
+public class EnrichmentTcProvider implements WeightedTcProvider {
+
+    public static final UriRef ENRICHMENT_GRAPH_URI = new UriRef("urn:x-localinstance:/enrichment.graph");
+    
+    private LockableMGraph contentGraph;
+    private final Collection<Enricher> enrichers = Collections.synchronizedCollection(new HashSet<Enricher>());
+
+    @Reference
+    private ContentGraphProvider cgProvider;
+
+    @Reference
+    private TcManager tcManager;
+
+    @Override
+    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+        if (ENRICHMENT_GRAPH_URI.equals(name)) {
+            return getEnrichmentGraph();
+        }
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+        if (ENRICHMENT_GRAPH_URI.equals(name)) {
+            return getEnrichmentGraph();
+        }
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public Set<UriRef> listGraphs() {
+        return new HashSet<UriRef>(0);
+    }
+
+    @Override
+    public Set<UriRef> listMGraphs() {
+        return Collections.singleton(ENRICHMENT_GRAPH_URI);
+    }
+
+    @Override
+    public Set<UriRef> listTripleCollections() {
+        return Collections.singleton(ENRICHMENT_GRAPH_URI);
+    }
+
+    @Override
+    public MGraph createMGraph(UriRef name) throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("creating entities not supported");
+    }
+
+    @Override
+    public Graph createGraph(UriRef name, TripleCollection triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("creating entities not supported");
+    }
+
+    @Override
+    public void deleteTripleCollection(UriRef name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
+        throw new UnsupportedOperationException("deleting entities not supported");
+    }
+
+    @Override
+    public Set<UriRef> getNames(Graph graph) {
+        return new HashSet<UriRef>(0);
+    }
+
+    @Override
+    public int getWeight() {
+        return 0;
+    }
+
+    private MGraph getEnrichmentGraph() {
+        return new EnrichmentTriples(contentGraph, enrichers);
+    }
+
+    /**
+     * avtivates the component and adds the enrichment-graph to the virtual
+     * content graph.
+     * 
+     * gets the base content-graph from tcManager and sets the permission
+     * required to access the enrichment-graph accordingly
+     */
+    protected void activate(ComponentContext context) {
+        contentGraph = tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
+        Collection<Permission> requiredReadPermissions =
+                tcManager.getTcAccessController().getRequiredReadPermissions(Constants.CONTENT_GRAPH_URI);
+        if (requiredReadPermissions.isEmpty()) {
+            tcManager.getTcAccessController().setRequiredReadPermissionStrings(
+                    ENRICHMENT_GRAPH_URI, Collections.singleton(
+                        new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString()
+                    ));
+        } else {
+            tcManager.getTcAccessController().setRequiredReadPermissions(
+                    ENRICHMENT_GRAPH_URI, requiredReadPermissions);
+        }
+        cgProvider.addTemporaryAdditionGraph(ENRICHMENT_GRAPH_URI);
+    }
+
+    /**
+     * deactivates the compononent removing the enrichment-graph from the
+     * virtual content graph
+     */
+    protected void deactivate(ComponentContext context) {
+        cgProvider.removeTemporaryAdditionGraph(ENRICHMENT_GRAPH_URI);
+        contentGraph = null;
+    }
+
+
+
+    protected void bindEnricher(Enricher enricher) {
+        enrichers.add(enricher);
+    }
+
+    protected void unbindEnricher(Enricher enricher) {
+        enrichers.remove(enricher);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/globalmenu.api/LICENSE
----------------------------------------------------------------------
diff --git a/platform/globalmenu.api/LICENSE b/platform/globalmenu.api/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/globalmenu.api/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/globalmenu.api/pom.xml
----------------------------------------------------------------------
diff --git a/platform/globalmenu.api/pom.xml b/platform/globalmenu.api/pom.xml
new file mode 100644
index 0000000..0ada0be
--- /dev/null
+++ b/platform/globalmenu.api/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.globalmenu.api</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform GlobalMenu API</name>
+    <description>
+        The API for providing entries to the global clerezza menu
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
----------------------------------------------------------------------
diff --git a/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java b/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
new file mode 100644
index 0000000..e552bad
--- /dev/null
+++ b/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.globalmenu;
+
+/**
+ * This class keeps information about an item for the global menu.
+ *
+ * @author mir
+ */
+public class GlobalMenuItem implements Comparable<GlobalMenuItem> {
+
+    private String path;
+    private String label;
+    private String description;
+    private String identifier;
+    private int priority;
+    private String groupIdentifier;
+
+    /**
+     * Creates a new <code>GlobalMenuItem</code>.
+     *
+     * @param relativeUri of the resource to be shown in the menu.
+     * @param identifier The identifier of the menu item.
+     * @param label Specifies the label of the menu entry.
+     * @param priority the priority, higher numbers appear first in the menu
+     * @param groupIdentifier Specifies the the identifier of the group of which
+     *        the menu item is part.
+     */
+    public GlobalMenuItem(String path, String identifier, String label,
+            int priority, String groupIdentifier) {
+        if (label == null) {
+            throw new IllegalArgumentException("label may not be null");
+        }
+        this.path = path;
+        this.label = label;
+        this.identifier = identifier;
+        this.priority = priority;
+        this.groupIdentifier = groupIdentifier;
+    }
+
+    /**
+     * Creates a new <code>GlobalMenuItem</code>.
+     *
+     * @param relativeUri of the resource to be shown in the menu.
+     * @param identifier The identifier of the menu item.
+     * @param label Specifies the label of the menu entry.
+     * @param description The description of the menu item.
+     * @param priority the priority, higher numbers appear first in the menu
+     * @param groupIdentifier Specifies the the identifier of the group of which
+     *        the menu item is part.
+     */
+    public GlobalMenuItem(String path, String identifier, String label, String description,
+            int priority, String groupIdentifier) {
+        if (label == null) {
+            throw new IllegalArgumentException("label may not be null");
+        }
+        this.path = path;
+        this.label = label;
+        this.description = description;
+        this.identifier = identifier;
+        this.priority = priority;
+        this.groupIdentifier = groupIdentifier;
+    }
+
+    /**
+     * Returns the path of the resource to be shown in the menu. The
+     * path is additional to the bundle prefix and if existing to the
+     * <code>javax.ws.rs.Path</code> annotation of the
+     * <code>GlobalMenuItemsProvider</code> that returned this
+     * <code>GlobalMenuItem</code>.
+     * @return the path
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * Returns the label of the menu entry
+     * @return the label
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Returns the description of the menu entry.
+     * @return the groupIdentifier
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Return the identifier of the menu entry.
+     *
+     * @return
+     */
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Returns the the priority within the group, which is used for sorting
+     * the menu Items, higher numbers appear first in the menu
+     * @return the priority
+     */
+    public int getPriority() {
+        return priority;
+    }
+
+    /**
+     * Returns the the identifier of the group of which this menu item is part,
+     * null if this is a top-level item.
+     * @return the groupIdentifier
+     */
+    public String getGroupIdentifier() {
+        return groupIdentifier;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final GlobalMenuItem other = (GlobalMenuItem) obj;
+        if ((this.path == null) ? (other.path != null) : !this.path.equals(other.path)) {
+            return false;
+        }
+        if (!this.label.equals(other.label)) {
+            return false;
+        }
+        if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description)) {
+            return false;
+        }
+        if (this.priority != other.priority) {
+            return false;
+        }
+        if ((this.groupIdentifier == null) ? (other.groupIdentifier != null) : !this.groupIdentifier.equals(other.groupIdentifier)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 53 * hash + (this.path != null ? this.path.hashCode() : 0);
+        hash = 53 * hash + this.label.hashCode();
+        hash = 53 * hash + (this.description != null ? this.description.hashCode() : 0);
+        hash = 53 * hash + this.priority;
+        hash = 53 * hash + (this.groupIdentifier != null ? this.groupIdentifier.hashCode() : 0);
+        return hash;
+    }
+
+    
+
+    @Override
+    public int compareTo(GlobalMenuItem o) {
+        if (getPriority() == o.getPriority()) {
+            if (this.equals(o)) {
+                return 0;
+            } else {
+                return getLabel().compareTo(o.getLabel());
+            }
+        }
+        return o.getPriority() - getPriority();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
----------------------------------------------------------------------
diff --git a/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java b/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
new file mode 100644
index 0000000..f4ff7ce
--- /dev/null
+++ b/platform/globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.globalmenu;
+
+import java.util.Set;
+
+/**
+ * An implementation of this interface provides a set of
+ * <code>GlobalMenuItem</code>S. A <code>GlobalMenuItem</code> represents an
+ * item in the global menu of the Clerezza Platform.
+ *
+ * @author mir
+ */
+public interface  GlobalMenuItemsProvider {
+
+    /**
+     * Returns a <code>Set</code> of <code>GlobalMenuItem</code>S. If there is
+     * no <code>GlobalMenuItem</code> available (e.g. the current user has not
+     * the needed permissions) then the returned set is empty.
+     * @return
+     */
+    public Set<GlobalMenuItem> getMenuItems();
+}


[29/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation.viewer/pom.xml
----------------------------------------------------------------------
diff --git a/platform/documentation.viewer/pom.xml b/platform/documentation.viewer/pom.xml
new file mode 100644
index 0000000..1d9be7c
--- /dev/null
+++ b/platform/documentation.viewer/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.documentation.viewer</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <name>Clerezza - Platform Documentation Viewer</name>
+    <description>Presents the documentation of the Clerezza Platform
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.documentation</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation.viewer/src/main/java/org/apache/clerezza/platform/documentation/viewer/DocumentationViewer.java
----------------------------------------------------------------------
diff --git a/platform/documentation.viewer/src/main/java/org/apache/clerezza/platform/documentation/viewer/DocumentationViewer.java b/platform/documentation.viewer/src/main/java/org/apache/clerezza/platform/documentation/viewer/DocumentationViewer.java
new file mode 100644
index 0000000..32ad8d7
--- /dev/null
+++ b/platform/documentation.viewer/src/main/java/org/apache/clerezza/platform/documentation/viewer/DocumentationViewer.java
@@ -0,0 +1,238 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation.viewer;
+
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.documentation.DocumentationProvider;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.LiteralFactory;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.DOCUMENTATION;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+
+/**
+ *
+ * The documentation viewer provides a webpage that shows the available
+ * documentation.
+ *
+ * @scr.component
+ * @scr.service interface="java.lang.Object"
+ * @scr.property name="javax.ws.rs" type="Boolean" value="true"
+ *
+ * @author mir
+ */
+@Path("/documentation")
+public class DocumentationViewer {
+
+    /**
+     * @scr.reference
+     */
+    private TcManager tcManager;
+        
+    /**
+     * Redirects to the overview page
+     *
+     * @return {@link Response}
+     *
+     */
+    @GET
+    public GraphNode documentationPage(@Context UriInfo uriInfo) {
+        TrailingSlash.enforcePresent(uriInfo);
+        Graph documentations = tcManager.getGraph(
+                DocumentationProvider.DOCUMENTATION_GRAPH_URI);        
+        Collection<DocumentationItem> docItems = getDocItems(documentations);        
+        List<DocumentationItem> sortedDocItems = sortDocItems(docItems);        
+        MGraph mGraph = new SimpleMGraph();
+        BNode orderedContent = createOrderedContent(sortedDocItems, mGraph);
+        BNode titledContent = createTitledContent(orderedContent, mGraph);
+        MGraph resultGraph = new UnionMGraph(mGraph, documentations);
+        GraphNode resultNode = new GraphNode(titledContent, resultGraph);
+        return resultNode;
+    }
+
+    private Collection<DocumentationItem> getDocItems(Graph documentations) {
+        Iterator<Triple> docs = documentations.filter(null, 
+                DOCUMENTATION.documentation, null);        
+
+        Map<UriRef,DocumentationItem> uri2docItemObj = 
+            new HashMap<UriRef,DocumentationItem>();
+        
+        while (docs.hasNext()) {
+            Triple docc = docs.next();
+            UriRef docItem = (UriRef) docc.getObject();
+            Iterator<Triple> afterDocItemsIter = documentations.filter(docItem,
+                DOCUMENTATION.after, null);
+            Set<UriRef> afterDocItems = new HashSet<UriRef>();
+            while (afterDocItemsIter.hasNext()) {
+                afterDocItems.add((UriRef) afterDocItemsIter.next().getObject());
+            }
+            DocumentationItem docItemObj = new DocumentationItem(
+                    docItem, afterDocItems, uri2docItemObj);
+            uri2docItemObj.put(docItem, docItemObj);
+        }        
+        return uri2docItemObj.values();
+    }
+
+    protected List<DocumentationItem> sortDocItems(
+        Collection<DocumentationItem> docItems) {
+        List<DocumentationItem> result = 
+                new ArrayList<DocumentationItem>();
+        Iterator<DocumentationItem> items = docItems.iterator();
+
+        OUTER: while (items.hasNext()) {
+            DocumentationItem item = items.next();
+            for (int i = 0; i < result.size(); i++ ) {
+                if (result.get(i).isAfer(item.documentationItem)) {
+                    result.add(i, item);
+                    continue OUTER;
+                }
+            }
+            result.add(item);
+        }
+        return result;
+    }
+
+    private BNode createOrderedContent(List<DocumentationItem> sortedDocItems,
+        MGraph mGraph) {
+        BNode orderedContent = new BNode();
+        mGraph.add(new TripleImpl(orderedContent, RDF.type, DISCOBITS.OrderedContent));
+        Integer pos = 0;
+        Iterator<DocumentationItem> docItemObjsIter = sortedDocItems.iterator();
+        while (docItemObjsIter.hasNext()) {
+            DocumentationItem docItemObj = docItemObjsIter.next();
+            BNode containedDoc = new BNode();
+            mGraph.add(new TripleImpl(orderedContent, DISCOBITS.contains,
+                    containedDoc));
+            mGraph.add(new TripleImpl(containedDoc, DISCOBITS.pos,
+                    new PlainLiteralImpl(pos.toString())));
+            mGraph.add(new TripleImpl(containedDoc, DISCOBITS.holds,
+                    docItemObj.documentationItem));
+            pos++;
+        }
+        return orderedContent;
+    }
+
+    private BNode createTitledContent(BNode orderedContent, MGraph mGraph) {
+        BNode titledContent = new BNode();
+        mGraph.add(new TripleImpl(titledContent, RDF.type, DISCOBITS.TitledContent));
+        BNode title = new BNode();
+        mGraph.add(new TripleImpl(title, DISCOBITS.pos, new PlainLiteralImpl("0")));
+        BNode titleXml = new BNode();
+        mGraph.add(new TripleImpl(titleXml, RDF.type, DISCOBITS.XHTMLInfoDiscoBit));
+        mGraph.add(new TripleImpl(titleXml, DISCOBITS.infoBit,
+                LiteralFactory.getInstance().createTypedLiteral("Documentation")));
+        mGraph.add(new TripleImpl(title, DISCOBITS.holds, titleXml));
+        mGraph.add(new TripleImpl(title, RDF.type, DISCOBITS.Entry));
+        mGraph.add(new TripleImpl(titledContent, DISCOBITS.contains, title));        
+        BNode content = new BNode();
+        mGraph.add(new TripleImpl(content, DISCOBITS.pos, new PlainLiteralImpl("1")));
+        mGraph.add(new TripleImpl(content, DISCOBITS.holds, orderedContent));
+        mGraph.add(new TripleImpl(content, RDF.type, DISCOBITS.Entry));
+        mGraph.add(new TripleImpl(titledContent, DISCOBITS.contains, content));        
+        return titledContent;
+    }
+
+    protected static class DocumentationItem {
+
+        private UriRef documentationItem;
+        private Set<UriRef> afterDocItems;
+        
+        private boolean transitiveAfterDocItemsAdded = false;
+        private Map<UriRef, DocumentationItem> uri2docItemObj;
+
+        DocumentationItem(UriRef doumentationItem, Set<UriRef> explicitAfterDocItems,
+            Map<UriRef, DocumentationItem> uri2docItemObj) {
+            this.documentationItem = doumentationItem;
+            this.afterDocItems = explicitAfterDocItems;
+            this.uri2docItemObj = uri2docItemObj;
+        }
+
+        public boolean isAfer(UriRef docItem) {
+            return getAfterDocItems().contains(docItem);
+        }
+        
+        private Set<UriRef> getAfterDocItems() {
+            Stack<DocumentationItem> stack = new Stack<DocumentationItem>();
+            stack.add(this);
+            return getAfterDocItems(stack);
+        }
+        
+        private Set<UriRef> getAfterDocItems(Stack<DocumentationItem> stack) {
+            if (!transitiveAfterDocItemsAdded) {
+                Iterator<UriRef> afterDocUrisIter = afterDocItems.iterator();
+                while (afterDocUrisIter.hasNext()) {
+                    UriRef uriRef = afterDocUrisIter.next();
+                    DocumentationItem docItem = uri2docItemObj.get(uriRef);
+                    if (stack.contains(docItem)) {
+                        throw new RuntimeException("Documentation: cycle detected!\n"
+                            + stack.toString());
+                    }
+                    stack.add(docItem);
+                    afterDocItems.addAll(docItem.getAfterDocItems(stack));
+                    
+                }
+                transitiveAfterDocItemsAdded = true;
+            }             
+            return afterDocItems;
+        }
+
+        @Override
+        public String toString() {
+            StringWriter writer = new StringWriter();
+            writer.append("[");
+            writer.append(documentationItem.getUnicodeString());
+            writer.append(" is after (");
+            Iterator<UriRef> afterDocs = afterDocItems.iterator();
+            while (afterDocs.hasNext()) {
+                UriRef uriRef = afterDocs.next();
+                writer.append(uriRef.getUnicodeString());
+                if (afterDocs.hasNext()) {
+                    writer.append(",");
+                }
+            }
+            writer.append(")]");
+            return writer.toString();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation.viewer/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform/documentation.viewer/src/main/resources/META-INF/documentation.nt b/platform/documentation.viewer/src/main/resources/META-INF/documentation.nt
new file mode 100644
index 0000000..1a3a6f4
--- /dev/null
+++ b/platform/documentation.viewer/src/main/resources/META-INF/documentation.nt
@@ -0,0 +1,26 @@
+<bundle:///intro-content-el/0> <http://discobits.org/ontology#infoBit> "The documentation viewer provides access to the documentation (provided by the different modules) at <a xmlns=\"http://www.w3.org/1999/xhtml\" href=\"/documentation\">/documentation</a>."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/1> <http://discobits.org/ontology#infoBit> "The documentation is ordered so that the after properties http://clerezza.org/2009/08/documentation#after are satisfied. When the documentation is written with the discobits editor such a property is typically set by adding something like the folleowing in the RDF editing mode to the xml element representing the resource: &lt;after xmlns=\"http://clerezza.org/2009/08/documentation#\" rdf:resource=\"bundle://org.apache.clerezza.platform.content/discobits-editor\"/ /&gt;"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:1e27a3b4f21eada7ec61fd7c55f2bd221 . 
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:86e4309edd82a6d415338546caff2d551 . 
+<bundle:///intro-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///intro-title> <http://discobits.org/ontology#infoBit> "Documentation Viewer"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro> <http://clerezza.org/2009/08/documentation#after> <bundle://org.apache.clerezza.platform.content/discobits-editor> .
+<bundle:///intro> <http://clerezza.org/2009/08/documentation#after> <bundle://org.apache.clerezza.platform.documentation/intro> .
+<bundle:///intro> <http://discobits.org/ontology#contains> _:cc06f094ff0d735a332291b856b0d4ae1 . 
+<bundle:///intro> <http://discobits.org/ontology#contains> _:ccd6d577f99d82c53d5323fdbe4b6ba31 . 
+<bundle:///intro> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+_:1e27a3b4f21eada7ec61fd7c55f2bd221 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/0> . 
+_:1e27a3b4f21eada7ec61fd7c55f2bd221 <http://discobits.org/ontology#pos> "0" . 
+_:1e27a3b4f21eada7ec61fd7c55f2bd221 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1> . 
+_:86e4309edd82a6d415338546caff2d551 <http://discobits.org/ontology#pos> "1" . 
+_:86e4309edd82a6d415338546caff2d551 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:cc06f094ff0d735a332291b856b0d4ae1 <http://discobits.org/ontology#holds> <bundle:///intro-content> . 
+_:cc06f094ff0d735a332291b856b0d4ae1 <http://discobits.org/ontology#pos> "1" . 
+_:cc06f094ff0d735a332291b856b0d4ae1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:ccd6d577f99d82c53d5323fdbe4b6ba31 <http://discobits.org/ontology#holds> <bundle:///intro-title> . 
+_:ccd6d577f99d82c53d5323fdbe4b6ba31 <http://discobits.org/ontology#pos> "0" . 
+_:ccd6d577f99d82c53d5323fdbe4b6ba31 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation.viewer/src/test/java/org/apache/clerezza/platform/documentation/viewer/SortTest.java
----------------------------------------------------------------------
diff --git a/platform/documentation.viewer/src/test/java/org/apache/clerezza/platform/documentation/viewer/SortTest.java b/platform/documentation.viewer/src/test/java/org/apache/clerezza/platform/documentation/viewer/SortTest.java
new file mode 100644
index 0000000..a980223
--- /dev/null
+++ b/platform/documentation.viewer/src/test/java/org/apache/clerezza/platform/documentation/viewer/SortTest.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation.viewer;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.clerezza.rdf.core.UriRef;
+
+/**
+ *
+ * @author mir
+ */
+public class SortTest {
+
+    @Test
+    public void sortTest() {
+        DocumentationViewer docViewer = new DocumentationViewer();
+
+        Map<UriRef,DocumentationViewer.DocumentationItem> uri2docItemObj =
+            new HashMap<UriRef,DocumentationViewer.DocumentationItem>();
+        UriRef ref1 = new UriRef("ref1");
+        UriRef ref2 = new UriRef("ref2");
+        UriRef ref3 = new UriRef("ref3");
+        UriRef ref4 = new UriRef("ref4");
+        UriRef ref5 = new UriRef("ref5");
+
+        Set<UriRef> set1 = new HashSet<UriRef>();
+        DocumentationViewer.DocumentationItem a =
+            new DocumentationViewer.DocumentationItem(ref1, set1, uri2docItemObj);
+
+        Set<UriRef> set2 = new HashSet<UriRef>();
+        set2.add(ref1);
+        DocumentationViewer.DocumentationItem b =
+            new DocumentationViewer.DocumentationItem(ref2, set2, uri2docItemObj);
+
+        Set<UriRef> set3 = new HashSet<UriRef>();
+        set3.add(ref2);
+        DocumentationViewer.DocumentationItem c =
+            new DocumentationViewer.DocumentationItem(ref3, set3, uri2docItemObj);
+
+        Set<UriRef> set4 = new HashSet<UriRef>();
+        set4.add(ref3);
+        DocumentationViewer.DocumentationItem d =
+            new DocumentationViewer.DocumentationItem(ref4, set4, uri2docItemObj);
+
+        Set<UriRef> set5 = new HashSet<UriRef>();
+        set5.add(ref4);
+        DocumentationViewer.DocumentationItem e =
+            new DocumentationViewer.DocumentationItem(ref5, set5, uri2docItemObj);
+
+        uri2docItemObj.put(ref2, b);
+        uri2docItemObj.put(ref4, d);
+        uri2docItemObj.put(ref1, a);
+        uri2docItemObj.put(ref3, c);
+        uri2docItemObj.put(ref5, e);
+
+        List<DocumentationViewer.DocumentationItem> orderedList = 
+            docViewer.sortDocItems(uri2docItemObj.values());
+
+        Iterator<DocumentationViewer.DocumentationItem> iter =
+            orderedList.iterator();
+
+        Object[] expecteds =
+            new DocumentationViewer.DocumentationItem[5];
+
+        expecteds[0] = a;
+        expecteds[1] = b;
+        expecteds[2] = c;
+        expecteds[3] = d;
+        expecteds[4] = e;
+
+        Assert.assertArrayEquals(expecteds, orderedList.toArray());
+    }
+
+    @Test(expected=RuntimeException.class)
+    public void cycleTest() {
+        DocumentationViewer docViewer = new DocumentationViewer();
+
+        Map<UriRef,DocumentationViewer.DocumentationItem> uri2docItemObj =
+            new HashMap<UriRef,DocumentationViewer.DocumentationItem>();
+        UriRef ref1 = new UriRef("ref1");
+        UriRef ref2 = new UriRef("ref2");
+        UriRef ref3 = new UriRef("ref3");
+        UriRef ref4 = new UriRef("ref4");
+        UriRef ref5 = new UriRef("ref5");
+
+        Set<UriRef> set1 = new HashSet<UriRef>();
+        set1.add(ref5);
+        DocumentationViewer.DocumentationItem a =
+            new DocumentationViewer.DocumentationItem(ref1, set1, uri2docItemObj);
+
+        Set<UriRef> set2 = new HashSet<UriRef>();
+        set2.add(ref1);
+        DocumentationViewer.DocumentationItem b =
+            new DocumentationViewer.DocumentationItem(ref2, set2, uri2docItemObj);
+
+        Set<UriRef> set3 = new HashSet<UriRef>();
+        set3.add(ref2);
+        DocumentationViewer.DocumentationItem c =
+            new DocumentationViewer.DocumentationItem(ref3, set3, uri2docItemObj);
+
+        Set<UriRef> set4 = new HashSet<UriRef>();
+        set4.add(ref3);
+        DocumentationViewer.DocumentationItem d =
+            new DocumentationViewer.DocumentationItem(ref4, set4, uri2docItemObj);
+
+        Set<UriRef> set5 = new HashSet<UriRef>();
+        set5.add(ref4);
+        DocumentationViewer.DocumentationItem e =
+            new DocumentationViewer.DocumentationItem(ref5, set5, uri2docItemObj);
+
+        uri2docItemObj.put(ref2, b);
+        uri2docItemObj.put(ref4, d);
+        uri2docItemObj.put(ref1, a);
+        uri2docItemObj.put(ref3, c);
+        uri2docItemObj.put(ref5, e);
+        
+        List<DocumentationViewer.DocumentationItem> orderedList =
+            docViewer.sortDocItems(uri2docItemObj.values());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/LICENSE
----------------------------------------------------------------------
diff --git a/platform/documentation/LICENSE b/platform/documentation/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/documentation/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/pom.xml
----------------------------------------------------------------------
diff --git a/platform/documentation/pom.xml b/platform/documentation/pom.xml
new file mode 100644
index 0000000..cd4b989
--- /dev/null
+++ b/platform/documentation/pom.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>clerezza</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.5</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.documentation</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Documentation</name>
+    <description>Manages the documentation of the Clerezza Platform
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationInContentGraph.java
----------------------------------------------------------------------
diff --git a/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationInContentGraph.java b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationInContentGraph.java
new file mode 100644
index 0000000..ad0ad8a
--- /dev/null
+++ b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationInContentGraph.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation;
+
+import org.osgi.service.component.ComponentContext;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+
+/**
+ * Registers the documentation graph as addition to the content graph
+ * 
+ * @scr.component
+ * 
+ * @author rbn, hasan
+ */
+public class DocumentationInContentGraph {
+
+
+    /**
+     * we have this dependency to make sure we get started after the documentatinProvider
+     *
+     * @scr.reference
+     */
+    private DocumentationProvider documentationProvider;
+
+    /**
+     * @scr.reference
+     */
+    private ContentGraphProvider cgProvider;
+
+    protected void activate(final ComponentContext componentContext) {
+        cgProvider.addTemporaryAdditionGraph(DocumentationProvider.DOCUMENTATION_GRAPH_URI);
+    }
+
+    protected void deactivate(final ComponentContext componentContext) {
+        cgProvider.removeTemporaryAdditionGraph(DocumentationProvider.DOCUMENTATION_GRAPH_URI);
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java
----------------------------------------------------------------------
diff --git a/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java
new file mode 100644
index 0000000..3923a8b
--- /dev/null
+++ b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java
@@ -0,0 +1,274 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+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;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.clerezza.platform.config.PlatformConfig;
+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.Triple;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
+import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
+import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
+import org.apache.clerezza.rdf.core.impl.SimpleGraph;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.clerezza.rdf.ontologies.DISCOBITS;
+import org.apache.clerezza.rdf.ontologies.DOCUMENTATION;
+import org.apache.clerezza.rdf.ontologies.OSGI;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.utils.UnionMGraph;
+
+/**
+ * The DocumentationProvider gathers the documentations of bundles and provides
+ * a graph containing all documentations.
+ * It is an implementation of <code>WeightedTcProvider</code> with the default
+ * weight 30. 
+ * @author mir, hasan
+ */
+@Component
+@Services({
+    @Service(WeightedTcProvider.class),
+    @Service(DocumentationProvider.class)})
+@Property(name="weight", intValue=30)
+
+public class DocumentationProvider implements WeightedTcProvider, BundleListener {
+
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+
+    /**
+     * File path to the file containing the documentation of the bundle
+     */
+    private static final String DOCUMENTATION_FILE = "/META-INF/documentation.nt";
+
+    @Reference
+    private PlatformConfig config;
+    
+    @Reference
+    private Parser parser;
+
+    /**
+     * Contains the map between bundles and their documentation-graph
+     */
+    private Map<Bundle, MGraph> bundle2DocGraphMap = new HashMap<Bundle, MGraph>();
+
+    /**
+     * UnionGraph which contains all documenation-graphs of the registered
+     * bundles
+     */
+    private Graph unitedDocumentations;
+
+    /**
+     * The URI of the graph containing the documentations
+     */
+    public static final UriRef DOCUMENTATION_GRAPH_URI =
+            new UriRef("urn:x-localinstance:/documentation.graph");
+
+    private int weight = 30;    
+
+    @Override
+    public int getWeight() {
+        return weight;
+    }
+
+    @Override
+    public Graph getGraph(UriRef name) throws NoSuchEntityException {
+        if (name.equals(DOCUMENTATION_GRAPH_URI)) {
+            return unitedDocumentations;
+        }
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
+        throw new NoSuchEntityException(name);
+    }
+
+    @Override
+    public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
+        return getGraph(name);
+    }
+
+    @Override
+    public Set<UriRef> listGraphs() {
+        return Collections.singleton(DOCUMENTATION_GRAPH_URI);
+    }
+
+    @Override
+    public Set<UriRef> listMGraphs() {
+        return new HashSet<UriRef>();
+    }
+
+    @Override
+    public Set<UriRef> listTripleCollections() {
+        return Collections.singleton(DOCUMENTATION_GRAPH_URI);
+    }
+
+    @Override
+    public MGraph createMGraph(UriRef name)
+            throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    @Override
+    public Graph createGraph(UriRef name, TripleCollection triples)
+            throws UnsupportedOperationException, EntityAlreadyExistsException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    @Override
+    public void deleteTripleCollection(UriRef name)
+            throws UnsupportedOperationException, NoSuchEntityException,
+            EntityUndeletableException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    @Override
+    public Set<UriRef> getNames(Graph graph) {
+        final HashSet<UriRef> result = new HashSet<UriRef>();
+        if (unitedDocumentations.equals(graph)) {
+            result.add(DOCUMENTATION_GRAPH_URI);
+        }
+        return result;
+    }
+
+    @Override
+    public void bundleChanged(BundleEvent event) {
+        Bundle bundle = event.getBundle();
+        switch (event.getType()) {
+            case BundleEvent.STARTED:
+                registerDocumentation(bundle);
+                break;
+            case BundleEvent.STOPPED:
+                unregisterDocumentation(bundle);
+                break;
+        }
+        createUnionGraph();
+    }
+
+    protected void activate(final ComponentContext componentContext) {
+        componentContext.getBundleContext().addBundleListener(this);
+        weight = (Integer) componentContext.getProperties().get("weight");
+        registerExistingDocumentations(componentContext);
+        createUnionGraph();
+    }
+
+    protected void deactivate(final ComponentContext componentContext) {
+        componentContext.getBundleContext().removeBundleListener(this);
+    }    
+
+    private void registerExistingDocumentations(ComponentContext componentContext) {
+        Bundle[] bundles = componentContext.getBundleContext().getBundles();
+        for (Bundle bundle : bundles) {
+            if (bundle.getState() == Bundle.ACTIVE) {
+                registerDocumentation(bundle);
+            }
+        }
+    }
+
+    private void registerDocumentation(Bundle bundle) {
+        URL entry = bundle.getEntry(DOCUMENTATION_FILE);
+        if (entry == null) {
+            return;
+        }
+        MGraph docMGraph = getDocumentationMGraph(entry, bundle.getSymbolicName());
+        addAdditionalTriples(bundle, docMGraph);
+        bundle2DocGraphMap.put(bundle, docMGraph);
+        logger.info("Registered documentation of bundle: {}",
+                bundle.getSymbolicName());
+    }
+
+    private MGraph getDocumentationMGraph(URL docUrl, String symbolicName) {
+        try {
+            Graph parsedGraph = parser.parse(docUrl.openStream(),
+                    SupportedFormat.N_TRIPLE);
+            UriRef baseUri = config.getDefaultBaseUri();
+            return new SimpleMGraph(new UriMutatorIterator(
+                    parsedGraph.iterator(), baseUri.getUnicodeString(), symbolicName));
+        } catch (IOException ex) {
+            logger.warn("Cannot parse documentation at URL: {}", docUrl);
+            throw new RuntimeException(ex);
+        }
+    }
+
+    /**
+     * Adds triples that point from the bundle resource to its documentations.
+     *
+     * @param bundle
+     * @param docMGraph
+     */
+    private void addAdditionalTriples(Bundle bundle, MGraph docMGraph) {
+        UriRef bundleUri = new UriRef(bundle.getLocation());
+        Triple triple = new TripleImpl(bundleUri, RDF.type, OSGI.Bundle);
+        docMGraph.add(triple);
+        Iterator<Triple> titledContents = docMGraph.filter(null, RDF.type,
+                DISCOBITS.TitledContent);
+        Set<Triple> newTriples = new HashSet<Triple>();
+        for (Iterator<Triple> it = titledContents; it.hasNext();) {
+            NonLiteral titledContent = it.next().getSubject();
+            if (docMGraph.filter(null, DISCOBITS.holds, titledContent).hasNext()) {
+                continue;
+            }
+            triple = new TripleImpl(bundleUri, DOCUMENTATION.documentation,
+                    titledContent);
+            newTriples.add(triple);
+        }
+        docMGraph.addAll(newTriples);
+    }
+
+    private void unregisterDocumentation(Bundle bundle) {
+        bundle2DocGraphMap.remove(bundle);
+        logger.info("Unregistered documentation of bundle: {}",
+                bundle.getSymbolicName());
+    }
+
+    private void createUnionGraph() {
+        MGraph[] docGraphs = bundle2DocGraphMap.values().
+                toArray(new MGraph[bundle2DocGraphMap.size()]);
+        if (docGraphs.length > 0) {
+            unitedDocumentations = new SimpleGraph(new UnionMGraph(docGraphs), true);
+        } else {
+            unitedDocumentations = new SimpleGraph(new SimpleMGraph(), true);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/UriMutatorIterator.java
----------------------------------------------------------------------
diff --git a/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/UriMutatorIterator.java b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/UriMutatorIterator.java
new file mode 100644
index 0000000..c728a76
--- /dev/null
+++ b/platform/documentation/src/main/java/org/apache/clerezza/platform/documentation/UriMutatorIterator.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Iterator;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+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.TypedLiteral;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.core.impl.TypedLiteralImpl;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ * Replaces the <code>BASE_URI_PLACEHOLDER</code> in the <code>UriRef</code>s 
+ * as well as in the XML Literal of the <code>Triple</code>s provided by the
+ * specified <code>Iterator</code>s with the specified base URI.
+ *
+ * @author mir, hasan
+ */
+public class UriMutatorIterator implements Iterator<Triple> {
+
+    public static final Logger logger = LoggerFactory.getLogger(UriMutatorIterator.class);
+
+    private DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+
+    public static final UriRef XML_LITERAL =
+            new UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
+
+    public static final String BASE_URI_PLACEHOLDER = "bundle://";
+    private Iterator<Triple> wrapped;
+    private String baseUri;
+    /*
+     * The symbolic name of the bundle from which the documentation origins.
+     */
+    private String originBundleSymbName;
+
+    UriMutatorIterator(Iterator<Triple> wrapped, String baseUri,
+            String bundleSymbolicName) {
+        this.wrapped = wrapped;
+        this.baseUri = baseUri;
+        this.originBundleSymbName = bundleSymbolicName;
+    }
+
+    @Override
+    public boolean hasNext() {
+        return wrapped.hasNext();
+    }
+
+    @Override
+    public Triple next() {
+        Triple triple = wrapped.next();
+
+        NonLiteral subject = triple.getSubject();
+        if (subject instanceof UriRef) {
+            subject = replacePlaceHolder((UriRef) subject);
+        }
+        UriRef predicate = replacePlaceHolder(triple.getPredicate());
+
+        Resource object = triple.getObject();
+        if (object instanceof UriRef) {
+            object = replacePlaceHolder((UriRef) object);
+        } else if (object instanceof TypedLiteral) {
+            TypedLiteral literal = (TypedLiteral) object;
+            if (literal.getDataType().equals(XML_LITERAL)) {
+                object = replacePlaceHolderInUrl(literal);
+            }
+        }
+        return new TripleImpl(subject, predicate, object);
+    }
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    private UriRef replacePlaceHolder(UriRef uriRef) {
+        String orig = uriRef.getUnicodeString();
+        if (orig.startsWith(BASE_URI_PLACEHOLDER)) {
+            int nextSlash = orig.indexOf("/", BASE_URI_PLACEHOLDER.length());
+            String bundleSymbolicName;
+            if (nextSlash != BASE_URI_PLACEHOLDER.length()) {
+                bundleSymbolicName = orig.subSequence(
+                        BASE_URI_PLACEHOLDER.length(), nextSlash).toString();
+            } else {
+                bundleSymbolicName = originBundleSymbName;
+            }
+            return new UriRef(baseUri + "bundle-doc/" + bundleSymbolicName +
+                    orig.substring(nextSlash));
+        }
+        return uriRef;
+    }
+
+    private TypedLiteral replacePlaceHolderInUrl(TypedLiteral xmlLiteral) {
+        final String tagName = "infoBit";
+        final String openingTag = "<" + tagName + ">";
+        final String closingTag = "</" + tagName + ">";
+        String text = openingTag + xmlLiteral.getLexicalForm() + closingTag;
+
+        InputStream styleSheet = getClass().getResourceAsStream("baseUriTransformation.xsl");
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        StreamSource styleSource = new StreamSource(styleSheet);
+        try {
+            Transformer transformer = transformerFactory.newTransformer(styleSource);
+
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document document = builder.parse(new ByteArrayInputStream(text.getBytes("UTF-8")));
+            Source source = new DOMSource(document);
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(text.length());
+            Result result = new StreamResult(baos);
+
+            transformer.setParameter("baseUri", baseUri);
+            transformer.setParameter("originBundleSymbolicName", originBundleSymbName);
+            transformer.transform(source, result);
+
+            String resultedText = baos.toString("UTF-8");
+            int startIdx = resultedText.indexOf(openingTag) + openingTag.length();
+            int endIdx = resultedText.lastIndexOf(closingTag);
+            return new TypedLiteralImpl(resultedText.substring(startIdx, endIdx),
+                    XML_LITERAL);
+        } catch (SAXException se) {
+            logger.warn("SAXException {} while transforming xml literal: {}",
+                    se.getMessage(), text);
+        } catch (ParserConfigurationException pce) {
+            logger.warn("ParserConfigurationException {} while transforming xml literal: {}",
+                    pce.getMessage(), text);
+        } catch (TransformerException te) {
+            logger.warn("TransformerException {} while transforming xml literal: {}",
+                    te.getMessage(), text);
+        } catch (UnsupportedEncodingException uee) {
+            logger.warn("UnsupportedEncodingException {} while transforming xml literal: {}",
+                    uee.getMessage(), text);
+        } catch (IOException ioe) {
+            logger.warn("IOException {} while transforming xml literal: {}",
+                    ioe.getMessage(), text);
+        }
+        return xmlLiteral;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform/documentation/src/main/resources/META-INF/documentation.nt b/platform/documentation/src/main/resources/META-INF/documentation.nt
new file mode 100644
index 0000000..3f473b5
--- /dev/null
+++ b/platform/documentation/src/main/resources/META-INF/documentation.nt
@@ -0,0 +1,47 @@
+<bundle:///intro-content-el/0> <http://discobits.org/ontology#infoBit> "Any bundle may provide some user documentation. This documentation is provided by a file named \"documentation.nt\" in the META-INF directory of the bundle-jar. This file can provide multiple documentation resources described using the discobits ontology. The resources have UriRefs starting with \"bundle:///\", this will be replaced with http://&lt;hostname&gt;/bundle-doc/&lt;Bundle-SymbolicName&gt; by the documentation aggregator which provides the graph urn:x-localinstance:/documentation.graph containing the documentation of all installed bundles. To reference a documentation entry from another bundle the bundle-uri can contain a Borundle-SymbolicName after the second slash, e.g. bundle://org.apache.clerezza.platform.content/intro."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/1> <http://discobits.org/ontology#infoBit> "By convention any bundle documentation provides a resource named bundle:///intro introducing the functionality of the bundle."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/2-content-el/0> <http://discobits.org/ontology#infoBit> "The recommended way to create and edit the documentation of a bundle is as follows:<ul xmlns=\"http://www.w3.org/1999/xhtml\"><li>Launch clerezza (in the following we assume its running on localhost:8080)</li><li>Install and start the stable n-triples serialization provider (to make the stored files more suitable for version control) by entering on the commmand line: <code>start(\"mvn:org.apache.clerezza/rdf.stable.serializer\")</code></li>\n<li>Install and start the file storage provider(to access local rdf files as named graphs)  by entering on the commmand line: <code>start(\"mvn:org.apache.clerezza/rdf.file.storage\")</code><code></code></li><li>If it doesn't exist yet create an empty file src/main/resources/META-INF/documentation.nt in the project to be documented and </li><li>Open http://localhost:8080/tools/editor/, enter the file-uri of the previously created file as Graph and a bundle-uri (
 such as bundle:///intro) as resource</li><li>edit, save, ship your bundle</li></ul>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/2-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/2-content> <http://discobits.org/ontology#contains> _:dca98a68e3413be1e9bb3f4e56f5cc561 . 
+<bundle:///intro-content-el/2-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///intro-content-el/2-title> <http://discobits.org/ontology#infoBit> "Writing Documentation"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-content-el/2-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro-content-el/2> <http://discobits.org/ontology#contains> _:005cab2e8f532d75dbe6021467d5f7191 . 
+<bundle:///intro-content-el/2> <http://discobits.org/ontology#contains> _:3682407f1c90d02dcf9dbf4e83d964f51 . 
+<bundle:///intro-content-el/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:0c33aa960ad81e72549c579dd55074231 . 
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:16fd3882eda078006a6b02abb28816da1 . 
+<bundle:///intro-content> <http://discobits.org/ontology#contains> _:da78c47eff7d6e6f75a17d01572cb4d81 . 
+<bundle:///intro-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
+<bundle:///intro-title> <http://discobits.org/ontology#infoBit> "Platform Documentation Aggregator"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
+<bundle:///intro-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
+<bundle:///intro> <bundle:///nullafter> <bundle://org.apache.clerezza.platform.content/discobits-editor> .
+<bundle:///intro> <http://discobits.org/ontology#contains> _:2d0db51a9a2a40d89460edf6544edbad1 . 
+<bundle:///intro> <http://discobits.org/ontology#contains> _:566a75916142ac411441d067f09a49f71 . 
+<bundle:///intro> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
+_:005cab2e8f532d75dbe6021467d5f7191 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/2-content> . 
+_:005cab2e8f532d75dbe6021467d5f7191 <http://discobits.org/ontology#pos> "1" . 
+_:005cab2e8f532d75dbe6021467d5f7191 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:0c33aa960ad81e72549c579dd55074231 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/2> . 
+_:0c33aa960ad81e72549c579dd55074231 <http://discobits.org/ontology#pos> "2" . 
+_:0c33aa960ad81e72549c579dd55074231 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:16fd3882eda078006a6b02abb28816da1 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/0> . 
+_:16fd3882eda078006a6b02abb28816da1 <http://discobits.org/ontology#pos> "0" . 
+_:16fd3882eda078006a6b02abb28816da1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:2d0db51a9a2a40d89460edf6544edbad1 <http://discobits.org/ontology#holds> <bundle:///intro-title> . 
+_:2d0db51a9a2a40d89460edf6544edbad1 <http://discobits.org/ontology#pos> "0" . 
+_:2d0db51a9a2a40d89460edf6544edbad1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:3682407f1c90d02dcf9dbf4e83d964f51 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/2-title> . 
+_:3682407f1c90d02dcf9dbf4e83d964f51 <http://discobits.org/ontology#pos> "0" . 
+_:3682407f1c90d02dcf9dbf4e83d964f51 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#holds> <bundle:///intro-content> . 
+_:566a75916142ac411441d067f09a49f71 <http://discobits.org/ontology#pos> "1" . 
+_:566a75916142ac411441d067f09a49f71 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:da78c47eff7d6e6f75a17d01572cb4d81 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/1> . 
+_:da78c47eff7d6e6f75a17d01572cb4d81 <http://discobits.org/ontology#pos> "1" . 
+_:da78c47eff7d6e6f75a17d01572cb4d81 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 
+_:dca98a68e3413be1e9bb3f4e56f5cc561 <http://discobits.org/ontology#holds> <bundle:///intro-content-el/2-content-el/0> . 
+_:dca98a68e3413be1e9bb3f4e56f5cc561 <http://discobits.org/ontology#pos> "0" . 
+_:dca98a68e3413be1e9bb3f4e56f5cc561 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> . 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/main/resources/org/apache/clerezza/platform/documentation/baseUriTransformation.xsl
----------------------------------------------------------------------
diff --git a/platform/documentation/src/main/resources/org/apache/clerezza/platform/documentation/baseUriTransformation.xsl b/platform/documentation/src/main/resources/org/apache/clerezza/platform/documentation/baseUriTransformation.xsl
new file mode 100644
index 0000000..9767343
--- /dev/null
+++ b/platform/documentation/src/main/resources/org/apache/clerezza/platform/documentation/baseUriTransformation.xsl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+	<xsl:param name="baseUri"/>
+	<xsl:param name="originBundleSymbolicName"/>
+	<xsl:template match="@*|node()">
+		<xsl:copy>
+			<xsl:apply-templates select="@*|node()"/>
+		</xsl:copy>
+	</xsl:template>
+
+	<xsl:template match="@href[parent::a]">
+		<xsl:attribute name="href">
+			<xsl:choose>
+				<xsl:when test="starts-with(.,'bundle:///')">
+					<xsl:value-of select="concat($baseUri,'bundle-doc/',$originBundleSymbolicName,substring-after(.,'bundle://'))"/>
+				</xsl:when>
+				<xsl:when test="starts-with(.,'bundle://')">
+					<xsl:value-of select="concat($baseUri,'bundle-doc/',substring-after(.,'bundle://'))"/>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:value-of select="."/>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:attribute>
+	</xsl:template>
+</xsl:stylesheet>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation/src/test/java/org/apache/clerezza/platform/documentation/UriMutatorIteratorTest.java
----------------------------------------------------------------------
diff --git a/platform/documentation/src/test/java/org/apache/clerezza/platform/documentation/UriMutatorIteratorTest.java b/platform/documentation/src/test/java/org/apache/clerezza/platform/documentation/UriMutatorIteratorTest.java
new file mode 100644
index 0000000..652dd1c
--- /dev/null
+++ b/platform/documentation/src/test/java/org/apache/clerezza/platform/documentation/UriMutatorIteratorTest.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.documentation;
+
+import java.util.Iterator;
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.clerezza.rdf.core.Literal;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.core.impl.TypedLiteralImpl;
+
+/**
+ *
+ * @author mir
+ */
+public class UriMutatorIteratorTest {
+
+    private static final String HOST = "http://localhost:8282/";
+
+    private static String ORIGIN_BUNDLE_NAME = "my.symbolic.name";
+
+    private static String REFERENCED_BUNDLE_NAME = "your.symbolic.name";
+
+    @Test
+    public void testMutator() {
+        MGraph mGraph = new SimpleMGraph();
+        UriRef uriRef = new UriRef(UriMutatorIterator.BASE_URI_PLACEHOLDER +
+                REFERENCED_BUNDLE_NAME + "/bla#Test");
+        UriRef expectedUriRef = new UriRef(HOST + 
+                "bundle-doc/"+ REFERENCED_BUNDLE_NAME +"/bla#Test");
+        mGraph.add(new TripleImpl(uriRef, uriRef, uriRef));
+        Iterator<Triple> it = new UriMutatorIterator(mGraph.iterator(), HOST,
+                ORIGIN_BUNDLE_NAME);
+        Triple expectedTriple = new TripleImpl(expectedUriRef, expectedUriRef,
+                expectedUriRef);
+        Assert.assertEquals(expectedTriple, it.next());        
+    }
+
+    @Test
+    public void testMutatorNoSymbolicName() {
+        MGraph mGraph = new SimpleMGraph();
+        UriRef uriRef = new UriRef(UriMutatorIterator.BASE_URI_PLACEHOLDER +
+                "/bla#Test");
+        UriRef expectedUriRef = new UriRef(HOST +
+                "bundle-doc/"+ ORIGIN_BUNDLE_NAME +"/bla#Test");
+        mGraph.add(new TripleImpl(uriRef, uriRef, uriRef));
+        Iterator<Triple> it = new UriMutatorIterator(mGraph.iterator(), HOST,
+                ORIGIN_BUNDLE_NAME);
+        Triple expectedTriple = new TripleImpl(expectedUriRef, expectedUriRef,
+                expectedUriRef);
+        Assert.assertEquals(expectedTriple, it.next());
+    }
+
+    @Test
+    public void baseUriTransformation() {
+        MGraph mGraph = new SimpleMGraph();
+        String xml = "<a href=\"" + UriMutatorIterator.BASE_URI_PLACEHOLDER +
+            REFERENCED_BUNDLE_NAME + "/bla\"/>";
+        Literal literal = new TypedLiteralImpl(xml,
+                    UriMutatorIterator.XML_LITERAL);
+        String expectedXml = "<a href=\"" + HOST + 
+            "bundle-doc/"+ REFERENCED_BUNDLE_NAME +"/bla\"/>";
+        Literal expectedLiteral = new TypedLiteralImpl(expectedXml,
+                    UriMutatorIterator.XML_LITERAL);
+        UriRef uriRef = new UriRef("bla");
+            mGraph.add(new TripleImpl(uriRef, uriRef, literal));
+        Iterator<Triple> it = new UriMutatorIterator(mGraph.iterator(), HOST,
+                ORIGIN_BUNDLE_NAME);
+        Triple expectedTriple = new TripleImpl(uriRef, uriRef,
+                expectedLiteral);
+        Assert.assertEquals(expectedTriple, it.next());
+    }
+
+    @Test
+    public void baseUriTransformationNoSymbolicName() {
+        MGraph mGraph = new SimpleMGraph();
+        String xml = "<a href=\"" + UriMutatorIterator.BASE_URI_PLACEHOLDER +
+            "/bla\"/>";
+        Literal literal = new TypedLiteralImpl(xml,
+                    UriMutatorIterator.XML_LITERAL);
+        String expectedXml = "<a href=\"" + HOST +
+            "bundle-doc/"+ ORIGIN_BUNDLE_NAME +"/bla\"/>";
+        Literal expectedLiteral = new TypedLiteralImpl(expectedXml,
+                    UriMutatorIterator.XML_LITERAL);
+        UriRef uriRef = new UriRef("bla");
+            mGraph.add(new TripleImpl(uriRef, uriRef, literal));
+        Iterator<Triple> it = new UriMutatorIterator(mGraph.iterator(), HOST,
+                ORIGIN_BUNDLE_NAME);
+        Triple expectedTriple = new TripleImpl(uriRef, uriRef,
+                expectedLiteral);
+        Assert.assertEquals(expectedTriple, it.next());
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/LICENSE
----------------------------------------------------------------------
diff --git a/platform/editor/LICENSE b/platform/editor/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/editor/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/nbactions.xml
----------------------------------------------------------------------
diff --git a/platform/editor/nbactions.xml b/platform/editor/nbactions.xml
new file mode 100644
index 0000000..9690e1a
--- /dev/null
+++ b/platform/editor/nbactions.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+  <action>
+    <actionName>CUSTOM-deploy to localhost:8080</actionName>
+    <displayName>deploy to localhost:8080</displayName>
+    <goals>
+      <goal>install</goal>
+      <goal>org.apache.sling:maven-sling-plugin:install</goal>
+    </goals>
+  </action>
+</actions>


[82/87] [abbrv] clerezza git commit: CLEREZZA-982: changed package name in ssp implicit header

Posted by re...@apache.org.
CLEREZZA-982: changed package name in ssp implicit header

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

Branch: refs/heads/master
Commit: de2a6d18330c7b7e2152b69c629abdb1a8c31c53
Parents: f2811c7
Author: Reto Gmuer <re...@apache.org>
Authored: Sun Apr 12 10:30:24 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Sun Apr 12 10:30:24 2015 +0000

----------------------------------------------------------------------
 .../platform/typerendering/scalaserverpages/implicit-header.txt    | 2 +-
 .../typerendering/scalaserverpages/typerenderlet-header.txt        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/de2a6d18/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
index 236786c..818632e 100644
--- a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
+++ b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/implicit-header.txt
@@ -4,7 +4,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
-import org.apache.commons.rdf._
+import org.apache.clerezza.commons.rdf._
 import javax.ws.rs.core.UriInfo
 
  class CompiledScalaServerPage extends AbstractRenderlet {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/de2a6d18/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/typerenderlet-header.txt
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/typerenderlet-header.txt b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/typerenderlet-header.txt
index 9b4444d..507661d 100644
--- a/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/typerenderlet-header.txt
+++ b/platform/typerendering.scalaserverpages/src/main/resources/org/apache/clerezza/platform/typerendering/scalaserverpages/typerenderlet-header.txt
@@ -5,6 +5,7 @@ import org.apache.clerezza.rdf.scala.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
 import javax.ws.rs.core.UriInfo
+import org.apache.clerezza.commons.rdf._
 
  class CompiledScalaServerPage extends SRenderlet {
 


[03/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java b/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
deleted file mode 100644
index c58865c..0000000
--- a/platform/platform.content.representations/platform.content.representations.core/src/main/java/org/apache/clerezza/platform/content/representations/core/ThumbnailService.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.representations.core;
-
-import java.net.URL;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.DefaultValue;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.platform.config.PlatformConfig;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.Literal;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.ontologies.DISCOBITS;
-import org.apache.clerezza.rdf.ontologies.EXIF;
-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;
-import org.apache.felix.scr.annotations.Services;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * This JAX-RS resource provides a method to retrieve the uri to
- * the thumbnail or a other small representation of a InfoDiscoBit.
- *
- * @author mir
- */
-@Component
-@Services({
-    @Service(Object.class),
-    @Service(ThumbnailService.class)
-})
-
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("thumbnail-service")
-public class ThumbnailService implements BundleListener {
-
-    @Reference
-    ContentGraphProvider cgProvider;
-    @Reference
-    PlatformConfig config;
-    @Reference
-    AlternativeRepresentationGenerator altRepGen;
-    private static final Logger log = LoggerFactory.getLogger(ThumbnailService.class);
-    private BundleContext bundleContext;
-    private String STATICWEB_PATH = "/CLEREZZA-INF/web-resources/style/";
-    private String MEDIA_TYPE_BASE_PATH = STATICWEB_PATH + "images/icons/mediatype/";
-    private Bundle cachedStyleBundle = null;
-    private Map<MediaType, String> mediaTypeIconUriCache =
-            Collections.synchronizedMap(new HashMap<MediaType, String>());
-
-    protected void activate(ComponentContext context) {
-        bundleContext = context.getBundleContext();
-        bundleContext.addBundleListener(this);
-    }
-
-    protected void deactivate(ComponentContext context) {
-        bundleContext.removeBundleListener(this);
-        bundleContext = null;
-        mediaTypeIconUriCache.clear();
-    }
-
-    /**
-     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
-     * specified over the query parameter "uri". The thumbnails
-     * maximum width and height can optionally be specified over the query parameters
-     * "width" and "height". Futhermore there is the optional "exact" parameter,
-     * which specifies if the thumbnail must have the exact width and height as
-     * specified or not (default is "false"). If more than one acceptable thumbnail
-     * is available then the thumbnail uri of the thumbnail with the highest resolution
-     * (width * height) is returned. If no thumbnail is available and the logged
-     * in user has the write permission for the content graph, then an attempt is
-     * made to create the thumbnail on the fly. If this fails or the write permission
-     * is missing, then the uri of the icon representing the media type is returned.
-     * If also no media type icon is available the uri to default icon is returned.
-     *
-     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
-     *        be returned
-     * @param height the maximum height that the thumbnail has
-     * @param width the maximum width that the thumbnail has
-     * @param exact boolean that specifies if the return thumbnail should have
-     *        the exact width and height.
-     * @return
-     */
-    @GET
-    public Response getThumbnailUri(@QueryParam("uri") UriRef infoBitUri,
-            @QueryParam("width") Integer width, @QueryParam("height") Integer height,
-            @DefaultValue("false") @QueryParam("exact") Boolean exact, @Context UriInfo uriInfo) {
-        return RedirectUtil.createSeeOtherResponse(
-                getThumbnailUri(infoBitUri, width, height, exact).getUnicodeString(), uriInfo);
-    }
-
-
-    /**
-     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
-     * specified over the query parameter "uri". The thumbnails
-     * maximum width and height can optionally be specified over the query parameters
-     * "width" and "height". If more than one acceptable thumbnail is available
-     * then the thumbnail uri of the thumbnail with the highest resolution
-     * (width * height) is returned. If no thumbnail is available and the logged
-     * in user has the write permission for the content graph, then an attempt is
-     * made to create the thumbnail on the fly. If this fails or the write permission
-     * is missing, then the uri of the icon representing the media type is returned.
-     * If also no media type icon is available the uri to default icon is returned.
-     *
-     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
-     *        be returned
-     * @param height the maximum height that the thumbnail has
-     * @param width the maximum width that the thumbnail has
-     * @return
-     */
-    public UriRef getThumbnailUri(UriRef infoBitUri, Integer width,  Integer height) {
-        return getThumbnailUri(infoBitUri, width, height, false);
-    }
-
-    /**
-     * Returns the thumbnail uri for a InfoDiscoBit which is located at the uri
-     * specified over the query parameter "uri". The thumbnails
-     * maximum width and height can optionally be specified over the query parameters
-     * "width" and "height". Futhermore there is the optional "exact" parameter,
-     * which specifies if the thumbnail must have the exact width and height as
-     * specified or not. If more than one acceptable thumbnail is available then
-     * the thumbnail uri of the thumbnail with the highest resolution (width * height)
-     * is returned. If no thumbnail is available and the logged in user has the write
-     * permission for the content graph, then an attempt is made to create the
-     * thumbnail on the fly. If this fails or the write permission is missing, then
-     * the uri of the icon representing the media type is returned. If also no
-     * media type icon is available the uri to default icon is returned.
-     *
-     * @param infoBitUri the uri of the infoDiscoBit of which the thumbnail uri should
-     *        be returned
-     * @param height the maximum height that the thumbnail has
-     * @param width the maximum width that the thumbnail has
-     * @param exact boolean that specifies if the return thumbnail should have
-     *        the exact width and height.
-     * @return
-     */
-    public UriRef getThumbnailUri(UriRef infoBitUri, Integer width,  Integer height,
-            boolean exact) {
-        if ((width == null) && (height == null)) {
-            throw new IllegalArgumentException("height and/or width must be specified");
-        }
-        if (width == null) {
-            width = Integer.MAX_VALUE;
-        }
-        if (height == null) {
-            height = Integer.MAX_VALUE;
-        }
-        GraphNode infoBitNode = new GraphNode(infoBitUri, cgProvider.getContentGraph());
-        UriRef thumbnailUri = getGeneratedThumbnailUri(infoBitNode, width, height, exact);
-        if (thumbnailUri == null) {
-            Literal mediaTypeLiteral = null;
-            Lock readLock = infoBitNode.readLock();
-            readLock.lock();
-            try {
-                Iterator<Resource> mediaTypes = infoBitNode.getObjects(DISCOBITS.mediaType);
-                if (mediaTypes.hasNext()) {
-                    mediaTypeLiteral = (Literal) mediaTypes.next();
-                }
-            } finally {
-                readLock.unlock();
-            }
-            if (mediaTypeLiteral != null) {
-                MediaType mediaType = MediaType.valueOf(mediaTypeLiteral.getLexicalForm());
-                // if the infoBit is an image, create a thumbnail on the fly.
-                if (mediaType.getType().startsWith("image")) {
-                    try {
-                        thumbnailUri = altRepGen.generateAlternativeImage(infoBitNode, width,
-                                height, exact);
-                    } catch (Exception ex) {
-                        ex.printStackTrace();
-                        // Was worth a try. eLets go on
-                    }
-                }
-                if (thumbnailUri == null) {
-                    String iconUri = mediaTypeIconUriCache.get(mediaType);
-                    if (iconUri == null) {
-                        iconUri = getMediaTypeIconUri(mediaType);
-                        mediaTypeIconUriCache.put(mediaType, iconUri);
-                    }
-                    thumbnailUri = new UriRef(iconUri);
-                }
-            }
-        }
-        if (thumbnailUri == null) {
-            thumbnailUri = new UriRef(getDefaultIconUrl(getStyleBundle()));
-        }
-        return thumbnailUri;
-    }
-
-    private String getMediaTypeIconUri(MediaType mediaType) {
-        Bundle styleBundle = getStyleBundle();
-        if (styleBundle == null) {
-            throw new RuntimeException("no style bundle found");
-        }
-        String path = MEDIA_TYPE_BASE_PATH + mediaType.getType() + "/";
-        Enumeration entries = styleBundle.findEntries(path,
-                mediaType.getSubtype() + ".*", false);
-        String iconUri = createIconUri(entries);
-        if (iconUri != null) {
-            return iconUri;
-        }
-        entries = styleBundle.findEntries(path, "any.*", false);
-        iconUri = createIconUri(entries);
-        if (iconUri != null) {
-            return iconUri;
-        }
-        return getDefaultIconUrl(styleBundle);
-    }
-
-    private String getDefaultIconUrl(Bundle bundle) {
-        Enumeration entries = bundle.findEntries(MEDIA_TYPE_BASE_PATH, "any.*", false);
-        String iconUri = createIconUri(entries);
-        if (iconUri != null) {
-            return iconUri;
-        } else {
-            throw new RuntimeException("No default icon found");
-        }
-    }
-
-    private String createIconUri(Enumeration entries) {
-        if (entries != null && entries.hasMoreElements()) {
-            URL iconUrl = (URL) entries.nextElement();
-            return iconUrl.getPath().replace(STATICWEB_PATH, "style/");
-        }
-        return null;
-    }
-
-    private UriRef getGeneratedThumbnailUri(GraphNode infoBitNode,
-            Integer width, Integer height, boolean exact) {
-        if (isFittingImage(infoBitNode, width, height, exact)) {
-            return (UriRef) infoBitNode.getNode();
-        }
-        UriRef resultThumbnailUri = null;
-        int pixels = 0;
-        Lock readLock = infoBitNode.readLock();
-        readLock.lock();
-        try {
-            Iterator<Resource> thumbnails = infoBitNode.getObjects(DISCOBITS.thumbnail);
-            while (thumbnails.hasNext()) {
-                UriRef thumbnailUri = (UriRef) thumbnails.next();
-                GraphNode thumbnailNode = new GraphNode(thumbnailUri,
-                        cgProvider.getContentGraph());
-                int thumbnailPixels = getSurfaceSizeIfFitting(thumbnailNode, width, height, exact);
-                if (thumbnailPixels > pixels) {
-                    if (exact) {
-                        return thumbnailUri;
-                    }
-                    resultThumbnailUri = thumbnailUri;
-                    pixels = thumbnailPixels;
-                }
-            }
-        } finally {
-            readLock.unlock();
-        }
-        return resultThumbnailUri;
-    }
-
-    /**
-     * returns the surface in pixel if the image fits withing width and height,
-     * or -1 if it doesn't fit
-     */
-    private int getSurfaceSizeIfFitting(GraphNode infoBitNode, Integer width, Integer height,
-            boolean exact) {
-        Resource imageRes = infoBitNode.getNode();
-        if (imageRes instanceof UriRef) {
-            String imageUri = ((UriRef)imageRes).getUnicodeString();
-            if (!exact && imageUri.contains(AlternativeRepresentationGenerator.EXACT_APPENDIX)) {
-                return -1;
-            }
-        }        
-        Iterator<Resource> exifWidths = infoBitNode.getObjects(EXIF.width);
-        Iterator<Resource> exifHeights = infoBitNode.getObjects(EXIF.height);
-        if (!exifWidths.hasNext() || !exifHeights.hasNext()) {
-            log.warn(infoBitNode.getNode() + " doesn't have exif:width and exif:height");
-            return -1;
-        }
-        int thumbnailWidth = LiteralFactory.getInstance().createObject(
-                Integer.class, (TypedLiteral) exifWidths.next());
-        int thumbnailHeight = LiteralFactory.getInstance().createObject(
-                Integer.class, (TypedLiteral) exifHeights.next());
-        if (exact) {
-            if (thumbnailHeight == height && thumbnailWidth == width) {
-                return 1;
-            }
-        } else {
-            if (thumbnailHeight <= height && thumbnailWidth <= width) {
-                return thumbnailWidth * thumbnailHeight;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * returns true if infoBitNode is an image and fits
-     */
-    private boolean isFittingImage(GraphNode infoBitNode, Integer width, Integer height,
-            boolean exact) {
-        Lock readLock = infoBitNode.readLock();
-        readLock.lock();
-        try {
-            final Iterator<Literal> mediaTypesIter = infoBitNode.getLiterals(DISCOBITS.mediaType);
-            if (!mediaTypesIter.hasNext()) {
-                return false;
-            }
-            if (mediaTypesIter.next().getLexicalForm().startsWith("image")) {
-                return getSurfaceSizeIfFitting(infoBitNode, width, height, exact) > -1;
-            } else {
-                return false;
-            }
-        } finally {
-            readLock.unlock();
-        }
-    }
-
-    private synchronized Bundle getStyleBundle() {
-        if (cachedStyleBundle != null) {
-            return cachedStyleBundle;
-        }
-        Bundle[] bundles = bundleContext.getBundles();
-        for (Bundle bundle : bundles) {
-            URL staticWebPathURL = bundle.getEntry(STATICWEB_PATH);
-            if (staticWebPathURL != null) {
-                cachedStyleBundle = bundle;
-                return bundle;
-            }
-        }
-        return null;
-    }
-
-    @Override
-    public synchronized void bundleChanged(BundleEvent be) {
-        if (be.getType() == BundleEvent.UNINSTALLED
-                && be.getBundle().equals(cachedStyleBundle)) {
-            cachedStyleBundle = null;
-            cachedStyleBundle = getStyleBundle();
-            mediaTypeIconUriCache.clear();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.ontologies/LICENSE b/platform/platform.content.representations/platform.content.representations.ontologies/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content.representations/platform.content.representations.ontologies/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.ontologies/pom.xml b/platform/platform.content.representations/platform.content.representations.ontologies/pom.xml
deleted file mode 100644
index 41cfd94..0000000
--- a/platform/platform.content.representations/platform.content.representations.ontologies/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.content.representations</artifactId>
-        <version>0.2</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.representations.ontologies</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content Representations Ontologies</name>
-    <description>
-        Representations Ontologies
-    </description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.clerezza</groupId>
-                <artifactId>maven-ontologies-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <configuration>
-                            <resourcePath>${basedir}/src/main/resources</resourcePath>
-                            <sources>
-                                <source>${basedir}/target/generated-sources/main/java</source>
-                            </sources>
-                        </configuration>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>0.4</version>
-        </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf b/platform/platform.content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
deleted file mode 100644
index 01e604d..0000000
--- a/platform/platform.content.representations/platform.content.representations.ontologies/src/main/resources/org/apache/clerezza/platform/content/representations/ontologies/representations.rdf
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2009/12/representations#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Clerezza Content Representations
-	</dc:title>
-</owl:Ontology>
-
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="http://clerezza.org/2009/12/representations#isIconFor">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">is icon for</rdfs:label>
-	<skos:definition xml:lang="en">Points to a string specifying the resource type for which the subject is an icon.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/12/representations#" />
-	<rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Image" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
-</rdf:Property>
-</rdf:RDF>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content.representations/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content.representations/pom.xml b/platform/platform.content.representations/pom.xml
deleted file mode 100644
index 0327c26..0000000
--- a/platform/platform.content.representations/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.content.representations</artifactId>
-    <packaging>pom</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - Platform Content Representations</name>
-    <description>Provides services for creating and retrieving alternative representations of content.</description>
-    
-    <modules>
-        <module>platform.content.representations.ontologies</module>
-        <module>platform.content.representations.core</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.content/LICENSE b/platform/platform.content/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.content/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.content/pom.xml b/platform/platform.content/pom.xml
deleted file mode 100644
index 0cb5e24..0000000
--- a/platform/platform.content/pom.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- 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>
-        <relativePath>../parent</relativePath>
-    </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>
-    <dependencies>
-        <dependency>
-            <groupId>org.osgi</groupId>
-             <artifactId>org.osgi.core</artifactId>
-         </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-             <artifactId>org.osgi.compendium</artifactId>
-         </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typehandlerspace</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.graphnodeprovider</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.seedsnipe</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>javax.servlet</artifactId>
-                    <groupId>org.apache.felix</groupId>
-                </exclusion>
-            </exclusions>
-            <version>0.10</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wymiwyg</groupId>
-            <artifactId>wymiwyg-commons-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.felix</groupId>
-            <artifactId>org.apache.felix.scr.annotations</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4</version>
-        </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>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.metadata</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core.test</artifactId>
-            <scope>test</scope>
-            <version>0.15</version>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza.ext</groupId>
-            <artifactId>slf4j-scala-api</artifactId>
-            <version>1.6.3</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>net.sf.alchim</groupId>
-                <artifactId>yuicompressor-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
deleted file mode 100644
index e605c40..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/AbstractDiscobitsHandler.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.core.MediaType;
-import org.apache.clerezza.platform.content.collections.CollectionCreator;
-
-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;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * @author reto
- */
-public abstract class AbstractDiscobitsHandler implements DiscobitsHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(AbstractDiscobitsHandler.class);
-
-    /**
-     *
-     * @return the MGraph to be used to retrieve and create discobits
-     */
-    protected abstract MGraph getMGraph();
-
-    /**
-     * A <code>Set</code> containing <code>MetaDataGenerator</code>s to be used
-     * to add meta data to data putted by the handler.
-     *
-     * @return a Set containing meta data generators
-     */
-    protected abstract Set<MetaDataGenerator> getMetaDataGenerators();
-
-    
-    @Override
-    public void put(UriRef infoDiscoBitUri, MediaType mediaType,
-            byte[] data) {
-
-        GraphNode infoDiscoBitNode;
-        final LockableMGraph mGraph = (LockableMGraph) getMGraph();
-        infoDiscoBitNode = new GraphNode(infoDiscoBitUri, mGraph);
-        CollectionCreator collectionCreator = new CollectionCreator(mGraph);
-        collectionCreator.createContainingCollections(infoDiscoBitUri);
-        Lock writeLock = mGraph.getLock().writeLock();
-        writeLock.lock();
-        try {
-            infoDiscoBitNode.addProperty(RDF.type, DISCOBITS.InfoDiscoBit);
-            TypedLiteral dataLiteral = LiteralFactory.getInstance().createTypedLiteral(data);
-            infoDiscoBitNode.deleteProperties(DISCOBITS.infoBit);
-            infoDiscoBitNode.addProperty(DISCOBITS.infoBit, dataLiteral);
-            TypedLiteral mediaTypeLiteral = LiteralFactory.getInstance().createTypedLiteral(mediaType.toString());
-            infoDiscoBitNode.deleteProperties(DISCOBITS.mediaType);
-            infoDiscoBitNode.addProperty(DISCOBITS.mediaType,mediaTypeLiteral);
-        } finally {
-            writeLock.unlock();
-        }
-        Set<MetaDataGenerator> metaDataGenerators = getMetaDataGenerators();
-        synchronized(metaDataGenerators) {
-            for(MetaDataGenerator generator : metaDataGenerators) {
-                try {
-                    generator.generate(infoDiscoBitNode, data, mediaType);
-                } catch (RuntimeException ex) {
-                    logger.error("Exception in MetaDataGenerator ", ex);
-                }
-            }
-        }
-    }
-
-    @Override
-    public  void remove(NonLiteral node) {
-        MGraph mGraph = getMGraph();        
-        Iterator<Triple> properties = mGraph.filter(node, null, null);
-        //copying properties to set, as we're modifying underlying graph
-        Set<Triple> propertiesSet = new HashSet<Triple>();
-        while (properties.hasNext()) {
-            propertiesSet.add(properties.next());
-        }
-        properties = propertiesSet.iterator();
-        while (properties.hasNext()) {
-            Triple triple = properties.next();
-            UriRef predicate = triple.getPredicate();
-            if (predicate.equals(DISCOBITS.contains)) {
-                try {
-                    GraphNode containedNode = new GraphNode((NonLiteral)triple.getObject(), mGraph);
-                    //The following includes triple
-                    containedNode.deleteNodeContext();
-                } catch (ClassCastException e) {
-                    throw new RuntimeException("The value of "+predicate+" is expected not to be a literal");
-                }
-                //as some other properties of node could have been in the context of the object
-                remove(node);
-                return;
-            }            
-        }
-        GraphNode graphNode = new GraphNode(node, mGraph);
-        graphNode.deleteNodeContext();
-    }
-
-    @Override
-    public byte[] getData(UriRef uriRef) {
-        MGraph mGraph = getMGraph();
-        GraphNode node = new GraphNode(uriRef, mGraph);
-        final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
-        if (infoDiscobit == null) {
-            return null;
-        }
-        return infoDiscobit.getData();
-    }
-
-    @Override
-    public MediaType getMediaType(UriRef uriRef) {
-        MGraph mGraph = getMGraph();
-        GraphNode node = new GraphNode(uriRef, mGraph);
-        final InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(node);
-        if (infoDiscobit == null) {
-            return null;
-        }
-        return MediaType.valueOf(infoDiscobit.getContentType());
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
deleted file mode 100644
index 5bcf1af..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/CollectionTypeHandler.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.clerezza.platform.content;
-
-import java.net.URL;
-import java.util.Map;
-import javax.ws.rs.GET;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.clerezza.platform.content.WebDavUtils.PropertyMap;
-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;
-import org.apache.clerezza.platform.content.webdav.COPY;
-import org.apache.clerezza.platform.content.webdav.LOCK;
-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.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.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.felix.scr.annotations.Services;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * Provides HTTP Methods for WebDav
- * 
- * @author ali
- */
-
-@Component
-@Services({
-    @Service(Object.class),
-    @Service(CollectionTypeHandler.class)
-})
-@Property(name = "org.apache.clerezza.platform.typehandler", boolValue = true)
-@SupportedTypes(types = { "http://clerezza.org/2009/09/hierarchy#Collection" }, prioritize = true)
-public class CollectionTypeHandler extends DiscobitsTypeHandler{
-
-    private Logger logger = LoggerFactory.getLogger(CollectionTypeHandler.class);
-    
-    @Reference
-    private RenderletManager renderletManager;
-
-    /**
-     * The activate method is called when SCR activates the component configuration.
-     * This method gets the system graph or create a new one if it doesn't exist.
-     *
-     * @param componentContext
-     */
-    protected void activate(ComponentContext componentContext) {
-        URL templateURL = getClass().getResource("collection.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(templateURL.toString()), HIERARCHY.Collection,
-                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        logger.info("CollectionTypeHandler activated.");
-    }
-
-    /**
-     * Returns a GraphNode of the requested collection
-     * @return 
-     */
-    @GET
-    @Override
-    public GraphNode getResource(@Context UriInfo uriInfo) {
-        final MGraph contentGraph = cgProvider.getContentGraph();
-        final String uriString = uriInfo.getAbsolutePath().toString();
-        final UriRef indexUri = new UriRef(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 GraphNode graphNode = new GraphNode(uri, mGraph);
-        graphNode.addProperty(RDF.type, PLATFORM.HeadedPage);
-
-        UriRef collectionUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        return graphNode;
-    }
-
-    @Override
-    Map<UriRef, 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,
-            String depthHeader) {
-        Map<UriRef, PropertyMap> result;
-        NodeList children = requestNode.getChildNodes();
-        result = WebDavUtils.getPropsByName(children, node, depthHeader,
-                true /* includeValues */);
-        return result;
-    }
-
-    @Override
-    Map<UriRef, PropertyMap> getAllProps(GraphNode node, String depthHeader) {
-        return WebDavUtils.getCollectionProps(null, null, null, node,
-                            depthHeader, true /* includeValues */);
-    }
-
-    /*-----------------------*
-     * Not Supported Methods * 
-     *-----------------------*/
-    
-    /**
-     * Locks a resource
-     *
-     * @return returns a 501 Not Implemented response
-     */
-    @LOCK
-    public Object lock() {
-        return Response.status(501/* Not Implemented */).build();
-    }
-
-    /**
-     * Unlocks a resource
-     *
-     * @return returns a 501 Not Implemented response
-     */
-    @UNLOCK
-    public Object unlock() {
-        return Response.status(501/* Not Implemented */).build();
-    }
-
-    /**
-     * Copies a resource
-     *
-     * @return returns a 501 Not Implemented response
-     */
-    @COPY
-    public Object copy() {
-        return Response.status(501/* Not Implemented */).build();
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
deleted file mode 100644
index 6a7db15..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/ContentPostSupport.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-
-import java.net.URI;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-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.rdf.ontologies.RDF;
-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;
-
-/**
- * This Jax-rs root resource provides a method to post content to the content
- * graph
- *
- * @author mir
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("content")
-public class ContentPostSupport {
-    
-    @Reference
-    private DiscobitsHandler handler;
-
-    @Reference
-    private ContentGraphProvider cgProvider;
-
-    /**
-     * Creates an InfoDiscoBt (aka Binary Content) in the content graph.<br/>
-     * This JAX-RS method is available under the path "content". It requires
-     * a multipart/form-data with two fields: "content", which is the content of the
-     * InfoDiscobit to be created and "uri" which is the uri of the new
-     * InfoDiscoBit.
-     *
-     * @param form
-     * @return Returns a Created (201) response, if the info bit was successfully
-     * uploaded. Returns Bad Request (400) response, if required form fields are
-     * missing. Returns a Conflict (409) response, if at the specified URI a
-     * resource already exists.
-     */
-    @POST
-    @Consumes("multipart/form-data")
-    public Response postContent(MultiPartBody form) {
-        FormFile formFile = form.getFormFileParameterValues("content")[0];
-        String uri = form.getTextParameterValues("uri")[0];
-        byte[] content = formFile.getContent();
-        if (content == null || uri == null) {
-            return Response.status(400).entity("Required form field is missing").
-                    type(MediaType.TEXT_PLAIN_TYPE).build();
-        }
-        LockableMGraph contentGraph = cgProvider.getContentGraph();
-        Lock readLock = contentGraph.getLock().readLock();
-        readLock.lock();
-        try {
-            if (contentGraph.filter(new UriRef(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();
-            }
-        } finally {
-            readLock.unlock();
-        }
-        handler.put(new UriRef(uri), formFile.getMediaType(), content);
-        return Response.created(URI.create(uri)).build();
-    }    
-    
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
deleted file mode 100644
index 3b45d62..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitTemplating.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-
-
-import javax.ws.rs.core.MediaType;
-
-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.rdf.ontologies.DISCOBITS;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-
-/**
- *
- * @author tio
- */
-@Component(immediate = true)
-public class DiscobitTemplating {
-
-    @Reference
-    RenderletManager renderletManager;
-
-    protected void activate(ComponentContext context) {
-
-        // register seedsnipe renderlets
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(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()),
-                RDFS.Resource, "(naked|.*-naked)", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(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()),
-                DISCOBITS.OrderedContent, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(getClass().getResource("TitledContent.xhtml").toString()),
-                DISCOBITS.TitledContent, null, MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        renderletManager.registerRenderlet(TitledContentRenderlet.class.getName(),
-                null, DISCOBITS.TitledContent, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        // 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,
-                MediaType.APPLICATION_XHTML_XML_TYPE, true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
deleted file mode 100644
index 2e3e441..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsHandler.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-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;
-
-/**
- * Provides utility methods to create, retrieve and remove binary contents.
- * Binary contents are modeled as InfoDiscoBit from the discobit ontology at
- * http://discobits.org/ontology
- *
- * @author rbn
- */
-public interface DiscobitsHandler {
-
-    /**
-     * Creates an InfoDiscoBit
-     * 
-     * @param infoDiscoBitUri
-     * @param mediaType
-     * @param data
-     */
-    public abstract void put(UriRef infoDiscoBitUri, MediaType mediaType,
-            byte[] data);
-
-    /**
-     * Removes InfoDiscoBits (aka binary contents), other DiscoBits and
-     * the context of the specified node. If it is in a hierarchy then it
-     * will be removed also form its container.
-     * 
-     * @param node
-     */
-    public abstract void remove(NonLiteral node);
-
-    /**
-     * 
-     * @param uriRef
-     * @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);
-
-    /**
-     * 
-     * @param uriRef
-     * @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);
-
-}
\ No newline at end of file


[02/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
deleted file mode 100644
index a92ff01..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/DiscobitsTypeHandler.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider;
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.Status;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.platform.content.WebDavUtils.PropertyMap;
-import org.apache.clerezza.platform.content.collections.CollectionCreator;
-import org.apache.clerezza.platform.content.webdav.MKCOL;
-import org.apache.clerezza.platform.content.webdav.MOVE;
-import org.apache.clerezza.platform.content.webdav.PROPFIND;
-import org.apache.clerezza.platform.content.webdav.PROPPATCH;
-
-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.ReferenceCardinality;
-import org.apache.felix.scr.annotations.ReferencePolicy;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.felix.scr.annotations.Services;
-import org.slf4j.Logger;
-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.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.web.fileserver.util.MediaTypeGuesser;
-import org.osgi.service.component.ComponentContext;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * This Class allows getting and putting content structured using the
- * Discobits ontology.
- *
- * Is an implementation of DiscobitsHandler and additionally registers as
- * TypeHanlder to allow HTTP GET and PUT.
- *
- * @author reto, tho, agron, mir
- */
-@Component(metatype=true)
-@Service({
-    Object.class,
-    DiscobitsHandler.class
-})
-@Property(name="org.apache.clerezza.platform.typehandler", boolValue=true)
-@Reference(name="metaDataGenerator",
-    policy=ReferencePolicy.DYNAMIC,
-    cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
-    referenceInterface=MetaDataGenerator.class
-)
-@SupportedTypes(types = { "http://www.w3.org/2000/01/rdf-schema#Resource" }, prioritize = false)
-public class DiscobitsTypeHandler extends AbstractDiscobitsHandler
-        implements DiscobitsHandler {
-@Property(value="600", label="Max-Age", description="Specifies the value of the max-age field"
-        + "set in the cache-control header of InfoDiscoBit-Responses, as per RFC 2616 this is a number of "
-        + "seconds")
-    public static final String MAX_AGE = "max-age";
-
-    @Reference
-    protected ContentGraphProvider cgProvider;
-
-    @Reference
-    PageNotFoundService notFoundPageService;
-
-    @Reference
-    GraphNodeProvider graphNodeProvider;
-
-    private static final Logger logger = LoggerFactory.getLogger(DiscobitsTypeHandler.class);
-
-    private final Set<MetaDataGenerator> metaDataGenerators =
-            Collections.synchronizedSet(new HashSet<MetaDataGenerator>());
-
-    private String cacheControlHeaderValue;
-
-    protected void activate(ComponentContext context) {
-        cacheControlHeaderValue = "max-age="+(String) context.getProperties().get(MAX_AGE);
-    }
-
-    /**
-     * TypeHandle method for rdf types "TitledContext", "InfoDiscoBit",
-     * "OrderedContent" and "XHTMLInfoDiscoBit".
-     * 
-     * @param uriInfo
-     * @return
-     */
-    @GET
-    @Produces({"*/*"})
-    public Object getResource(@Context UriInfo uriInfo) {
-        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
-            final GraphNode graphNode = getResourceAsGraphNode(uriInfo);
-        if (graphNode == null) {
-            return resourceUnavailable(uri, uriInfo);
-        }
-        InfoDiscobit infoDiscobit = InfoDiscobit.createInstance(graphNode);
-        if (infoDiscobit != null) {
-            Response response = Response.ok().
-                    header(HttpHeaders.CACHE_CONTROL, cacheControlHeaderValue).
-                    entity(infoDiscobit).
-                    build();
-            return response;
-        } else {
-            return graphNode;
-        }
-    }
-
-    private GraphNode getResourceAsGraphNode(UriInfo uriInfo) {
-        final UriRef uri = new UriRef(uriInfo.getAbsolutePath().toString());
-        GraphNode result = graphNodeProvider.getLocal(uri);
-        //could chck if nodeContext > 0, but this would be less efficient
-        TripleCollection tc = result.getGraph();
-        if (tc.filter(uri, null, null).hasNext()) {
-            return result;
-        }
-        if (tc.filter(null, null, uri).hasNext()) {
-            return result;
-        }
-        return null;
-    }
-
-
-    
-    /**
-     * Creates an <code>InfoDiscoBit</code> at the specified location
-     *
-     * @param uriInfo the uri of the InforDiscoBit to be created
-     * @param data the content of the upload
-     */
-    @PUT
-    public Response putInfoDiscobit(@Context UriInfo uriInfo, @Context HttpHeaders headers, byte[] data) {
-        final String contentType;
-        {
-            final List<String> contentTypeHeaders = headers.getRequestHeader(HttpHeaders.CONTENT_TYPE);
-            if (contentTypeHeaders == null) {
-                logger.warn("Content-Type not specified");
-                final MediaType guessTypeForName = MediaTypeGuesser.getInstance().
-                        guessTypeForName(uriInfo.getAbsolutePath().toString());
-                contentType = guessTypeForName == null ?
-                    MediaType.APPLICATION_OCTET_STREAM : guessTypeForName.toString();
-            } else {
-                contentType = contentTypeHeaders.get(0);
-            }
-            
-        }    
-        final UriRef infoDiscoBitUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        put(infoDiscoBitUri, MediaType.valueOf(contentType), data);
-        return Response.status(Status.CREATED).build();
-    }
-
-    /**
-     * Creates a new collection at the specified uri
-     *
-     * @param uriInfo
-     * @return
-     * <ul>
-     *    <li>201 "Created" response if method succeeded
-     *    <li>405 "Method Not Allowed" response if collection already exists
-     * </ul>
-     */
-    @MKCOL
-    public Object mkcol(@Context UriInfo uriInfo) {
-        String uriString = uriInfo.getAbsolutePath().toString();
-        if (uriString.charAt(uriString.length()-1) != '/') {
-            uriString += '/';
-        }
-        UriRef nodeUri = new UriRef(uriString);
-        final MGraph mGraph = cgProvider.getContentGraph();
-        Triple typeTriple = new TripleImpl(nodeUri, RDF.type, HIERARCHY.Collection);
-        if (mGraph.contains(typeTriple)) {
-            return Response.status(405) // Method Not Allowed
-                    .entity("Collection \"" + nodeUri.getUnicodeString()
-                    + "\" already exists.").build();
-        }
-        new CollectionCreator(mGraph).createContainingCollections(nodeUri);
-        return Response.created(uriInfo.getAbsolutePath()).build();
-    }
-
-    /**
-     * Finds all properties of a hierarchy node and returns them in a
-     * {@link DOMSource}
-     *
-     * @param uriInfo
-     * @param headers {@link HttpHeaders}
-     * @param body {@link DOMSource} containing the requested properties, can be null
-     * @return
-     * <ul>
-     *    <li>207 "Multistatus" response if method succeeded
-     *    <li>404 "Not Found" response if the hierarchy node was not found
-     *    <li>400 "Bad Request" response if the body is malformed
-     * </ul>
-     */
-    @PROPFIND
-    @Consumes({"application/xml", "text/xml", "*/*"})
-    @Produces({"application/xml", "text/xml", "*/*"})
-    public Response propfind(@Context UriInfo uriInfo,
-            @Context HttpHeaders headers, DOMSource body) {
-        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        if (!nodeAtUriExists(nodeUri)) {
-            return resourceUnavailable(nodeUri, uriInfo);
-        }
-            Map<UriRef, PropertyMap> result;
-        try {
-            String depthHeader = WebDavUtils.getHeaderAsString(headers, "Depth");
-            if (depthHeader == null) {
-                depthHeader = WebDavUtils.infinite;
-            }
-            final MGraph mGraph = cgProvider.getContentGraph();
-            GraphNode node = new GraphNode(nodeUri, mGraph);
-            if (body != null) {
-                Document requestDoc = WebDavUtils.sourceToDocument(body);
-                Node propfindNode = WebDavUtils.getNode(requestDoc, WebDavUtils.propfind);
-                Node requestNode = WebDavUtils.getFirstChild(propfindNode);
-                String requestType = requestNode.getLocalName();
-                if (requestType.equalsIgnoreCase(WebDavUtils.allprop)) {
-                    result = getAllProps(node, depthHeader);
-                } else if (requestType.equalsIgnoreCase(WebDavUtils.prop)) {
-                    result = getPropsByName(requestNode, node, depthHeader);
-                } else if (requestType.equalsIgnoreCase(WebDavUtils.propname)) {
-                    result = getPropNames(node, depthHeader);
-                } else {
-                    return Response.status(Status.BAD_REQUEST).build();
-                }
-            } else {
-                // returns all properties
-                result = getAllProps(node, depthHeader);
-            }
-            Document responseDoc = WebDavUtils.createResponseDoc(result);
-            return Response.status(207).entity(new DOMSource(responseDoc)).type(
-                    MediaType.APPLICATION_XML_TYPE).build();
-        } catch (TransformerFactoryConfigurationError e) {
-            return Response.status(Status.BAD_REQUEST).build();
-        } catch (TransformerException e) {
-            return Response.status(Status.BAD_REQUEST).build();
-        } catch (ParserConfigurationException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    Map<UriRef, PropertyMap> getPropNames(GraphNode node, String depthHeader) {
-        Map<UriRef, PropertyMap> result = new HashMap<UriRef, PropertyMap>();
-        WebDavUtils.addNodeProperties(result, null, null, node, false);
-        return result;
-    }
-
-    Map<UriRef, PropertyMap> getPropsByName(Node requestNode, GraphNode node,
-            String depthHeader) {
-        Map<UriRef, 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>();
-        WebDavUtils.addNodeProperties(result, null, null, node, true);
-        return result;
-    }
-
-    /**
-     * @param uriInfo
-     * @param body {@link DOMSource} containing properties which should be set
-     * or deleted
-     * @return
-     * <ul>
-     *    <li>207 "Multistatus" response if method succeeded
-     *    <li>404 "Not Found" response if the hierarchy node was not found
-     *    <li>400 "Bad Request" response if the body is malformed
-     * </ul>
-     */
-    @PROPPATCH
-    @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());
-        if (!nodeAtUriExists(nodeUri)) {
-            return resourceUnavailable(nodeUri, uriInfo);
-        }
-        try {
-            Document requestDoc = WebDavUtils.sourceToDocument(body);
-            final MGraph mGraph = cgProvider.getContentGraph();
-            GraphNode node = new GraphNode(nodeUri, mGraph);
-            NodeList propsToSet = null;
-            NodeList propsToRemove = null;
-            Node proppatchNode = WebDavUtils.getNode(requestDoc, WebDavUtils.proppatch);
-            NodeList childNodes = proppatchNode.getChildNodes();
-            for (int i = 0; i < childNodes.getLength(); i++) {
-                Node child = childNodes.item(i);
-                String localName = child.getLocalName();
-                if (localName != null) {
-                    if (localName.equals(WebDavUtils.set)) {
-                        propsToSet = child.getFirstChild().getChildNodes();
-                    } else if (localName.equals(WebDavUtils.remove)) {
-                        propsToRemove = child.getFirstChild().getChildNodes();
-                    }
-                }
-            }
-            Document responseDoc = WebDavUtils.modifyProperties(node, propsToSet, propsToRemove);
-            return Response.status(207).entity(new DOMSource(responseDoc)).type(
-                    MediaType.APPLICATION_XML_TYPE).build();
-        } catch (ParserConfigurationException ex) {
-            throw new RuntimeException(ex);
-        } catch (TransformerFactoryConfigurationError ex) {
-            return Response.status(Status.BAD_REQUEST).build();
-        } catch (TransformerException ex) {
-            return Response.status(Status.BAD_REQUEST).build();
-        } 
-    }
-
-    /**
-     * Moves or renames a hierarchy node
-     *
-     * @param uriInfo
-     * @param headers
-     * @return
-     * <ul>
-     *  <li>201 "Created" response if method succeeded
-     *  <li>412 "Precondition Failed" response if the destination URL is already
-     *    mapped to a resource
-     *  <li>404 "Not Found" response if the hierarchy node was not found
-     *  <li>403 "Forbidden" response if the source and destination resources are the same
-     *  <li>400 "Bad Request" if no "Destination" header was found
-     * </ul>
-     */
-    @MOVE
-    public Response move(@Context UriInfo uriInfo, @Context HttpHeaders headers) {
-        UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        final LockableMGraph mGraph = cgProvider.getContentGraph();
-        GraphNode node = new GraphNode(nodeUri, mGraph);
-        String targetString = WebDavUtils.getHeaderAsString(headers,
-                    "Destination");
-        UriRef targetUri = new UriRef(targetString);
-        String overwriteHeader = WebDavUtils.getHeaderAsString(headers, "Overwrite");
-        boolean overwriteTarget = "T".equalsIgnoreCase(overwriteHeader);
-        if (nodeAtUriExists(targetUri)) {
-            if (overwriteTarget) {
-                new GraphNode(targetUri, mGraph).deleteNodeContext();
-            } else {
-                return Response.status(Status.PRECONDITION_FAILED).build();
-            }
-        }
-        Lock l = mGraph.getLock().writeLock();
-        l.lock();
-        try {
-            Iterator<Triple> oldParentTripleIter
-                    = mGraph.filter(nodeUri, HIERARCHY.parent, null);
-            if (oldParentTripleIter.hasNext()) {
-                oldParentTripleIter.next();
-                oldParentTripleIter.remove();
-            }
-            while (oldParentTripleIter.hasNext()) {
-                logger.error("more than one parent statement: "+oldParentTripleIter.next());
-                oldParentTripleIter.remove();
-            }
-            Lock writeLock = node.writeLock();
-            writeLock.lock();
-            try {
-                node.replaceWith(targetUri);
-            } finally {
-                writeLock.unlock();
-            }
-            new CollectionCreator(mGraph).createContainingCollections(targetUri);
-            try {
-                return Response.created(new java.net.URI(targetUri.getUnicodeString())).build();
-            } catch (URISyntaxException ex) {
-                throw new IllegalArgumentException(ex);
-            }
-        } finally {
-            l.unlock();
-        }
-    }
-
-    /**
-     * Deletes a hierarchy node
-     *
-     * @param uriInfo
-     * @return
-     * <ul>
-     *    <li>200 "OK" response if method succeeded
-     *    <li>404 "Not Found" response if the hierarchy node was not found
-     * </ul>
-     */
-    @DELETE
-    public Response delete(@Context UriInfo uriInfo) {
-        UriRef nodeUri = new UriRef(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();
-        GraphNode node = new GraphNode(nodeUri, mGraph);
-        node.deleteNodeContext();
-        return Response.ok().build();
-    }
-
-    /**
-     * @param uriInfo
-     * @return
-     * <ul>
-     *    <li>200 "OK" response with an "Allow" and a "DAV" header. The "Allow"
-     * header contains all the possible HTTP methods that can be executed on the
-     * resource and the "DAV" header shows if the resource is WebDAV enabled
-     *    <li>404 "Not Found" response if the resource was not found
-     * </ul>
-     */
-    @OPTIONS
-    public Response options(@Context UriInfo uriInfo) {
-        final UriRef nodeUri = new UriRef(uriInfo.getAbsolutePath().toString());
-        if (!nodeAtUriExists(nodeUri)) {
-            return resourceUnavailable(nodeUri, uriInfo);
-        }
-            Response.ResponseBuilder builder = Response.ok();
-            builder.header("Dav", "1");
-            Set<String> allow = new HashSet<String>();
-            Method[] methods = this.getClass().getMethods();
-            for (Method method : methods) {
-                for (Annotation annotation : method.getAnnotations()) {
-                    HttpMethod httpMethod = annotation.annotationType().getAnnotation(HttpMethod.class);
-                    if (httpMethod != null) {
-                        allow.add(httpMethod.value());
-                    }
-                }
-            }
-            if (allow.isEmpty()) {
-                builder.header("Allow", "");
-            } else {
-                final Iterator<String> iterator = allow.iterator();
-                final StringBuffer buffer = new StringBuffer(iterator.next());
-                while (iterator.hasNext()) {
-                    buffer.append(", ");
-                    buffer.append(iterator.next());
-                }
-                builder.header("Allow", buffer.toString());
-            }
-        return builder.build();
-    }
-
-    protected void bindMetaDataGenerator(MetaDataGenerator generator) {
-        metaDataGenerators.add(generator);
-    }
-
-    protected void unbindMetaDataGenerator(MetaDataGenerator generator) {
-        metaDataGenerators.remove(generator);
-    }
-
-    @Override
-    protected MGraph getMGraph() {
-        return cgProvider.getContentGraph();
-    }
-
-    @Override
-    protected Set<MetaDataGenerator> getMetaDataGenerators() {
-        return metaDataGenerators;
-    }
-
-    
-
-    private boolean nodeAtUriExists(UriRef nodeUri) {
-        LockableMGraph mGraph = (LockableMGraph) getMGraph();
-        Lock readLock = mGraph.getLock().readLock();
-        readLock.lock();
-        try {
-            return mGraph.filter(nodeUri, null, null).hasNext()
-                    || mGraph.filter(null, null, nodeUri).hasNext();
-        } finally {
-            readLock.unlock();
-        }
-    }
-
-    private Response resourceUnavailable(UriRef nodeUri,
-            UriInfo uriInfo) {
-        UriRef oppositUri = makeOppositeUriRef(nodeUri);
-        if (nodeAtUriExists(oppositUri)) {
-            return RedirectUtil.createSeeOtherResponse(
-                    oppositUri.getUnicodeString(), uriInfo);
-        } else {
-            return notFoundPageService.createResponse(uriInfo);
-        }
-        //return Response.status(Status.NOT_FOUND).build();
-    }
-    /**
-     * add trailing slash if none present, remove otherwise
-     *
-     * @param uri
-     * @return
-     */
-    private static UriRef makeOppositeUriRef(UriRef uri) {
-        String uriString = uri.getUnicodeString();
-        if (uriString.endsWith("/")) {
-            return new UriRef(uriString.substring(0, uriString.length() - 1));
-        } else {
-            return new UriRef(uriString + "/");
-        }
-    }
-
-    private UriRef createAnyHostUri(UriInfo uriInfo) {
-        return new UriRef(Constants.ALL_HOSTS_URI_PREFIX+uriInfo.getPath());
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/Editor.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/Editor.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/Editor.java
deleted file mode 100644
index 5e7940d..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/Editor.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.net.URL;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-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.osgi.framework.Bundle;
-import org.osgi.service.component.ComponentContext;
-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;
-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.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.web.fileserver.BundlePathNode;
-import org.apache.clerezza.web.fileserver.FileServer;
-import org.wymiwyg.commons.util.dirbrowser.PathNode;
-
-/**
- * This Jax-rs root resource provides an ajax edito ro edit content structured
- * using the Discobits ontology
- *
- * @author rbn
- *
- */
-@Component
-@Service(Object.class)
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("tools/editor")
-public class Editor extends FileServer {
-
-    @Reference
-    private ContentGraphProvider cgProvider;
-
-    @Reference
-    private TcManager tcManager;
-    
-    @Reference
-    private Serializer serializer;
-
-    
-    private static final Logger logger = LoggerFactory.getLogger(Editor.class);
-
-    private Providers providers;
-    private final String rdfXml = "application/rdf+xml";
-    
-    
-    
-    /**
-     * On activation the {@link FileServer} is prepared
-     *
-     * @param context
-     */
-    protected void activate(ComponentContext context) {
-        configure(context.getBundleContext());
-    }
-
-    
-    /**
-     * The providers are injected by the Jax-rs implementation and used to
-     * locate readers for the RDF content of the body
-     *
-     * @param providers
-     */
-    @Context
-    public void setProviders(Providers providers) {
-        this.providers = providers;
-    }
-
-
-    @GET
-    @Path("get")
-    public GraphNode getDiscobit(@QueryParam("resource") UriRef uri,
-            @QueryParam("graph") UriRef graphUri) {
-        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
-            tcManager.getMGraph(graphUri);
-        return new GraphNode(uri, mGraph);
-    }
-
-    /**
-     * replaces the subgraph serialized with RDF/XML in <code>revokedString
-     * </code> with the one from <code>assertedString</code>.
-     *
-     * @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
-     */
-    @POST
-    @Path("post")
-    public void postDiscobit(@QueryParam("graph") UriRef graphUri,
-            @FormParam("assert") String assertedString,
-            @FormParam("revoke") String revokedString,
-            @FormParam("rdfFormat") String rdfFormat) {
-        if (rdfFormat == null) {
-            rdfFormat = rdfXml;
-        }
-        MediaType mediaType = MediaType.valueOf(rdfFormat);
-        MessageBodyReader<Graph> graphReader = providers.getMessageBodyReader(Graph.class, Graph.class, null,mediaType);
-        final Graph assertedGraph;
-        final Graph 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()));
-        } catch (IOException ex) {
-            logger.error("reading graph {}", ex);
-            throw new WebApplicationException(ex, 500);
-        }
-        final MGraph mGraph = graphUri == null ? cgProvider.getContentGraph() :
-            tcManager.getMGraph(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);
-        } catch (NoSuchSubGraphException ex) {
-            throw new RuntimeException(ex);
-        }
-        mGraph.addAll(assertedGraph);
-    }
-
-    @GET
-    //this is to work around
-    @Produces(MediaType.APPLICATION_OCTET_STREAM)
-    public PathNode getStaticFile(@Context UriInfo uriInfo) {
-        TrailingSlash.enforcePresent(uriInfo);
-        final PathNode node = getNode("disco.xhtml");
-        logger.debug("serving static {}", node);
-        return node;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
deleted file mode 100644
index 8693216..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobit.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-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.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;
-import org.apache.clerezza.rdf.ontologies.RDF;
-
-/**
- * Represents an InfoDiscoBit
- *
- * @author reto
- */
-public class InfoDiscobit {
-
-    private GraphNode infoBit;
-
-
-    /**
-     *
-     * @param infoBit
-     * @return an instance of InfoDiscobit or null if node is not an InfoDiscoBit
-     */
-    public static InfoDiscobit createInstance(GraphNode node) {
-        Lock l = node.readLock();
-        l.lock();
-        try {
-            Iterator<Resource> types = node.getObjects(RDF.type);
-            while(types.hasNext()) {
-                if (types.next().equals(DISCOBITS.InfoDiscoBit)){
-                    return new InfoDiscobit(node);
-                }
-            }
-            return null;
-        } finally {
-            l.unlock();
-        }
-    }
-
-    InfoDiscobit(GraphNode infoBit) {
-        this.infoBit = infoBit;
-    }
-
-    public String getContentType() {
-        Lock readLock = infoBit.readLock();
-        readLock.lock();
-        try {
-            Iterator<Literal> mediaTypeLits = infoBit.getLiterals(DISCOBITS.mediaType);
-            if (mediaTypeLits.hasNext()) {
-                return mediaTypeLits.next().getLexicalForm();
-            } else {
-                throw new RuntimeException("InfoDiscobit has no media type property");
-            }
-        } finally {
-            readLock.unlock();
-        }
-    }
-    
-    public byte[] getData() {
-        byte[] result;
-        Lock readLock = infoBit.readLock();
-        readLock.lock();
-        try {
-            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);
-                }
-            } else {
-                throw new RuntimeException("InfoDiscobit has not infoBit property");
-            }
-        } finally {
-            readLock.unlock();
-        }        
-        return result;    
-    };
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
deleted file mode 100644
index e3a2aa4..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/InfoDiscobitWriter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import javax.ws.rs.Produces;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.ext.MessageBodyWriter;
-import javax.ws.rs.ext.Provider;
-
-
-/**
- * 
- * @scr.component
- * @scr.service interface="java.lang.Object"
- * @scr.property name="javax.ws.rs" type="Boolean" value="true"
- *
- * @author reto
- */
-@Provider
-@Produces("*/*")
-public class InfoDiscobitWriter implements MessageBodyWriter<InfoDiscobit> {
-
-    @Override
-    public boolean isWriteable(Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return InfoDiscobit.class.isAssignableFrom(type);
-    }
-
-    @Override
-    public long getSize(InfoDiscobit t, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType) {
-        return t.getData().length;
-    }
-
-    @Override
-    public void writeTo(InfoDiscobit t, Class<?> type, Type genericType,
-            Annotation[] annotations, MediaType mediaType,
-            MultivaluedMap<String, Object> httpHeaders,
-            OutputStream entityStream) throws IOException,
-            WebApplicationException {
-        httpHeaders.putSingle(HttpHeaders.CONTENT_TYPE, t.getContentType());
-        entityStream.write(t.getData());
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
deleted file mode 100644
index ccce889..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/PageNotFoundService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Copyright 2010 reto.
- * 
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- * 
- *       http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *  under the License.
- */
-
-package org.apache.clerezza.platform.content;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-/**
- * An instance of this service is called by DiscoBitHandler if a resource
- * is not found in the content graph.
- *
- * @author reto
- */
-public interface PageNotFoundService {
-
-    /**
-     * Creates a response when a resource could not be found in the Content 
-     * Graph, this is a 404 response.
-     * 
-     * @param uriInfo
-     * @return
-     */
-    public Response createResponse(UriInfo uriInfo);
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
deleted file mode 100644
index 69171ff..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/SimpleDiscobitsHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import java.util.Set;
-import org.apache.clerezza.rdf.core.MGraph;
-
-/**
- *
- * @author reto
- */
-class SimpleDiscobitsHandler extends AbstractDiscobitsHandler {
-    
-    private final MGraph mGraph;
-
-    public SimpleDiscobitsHandler(MGraph mGraph) {
-        this.mGraph = mGraph;
-    }
-
-    @Override
-    protected MGraph getMGraph() {
-        return mGraph;
-    }
-
-    @Override
-    protected Set<MetaDataGenerator> getMetaDataGenerators() {
-        return null;
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
deleted file mode 100644
index 094e773..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/TitledContentRenderlet.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-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.rdf.ontologies.DISCOBITS;
-import org.apache.clerezza.rdf.utils.GraphNode;
-
-/**
- * A renderlet for rendering TitledContent. The contained elements are rendered
- * calling back to the specified <code>Renderer</code>.
- *
- * This renderlet uses a thread-local variable to set the appropriate heading
- * level (h1 - h6)
- *
- * @author rbn, mir
- *
- * @scr.component
- * @scr.service interface="org.apache.clerezza.platform.typerendering.Renderlet"
- */
-public class TitledContentRenderlet implements Renderlet {
-
-    private static ThreadLocal<Integer> headingLevel  = new ThreadLocal<Integer>() {
-
-        @Override
-        protected Integer initialValue() {
-            return 1;
-        }
-
-    };
-    @Override
-    public void render(GraphNode res, GraphNode context, Map<String, Object> sharedRenderingValues,
-            CallbackRenderer callbackRenderer,
-            URI renderingSpecification,
-            String mode,
-            MediaType mediaType, RequestProperties requestProperties,
-            OutputStream os) throws IOException {
-        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";
-            writer.print(nodeLabel+": titled and/or content could not be found");
-            writer.flush();
-            return;
-        }
-        writer.print(getHeaderOpen());
-        writer.flush();
-        callbackRenderer.render(
-                containedNodes.get(0),
-                context, mode, os);
-        writer.println(getHeaderClose());
-        headingLevel.set(headingLevel.get()+1);
-        writer.print("<div class='tx-content'>");
-        writer.flush();
-        callbackRenderer.render(
-                containedNodes.get(1),
-                context, mode, os);
-        headingLevel.set(headingLevel.get()-1);
-        writer.println("</div>");
-        writer.flush();
-    }
-
-
-    private List<GraphNode> getContainedNodes(GraphNode titledContent) {
-        final SortedSet<GraphNode> entries = new TreeSet<GraphNode>(new Comparator<GraphNode>() {
-
-            @Override
-            public int compare(GraphNode o1, GraphNode o2) {
-                    int pos1 = getPos(o1);
-                    int pos2 = getPos(o2);
-                    return pos1 - pos2;
-            }
-            private int getPos(GraphNode o) {
-                try {
-                    return Integer.parseInt(o.getLiterals(DISCOBITS.pos).next().getLexicalForm());
-                } catch (NullPointerException e) {
-                    return -1;
-                }
-            }
-
-        });
-        final Iterator<Resource> entriesIter = titledContent.getObjects(DISCOBITS.contains);
-        while (entriesIter.hasNext()) {
-            Resource resource = entriesIter.next();
-            entries.add(new GraphNode((NonLiteral) resource,titledContent.getGraph()));
-        }
-        final List<GraphNode> result = new ArrayList<GraphNode>();
-        for (GraphNode graphNode : entries) {
-            Iterator<Resource> holded = graphNode.getObjects(DISCOBITS.holds);
-            if (!holded.hasNext()) {
-                throw new RuntimeException(
-                        "Titled Content must contain a first element: "+graphNode.getNodeContext());
-            }
-            result.add(new GraphNode(holded.next(),
-                    titledContent.getGraph()));
-        }
-        return result;
-    }
-
-    private String getHeaderOpen() {
-        final Integer level = headingLevel.get();
-        return level < 7 ? "<h"+level+">" : "<div class = \"heading\">";
-    }
-
-    private String getHeaderClose() {
-        final Integer level = headingLevel.get();
-        return level < 7 ? "</h"+level+">" : "</div>";
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
deleted file mode 100644
index aea5190..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.content;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMResult;
-import org.apache.clerezza.rdf.core.Literal;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-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.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.DCTERMS;
-import org.apache.clerezza.rdf.ontologies.HIERARCHY;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- *
- * @author agron
- */
-class WebDavUtils {
-
-    static final String infinite = "infinite";
-    static final String prop = "prop";
-    static final String allprop = "allprop";
-    static final String propname = "propname";
-    static final String propfind = "propfind";
-    static final String proppatch = "propertyupdate";
-    static final String set = "set";
-    static final String remove = "remove";
-    private static final String davUri = "DAV:";
-    private static final String multistat = "multistatus";
-    private static final String response = "response";
-    private static final String href = "href";
-    private static final String propstat = "propstat";
-    private static final String status = "status";
-
-    //WebDAV properties
-    private static final String creationdate = "creationdate";
-    private static final String displayname = "displayname";
-    private static final String getcontentlanguage = "getcontentlanguage";
-    private static final String getcontentlength = "getcontentlength";
-    private static final String getcontenttype = "getcontenttype";
-    private static final String getetag = "getetag";
-    private static final String getlastmodified = "getlastmodified";
-    private static final String lockdiscovery = "lockdiscovery";
-    private static final String resourcetype = "resourcetype";
-    private static final String supportedlock = "supportedlock";
-
-    private static final List<String> davProps = new ArrayList<String>(Arrays.asList(
-            creationdate, displayname, getcontentlanguage, getcontentlength,
-            getcontenttype, getetag, getlastmodified, lockdiscovery,
-            resourcetype, supportedlock));
-    
-    private static final List<String> protectedProps = new ArrayList<String>(Arrays.asList(
-            creationdate, getcontentlength, getetag, getlastmodified,
-            lockdiscovery, resourcetype, supportedlock));
-
-
-    /**
-     * Returns the {@link Node} from a given {@link Document}
-     * @param doc
-     * @param nodeName
-     * @return null if Node wasen't found
-     */
-    static Node getNode(Document doc, String nodeName){
-        NodeList nodes = doc.getElementsByTagNameNS(davUri, nodeName);
-        if(nodes.getLength() == 1){
-            return nodes.item(0);
-        }
-        return null;
-    }
-
-    /**
-     * @param node
-     * @return returns the first non Text node or null
-     */
-    static Node getFirstChild(Node node){
-        NodeList nodeList = node.getChildNodes();
-        for (int i = 0; i < nodeList.getLength(); i++) {
-            if(nodeList.item(i).getLocalName() != null){
-                return nodeList.item(i);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Converts a {@link Source} to a {@link Document}
-     *
-     * @throws ParserConfigurationException
-     * @throws TransformerFactoryConfigurationError
-     * @throws TransformerException
-     */
-    static Document sourceToDocument(Source body)
-            throws ParserConfigurationException,
-            TransformerFactoryConfigurationError, TransformerException {
-        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
-                .newDocument();
-        Transformer transformer = TransformerFactory.newInstance().newTransformer();
-        DOMResult result = new DOMResult(doc);
-        transformer.transform(body, result);
-        return (Document) result.getNode();
-    }
-
-    /**
-     * Returns the content of a requested header as a {@link String}
-     *
-     * @param headers
-     * @param header
-     *            header to be returned
-     * @return returns <code>null</code> if the requested header is empty
-     */
-    static String getHeaderAsString(HttpHeaders headers, String header) {
-        List<String> requestedHeader = headers.getRequestHeader(header);
-        if(requestedHeader == null){
-            return null;
-        }
-        Iterator<String> headerIterator = requestedHeader.iterator();
-        if (headerIterator.hasNext()) {
-            return headerIterator.next();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @param clazz
-     * @return returns an ok Response with a DAV: and an ALLOW: header
-     */
-    static Response options(Class<?> clazz){
-        Response.ResponseBuilder builder = Response.ok();
-        builder.header("Dav", "1");
-        Set<String> allow = new HashSet<String>();
-        Method[] methods = clazz.getMethods();
-        for (Method method : methods){
-            for (Annotation annotation : method.getAnnotations()){
-                HttpMethod httpMethod = annotation.annotationType()
-                        .getAnnotation(HttpMethod.class);
-                if(httpMethod != null){
-                    allow.add(httpMethod.value());
-                }
-            }
-        }
-        if (allow.isEmpty()) {
-            builder.header("Allow", "");
-        } else {
-            final Iterator<String> iterator = allow.iterator();
-            final StringBuffer buffer = new StringBuffer(iterator.next());
-            while (iterator.hasNext()) {
-                buffer.append(", ");
-                buffer.append(iterator.next());
-            }
-            builder.header("Allow", buffer.toString());
-        }
-        return builder.build();
-    }
-
-    /*------------------------------------------*
-     * Putting the properties in a DOM Document *
-     *------------------------------------------*/
-
-    static Document createResponseDoc(Map<UriRef, PropertyMap> resultMap)
-            throws ParserConfigurationException {
-        Document responseDoc = DocumentBuilderFactory.newInstance().
-                newDocumentBuilder().newDocument();
-        Set<UriRef> nodeNameSet = resultMap.keySet();
-
-        Element multistatElement = responseDoc.createElementNS(davUri,"D:" + multistat);
-        // add multistat element to response
-        responseDoc.appendChild(multistatElement);
-        for (UriRef nodeName : nodeNameSet) {
-            Element responseElement = responseDoc.createElementNS(davUri, "D:" + response);
-            // add response element to response Document
-            multistatElement.appendChild(responseElement);
-            PropertyMap propertyMap = resultMap.get(nodeName);
-            addElementsToResponse(propertyMap, responseElement, responseDoc, nodeName);
-        }
-        return responseDoc;
-    }
-
-    private static void addElementsToResponse(PropertyMap propertyMap,
-            Element responseElement, Document responseDoc, UriRef nodeName) {
-        Element hrefElement = responseDoc.createElementNS(davUri, "D:" + href);
-        hrefElement.setTextContent(nodeName.getUnicodeString());
-        // add hrefElement element to responseElement
-        responseElement.appendChild(hrefElement);
-        addPropsToPropstat(responseElement, propertyMap, responseDoc);
-
-    }
-
-    private static void addPropsToPropstat(Element responseElement, PropertyMap propertyMap,
-            Document responseDoc) {
-        Set<Property> props = propertyMap.keySet();
-        Element propFoundElement = responseDoc.createElementNS(davUri, "D:" + prop);
-        Element propNotFoundElement = responseDoc.createElementNS(davUri, "D:" + prop);
-        for(Property propVal : props){
-            String propName = propVal.prop;
-            String ns = propVal.ns;
-            String prf = ns.equalsIgnoreCase(davUri) ? "D:":"R:";
-            String value = propertyMap.get(propVal);
-            Element resultElement = responseDoc.createElementNS(ns, prf + propName);
-            if(value != null){
-                if (!(value.isEmpty())){
-                    if (value.equals("collection")) {
-                        resultElement.appendChild(responseDoc.createElementNS(
-                                davUri, "D:collection"));
-                    } else {
-                        resultElement.setTextContent(value);
-                    }
-                }
-                propFoundElement.appendChild(resultElement);
-            } else {
-                propNotFoundElement.appendChild(resultElement);
-            }
-        }
-        Element propstatFoundElement = responseDoc.createElementNS(davUri,
-                "D:" + propstat);
-        Element statusFoundElement = responseDoc.createElementNS(davUri,
-                "D:" + status);
-        propstatFoundElement.appendChild(propFoundElement);
-        statusFoundElement.setTextContent("HTTP/1.1 200 OK");
-        propstatFoundElement.appendChild(statusFoundElement);
-        responseElement.appendChild(propstatFoundElement);
-        if(propNotFoundElement.hasChildNodes()){
-            Element propstatNotFoundElement = responseDoc.createElementNS(davUri,
-                    "D:" + propstat);
-            Element statusNotFoundElement = responseDoc.createElementNS(davUri,
-                    "D:" + status);
-            propstatNotFoundElement.appendChild(propNotFoundElement);
-            statusNotFoundElement.setTextContent("HTTP/1.1 404 Not Found");
-            propstatNotFoundElement.appendChild(statusNotFoundElement);
-            responseElement.appendChild(propstatNotFoundElement);
-        }
-
-    }
-
-    /*------------------------------------------------------------*
-     * Get the properties from the CollectionNode and its members *
-     *------------------------------------------------------------*/
-
-    static Map<UriRef, PropertyMap> getPropsByName(NodeList children,
-            GraphNode node, String depthHeader, boolean includeValues) {
-        List<Property> requestedUserProps = new ArrayList<Property>();
-        List<Property> requestedDavProps = new ArrayList<Property>();
-
-        for (int i = 0; i < children.getLength(); i++) {
-            Node child = children.item(i);
-            String localName = child.getLocalName();
-            if(localName == null){
-                continue;
-            }
-            String nsUri = child.getNamespaceURI();
-            if (nsUri.equals(davUri)) {
-                requestedDavProps.add(new Property(nsUri, localName));
-            } else {
-                requestedUserProps.add(new Property(nsUri, localName));
-            }
-        }
-        Map<UriRef, PropertyMap> allprops = new HashMap<UriRef, PropertyMap>();
-
-        if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
-            return getCollectionProps(allprops, requestedUserProps, requestedDavProps,
-                    node, depthHeader, includeValues);
-        }else{
-            addNodeProperties(allprops, requestedUserProps, requestedDavProps,
-                    node, includeValues);
-            return allprops;
-        }
-
-    }
-    
-    static Map<UriRef, PropertyMap> getCollectionProps(Map<UriRef, PropertyMap> allprops,
-            List<Property> requestedUserProps, List<Property> requestedDavProps,
-            GraphNode collection, String depthHeader, boolean includeValues) {
-        if(allprops == null){
-            allprops = new HashMap<UriRef, PropertyMap>();
-        }
-        addNodeProperties(allprops, requestedUserProps, requestedDavProps, collection,
-                includeValues);
-        if (depthHeader.equals("1") || depthHeader.equals(infinite)) {
-            Iterator<GraphNode> membersIter = collection.getSubjectNodes(HIERARCHY.parent);
-            List<GraphNode> members = new ArrayList<GraphNode>();
-            while (membersIter.hasNext()) {
-                members.add(membersIter.next());
-            }
-            addMemberProps(allprops, requestedUserProps, requestedDavProps, members,
-                    depthHeader, includeValues);
-        }
-        return allprops;
-    }
-
-    private static void addMemberProps(Map<UriRef, PropertyMap> allprops,
-            List<Property> requestedUserProps, List<Property> requestedDavProps,
-            List<GraphNode> members, String depthHeader, boolean includeValues) {
-        for (GraphNode member : members) {
-            if (depthHeader.equals(infinite) && member.hasProperty(RDF.type, HIERARCHY.Collection)) {
-                getCollectionProps(allprops, requestedUserProps, requestedDavProps,
-                        member, depthHeader, includeValues);
-            } else {
-                addNodeProperties(allprops, requestedUserProps, requestedDavProps,
-                        member,    includeValues);
-            }
-        }
-    }
-
-    static void addNodeProperties(Map<UriRef, PropertyMap> allprops,
-            List<Property> requestedUserProps, List<Property> requestedDavProps,
-            GraphNode node,    boolean includeValues) {
-
-        if (requestedDavProps == null) {
-            requestedDavProps = new ArrayList<Property>();
-            for(String st : davProps){
-                requestedDavProps.add(new Property(davUri, st));
-            }
-        }
-        PropertyMap propertyMap = new PropertyMap();
-        if (includeValues) {
-            addDavProps(node, propertyMap, requestedDavProps);
-            addUserProps(node, propertyMap, requestedUserProps);
-        } else {
-            addDavPropsWithoutValues(propertyMap);
-            addUserPropsWithoutValues(node, propertyMap);
-        }
-        allprops.put((UriRef) node.getNode(), propertyMap);
-
-    }
-
-    private static void addUserProps(GraphNode node, PropertyMap propertyMap,
-            List<Property> requestedProps) {
-        Iterator<UriRef> userPropsIter;
-        Lock readLock = node.readLock();
-        readLock.lock(); 
-        try {
-            userPropsIter = node.getProperties();
-        } finally {
-            readLock.unlock();
-        }
-        Set<UriRef> userProps = new HashSet<UriRef>();
-        while (userPropsIter.hasNext()) {
-            userProps.add(userPropsIter.next());
-        }
-        userProps.remove(HIERARCHY.members);
-        if (requestedProps != null) {
-            for (Property requestedProp : requestedProps) {
-                UriRef predicate = new UriRef(requestedProp.value());
-                if (userProps.contains(predicate)) {
-                    readLock.lock();
-                    try {
-                        Iterator<Resource> value = node.getObjects(predicate);
-                        if (value.hasNext()) {
-                            propertyMap.put(requestedProp, getValue(value.next()));
-                        } else {
-                            propertyMap.put(requestedProp, "");
-                        }
-                    } finally {
-                        readLock.unlock();
-                    }
-                } else {
-                    propertyMap.put(requestedProp, null);
-                }
-            }
-        } else {
-            for (UriRef uri : userProps) {
-                String userProp = uri.getUnicodeString();
-                int index = userProp.lastIndexOf("#");
-                if (index == -1) {
-                    index = userProp.lastIndexOf("/");
-                }
-                Property property = new Property(userProp.substring(0, index + 1),
-                        userProp.substring(index + 1));
-
-                Iterator<Resource> value = node.getObjects(uri);
-                readLock.lock();
-                try {
-                    if (value.hasNext()) {
-                        propertyMap.put(property, getValue(value.next()));
-                    } else {
-                        propertyMap.put(property, "");
-                    }
-                } finally {
-                    readLock.unlock();
-                }
-            }
-        }
-    }
-
-    private static void addUserPropsWithoutValues(GraphNode node,
-            PropertyMap propertyMap) {
-        Iterator<UriRef> userPropsIter;
-        Lock readLock = node.readLock();
-        readLock.lock();
-        try {
-            userPropsIter = node.getProperties();
-        } finally {
-            readLock.unlock();
-        }
-        Set<UriRef> userProps = new HashSet<UriRef>();
-        while (userPropsIter.hasNext()) {
-            userProps.add(userPropsIter.next());
-        }
-        userProps.remove(HIERARCHY.members);
-        for (UriRef uri : userProps) {
-            String userProp = uri.getUnicodeString();
-            int index = userProp.lastIndexOf("#");
-            if (index == -1) {
-                index = userProp.lastIndexOf("/");
-            }
-            Property property = new Property(userProp.substring(0, index + 1),
-                    userProp.substring(index + 1));
-            propertyMap.put(property, "");
-        }
-    }
-
-    /**
-     * @param resource
-     * @return returns the unicode string of an UriRef or the lexical form of a
-     * Literal or the return value of a toString() on a BNode
-     */
-    private static String getValue(Resource resource){
-        if(resource instanceof UriRef){
-            return ((UriRef)resource).getUnicodeString();
-        }else if(resource instanceof Literal){
-            return ((Literal)resource).getLexicalForm();
-        }else {
-            return resource.toString();
-        }
-    }
-
-    /**
-     * FIXME find better implementation
-     * @param node
-     * @param propertyMap
-     * @param includeValues
-     * @param requestedProps
-     */
-    private static void addDavProps(GraphNode node, PropertyMap propertyMap,
-            List<Property> requestedProps) {
-        for (Property property : requestedProps) {
-            if (davProps.contains(property.prop)) {
-                if (property.prop.equalsIgnoreCase(displayname)) {
-                    propertyMap.put(property, getLastSection(((UriRef)node.getNode()).getUnicodeString()));
-                } else if (property.prop.equalsIgnoreCase(resourcetype)) {
-                    if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
-                        propertyMap.put(property, "collection");
-                    } else {
-                        propertyMap.put(property, "");
-                    }
-                } else if(property.prop.equalsIgnoreCase(creationdate)){
-                    Lock readLock = node.readLock();
-                    readLock.lock();
-                    try {
-                        Iterator<Resource> date = node.getObjects(DCTERMS.dateSubmitted);
-                        if (date.hasNext()) {
-                            String st = getValue(date.next());
-                            propertyMap.put(property, st);
-                        } else {
-                            propertyMap.put(property, "");
-                        }
-                    } finally {
-                        readLock.unlock();
-                    }
-                } else if(property.prop.equalsIgnoreCase(getlastmodified)){
-                    Lock readLock = node.readLock();
-                    readLock.lock();
-                    try {
-                        Iterator<Resource> date = node.getObjects(DCTERMS.modified);
-                        if (date.hasNext()) {
-                            String st = getValue(date.next());
-                            propertyMap.put(property, st);
-                        } else {
-                            propertyMap.put(property, "");
-                        }
-                    } finally {
-                        readLock.unlock();
-                    }
-                } else if(property.prop.equalsIgnoreCase(getcontenttype)){
-                    Lock readLock = node.readLock();
-                    readLock.lock();
-                    try {
-                        Iterator<Resource> mediaType = node.getObjects(DCTERMS.MediaType);
-                        if (mediaType.hasNext()) {
-                            String st = getValue(mediaType.next());
-                            propertyMap.put(property, st);
-                        } else {
-                            propertyMap.put(property, "");
-                        }
-                    } finally {
-                        readLock.unlock();
-                    }
-                } else {
-                    propertyMap.put(property, "");
-                }
-            } else {
-                propertyMap.put(property, null);
-            }
-        }
-    }
-
-    private static void addDavPropsWithoutValues(PropertyMap propertyMap) {
-        for (String property : davProps) {
-                propertyMap.put(new Property(davUri, property), "");
-        }
-    }
-
-    /*-------------------*
-     * Proppatch methods *
-     *-------------------*/
-
-    static Document modifyProperties(GraphNode hierarchyNode, NodeList propsToSet,
-            NodeList propsToRemove) throws ParserConfigurationException {
-        Document responseDoc = DocumentBuilderFactory.newInstance()
-                    .newDocumentBuilder().newDocument();
-        UriRef subject = (UriRef) hierarchyNode.getNode();
-        Element hrefElement = responseDoc.createElementNS(davUri, href);
-        hrefElement.setTextContent(subject.getUnicodeString());
-        Element multistatus = responseDoc.createElementNS(davUri, multistat);
-        Element responseElement = responseDoc.createElementNS(davUri, response);
-        Element propOk = responseDoc.createElementNS(davUri, prop);
-        Element propForbidden = responseDoc.createElementNS(davUri, prop);
-
-        responseDoc.appendChild(multistatus);
-        multistatus.appendChild(responseElement);
-        responseElement.appendChild(hrefElement);
-
-        Map<Property, String> setMap = getNodeListAsMap(propsToSet);
-        Map<Property, String> removeMap = getNodeListAsMap(propsToRemove);
-        TripleCollection contentGraph = hierarchyNode.getGraph();
-        for(Map.Entry<Property, String> entry : setMap.entrySet()){
-            Property property = entry.getKey();
-            if(property.ns.equalsIgnoreCase(davUri)){
-                if(protectedProps.contains(property.prop)){
-                    propForbidden.appendChild(responseDoc
-                            .createElementNS(davUri, property.prop));
-                } else {
-                    UriRef predicate = new UriRef(property.value());
-                    Lock writeLock = hierarchyNode.writeLock();
-                    writeLock.lock();
-                    try {
-                        Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
-                        replaceProp(subject, predicate, valIter, contentGraph, entry);
-                    } finally {
-                        writeLock.unlock();
-                    }
-                    propOk.appendChild(responseDoc.createElementNS(davUri, property.prop));
-                }
-            } else {
-                UriRef predicate = new UriRef(property.value());
-                Lock writeLock = hierarchyNode.writeLock();
-                writeLock.lock();
-                try {
-                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
-                    replaceProp(subject, predicate, valIter, contentGraph, entry);
-                } finally {
-                    writeLock.unlock();
-                }
-                propOk.appendChild(responseDoc.createElementNS(property.ns, "R:" + property.prop));
-            }
-        }
-
-        for(Map.Entry<Property, String> entry : removeMap.entrySet()){
-            Property property = entry.getKey();
-            if(davProps.contains(property.prop)){
-                propForbidden.appendChild(responseDoc
-                            .createElementNS(davUri, property.prop));
-            } else {
-                UriRef predicate = new UriRef(property.value());
-                Lock writeLock = hierarchyNode.writeLock();
-                writeLock.lock();
-                try {
-                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
-                    Set<Triple> triplesToBeRemoved = new HashSet<Triple>();
-                    while (valIter.hasNext()) {
-                        triplesToBeRemoved.add(new TripleImpl(subject, predicate, valIter.next()));
-                    }
-                    contentGraph.removeAll(triplesToBeRemoved);
-                } finally {
-                    writeLock.unlock();
-                }
-                propOk.appendChild(responseDoc.createElementNS(property.ns, property.prop));
-
-            }
-        }
-
-        if(propOk.hasChildNodes()){
-            Element propstatOk = responseDoc.createElementNS(davUri, propstat);
-            Element statusOk = responseDoc.createElementNS(davUri, status);
-            responseElement.appendChild(propstatOk);
-            propstatOk.appendChild(propOk);
-            propstatOk.appendChild(statusOk);
-            statusOk.setTextContent("HTTP/1.1 200 OK");
-        }
-        if(propForbidden.hasChildNodes()){
-            Element propstatForbidden = responseDoc.createElementNS(davUri, propstat);
-            Element statusForbidden = responseDoc.createElementNS(davUri, status);
-            responseElement.appendChild(propstatForbidden);
-            propstatForbidden.appendChild(propForbidden);
-            propstatForbidden.appendChild(statusForbidden);
-            statusForbidden.setTextContent("HTTP/1.1 403 Forbidden");
-        }
-
-        return responseDoc;
-    }
-
-    private static Map<Property, String> getNodeListAsMap(NodeList nodeList) {
-        if (nodeList == null) {
-            return new HashMap<Property, String>();
-        }
-        Map<Property, String> result = new HashMap<Property, String>();
-        for (int i = 0; i < nodeList.getLength(); i++) {
-            Node node = nodeList.item(i);
-            String propName = node.getLocalName();
-            if (propName != null) {
-                String nsUri = node.getNamespaceURI();
-                result.put(new Property(nsUri, propName), node.getTextContent());
-            }
-        }
-        return result;
-    }
-
-    private static void replaceProp(UriRef subject, UriRef predicate,
-            Iterator<Resource> valIter, TripleCollection contentGraph,
-            Map.Entry<Property, String> entry) {
-        LiteralFactory fac = LiteralFactory.getInstance();
-        Set<Triple> triplesToBeRemoved = new HashSet<Triple>();
-        if (valIter.hasNext()) {
-            triplesToBeRemoved.add(new TripleImpl(subject, predicate, valIter.next()));
-        }
-        contentGraph.removeAll(triplesToBeRemoved);
-        contentGraph.add(new TripleImpl(subject, predicate,
-                fac.createTypedLiteral(entry.getValue())));
-    }
-
-    private static String getLastSection(String s) {
-        return s.substring(s.lastIndexOf('/', s.length()-2));
-    }
-
-    /**
-     * Helper class whicht is a {@link HashMap} that maps {@link Property} to a {@link String}
-     * @author ali
-     */
-    @SuppressWarnings("serial")
-    static class PropertyMap extends HashMap<Property, String> {
-    }
-
-    static class Property {
-        final String ns;
-        final String prop;
-
-        public Property(String ns, String prop) {
-            this.ns = ns;
-            this.prop = prop;
-        }
-
-        public String value(){
-            return ns+prop;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
deleted file mode 100644
index 012d917..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.content.collections;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.HIERARCHY;
-import org.apache.clerezza.rdf.ontologies.RDF;
-
-/**
- * Creates the collections containing a resource in an underlying MGraph
- *
- * @author reto
- */
-public class CollectionCreator {
-
-    private MGraph mGraph;
-
-    public CollectionCreator(MGraph mGraph) {
-        this.mGraph = mGraph;
-    }
-
-    public void createContainingCollections(UriRef uriRef) {
-        try {
-            URI uri = new URI(uriRef.getUnicodeString());
-            if (uri.getHost() == null) {
-                throw new IllegalArgumentException("Host name missing in " + uriRef);
-            }
-            String[] pathSections = uri.getRawPath().split("/");
-            for (int i = pathSections.length - 1; i >= 0 ; i--) {
-                String section = pathSections[i];
-                if (section.length() == 0) {
-                    if (i == 0) {
-                        return;
-                    } else {
-                        throw new IllegalArgumentException(
-                                uriRef+" contains consequtive slashes in path section");
-                    }
-                }
-                final String unicodeString = uriRef.getUnicodeString();
-                int lastIndexOf = unicodeString.lastIndexOf(section);
-                UriRef parentUriRef = new UriRef(unicodeString.substring(0, lastIndexOf));
-                mGraph.add(new TripleImpl(uriRef, HIERARCHY.parent, parentUriRef));
-                mGraph.add(new TripleImpl(parentUriRef, RDF.type, HIERARCHY.Collection));
-                uriRef = parentUriRef;
-
-            }
-        } catch (URISyntaxException ex) {
-            throw new IllegalArgumentException(ex);
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
deleted file mode 100644
index 7881a34..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.genericmetadata;
-
-import java.util.Date;
-import javax.ws.rs.core.MediaType;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.ontologies.DCTERMS;
-
-/**
- * This class generates metadata about assets.
- *
- * @author tio
- */
-@Component()
-@Service(MetaDataGenerator.class)
-public class GenericMetaDataGenerator implements MetaDataGenerator {
-
-    @Override
-    public void generate(GraphNode node, byte[] data, MediaType mediaType) {
-        TypedLiteral dateLiteral = LiteralFactory.getInstance()
-                    .createTypedLiteral(new Date());
-        if(node.getObjects(DCTERMS.dateSubmitted).hasNext()) {
-            if(node.getObjects(DCTERMS.modified).hasNext()) {
-                node.deleteProperties(DCTERMS.modified);
-            }
-            node.addProperty(DCTERMS.modified, dateLiteral);
-        } else {
-            node.addProperty(DCTERMS.dateSubmitted, dateLiteral);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
deleted file mode 100644
index 9b7c666..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/COPY.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.webdav;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.ws.rs.HttpMethod;
-
-/**
- * Indicates that the annotated method responds to HTTP COPY requests
- * @author ali
- */
-
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@HttpMethod("COPY")
-public @interface COPY {
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
----------------------------------------------------------------------
diff --git a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java b/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
deleted file mode 100644
index 8fb4630..0000000
--- a/platform/platform.content/src/main/java/org/apache/clerezza/platform/content/webdav/LOCK.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.content.webdav;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.ws.rs.HttpMethod;
-
-/**
- * Indicates that the annotated method responds to HTTP LOCK requests
- * @author ali
- */
-
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@HttpMethod("LOCK")
-public @interface LOCK {
-
-}


[74/87] [abbrv] clerezza git commit: CLEREZZA-983: Adapted to new casing of rdf-core (part 1)

Posted by re...@apache.org.
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;
         }


[11/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
deleted file mode 100644
index 7a7b7f9..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.accountcontrolpanel</artifactId>
-        <version>0.10</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.accountcontrolpanel.core</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-    <name>Clerezza - Platform Account Control Panel Core</name>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>compile</goal>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                                        <!-- <scalaVersion>${scala.version}</scalaVersion> -->
-                                        <!-- <args>
-                                                <arg>-target:jvm-1.5</arg>
-                                        </args> -->
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <instructions>
-                        <Service-Component>OSGI-INF/serviceComponents.xml</Service-Component>
-                        <Export-Package>org.apache.clerezza.platform.accountcontrolpanel.*</Export-Package>
-                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.xsite</groupId>
-                <artifactId>xsite-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
-                    <sitemapPath>content/sitemap.xml</sitemapPath>
-                    <skinPath>templates/skin.html</skinPath>
-                    <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>pre-site</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>                 
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.scala.utils</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.seedsnipe</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.users.core</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-          <groupId>org.scala-lang</groupId>
-          <artifactId>scala-library</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scala</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.globalmenu.api</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.accountcontrolpanel.ontologies</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.usermanager</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>permissiondescriptions</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>ssl.keygen.base</artifactId>
-            <version>0.6</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.security.foafssl.ontologies</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.clerezza.ext</groupId>
-          <artifactId>slf4j-scala-api</artifactId>
-            <version>1.6.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.stanbol</groupId>
-            <artifactId>org.apache.stanbol.commons.security.core</artifactId>
-            <version>0.11.0</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
deleted file mode 100644
index 6d0803d..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/IEKeygen.js
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/**
- *
- * Copyright (c) 2008-2010, The University of Manchester, United Kingdom. All
- * rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer. Redistributions in binary
- * form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided
- * with the distribution. Neither the name of the The University of Manchester
- * nor the names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * Author........: Bruno Harbulot
- *
- */
-
-
-
-function createCsrCertEnroll(enrollFactObj, keylength) {
-	/*
-	 * Creates a CX509EnrollmentWebClassFactory (used to create all the other
-	 * objects).
-	 */
-	if (enrollFactObj == null) {
-		enrollFactObj = new ActiveXObject(
-			"X509Enrollment.CX509EnrollmentWebClassFactory");
-	}
-
-	/*
-	 * Load the information about the providers.
-	 */
-	var providerInfosObj = enrollFactObj
-	.CreateObject("X509Enrollment.CCspInformations");
-	providerInfosObj.AddAvailableCsps();
-
-	/*
-	 * Find the provider of RSA type (sufficient for this example). The type
-	 * numbers for this are 1, 2 and 24.
-	 * http://msdn.microsoft.com/en-us/library/aa379427%28VS.85%29.aspx
-	 */
-	var providerType = -1;
-	var providerName = null;
-	for ( var i = 0; i < providerInfosObj.Count; i++) {
-		var providerInfoObj = providerInfosObj.ItemByIndex(i);
-		switch (providerInfoObj.Type) {
-			case 1:
-			case 2:
-			case 24:
-				providerType = providerInfoObj.Type;
-				providerName = providerInfoObj.Name;
-				break;
-			default:
-		}
-	}
-
-	/*
-	 * Creates a 2048-bit key with this provider.
-	 */
-	var privKeyObj = enrollFactObj
-	.CreateObject("X509Enrollment.CX509PrivateKey");
-	privKeyObj.ProviderType = providerInfoObj.Type;
-	privKeyObj.KeySpec = 1;
-	privKeyObj.Length = keylength;
-	// http://msdn.microsoft.com/en-us/library/aa379024%28VS.85%29.aspx
-	privKeyObj.MachineContext = false;
-	// http://msdn.microsoft.com/en-us/library/aa379414%28VS.85%29.aspx
-	privKeyObj.KeyProtection = 2;
-	// http://msdn.microsoft.com/en-us/library/aa379002%28VS.85%29.aspx
-	privKeyObj.ExportPolicy = 1;
-
-	/*
-	 * Creates the PKCS#10 object and initialise as a user context.
-	 */
-	var pkcs10CsrObj = enrollFactObj
-	.CreateObject("X509Enrollment.CX509CertificateRequestPkcs10");
-	pkcs10CsrObj.InitializeFromPrivateKey(1, privKeyObj, "");
-
-	/*
-	 * Creates the enrolment object and exports the CSR.
-	 */
-	var enrollObj = enrollFactObj
-	.CreateObject("X509Enrollment.CX509Enrollment");
-	enrollObj.InitializeFromRequest(pkcs10CsrObj);
-	var csr = enrollObj.CreateRequest(1);
-	csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr
-	+ "-----END CERTIFICATE REQUEST-----";
-
-	/*
-	 * Makes the request to the server.
-	 */
-    xmlHttpRequest = createRequest(csr);
-
-    /**
-	 * What to do on response
-	 */
-    xmlHttpRequest.onreadystatechange = function() {
-		if (xmlHttpRequest.readyState == 4) {
-			if (xmlHttpRequest.status == 200) {
-				/*
-				 * Installs the certificate.
-				 */
-				try {
-					enrollObj.InstallResponse(4, xmlHttpRequest.responseText,
-						0, "");
-					window.alert("A certificate has been installed.");
-				} catch (e1) {
-					try {
-						enrollObj.InstallResponse(0,
-							xmlHttpRequest.responseText, 0, "");
-						window.alert("A certificate has been installed.");
-					} catch (e2) {
-						window
-						.alert("You're probably using Vista without SP1 or above, in which case you need to add the certificate of this authority as a trusted root certificate (not recommended in general).");
-					}
-				}
-			} else {
-				window.alert("The server returned an error status: "
-					+ xmlHttpRequest.status);
-			}
-		}
-	}
-}
-
-
-function createRequest(csrString) {
-	var xmlHttpRequest = new XMLHttpRequest();
-
-	xmlHttpRequest.open("POST", kgnFloctn, true);
-
-	var params = "webId=" + encodeURIComponent(document.getElementById("webId").value);
-	params += "&cn=" + encodeURIComponent(document.getElementById("cn").value);
-	params += "&csr=" + encodeURIComponent(csrString);
-	params += "&days="+encodeURIComponent(document.getElementById("days").value);
-	params += "&hours="+encodeURIComponent(document.getElementById("hours").value);
-
-	xmlHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
-	xmlHttpRequest.setRequestHeader("Content-length", params.length);
-	xmlHttpRequest.setRequestHeader("Connection", "close");
-
-	xmlHttpRequest.send(params);
-
-	return xmlHttpRequest;
-
-}
-
-
-function createCsrXenroll(enrollObj, keylength) {
-	if (enrollObj == null) {
-		enrollObj = new ActiveXObject("CEnroll.CEnroll");
-	}
-
-	// http://msdn.microsoft.com/en-us/library/aa379941%28VS.85%29.aspx
-	// CRYPT_EXPORTABLE: 1?
-	enrollObj.GenKeyFlags = (keylength * 256 * 256) + 1;
-	enrollObj.KeySpec = 2;
-
-	var csr = enrollObj.createPKCS10("", "");
-	csr = "-----BEGIN CERTIFICATE REQUEST-----\r\n" + csr
-	+ "-----END CERTIFICATE REQUEST-----";
-
-	xmlHttpRequest = createRequest(csr);
-
-	xmlHttpRequest.onreadystatechange = function() {
-		if (xmlHttpRequest.readyState == 4) {
-			if (xmlHttpRequest.status == 200) {
-				enrollObj.acceptPKCS7(xmlHttpRequest.responseText);
-				window.alert("A certificate has been installed.");
-			} else {
-				window.alert("The server returned an error status: "
-					+ xmlHttpRequest.status);
-			}
-		}
-	}
-}
-
-function createCsr() {
-	var keystrengthSelectElem = document.getElementById("keylength");
-	var keylength = keystrengthSelectElem.value;
-
-	var enrollFactObj = null;
-	try {
-		enrollFactObj = new ActiveXObject(
-			"X509Enrollment.CX509EnrollmentWebClassFactory");
-	} catch (e) {
-	}
-
-	if (enrollFactObj != null) {
-		createCsrCertEnroll(enrollFactObj, keylength);
-	} else {
-		var enrollObj = null;
-		try {
-			enrollObj = new ActiveXObject("CEnroll.CEnroll");
-		} catch (e) {
-		}
-		if (enrollObj != null) {
-			createCsrXenroll(enrollObj, keylength);
-		} else {
-			window.alert("ActiveX certificate creation not supported or not enabled.");
-		}
-	}
-}
-// kgnFloctn needs to be calculated first
-var kgnFloctn = "errorKeyGenLoctn";
-function configurePage() {
-	kgnFloctn = document.getElementById("keygenform").getAttribute("action");
-
-	var keygenElem = document.getElementById("spkac");
-
-	if (navigator.appName == "Microsoft Internet Explorer") {
-		var keygenFormElem = document.getElementById("keygenform");
-		keygenFormElem.removeAttribute("action");
-		keygenFormElem.removeAttribute("method");
-
-		/*
-		 * Try the ActiveX approach, assume Internet Explorer.
-		 */
-
-		var iehelptextElem = document.getElementById("iehelptext");
-		iehelptextElem.style.display = "block";
-
-		var submitButtonElem = document.getElementById("keygensubmit");
-		var newSumbitButtonElem = document.createElement("input");
-		newSumbitButtonElem.setAttribute("type", "button");
-		newSumbitButtonElem.setAttribute("value", "Submit");
-		submitButtonElem.parentNode.replaceChild(newSumbitButtonElem,
-			submitButtonElem);
-		submitButtonElem = newSumbitButtonElem;
-
-		if (submitButtonElem.attachEvent) {
-			submitButtonElem.attachEvent("onclick", createCsr);
-		} else {
-			submitButtonElem.setAttribute("onclick", "createCsr()");
-		}
-
-		var keystrengthSelectElem = document.createElement("select");
-		keystrengthSelectElem.setAttribute("id", "keylength");
-		keystrengthSelectElem.setAttribute("name", "keylength");
-		var optionElem;
-		optionElem = document.createElement("option");
-		optionElem.setAttribute("value", "1024");
-		optionElem.appendChild(document.createTextNode("1024"));
-		keystrengthSelectElem.appendChild(optionElem);
-		optionElem = document.createElement("option");
-		optionElem.setAttribute("value", "2048");
-		optionElem.appendChild(document.createTextNode("2048"));
-		keystrengthSelectElem.appendChild(optionElem);
-		var keystrengthTdElem = document.getElementById("keystrenghtd");
-		keystrengthTdElem.appendChild(keystrengthSelectElem);
-	}
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
deleted file mode 100644
index 6ad1db2..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/scripts/profile.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-$(document).ready(function() {
-	$('#newWebIdButton').click(function() {
-		$("#newOrExistingSelection").css({display: "none"})
-		$("#createNewWebId").css({display: "block"})
-	});
-	$("#existingWebIdButton").click(function() {
-		$("#newOrExistingSelection").css({display: "none"})
-		$("#setExistingWebId").css({display: "block"})
-	});
-	$("#keygenform").submit(function() {
-		return spkacFix();
-	});
-});
-
-var crmfObject;
-function setCRMFRequest() {
-	var hiddenField = $("<input type=\"hidden\" name=\"crmf\" id=\"crmf\" \/>");
-	$("#keygenform").append(hiddenField)
-	//var formContents = $("#keygenform").serialize();
-	//var newContents = jQuery.extend({}, formContents);
-	hiddenField.val(crmfObject.request)
-	$("#keygenform").submit()
-}
-
-function spkacFix() {
-
-	if ($("#spkac").val()) {
-		return true;
-	} else {
-		if ($("#crmf").val()) {
-			return true;
-		}
-		//alert("fix needed by firefox in xhtml mode")
-		crmfObject = crypto.generateCRMFRequest(
-		'CN=Ignored',
-		"regToken", "authenticator", // not sure
-		null, // base-64 cert for key
-		// escrow. set this to null
-		"setCRMFRequest();", // callback
-		2048, null, "rsa-dual-use"); // key parameters
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
deleted file mode 100644
index 64e52c4..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/CLEREZZA-INF/web-resources/account-control-panel/style/profile.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#associateSelection {
-	width: 80%
-}
-#createNewWebId {
-	display: none
-}
-#setExistingWebId {
-	display: none
-}
-/* we need to override a table td:first-child in /style/table.css */
-td.propvalue:first-child { 
-	text-align: right;
-}
-
-td.formlabel:first-child { 
-	width: 10em;
-	text-align: right;
-}
-
-td.multiline:first-child {
-    vertical-align: text-top;
-}
-
-img.mugshot {
-    width: 80px;
-}
-
-td.personInABox {
-    width: 100px;
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
deleted file mode 100644
index 8e50481..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.AcpPermissionDescriptionsProvider"/>
-    </scr:component>
-
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.MenuItemProvider"/>
-    </scr:component>
-
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel"/>
-        <service servicefactory="false">
-            <provide interface="java.lang.Object"/>
-        </service>
-        <property name="javax.ws.rs" type="Boolean" value="true"/>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.SettingsPanel"/>
-        <reference name="configurationAdmin" interface="org.osgi.service.cm.ConfigurationAdmin" cardinality="0..1" policy="dynamic" bind="bindConfigurationAdmin" unbind="unbindConfigurationAdmin"/>
-        <reference name="systemGraph" interface="org.apache.clerezza.rdf.core.MGraph" cardinality="1..1" policy="static" target="(name=urn:x-localinstance:/system.graph)" bind="bindSystemGraph" unbind="unbindSystemGraph"/>
-        <reference name="cgProvider" interface="org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider" cardinality="1..1" policy="static" bind="bindCgProvider" unbind="unbindCgProvider"/>
-    </scr:component>
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.SettingsPanel"/>
-    </scr:component>
-
-
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel"/>
-        <service servicefactory="false">
-            <provide interface="java.lang.Object"/>
-        </service>
-        <property name="javax.ws.rs" type="Boolean" value="true"/>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.ProfilePanel"/>
-        <reference name="userManager" interface="org.apache.clerezza.platform.usermanager.UserManager"
-                   cardinality="1..1" policy="static" bind="bindUserManager" unbind="unbindUserManager"/>
-        <reference name="graphNodeProvider" interface="org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider"
-                   cardinality="1..1" policy="static" bind="bindGraphNodeProvider" unbind="unbindGraphNodeProvider"/>
-        <reference name="keygenSrvc" interface="org.apache.clerezza.ssl.keygen.KeygenService"
-                   cardinality="1..1" policy="static" bind="bindKeygenSrvc" unbind="unbindKeygenSrvc"/>
-        <reference name="webIdGraphsService" interface="org.apache.clerezza.platform.users.WebIdGraphsService"
-                   cardinality="1..1" policy="static" bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
-        <reference name="platformConfig" interface="org.apache.clerezza.platform.config.PlatformConfig"
-                   cardinality="1..1" policy="static" bind="bindPlatformConfig" unbind="unbindPlatformConfig"/>
-        <reference name="tcManager" interface="org.apache.clerezza.rdf.core.access.TcManager"
-                   cardinality="1..1" policy="static" bind="bindTcManager" unbind="unbindTcManager"/>
-    </scr:component>
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.ProfilePanel"/>
-    </scr:component>
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.ContactConfirmRenderlet"/>
-    </scr:component>
-    <scr:component enabled="true" name="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox">
-        <implementation class="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox"/>
-        <service servicefactory="false">
-            <provide interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
-        </service>
-        <property name="service.pid" value="org.apache.clerezza.platform.accountcontrolpanel.html.PersonBox"/>
-    </scr:component>
-</components>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
deleted file mode 100644
index 5d41410..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/AcpPermissionDescriptionsProvider.scala
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.accountcontrolpanel
-
-import java.util.HashSet
-import java.util.Set
-import org.apache.clerezza.permissiondescriptions.PermissionDescriptionsProvider
-import org.apache.clerezza.permissiondescriptions.PermissionDescripton
-import org.apache.felix.scr.annotations.Component
-import org.apache.felix.scr.annotations.Service
-
-/**
- * <code>PermissionDescriptionsProvider</code> implementation that provides
- * <code>PermissionDescripton</code>s of Account Control Panel permissions.
- * The following permissions are described:
- * <ul>
- *   <li>org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission</li>
- *   <li>org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission</li>
- *   <li>org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission</li>
- * </ul>
- *
- * @author mir
- */
-object AcpPermissionDescriptionsProvider {
-  private  val ACP_PERMISSION_DESCRIPTIONS: Set[PermissionDescripton] = new HashSet[PermissionDescripton]
-  ACP_PERMISSION_DESCRIPTIONS.add(
-    new PermissionDescripton("Change Own Password Permission",
-      "Grants permission to the user to change its own password",
-      null, classOf[ChangePasswordPermission],
-      "(org.apache.clerezza.platform.accountcontrolpanel.ChangePasswordPermission \"{username}\" \"\")"
-    )
-  )
-
-  ACP_PERMISSION_DESCRIPTIONS.add(
-    new PermissionDescripton("Access Own Account Control Panel Permission",
-      "Grants permission to the user to access its own Account Control Panel",
-      null, classOf[AccountControlPanelAppPermission],
-      "(org.apache.clerezza.platform.accountcontrolpanel.AccountControlPanelAppPermission \"{username}\" \"\")"
-    )
-  )
-
-  ACP_PERMISSION_DESCRIPTIONS.add(
-    new PermissionDescripton("Bundle Upload Permission",
-      "Grants permission to the user to upload a bundle",
-      null, classOf[AccountControlPanelAppPermission],
-      "(org.apache.clerezza.platform.accountcontrolpanel.UserBundlePermission \"{username}\" \"\")"
-    )
-  )
-
-}
-
-class AcpPermissionDescriptionsProvider extends PermissionDescriptionsProvider {
-
-  import AcpPermissionDescriptionsProvider._
-
-  def getPermissionDescriptors: Set[PermissionDescripton] = {
-    return ACP_PERMISSION_DESCRIPTIONS
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
deleted file mode 100644
index ce09780..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.accountcontrolpanel
-
-import java.io.UnsupportedEncodingException
-import java.net.URLEncoder
-import java.security.AccessControlContext
-import java.security.AccessControlException
-import java.security.AccessController
-import java.security.Principal
-import java.security.PrivilegedActionException
-import java.security.PrivilegedExceptionAction
-import java.util.HashSet
-import java.util.Iterator
-import java.util.Set
-import javax.security.auth.Subject
-import org.apache.felix.scr.annotations.Component
-import org.apache.felix.scr.annotations.Service
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
-import org.apache.stanbol.commons.security.UserUtil
-
-/**
- *
- * Provides menu-item to profile or settings-panel or none depending on user
- * permissions.
- *
- * @author reto
- */
-class MenuItemProvider extends GlobalMenuItemsProvider {
-  def getMenuItems: Set[GlobalMenuItem] = {
-    var items: Set[GlobalMenuItem] = new HashSet[GlobalMenuItem]
-    var userName: String = UserUtil.getCurrentUserName
-    if (userName != null) {
-      try {
-        AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
-      }
-      catch {
-        case e: AccessControlException => {
-          return items
-        }
-      }
-      try {
-        var path: String = "/user/" + URLEncoder.encode(userName, "utf-8") + "/control-panel"
-        items.add(new GlobalMenuItem(path, "ACP", "Account Control Panel", 5, "Administration"))
-      }
-      catch {
-        case e: UnsupportedEncodingException => {
-          throw new RuntimeException(e)
-        }
-      }
-    }
-    return items
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
deleted file mode 100644
index d46f9f1..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.accountcontrolpanel
-
-import java.util.List
-import java.util.Arrays
-import java.util.Collections
-import java.util.Iterator
-import ontologies.CONTROLPANEL
-import org.apache.clerezza.rdf.utils.graphnodeprovider.GraphNodeProvider
-import org.apache.clerezza.ssl.keygen.CertSerialisation
-import org.apache.clerezza.ssl.keygen.Certificate
-import org.apache.clerezza.foafssl.ontologies.CERT
-import org.apache.clerezza.foafssl.ontologies.RSA
-import org.apache.clerezza.jaxrs.utils.RedirectUtil
-import org.apache.clerezza.jaxrs.utils.TrailingSlash
-import org.apache.clerezza.platform.config.PlatformConfig
-import org.apache.clerezza.platform.usermanager.UserManager
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.platform.Constants
-import access.TcManager
-import impl.{SimpleMGraph, TripleImpl}
-import org.apache.clerezza.rdf.utils.GraphNode
-import org.apache.clerezza.rdf.utils.UnionMGraph
-import org.osgi.service.component.ComponentContext
-import javax.ws.rs._
-import javax.ws.rs.core.Context
-import javax.ws.rs.core.MediaType
-import javax.ws.rs.core.Response
-import javax.ws.rs.core.UriInfo
-import java.math.BigInteger
-import java.security.AccessController
-import java.security.PrivilegedAction
-import java.security.interfaces.RSAPublicKey
-import org.apache.clerezza.ssl.keygen.KeygenService
-import java.net.URI
-import org.apache.clerezza.rdf.core.access.security.TcPermission
-import org.apache.clerezza.rdf.ontologies._
-import org.slf4j.scala.Logging
-import org.apache.clerezza.platform.users.{WebIdInfo, WebIdGraphsService}
-import org.apache.clerezza.rdf.scala.utils._
-
-/**
- * Presents a panel where the user can create a webid and edit her profile.
- *
- * @author reto
- */
-
-@Path("/user/{id}/profile")
-class ProfilePanel extends Logging {
-
-  import collection.JavaConversions._
-  import Preamble._
-
-  /**
-   * Returns a GraphNode describing a ProfilePage for the user identified by
-   * the specified UserName. A ProfilePage resourcve is retuned for any user
-   * disregarding if they have a WebId and if this is local. The renderlet
-   * may provide instrcutions on how a WebId is created for users that do
-   * not have a WebId and redirect them to their WebId provider if they have
-   * a remote WebId.
-   */
-  @GET
-  def getPersonalProfilePage(@Context uriInfo: UriInfo,
-                             @PathParam(value = "id") userName: String): GraphNode = {
-    TrailingSlash.enforceNotPresent(uriInfo)
-    //not checking as public profile must be public, more selective access control TBD
-    //AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
-    val resultNode= getPersonalProfile(userName, uriInfo)
-    return resultNode
-  }
-
-  private def getPersonalProfile(userName: String, info: UriInfo): GraphNode = {
-    lazy val suggestedPPDUri = getSuggestedPPDUri(userName)
-
-    val profile = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-      def run: GraphNode = {
-        val userInSysGraph = userManager.getUserInSystemGraph(userName)
-        val userResource = userInSysGraph.getNode
-        val profile: GraphNode = userResource match {
-          case blank: BNode => {
-            //user does not have a webId yet
-            val g = new EzMGraph()
-            import g._
-            val profile = bnode
-            (profile -- CONTROLPANEL.isLocalProfile --> bool2lit(true)
-            -- CONTROLPANEL.suggestedPPDUri --> suggestedPPDUri
-            -- FOAF.primaryTopic --> (bnode -- PLATFORM.userName --> userName))
-            profile
-          }
-          case webid: UriRef => {
-            var webIDInfo = webIdGraphsService.getWebIdInfo(webid)
-            var res = new GraphNode(suggestedPPDUri, new UnionMGraph(new SimpleMGraph, webIDInfo.localPublicUserData))
-            (res -- CONTROLPANEL.isLocalProfile --> bool2lit(webIDInfo.isLocal)
-              -- FOAF.primaryTopic --> webid)
-            res
-          }
-        }
-        /*val friendInfo:Iterator[TripleCollection] = for (kn: Triple <- profile.getGraph.filter(userResource.asInstanceOf[NonLiteral], FOAF.knows, null)
-                              if kn.getObject.isInstanceOf[UriRef];
-                              friend = kn.getObject.asInstanceOf[UriRef]
-                              if (friend != suggestedPPDUri)
-        ) yield {
-          try {
-            val friendGraph = tcManager.getGraph(FoafBrowser.removeHash(friend))
-            new RichGraphNode(friend, friendGraph).getNodeContext
-          } catch {
-            case e => {
-              logger.warn("cought exception trying to fetch graph - these graphs should already be in store " + friend, e)
-              new EzMGraph() {
-                friend -- SKOS.note --> ("problem with fetching this node: " + e)
-              }
-            }
-          }
-        }
-        //vera bad: mixing data from different sources
-        for (g <- friendInfo) profile.getGraph.addAll(g) */
-        profile
-      }
-    })
-
-
-    (profile a   PLATFORM.HeadedPage
-             a  CONTROLPANEL.ProfilePage)
-  }
-
-  /**
-   * @param userName
-   * @return the suggested Personal Profile Document URI
-   */
-  def getSuggestedPPDUri(userName: String): UriRef = {
-    return new UriRef(platformConfig.getDefaultBaseUri.getUnicodeString + "user/" + userName + "/profile")
-  }
-
-  @POST
-  @Path("set-existing-webid")
-  def setExistingWebId(@Context uriInfo: UriInfo,
-                       @FormParam("webid") webId: UriRef,
-                       @PathParam(value = "id") userName: String): Response = {
-    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
-    return AccessController.doPrivileged(new PrivilegedAction[Response] {
-      def run: Response = {
-        var userInSystemGraph: GraphNode = userManager.getUserInSystemGraph(userName)
-        userInSystemGraph.replaceWith(webId)
-        return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-      }
-    })
-  }
-
-  @POST
-  @Path("create-new-web-id")
-  def createNewWebId(@Context uriInfo: UriInfo,
-                     @PathParam(value = "id") userName: String): Response = {
-    val ppd: UriRef = getSuggestedPPDUri(userName)
-    val webId: UriRef = new UriRef(ppd.getUnicodeString + "#me")
-    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
-    return AccessController.doPrivileged(new PrivilegedAction[Response] {
-      def run: Response = {
-        userManager.assignPermissionsToUser(userName, java.util.Collections.singletonList(new TcPermission(
-            webId.getUnicodeString, TcPermission.READWRITE).toString))
-        tcManager.getTcAccessController.setRequiredReadPermissionStrings(
-          ppd, Collections.singleton(new TcPermission(
-              Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
-        tcManager.createMGraph(ppd)
-        val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
-        webIDInfo.localPublicUserData.addAll(
-          Arrays.asList(
-            new TripleImpl(ppd, RDF.`type`, FOAF.PersonalProfileDocument),
-            new TripleImpl(ppd, FOAF.primaryTopic, webId))
-        )
-        var userInSystemGraph: GraphNode = userManager.getUserInSystemGraph(userName)
-        userInSystemGraph.replaceWith(webId)
-        return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-      }
-    })
-  }
-
-  /**
-   * Presents a confirmation form for adding a contact
-   */
-  @GET
-  @Path("addContact")
-  def addContactConfirm(@PathParam(value = "id") userName: String,
-    @QueryParam("contactWebId") contactWebId: UriRef): GraphNode = {
-    AccessController.checkPermission(new AccountControlPanelAppPermission(userName, ""))
-    val contactNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-      def run = {
-        graphNodeProvider.get(contactWebId);
-      }
-    })
-    val resultGraph = new EzMGraph(new UnionMGraph(new SimpleMGraph, contactNode.getGraph))
-    import resultGraph._
-    val result: GraphNode = bnode
-    result a CONTROLPANEL.ContactConfirmPage
-    result -- FOAF.primaryTopic --> contactNode
-  }
-
-  @POST
-  @Path("addContact")
-  def addContact(@PathParam(value = "id") userName: String, @Context uriInfo: UriInfo,
-                 @FormParam("webId") newContacts: java.util.List[UriRef]): Response = {
-    import collection.JavaConversions._
-    if (newContacts.size > 0) {
-      var me: GraphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-        def run: GraphNode = {
-          return userManager.getUserGraphNode(userName)
-        }
-      })
-      for (contactWebID <- newContacts) {
-        val webIdGraphs = webIdGraphsService.getWebIdInfo(me.getNode.asInstanceOf[UriRef])
-        var meGrph: GraphNode = new GraphNode(me.getNode, webIdGraphs.localPublicUserData)
-        meGrph.addProperty(FOAF.knows, contactWebID)
-      } //todo: one should catch errors here (bad uris sent for ex
-    }
-    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-  }
-
-  /**
-   * Removes a contact
-   */
-  @POST
-  @Path("deleteContact")
-  def deleteContact(@PathParam(value = "id") userName: String, @Context uriInfo: UriInfo,
-                 @FormParam("contactWebId") contactWebId: UriRef): Response = {
-    import collection.JavaConversions._
-    var me: GraphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-      def run: GraphNode = {
-        return userManager.getUserGraphNode(userName)
-      }
-    })
-    val webIdGraphs = webIdGraphsService.getWebIdInfo(me.getNode.asInstanceOf[UriRef])
-    var meGrph: GraphNode = new GraphNode(me.getNode, webIdGraphs.localPublicUserData)
-    meGrph.deleteProperty(FOAF.knows, contactWebId)
-    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-  }
-
-  /**
-   * @parm webId: A list of WebIDs to be added as Subject Alternative Names
-   * @param cn Common Name, the name that usually appears in the certificate selection box
-   * @param spkac key request in format generated by  Netscape, Safari, Opera
-   * @param crmf hey request in format generated by M$ Explorer
-   * @param csr key request as generated by Javascript of Netscape
-   * @param hours the certificate should last  (hours and days add up)
-   * @param days the certificate should last
-   * @param comment a comment to be attached to the public key in the database
-   */
-  @POST
-  @Path("keygen")
-  def createCert(@FormParam("webId") webIds: java.util.List[URI],
-                 @FormParam("cn") commonName: String,
-                 @FormParam("spkac") spkac: String,
-                 @FormParam("crmf") crmf: String,
-                 @FormParam("csr") csr: String,
-                 @FormParam("hours") hours: String,
-                 @FormParam("days") days: String,
-                 @FormParam("comment") comment: String): Response = {
-    import scala.collection.JavaConversions._
-    var cert: Certificate = null
-    if (spkac != null && spkac.length > 0) {
-      cert = keygenSrvc.createFromSpkac(spkac)
-      if (cert == null) {
-        logger.warn("unable to create certificate from spkac request")
-      }
-    }
-    if (cert == null && crmf != null && crmf.length > 0) {
-      cert = keygenSrvc.createFromCRMF(crmf)
-      if (cert == null) {
-        logger.warn("unable to create certificate from crmf requrest :" + crmf)
-      }
-    }
-    if (cert == null && csr != null && csr.length > 0) {
-      cert = keygenSrvc.createFromPEM(csr)
-      if (cert == null) {
-        logger.warn("unable to create certificate from csr request :" + csr)
-      }
-    }
-    if (cert == null) {
-      throw new RuntimeException("The server was unable to create a certificate")
-    }
-    cert.setSubjectCommonName(commonName)
-    cert.addDurationInHours(hours)
-    cert.addDurationInDays(days)
-    cert.startEarlier("2")
-    for(san: URI<-webIds) {
-      cert.addSubjectAlternativeName(san.toString)
-    }
-    var ser: CertSerialisation = null
-    try {
-      ser = cert.getSerialisation
-    }
-    catch {
-      case ex: Exception => {
-        throw new RuntimeException(ex)
-      }
-    }
-    var pubKey: RSAPublicKey = cert.getSubjectPublicKey.getPublicKey.asInstanceOf[RSAPublicKey]
-    var publicExponent: BigInteger = pubKey.getPublicExponent
-    var modulus: BigInteger = pubKey.getModulus
-
-    for (webid: URI<-webIds
-         if (webid.getScheme=="https"||webid.getScheme=="http");
-          val webidRef = new UriRef(webid.toString);
-         val webIdInfo = webIdGraphsService.getWebIdInfo(webidRef);
-         if (webIdInfo.isLocal)
-    ) {
-      val certGraph = new EzMGraph(webIdInfo.localPublicUserData)
-      import certGraph._
-      val certNode = certGraph.bnode
-      ( (certNode a  RSA.RSAPublicKey)
-         -- CERT.identity -->  webidRef
-         -- RSA.modulus -->  modulus
-         -- RSA.public_exponent -->  publicExponent
-         -- DC.date -->  cert.getStartDate )
-      if (comment != null && comment.length > 0) {
-        certNode --  RDFS.comment -->  comment
-      }
-    }
-    var resBuild: Response.ResponseBuilder = Response.ok(ser.getContent, MediaType.valueOf(ser.getMimeType))
-    return resBuild.build
-  }
-
-  @POST
-  @Path("deletekey")
-  def deleteKey(@Context uriInfo: UriInfo,
-                @FormParam("webId") webId: UriRef,
-                @FormParam("keyhash") keys: List[String]): Response = {
-    val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
-    val agent: GraphNode = new GraphNode(webId, webIDInfo.localPublicUserData)
-    var subjects: Iterator[GraphNode] = agent.getSubjectNodes(CERT.identity)
-    import scala.util.control.Breaks._
-    breakable {
-      import scala.collection.JavaConversions._
-      //to for loop through iterators
-      for (nl <- subjects) {
-        var modulusIt: Iterator[Resource] = nl.getObjects(RSA.modulus)
-        if (!modulusIt.hasNext) break
-        var modLit: Resource = modulusIt.next
-        if (modulusIt.hasNext) logger.warn("data error, a modulus too many in cert for " + webId)
-        if (!(modLit.isInstanceOf[TypedLiteral])) {
-          logger.warn("a public key has a modulus that is not a literal for " + webId)
-          break
-        }
-        var modulus: BigInteger = LiteralFactory.getInstance.createObject(classOf[BigInteger], modLit.asInstanceOf[TypedLiteral])
-        for (key <- keys) {
-          if (modulus.hashCode == Integer.decode(key)) {
-            nl.deleteNodeContext
-            break
-          }
-        }
-      }
-    }
-    return RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-  }
-
-  @POST
-  @Path("modify")
-  def modifyProfile(@Context uriInfo: UriInfo,
-                    @PathParam("id") userName: String,
-                    @FormParam("webId") webId: UriRef,
-                    @FormParam("name") name: String,
-                    @FormParam("description") description: String): Response = {
-    val webIDInfo = AccessController.doPrivileged(new PrivilegedAction[WebIdInfo] {
-      def run = {
-        webIdGraphsService.getWebIdInfo(webId)
-      }
-    })
-    val agent: GraphNode = new GraphNode(webId, webIDInfo.localPublicUserData)
-    agent.deleteProperties(FOAF.name)
-    agent.addPropertyValue(FOAF.name, name)
-    agent.deleteProperties(DC.description)
-    agent.addPropertyValue(DC.description, description)
-    logger.debug("local graph (uri: {}) is now of size {}".format(webIDInfo.webId, webIDInfo.localPublicUserData.size))
-    RedirectUtil.createSeeOtherResponse("../profile", uriInfo)
-  }
-
-  protected def bindUserManager(usermanager: UserManager): Unit = {
-    userManager = usermanager
-  }
-
-  protected def unbindUserManager(usermanager: UserManager): Unit = {
-    if (userManager == usermanager) {
-      userManager = null
-    }
-  }
-
-  protected def bindGraphNodeProvider(graphNodeProvider: GraphNodeProvider): Unit = {
-    this.graphNodeProvider = graphNodeProvider
-  }
-
-  protected def unbindGraphNodeProvider(graphNodeProvider: GraphNodeProvider): Unit = {
-    this.graphNodeProvider = null
-  }
-
-  protected def bindKeygenSrvc(keygenservice: KeygenService): Unit = {
-    keygenSrvc = keygenservice
-  }
-
-  protected def unbindKeygenSrvc(keygenservice: KeygenService): Unit = {
-    if (keygenSrvc == keygenservice) {
-      keygenSrvc = null
-    }
-  }
-
-
-  protected def bindWebIdGraphsService(webidgraphsservice: WebIdGraphsService): Unit = {
-    webIdGraphsService = webidgraphsservice
-  }
-
-  protected def unbindWebIdGraphsService(webidgraphsservice: WebIdGraphsService): Unit = {
-    webIdGraphsService = null
-  }
-
-  protected def bindPlatformConfig(platformconfig: PlatformConfig): Unit = {
-    platformConfig = platformconfig
-  }
-
-  protected def unbindPlatformConfig(platformconfig: PlatformConfig): Unit = {
-    if (platformConfig == platformconfig) {
-      platformConfig = null
-    }
-  }
-
-  protected def bindTcManager(tcManager: TcManager) = {
-    this.tcManager = tcManager
-  }
-
-  protected def unbindTcManager(tcManager: TcManager) = {
-    this.tcManager = null
-  }
-
-  protected def activate(componentContext: ComponentContext): Unit = {
-    this.componentContext = componentContext
-  }
-
-
-  private var userManager: UserManager = null
-
-  private var graphNodeProvider: GraphNodeProvider = null
-
-  private var webIdGraphsService: WebIdGraphsService = null
-
-  private var keygenSrvc: KeygenService = null
-  private var platformConfig: PlatformConfig = null
-
-
-  private var componentContext: ComponentContext = null
-
-  private var tcManager: TcManager = null;
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
----------------------------------------------------------------------
diff --git a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala b/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
deleted file mode 100644
index 3d8d929..0000000
--- a/platform/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/SettingsPanel.scala
+++ /dev/null
@@ -1,646 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.accountcontrolpanel
-
-import java.io.ByteArrayInputStream
-import java.io.IOException
-import java.io.InputStream
-import java.io.UnsupportedEncodingException
-import java.net.URL
-import java.security.AccessControlException
-import java.security.AccessController
-import java.security.MessageDigest
-import java.security.NoSuchAlgorithmException
-import java.security.PrivilegedAction
-import java.util.Dictionary
-import java.util.HashMap
-import java.util.HashSet
-import java.util.Hashtable
-import java.util.Iterator
-import java.util.Map
-import java.util.Set
-import javax.ws.rs.Consumes
-import javax.ws.rs.FormParam
-import javax.ws.rs.GET
-import javax.ws.rs.POST
-import javax.ws.rs.Path
-import javax.ws.rs.PathParam
-import javax.ws.rs.QueryParam
-import javax.ws.rs.WebApplicationException
-import javax.ws.rs.core.Context
-import javax.ws.rs.core.MediaType
-import javax.ws.rs.core.Response
-import javax.ws.rs.core.Response.ResponseBuilder
-import javax.ws.rs.core.UriInfo
-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.ReferenceCardinality
-import org.apache.felix.scr.annotations.ReferencePolicy
-import org.apache.felix.scr.annotations.Service
-import org.osgi.framework.Bundle
-import org.osgi.framework.BundleException
-import org.osgi.service.cm.Configuration
-import org.osgi.service.cm.ConfigurationAdmin
-import org.osgi.service.component.ComponentContext
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
-import org.apache.clerezza.jaxrs.utils.TrailingSlash
-import org.apache.clerezza.jaxrs.utils.RedirectUtil
-import org.apache.clerezza.jaxrs.utils.form.FormFile
-import org.apache.clerezza.jaxrs.utils.form.MultiPartBody
-import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
-import org.apache.clerezza.platform.config.SystemConfig
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
-import org.apache.clerezza.platform.typerendering.RenderletManager
-import org.apache.clerezza.platform.typerendering.scala.PageRenderlet
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet
-import org.apache.clerezza.rdf.core.BNode
-import org.apache.clerezza.rdf.core.Graph
-import org.apache.clerezza.rdf.core.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.impl.PlainLiteralImpl
-import org.apache.clerezza.rdf.core.impl.SimpleLiteralFactory
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph
-import org.apache.clerezza.rdf.core.impl.TripleImpl
-import org.apache.clerezza.rdf.ontologies.OSGI
-import org.apache.clerezza.rdf.ontologies.PERMISSION
-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
-
-object SettingPanel {
-  val logger: Logger = LoggerFactory.getLogger(classOf[SettingsPanel])
-}
-
-/**
- *
- * Account control panel
- *
- * @author mir, hasan
- */
-@Path("/user/{id}/control-panel")
-class SettingsPanel {
-
-  import SettingPanel.logger
-
-  /**
-   * Mainpage
-   *
-   * @param id is the username as given in the URL
-   * @return an array of installed {@link Bundle}s to be managed
-   *
-   */
-  @GET
-  def settingsPage(@PathParam(value = "id") idP: String,
-              @QueryParam("changedPassword") changedPassword: String,
-              @Context uriInfo: UriInfo): GraphNode = {
-    TrailingSlash.enforceNotPresent(uriInfo)
-    val id: String = idP
-    var graphNode: GraphNode = null
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    try {
-      AccessController.checkPermission(new UserBundlePermission(id, ""))
-      graphNode = AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-        def run: GraphNode = {
-          var bundles: Array[Bundle] = userBundles(getAgent(id))
-          return asGraphNode(id, bundles)
-        }
-      })
-    }
-    catch {
-      case e: AccessControlException => {
-        graphNode = new GraphNode(new BNode, new SimpleMGraph)
-        graphNode.addProperty(CONTROLPANEL.userBundlePermission, LiteralFactory.getInstance.createTypedLiteral(false))
-      }
-    }
-    try {
-      AccessController.checkPermission(new ChangePasswordPermission(id, ""))
-      graphNode.addProperty(CONTROLPANEL.changePasswordPermission, LiteralFactory.getInstance.createTypedLiteral(true))
-    }
-    catch {
-      case e: AccessControlException => {
-        graphNode.addProperty(CONTROLPANEL.changePasswordPermission, LiteralFactory.getInstance.createTypedLiteral(false))
-      }
-    }
-    if (changedPassword != null && changedPassword.equals("false")) {
-      graphNode.addProperty(CONTROLPANEL.changedPassword, new PlainLiteralImpl("false"))
-    }
-    graphNode.addProperty(RDF.`type`, CONTROLPANEL.SettingsPage)
-    graphNode.addProperty(RDF.`type`, PLATFORM.HeadedPage)
-    return graphNode
-  }
-
-  private def addBundleDescriptionToGraph(responseGraph: MGraph, bundle: Bundle): Unit = {
-    var status: TypedLiteral = LiteralFactory.getInstance.createTypedLiteral(bundle.getState)
-    var bundleUri: UriRef = new UriRef(bundle.getLocation)
-    var triple: Triple = new TripleImpl(bundleUri, OSGI.status, status)
-    responseGraph.add(triple)
-    var bundleId: TypedLiteral = LiteralFactory.getInstance.createTypedLiteral(bundle.getBundleId)
-    triple = new TripleImpl(bundleUri, OSGI.bundle_id, bundleId)
-    responseGraph.add(triple)
-  }
-
-  private def asGraphNode(userId: String, bundles: Array[Bundle]): GraphNode = {
-    val responseGraph: MGraph = new SimpleMGraph
-    for (bundle <- bundles) {
-      addBundleDescriptionToGraph(responseGraph, bundle)
-    }
-    return AccessController.doPrivileged(new PrivilegedAction[GraphNode] {
-      def run: GraphNode = {
-        var userDescriptionGraph: Graph = new GraphNode(getAgent(userId), systemGraph).getNodeContext
-        var unionGraph: UnionMGraph = new UnionMGraph(responseGraph, userDescriptionGraph)
-        var graphNode: GraphNode = new GraphNode(getAgent(userId), unionGraph)
-        graphNode.addProperty(CONTROLPANEL.userBundlePermission, LiteralFactory.getInstance.createTypedLiteral(true))
-        return graphNode
-      }
-    })
-  }
-
-  /**
-   * Retrieves all bundles owned by a user represented by agent
-   *
-   * @param agent represents the user who owns bundles to be returned
-   * @return an array of {@link Bundle}s owned by the user
-   *
-   */
-  private def userBundles(agent: NonLiteral): Array[Bundle] = {
-    logger.debug("Retrieve all bundles from user: {}", agent)
-    var installedBundles: Array[Bundle] = componentContext.getBundleContext.getBundles
-    val locationMapper: Map[String, Long] = new HashMap[String, Long]
-    for (b <- installedBundles) {
-      locationMapper.put(b.getLocation, b.getBundleId)
-    }
-    return AccessController.doPrivileged(new PrivilegedAction[Array[Bundle]] {
-      def run: Array[Bundle] = {
-        var bundles: Set[Bundle] = new HashSet[Bundle]
-        var agentBundles: Iterator[Triple] = systemGraph.filter(null, OSGI.owner, agent)
-        while (agentBundles.hasNext) {
-          val location: String = (agentBundles.next.getSubject.asInstanceOf[UriRef]).getUnicodeString
-          try {
-            val id: Long = locationMapper.get(location)
-            bundles.add(componentContext.getBundleContext.getBundle(id))
-          } catch {
-            case _:NumberFormatException => None
-          }
-        }
-        return bundles.toArray(new Array[Bundle](bundles.size))
-      }
-    })
-  }
-
-  private def getAgent(id: String): NonLiteral = {
-    logger.debug("Get agent with id {}", id)
-    var agents: Iterator[Triple] = systemGraph.filter(null, PLATFORM.userName, new PlainLiteralImpl(id))
-    if (agents.hasNext) {
-      return agents.next.getSubject
-    }
-    else {
-      logger.debug("System graph does not contain user: {}", id)
-      var responseBuilder: Response.ResponseBuilder = Response.ok("<html><body>User does not exist</body></html>")
-      throw new WebApplicationException(responseBuilder.build)
-    }
-  }
-
-  private def getAgentPathPrefix(agent: NonLiteral): PlainLiteralImpl = {
-    return AccessController.doPrivileged(new PrivilegedAction[PlainLiteralImpl] {
-      def run: PlainLiteralImpl = {
-        var pathPrefixes: Iterator[Triple] = systemGraph.filter(agent, OSGI.agent_path_prefix, null)
-        if (pathPrefixes.hasNext) {
-          return pathPrefixes.next.getObject.asInstanceOf[PlainLiteralImpl]
-        }
-        return null
-      }
-    })
-  }
-
-  /**
-   * Installs a bundle from the specified location.
-   *
-   * @param id is the username as given in the URL
-   * @param location specifies the URL of the bundle to be installed
-   * @return an array of installed {@link Bundle}s to be managed
-   *
-   */
-  @POST
-  @Path("install-bundle")
-  @Consumes def installBundle(@PathParam(value = "id") id: String, multiForm: MultiPartBody, @Context uriInfo: UriInfo): Response = {
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.checkPermission(new UserBundlePermission(id, ""))
-    var formFiles: Array[FormFile] = multiForm.getFormFileParameterValues("bundle")
-    var filename: String = formFiles(0).getFileName
-    var bundleBytes: Array[Byte] = formFiles(0).getContent
-    if (bundleBytes.length == 0) {
-      var message: String = null
-      if (filename.equals("")) {
-        message = "No bundle specified"
-      }
-      else {
-        message = "Bundle has length 0"
-      }
-      var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(message)
-      throw new WebApplicationException(responseBuilder.build)
-    }
-    val bundleInputStream: InputStream = new ByteArrayInputStream(bundleBytes)
-    val location: String = "userbundle:" + id + "/" + filename
-    logger.info("Install bundle {} to location {}", id, location)
-    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
-      def run: Array[Bundle] = {
-        val agent: NonLiteral = getAgent(id)
-        val triple: Triple = new TripleImpl(new UriRef(location), OSGI.owner, agent)
-        try {
-          systemGraph.add(triple)
-          var bundle: Bundle = componentContext.getBundleContext.installBundle(location, bundleInputStream)
-          var prefix: PlainLiteralImpl = getAgentPathPrefix(agent)
-          if (prefix != null) {
-            addBundlePrefix(bundle, prefix.getLexicalForm)
-          }
-          return null
-        }
-        catch {
-          case ex: BundleException => {
-            systemGraph.remove(triple)
-            logger.debug("Failed to install a bundle from: {}", location)
-            logger.error("Exception during install bundle: {}", ex)
-            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.getMessage)
-            throw new WebApplicationException(responseBuilder.build)
-          }
-        }
-      }
-    })
-    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-  }
-
-  private def addBundlePrefix(bundle: Bundle, prefix: String): Unit = {
-    var symbolicName: String = bundle.getSymbolicName
-    /*if (configAdmin != null) {
-      try {
-        var configuration: Configuration = configAdmin.getConfiguration(classOf[TriaxrsPrefixManager].getName)
-        val properties = configuration.getProperties match {
-          case null => new Hashtable[String, AnyRef]()
-          case dict: Dictionary[String, AnyRef] => dict
-        }
-        var mappings = TriaxrsPrefixManager.parseMappings(properties.get(TriaxrsPrefixManager.TRIAXRS_MAPPINGS).asInstanceOf[Array[String]])
-        logger.debug("Prefix {} added to bundle {}", prefix, symbolicName)
-        mappings.put(symbolicName, prefix)
-        var newMappings: Array[String] = TriaxrsPrefixManager.unparseMappings(mappings)
-        properties.put(TriaxrsPrefixManager.TRIAXRS_MAPPINGS, newMappings)
-        configuration.update(properties)
-      }
-      catch {
-        case e: IOException => {
-          logger.warn("Unable to update configuration: {}", e.toString)
-        }
-      }
-    }
-    else {
-      logger.warn("Cannot add prefix mapping. Configuration Admin is missing")
-    }*/
-  }
-
-  private[accountcontrolpanel] def removeBundlePrefix(bundle: Bundle): Unit = {
-    var symbolicName: String = bundle.getSymbolicName
-    /*if ((this.configAdmin != null) && (symbolicName != null)) {
-      try {
-        val configuration: Configuration = configAdmin.getConfiguration(classOf[TriaxrsPrefixManager].getName)
-        val properties = configuration.getProperties match {
-          case null => new Hashtable[String, AnyRef]()
-          case dict: Dictionary[String, AnyRef] => dict
-        }
-        val mappings = TriaxrsPrefixManager.parseMappings(properties.get(TriaxrsPrefixManager.TRIAXRS_MAPPINGS).asInstanceOf[Array[String]])
-        mappings.remove(symbolicName)
-        val newMappings: Array[String] = TriaxrsPrefixManager.unparseMappings(mappings)
-        properties.put(TriaxrsPrefixManager.TRIAXRS_MAPPINGS, newMappings)
-        configuration.update(properties)
-      }
-      catch {
-        case e: IOException => {
-          logger.warn("Unable to update configuration: {}", e.toString)
-        }
-      }
-    }
-    else {
-      logger.warn("Cannot add prefix mapping. Configuration Admin is missing")
-    }*/
-  }
-
-  /**
-   * Starts the bundle with the specified bundle id.
-   *
-   * @param id is the username as given in the URL
-   * @param bundleIdString specifies the id of the bundle to be started
-   * @return an array of installed {@link Bundle}s to be managed
-   *
-   */
-  @POST
-  @Path("start-bundle")
-  def startBundle(@PathParam(value = "id") idP: String,
-             @FormParam("bundleId") bundleIdStringP: String,
-             @Context uriInfo: UriInfo): Response = {
-    val id: String = idP
-    val bundleIdString: String = bundleIdStringP
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.checkPermission(new UserBundlePermission(id, ""))
-    logger.info("Start bundle {} ", id)
-    val bundleId: Long = bundleIdString.toLong
-    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
-      def run: Array[Bundle] = {
-        try {
-          val bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
-          bundle.start
-        }
-        catch {
-          case e: BundleException => {
-            logger.debug("Failed to start bundle {}", bundleIdString)
-            logger.error("Exception during start bundle: {}", e)
-            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
-            throw new WebApplicationException(responseBuilder.build)
-          }
-        }
-        return null
-      }
-    })
-    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-  }
-
-  /**
-   * Stops the bundle with the specified bundle id.
-   *
-   * @param id is the username as given in the URL
-   * @param bundleIdString specifies the id of the bundle to be stopped
-   * @return an array of installed {@link Bundle}s to be managed
-   *
-   */
-  @POST
-  @Path("stop-bundle") def stopBundle(@PathParam(value = "id") idP: String,
-                          @FormParam("bundleId") bundleIdStringP: String,
-                          @Context uriInfo: UriInfo): Response = {
-    val id: String = idP
-    val bundleIdString: String = bundleIdStringP
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.checkPermission(new UserBundlePermission(id, ""))
-    logger.info("Stop bundle {}", id)
-    val bundleId: Long = bundleIdString.toLong
-    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
-      def run: Array[Bundle] = {
-        try {
-          var bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
-          bundle.stop
-        }
-        catch {
-          case e: BundleException => {
-            logger.debug("Failed to stop bundle ", bundleIdString)
-            logger.error("Exception during stop bundle: {}", e)
-            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
-            throw new WebApplicationException(responseBuilder.build)
-          }
-        }
-        return null
-      }
-    })
-    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-  }
-
-  /**
-   * Uninstalls the bundle with the specified bundle id.
-   *
-   * @param id is the username as given in the URL
-   * @param bundleIdString specifies the id of the bundle to be uninstalled
-   * @return an array of installed {@link Bundle}s to be managed
-   *
-   */
-  @POST
-  @Path("uninstall-bundle")
-  def uninstallBundle(@PathParam(value = "id") idP: String,
-                @FormParam("bundleId") bundleIdStringP: String,
-                @Context uriInfo: UriInfo): Response = {
-    val id: String = idP
-    val bundleIdString: String = bundleIdStringP
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.checkPermission(new UserBundlePermission(id, ""))
-    logger.info("Uninstall bundle {}", id)
-    val bundleId: Long = bundleIdString.toLong
-    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
-      def run: Array[Bundle] = {
-        val agent: NonLiteral = getAgent(id)
-        try {
-          var bundle: Bundle = componentContext.getBundleContext.getBundle(bundleId)
-          bundle.uninstall
-          val triple: Triple = new TripleImpl(new UriRef(bundle.getLocation), OSGI.owner, agent)
-          systemGraph.remove(triple)
-          removeBundlePrefix(bundle)
-        }
-        catch {
-          case e: BundleException => {
-            logger.debug("Failed to uninstall bundle {}", bundleIdString)
-            logger.error("Exception during uninstall bundle: {}", e)
-            var responseBuilder: Response.ResponseBuilder = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage)
-            throw new WebApplicationException(responseBuilder.build)
-          }
-        }
-        return null
-      }
-    })
-    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-  }
-
-  /**
-   * changes the password of an user
-   *
-   * @param idP id is the username as given in the URL
-   * @param lang represents the user's new standard language.
-   * @return
-   */
-  @POST
-  @Path("change-language")
-  def changeUserLanguage(@PathParam(value = "id") idP: String,
-                  @FormParam("availablelanguages") lang: String,
-                  @Context uriInfo: UriInfo): Response = {
-    val id: String = idP
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.doPrivileged(new PrivilegedAction[AnyRef] {
-      def run: AnyRef = {
-        var userNode: GraphNode = new GraphNode(getAgent(id), systemGraph)
-        userNode.deleteProperties(PLATFORM.preferredLangInISOCode)
-        userNode.addProperty(PLATFORM.preferredLangInISOCode, LiteralFactory.getInstance.createTypedLiteral(lang))
-        return null
-      }
-    })
-    return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-  }
-
-  /**
-   * changes the password of an user
-   *
-   * @param idP id is the username as given in the URL
-   * @param oldPW the current user password
-   * @param newPW the new password
-   * @param confirmNewPW the new password
-   * @return
-   */
-  @POST
-  @Path("change-password")
-  def changePassword(@PathParam(value = "id") idP: String,
-               @FormParam("oldPW") oldPW: String,
-               @FormParam("newPW") newPW: String,
-               @FormParam("confirmNewPW") confirmNewPW: String,
-               @Context uriInfo: UriInfo): Response = {
-    val id: String = idP
-    AccessController.checkPermission(new AccountControlPanelAppPermission(id, ""))
-    AccessController.checkPermission(new ChangePasswordPermission(id, ""))
-    var changedPassword: Boolean = false
-    if (newPW.trim.equals(confirmNewPW.trim) && checkPWStrings(oldPW, newPW)) {
-      changedPassword = AccessController.doPrivileged(new PrivilegedAction[Boolean] {
-        private def getCurrentPassword(agent: NonLiteral): String = {
-          var currentPassword: String = null
-          var oldPWTriple: Iterator[Triple] = systemGraph.filter(agent, PERMISSION.passwordSha1, null)
-          if (oldPWTriple.hasNext) {
-            var currentPWLiteral: Literal = oldPWTriple.next.getObject.asInstanceOf[Literal]
-            currentPassword = currentPWLiteral.getLexicalForm
-          }
-          return currentPassword
-        }
-
-        def run: Boolean = {
-          val agent: NonLiteral = getAgent(id)
-          var encodedOlpPW: String = getEncodedPW(oldPW)
-          var currentPassword: String = getCurrentPassword(agent)
-          if ((currentPassword != null) && !currentPassword.equals(encodedOlpPW)) {
-            logger.info("Typed wrong current password!")
-            return false
-          }
-          else {
-            removeOldPwAndAddNewPW(agent, currentPassword, newPW)
-            return true
-          }
-        }
-
-        private def removeOldPwAndAddNewPW(agent: NonLiteral, currentPassword: String, newPW: String): Unit = {
-          var newPWTriple: Triple = new TripleImpl(agent, PERMISSION.passwordSha1, new PlainLiteralImpl(getEncodedPW(newPW)))
-          if (currentPassword != null) {
-            var oldPWTriple: Triple = new TripleImpl(agent, PERMISSION.passwordSha1, new PlainLiteralImpl(currentPassword))
-            systemGraph.remove(oldPWTriple)
-            logger.debug("removed old password from systemgraph")
-          }
-          systemGraph.add(newPWTriple)
-          logger.debug("user " + id + " changed password")
-        }
-
-        private def getEncodedPW(password: String): String = {
-          if (password == null) {
-            return null
-          }
-          try {
-            return bytes2HexString(MessageDigest.getInstance("SHA1").digest(password.getBytes("UTF-8")))
-          }
-          catch {
-            case e: NoSuchAlgorithmException => {
-              throw new RuntimeException(e)
-            }
-            case e: UnsupportedEncodingException => {
-              throw new RuntimeException(e)
-            }
-          }
-        }
-
-        private def bytes2HexString(bytes: Array[Byte]): String = {
-          val HEXDIGITS: Array[Char] = "0123456789abcdef".toCharArray
-          val result = new Array[Char](bytes.length << 1)
-          var j: Int = 0
-          for (i <- 0 to bytes.length - 1) {
-            result(j) = HEXDIGITS(bytes(i) >> 4 & 0xF)
-            result(j + 1) = HEXDIGITS(bytes(i) & 0xF)
-            j += 2
-          }
-          return new String(result)
-        }
-      })
-    }
-    else {
-      logger.info("Changing password failed!")
-      changedPassword = false
-    }
-    if (changedPassword) {
-      return RedirectUtil.createSeeOtherResponse("../control-panel", uriInfo)
-    }
-    else {
-      return RedirectUtil.createSeeOtherResponse("../control-panel?changedPassword=false", uriInfo)
-    }
-  }
-
-  /**
-   * checks if the typed strings are valid
-   */
-  private def checkPWStrings(oldPW: String, newPW: String): Boolean = {
-    if (newPW.length == 0) {
-      return false
-    }
-    return true
-  }
-
-  /**
-   * The activate method is called when SCR activates the component configuration.
-   *
-   * @param componentContext
-   */
-  protected def activate(componentContext: ComponentContext): Unit = {
-    this.componentContext = componentContext
-  }
-
-  protected def bindConfigurationAdmin(configAdmin: ConfigurationAdmin): Unit = {
-    logger.debug("Binding configuration admin")
-    this.configAdmin = configAdmin
-  }
-
-  protected def unbindConfigurationAdmin(configAdmin: ConfigurationAdmin): Unit = {
-    logger.debug("Unbinding configuration admin")
-    this.configAdmin = null
-  }
-
-  protected def bindSystemGraph(mgraph: MGraph): Unit = {
-    systemGraph = mgraph
-  }
-
-  protected def unbindSystemGraph(mgraph: MGraph): Unit = {
-    if (systemGraph == mgraph) {
-      systemGraph = null
-    }
-  }
-
-  protected def bindCgProvider(contentgraphprovider: ContentGraphProvider): Unit = {
-    cgProvider = contentgraphprovider
-  }
-
-  protected def unbindCgProvider(contentgraphprovider: ContentGraphProvider): Unit = {
-    if (cgProvider == contentgraphprovider) {
-      cgProvider = null
-    }
-  }
-
-  private var componentContext: ComponentContext = null
-  private var systemGraph: MGraph = null
-  private var cgProvider: ContentGraphProvider = null
-  private var configAdmin: ConfigurationAdmin = null
-}
\ No newline at end of file


[07/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js b/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
deleted file mode 100644
index 745a2cf..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/resources/org/apache/clerezza/platform/concepts/core/staticweb/scripts/jquery.rdfquery.core-1.0.js
+++ /dev/null
@@ -1,4040 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/*
- * $ URIs @VERSION
- * 
- * Copyright (c) 2008,2009 Jeni Tennison
- * Licensed under the MIT (MIT-LICENSE.txt)
- *
- */
-/**
- * @fileOverview $ URIs
- * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
- * @copyright (c) 2008,2009 Jeni Tennison
- * @license MIT license (MIT-LICENSE.txt)
- * @version 1.0
- */
-/**
- * @class
- * @name jQuery
- * @exports $ as jQuery
- * @description rdfQuery is a <a href="http://jquery.com/">jQuery</a> plugin. The only fields and methods listed here are those that come as part of the rdfQuery library.
- */
-(function ($) {
-
-  var
-    mem = {},
-    uriRegex = /^(([a-z][\-a-z0-9+\.]*):)?(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i,
-    docURI,
-
-    parseURI = function (u) {
-      var m = u.match(uriRegex);
-      if (m === null) {
-        throw "Malformed URI: " + u;
-      }
-      return {
-        scheme: m[1] ? m[2].toLowerCase() : undefined,
-        authority: m[3] ? m[4] : undefined,
-        path: m[5] || '',
-        query: m[6] ? m[7] : undefined,
-        fragment: m[8] ? m[9] : undefined
-      };
-    },
-
-    removeDotSegments = function (u) {
-      var r = '', m = [];
-      if (/\./.test(u)) {
-        while (u !== undefined && u !== '') {
-          if (u === '.' || u === '..') {
-            u = '';
-          } else if (/^\.\.\//.test(u)) { // starts with ../
-            u = u.substring(3);
-          } else if (/^\.\//.test(u)) { // starts with ./
-            u = u.substring(2);
-          } else if (/^\/\.(\/|$)/.test(u)) { // starts with /./ or consists of /.
-            u = '/' + u.substring(3);
-          } else if (/^\/\.\.(\/|$)/.test(u)) { // starts with /../ or consists of /..
-            u = '/' + u.substring(4);
-            r = r.replace(/\/?[^\/]+$/, '');
-          } else {
-            m = u.match(/^(\/?[^\/]*)(\/.*)?$/);
-            u = m[2];
-            r = r + m[1];
-          }
-        }
-        return r;
-      } else {
-        return u;
-      }
-    },
-
-    merge = function (b, r) {
-      if (b.authority !== '' && (b.path === undefined || b.path === '')) {
-        return '/' + r;
-      } else {
-        return b.path.replace(/[^\/]+$/, '') + r;
-      }
-    };
-
-  /**
-   * Creates a new jQuery.uri object. This should be invoked as a method rather than constructed using new.
-   * @class Represents a URI
-   * @param {String} [relative='']
-   * @param {String|jQuery.uri} [base] Defaults to the base URI of the page
-   * @returns {jQuery.uri} The new jQuery.uri object.
-   * @example uri = jQuery.uri('/my/file.html');
-   */
-  $.uri = function (relative, base) {
-    var uri;
-    relative = relative || '';
-    if (mem[relative]) {
-      return mem[relative];
-    }
-    base = base || $.uri.base();
-    if (typeof base === 'string') {
-      base = $.uri.absolute(base);
-    }
-    uri = new $.uri.fn.init(relative, base);
-    if (mem[uri]) {
-      return mem[uri];
-    } else {
-      mem[uri] = uri;
-      return uri;
-    }
-  };
-
-  $.uri.fn = $.uri.prototype = {
-    /**
-     * The scheme used in the URI
-     * @type String
-     */
-    scheme: undefined,
-    /**
-     * The authority used in the URI
-     * @type String
-     */
-    authority: undefined,
-    /**
-     * The path used in the URI
-     * @type String
-     */
-    path: undefined,
-    /**
-     * The query part of the URI
-     * @type String
-     */
-    query: undefined,
-    /**
-     * The fragment part of the URI
-     * @type String
-     */
-    fragment: undefined,
-    
-    init: function (relative, base) {
-      var r = {};
-      base = base || {};
-      $.extend(this, parseURI(relative));
-      if (this.scheme === undefined) {
-        this.scheme = base.scheme;
-        if (this.authority !== undefined) {
-          this.path = removeDotSegments(this.path);
-        } else {
-          this.authority = base.authority;
-          if (this.path === '') {
-            this.path = base.path;
-            if (this.query === undefined) {
-              this.query = base.query;
-            }
-          } else {
-            if (!/^\//.test(this.path)) {
-              this.path = merge(base, this.path);
-            }
-            this.path = removeDotSegments(this.path);
-          }
-        }
-      }
-      if (this.scheme === undefined) {
-        throw "Malformed URI: URI is not an absolute URI and no base supplied: " + relative;
-      }
-      return this;
-    },
-  
-    /**
-     * Resolves a relative URI relative to this URI
-     * @param {String} relative
-     * @returns jQuery.uri
-     */
-    resolve: function (relative) {
-      return $.uri(relative, this);
-    },
-    
-    /**
-     * Creates a relative URI giving the path from this URI to the absolute URI passed as a parameter
-     * @param {String|jQuery.uri} absolute
-     * @returns String
-     */
-    relative: function (absolute) {
-      var aPath, bPath, i = 0, j, resultPath = [], result = '';
-      if (typeof absolute === 'string') {
-        absolute = $.uri(absolute, {});
-      }
-      if (absolute.scheme !== this.scheme || 
-          absolute.authority !== this.authority) {
-        return absolute.toString();
-      }
-      if (absolute.path !== this.path) {
-        aPath = absolute.path.split('/');
-        bPath = this.path.split('/');
-        if (aPath[1] !== bPath[1]) {
-          result = absolute.path;
-        } else {
-          while (aPath[i] === bPath[i]) {
-            i += 1;
-          }
-          j = i;
-          for (; i < bPath.length - 1; i += 1) {
-            resultPath.push('..');
-          }
-          for (; j < aPath.length; j += 1) {
-            resultPath.push(aPath[j]);
-          }
-          result = resultPath.join('/');
-        }
-        result = absolute.query === undefined ? result : result + '?' + absolute.query;
-        result = absolute.fragment === undefined ? result : result + '#' + absolute.fragment;
-        return result;
-      }
-      if (absolute.query !== undefined && absolute.query !== this.query) {
-        return '?' + absolute.query + (absolute.fragment === undefined ? '' : '#' + absolute.fragment);
-      }
-      if (absolute.fragment !== undefined && absolute.fragment !== this.fragment) {
-        return '#' + absolute.fragment;
-      }
-      return '';
-    },
-  
-    /**
-     * Returns the URI as an absolute string
-     * @returns String
-     */
-    toString: function () {
-      var result = '';
-      if (this._string) {
-        return this._string;
-      } else {
-        result = this.scheme === undefined ? result : (result + this.scheme + ':');
-        result = this.authority === undefined ? result : (result + '//' + this.authority);
-        result = result + this.path;
-        result = this.query === undefined ? result : (result + '?' + this.query);
-        result = this.fragment === undefined ? result : (result + '#' + this.fragment);
-        this._string = result;
-        return result;
-      }
-    }
-  
-  };
-
-  $.uri.fn.init.prototype = $.uri.fn;
-
-  /**
-   * Creates a {@link jQuery.uri} from a known-to-be-absolute URI
-   * @param {String}
-   * @returns {jQuery.uri}
-   */
-  $.uri.absolute = function (uri) {
-    return $.uri(uri, {});
-  };
-
-  /**
-   * Creates a {@link jQuery.uri} from a relative URI and an optional base URI
-   * @returns {jQuery.uri}
-   * @see jQuery.uri
-   */
-  $.uri.resolve = function (relative, base) {
-    return $.uri(relative, base);
-  };
-  
-  /**
-   * Creates a string giving the relative path from a base URI to an absolute URI
-   * @param {String} absolute
-   * @param {String} base
-   * @returns {String}
-   */
-  $.uri.relative = function (absolute, base) {
-    return $.uri(base, {}).relative(absolute);
-  };
-  
-  /**
-   * Returns the base URI of the page
-   * @returns {jQuery.uri}
-   */
-  $.uri.base = function () {
-    return $(document).base();
-  };
-  
-  /**
-   * Returns the base URI in scope for the first selected element
-   * @methodOf jQuery#
-   * @name jQuery#base
-   * @returns {jQuery.uri}
-   * @example baseURI = $('img').base();
-   */
-  $.fn.base = function () {
-    var base = $(this).parents().andSelf().find('base').attr('href'),
-      doc = $(this)[0].ownerDocument || document,
-      docURI = $.uri.absolute(doc.location === null ? document.location.href : doc.location.href);
-    return base === undefined ? docURI : $.uri(base, docURI);
-  };
-
-})(jQuery);
-/*
- * jQuery CURIE @VERSION
- * 
- * Copyright (c) 2008,2009 Jeni Tennison
- * Licensed under the MIT (MIT-LICENSE.txt)
- *
- * Depends:
- *  jquery.uri.js
- */
-/**
- * @fileOverview XML Namespace processing
- * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
- * @copyright (c) 2008,2009 Jeni Tennison
- * @license MIT license (MIT-LICENSE.txt)
- * @version 1.0
- * @requires jquery.uri.js
- */
-
-/*global jQuery */
-(function ($) {
-
-  var 
-    xmlNs = 'http://www.w3.org/XML/1998/namespace',
-    xmlnsNs = 'http://www.w3.org/2000/xmlns/',
-    
-    xmlnsRegex = /\sxmlns(?::([^ =]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g,
-    
-    ncNameChar = '[-A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u10000-\uEFFFF\.0-9\u00B7\u0300-\u036F\u203F-\u2040]',
-    ncNameStartChar = '[\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u0131\u0134-\u013E\u0141-\u0148\u014A-\u017E\u0180-\u01C3\u01CD-\u01F0\u01F4-\u01F5\u01FA-\u0217\u0250-\u02A8\u02BB-\u02C1\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03D6\u03DA\u03DC\u03DE\u03E0\u03E2-\u03F3\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E-\u0481\u0490-\u04C4\u04C7-\u04C8\u04CB-\u04CC\u04D0-\u04EB\u04EE-\u04F5\u04F8-\u04F9\u0531-\u0556\u0559\u0561-\u0586\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0641-\u064A\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D3\u06D5\u06E5-\u06E6\u0905-\u0939\u093D\u0958-\u0961\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8B\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AE0\u0B05-\u0B0C\u0B0F-\u0B10\u0B1
 3-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B36-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB5\u0BB7-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CDE\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D60-\u0D61\u0E01-\u0E2E\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EAE\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0F40-\u0F47\u0F49-\u0F69\u10A0-\u10C5\u10D0-\u10F6\u1100\u1102-\u1103\u1105-\u1107\u1109\u110B-\u110C\u110E-\u1112\u113C\u113E\u1140\u114C\u114E\u1150\u1154-\u1155\u1159\u115F-\u1161\u1163\u1165\u1167\u1169\u116D-\u116E\u1172-\u1173\u1175\u119E\u11A8\u11AB\u11AE-\u11AF\u11B7-\u11B8\u11BA\u11BC-\u11C2\u11EB\u11F0\u11F9\u1E00-\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F
 18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2126\u212A-\u212B\u212E\u2180-\u2182\u3041-\u3094\u30A1-\u30FA\u3105-\u312C\uAC00-\uD7A3\u4E00-\u9FA5\u3007\u3021-\u3029_]',
-    ncNameRegex = new RegExp('^' + ncNameStartChar + ncNameChar + '*$');
-    
-
-/**
- * Returns the namespaces declared in the scope of the first selected element, or
- * adds a namespace declaration to all selected elements. Pass in no parameters
- * to return all namespaces bindings on the first selected element. If only 
- * the prefix parameter is specified, this method will return the namespace
- * URI that is bound to the specified prefix on the first element in the selection
- * If the prefix and uri parameters are both specified, this method will
- * add the binding of the specified prefix and namespace URI to all elements
- * in the selection.
- * @methodOf jQuery#
- * @name jQuery#xmlns
- * @param {String} [prefix] Restricts the namespaces returned to only the namespace with the specified namespace prefix.
- * @param {String|jQuery.uri} [uri] Adds a namespace declaration to the selected elements that maps the specified prefix to the specified namespace.
- * @param {Object} [inherited] A map of inherited namespace bindings.
- * @returns {Object|jQuery.uri|jQuery}
- * @example 
- * // Retrieve all of the namespace bindings on the HTML document element
- * var nsMap = $('html').xmlns();
- * @example
- * // Retrieve the namespace URI mapped to the 'dc' prefix on the HTML document element
- * var dcNamespace = $('html').xmlns('dc');
- * @example
- * // Create a namespace declaration that binds the 'dc' prefix to the URI 'http://purl.org/dc/elements/1.1/'
- * $('html').xmlns('dc', 'http://purl.org/dc/elements/1.1/');
- */
-  $.fn.xmlns = function (prefix, uri, inherited) {
-    var 
-      elem = this.eq(0),
-      ns = elem.data('xmlns'),
-      e = elem[0], a, p, i,
-      decl = prefix ? 'xmlns:' + prefix : 'xmlns',
-      value,
-      tag, found = false;
-    if (uri === undefined) {
-      if (prefix === undefined) { // get the in-scope declarations on the first element
-        if (ns === undefined) {
-          ns = {
-//            xml: $.uri(xmlNs)
-          };
-          if (e.attributes && e.attributes.getNamedItemNS) {
-            for (i = 0; i < e.attributes.length; i += 1) {
-              a = e.attributes[i];
-              if (/^xmlns(:(.+))?$/.test(a.nodeName)) {
-                prefix = /^xmlns(:(.+))?$/.exec(a.nodeName)[2] || '';
-                value = a.nodeValue;
-                if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) {
-                  ns[prefix] = $.uri(a.nodeValue);
-                  found = true;
-                }
-              }
-            }
-          } else {
-            tag = /<[^>]+>/.exec(e.outerHTML);
-            a = xmlnsRegex.exec(tag);
-            while (a !== null) {
-              prefix = a[1] || '';
-              value = a[2] || a[3];
-              if (prefix === '' || (value !== '' && value !== xmlNs && value !== xmlnsNs && ncNameRegex.test(prefix) && prefix !== 'xml' && prefix !== 'xmlns')) {
-                ns[prefix] = $.uri(a[2] || a[3]);
-                found = true;
-              }
-              a = xmlnsRegex.exec(tag);
-            }
-            xmlnsRegex.lastIndex = 0;
-          }
-          inherited = inherited || (e.parentNode.nodeType === 1 ? elem.parent().xmlns() : {});
-          ns = found ? $.extend({}, inherited, ns) : inherited;
-          elem.data('xmlns', ns);
-        }
-        return ns;
-      } else if (typeof prefix === 'object') { // set the prefix mappings defined in the object
-        for (p in prefix) {
-          if (typeof prefix[p] === 'string' && ncNameRegex.test(p)) {
-            this.xmlns(p, prefix[p]);
-          }
-        }
-        this.find('*').andSelf().removeData('xmlns');
-        return this;
-      } else { // get the in-scope declaration associated with this prefix on the first element
-        if (ns === undefined) {
-          ns = elem.xmlns();
-        }
-        return ns[prefix];
-      }
-    } else { // set
-      this.find('*').andSelf().removeData('xmlns');
-      return this.attr(decl, uri);
-    }
-  };
-
-/**
- * Removes one or more XML namespace bindings from the selected elements.
- * @methodOf jQuery#
- * @name jQuery#removeXmlns
- * @param {String|Object|String[]} prefix The prefix(es) of the XML namespace bindings that are to be removed from the selected elements.
- * @returns {jQuery} The original jQuery object.
- * @example
- * // Remove the foaf namespace declaration from the body element:
- * $('body').removeXmlns('foaf');
- * @example
- * // Remove the foo and bar namespace declarations from all h2 elements
- * $('h2').removeXmlns(['foo', 'bar']);
- * @example
- * // Remove the foo and bar namespace declarations from all h2 elements
- * var namespaces = { foo : 'http://www.example.org/foo', bar : 'http://www.example.org/bar' };
- * $('h2').removeXmlns(namespaces);
- */
-  $.fn.removeXmlns = function (prefix) {
-    var decl, p, i;
-    if (typeof prefix === 'object') {
-      if (prefix.length === undefined) { // assume an object representing namespaces
-        for (p in prefix) {
-          if (typeof prefix[p] === 'string') {
-            this.removeXmlns(p);
-          }
-        }
-      } else { // it's an array
-        for (i = 0; i < prefix.length; i += 1) {
-          this.removeXmlns(prefix[i]);
-        }
-      }
-    } else {
-      decl = prefix ? 'xmlns:' + prefix : 'xmlns';
-      this.removeAttr(decl);
-    }
-    this.find('*').andSelf().removeData('xmlns');
-    return this;
-  };
-
-  $.fn.qname = function (name) {
-    var m, prefix, namespace;
-    if (name === undefined) {
-      if (this[0].outerHTML === undefined) {
-        name = this[0].nodeName.toLowerCase();
-      } else {
-        name = /<([^ >]+)/.exec(this[0].outerHTML)[1].toLowerCase();
-      }
-    }
-    if (name === '?xml:namespace') {
-      // there's a prefix on the name, but we can't get at it
-      throw "XMLinHTML: Unable to get the prefix to resolve the name of this element";
-    }
-    m = /^(([^:]+):)?([^:]+)$/.exec(name);
-    prefix = m[2] || '';
-    namespace = this.xmlns(prefix);
-    if (namespace === undefined && prefix !== '') {
-      throw "MalformedQName: The prefix " + prefix + " is not declared";
-    }
-    return {
-      namespace: namespace,
-      localPart: m[3],
-      prefix: prefix,
-      name: name
-    };
-  };
-
-})(jQuery);
-/*
- * jQuery CURIE @VERSION
- *
- * Copyright (c) 2008,2009 Jeni Tennison
- * Licensed under the MIT (MIT-LICENSE.txt)
- *
- * Depends:
- *  jquery.uri.js
- */
-/**
- * @fileOverview XML Schema datatype handling
- * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
- * @copyright (c) 2008,2009 Jeni Tennison
- * @license MIT license (MIT-LICENSE.txt)
- * @version 1.0
- * @requires jquery.uri.js
- */
-
-(function ($) {
-
-  var strip = function (value) {
-    return value.replace(/[ \t\n\r]+/, ' ').replace(/^ +/, '').replace(/ +$/, '');
-  };
-
-  /**
-   * Creates a new jQuery.typedValue object. This should be invoked as a method
-   * rather than constructed using new.
-   * @class Represents a value with an XML Schema datatype
-   * @param {String} value The string representation of the value
-   * @param {String} datatype The XML Schema datatype URI
-   * @returns {jQuery.typedValue}
-   * @example intValue = jQuery.typedValue('42', 'http://www.w3.org/2001/XMLSchema#integer');
-   */
-  $.typedValue = function (value, datatype) {
-    return $.typedValue.fn.init(value, datatype);
-  };
-
-  $.typedValue.fn = $.typedValue.prototype = {
-    /**
-     * The string representation of the value
-     * @memberOf jQuery.typedValue#
-     */
-    representation: undefined,
-    /**
-     * The value as an object. The type of the object will
-     * depend on the XML Schema datatype URI specified
-     * in the constructor. The following table lists the mappings
-     * currently supported:
-     * <table>
-     *   <tr>
-     *   <th>XML Schema Datatype</th>
-     *   <th>Value type</th>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#string</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#token</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#NCName</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#boolean</td>
-     *     <td>bool</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#decimal</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#integer</td>
-     *     <td>int</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#int</td>
-     *     <td>int</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#float</td>
-     *     <td>float</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#double</td>
-     *     <td>float</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#dateTime</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#date</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#gYear</td>
-     *     <td>int</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#gMonthDay</td>
-     *     <td>string</td>
-     *   </tr>
-     *   <tr>
-     *     <td>http://www.w3.org/2001/XMLSchema#anyURI</td>
-     *     <td>{@link jQuery.uri}</td>
-     *   </tr>
-     * </table>
-     * @memberOf jQuery.typedValue#
-     */
-    value: undefined,
-    /**
-     * The XML Schema datatype URI for the value's datatype
-     * @memberOf jQuery.typedValue#
-     */
-    datatype: undefined,
-
-    init: function (value, datatype) {
-      var d = $.typedValue.types[datatype];
-      if ($.typedValue.valid(value, datatype)) {
-        this.representation = value;
-        this.datatype = datatype;
-        this.value = d === undefined ? strip(value) : d.value(d.strip ? strip(value) : value);
-        return this;
-      } else {
-        throw {
-          name: 'InvalidValue',
-          message: value + ' is not a valid ' + datatype + ' value'
-        };
-      }
-    }
-  };
-
-  $.typedValue.fn.init.prototype = $.typedValue.fn;
-
-  /**
-   * An object that holds the datatypes supported by the script. The properties of this object are the URIs of the datatypes, and each datatype has four properties:
-   * <dl>
-   *   <dt>strip</dt>
-   *   <dd>A boolean value that indicates whether whitespace should be stripped from the value prior to testing against the regular expression or passing to the value function.</dd>
-   *   <dt>regex</dt>
-   *   <dd>A regular expression that valid values of the type must match.</dd>
-   *   <dt>validate</dt>
-   *   <dd>Optional. A function that performs further testing on the value.</dd>
-   *   <dt>value</dt>
-   *   <dd>A function that returns a Javascript object equivalent for the value.</dd>
-   * </dl>
-   * You can add to this object as necessary for your own datatypes, and {@link jQuery.typedValue} and {@link jQuery.typedValue.valid} will work with them.
-   * @see jQuery.typedValue
-   * @see jQuery.typedValue.valid
-   */
-  $.typedValue.types = {};
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#string'] = {
-    regex: /^.*$/,
-    strip: false,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#token'] = {
-    regex: /^.*$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return strip(v);
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#NCName'] = {
-    regex: /^[a-z_][-\.a-z0-9]+$/i,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return strip(v);
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#boolean'] = {
-    regex: /^(?:true|false|1|0)$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v === 'true' || v === '1';
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#decimal'] = {
-    regex: /^[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#integer'] = {
-    regex: /^[\-\+]?[0-9]+$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return parseInt(v, 10);
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#int'] = {
-    regex: /^[\-\+]?[0-9]+$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return parseInt(v, 10);
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'] = {
-    regex: /^(?:[\-\+]?(?:[0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)(?:[eE][\-\+]?[0-9]+)?|[\-\+]?INF|NaN)$/,
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      if (v === '-INF') {
-        return -1 / 0;
-      } else if (v === 'INF' || v === '+INF') {
-        return 1 / 0;
-      } else {
-        return parseFloat(v);
-      }
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#double'] = {
-    regex: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].regex,
-    strip: true,
-    value: $.typedValue.types['http://www.w3.org/2001/XMLSchema#float'].value
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#duration'] = {
-    regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+))?S)?)$/,
-    /** @ignore */
-    validate: function (v) {
-      var m = this.regex.exec(v);
-      return m[2] || m[3] || m[4] || m[5] || m[6] || m[7];
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#yearMonthDuration'] = {
-    regex: /^([\-\+])?P(?:([0-9]+)Y)?(?:([0-9]+)M)?$/,
-    /** @ignore */
-    validate: function (v) {
-      var m = this.regex.exec(v);
-      return m[2] || m[3];
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      var m = this.regex.exec(v),
-        years = m[2] || 0,
-        months = m[3] || 0;
-      months += years * 12;
-      return m[1] === '-' ? -1 * months : months;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#dateTime'] = {
-    regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):(([0-9]{2})(\.([0-9]+))?)((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
-    /** @ignore */
-    validate: function (v) {
-      var
-        m = this.regex.exec(v),
-        year = parseInt(m[1], 10),
-        tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, ''),
-        date;
-      if (year === 0 ||
-          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
-        return false;
-      }
-      try {
-        year = year < 100 ? Math.abs(year) + 1000 : year;
-        month = parseInt(m[2], 10);
-        day = parseInt(m[3], 10);
-        if (day > 31) {
-          return false;
-        } else if (day > 30 && !(month === 1 || month === 3 || month === 5 || month === 7 || month === 8 || month === 10 || month === 12)) {
-          return false;
-        } else if (month === 2) {
-          if (day > 29) {
-            return false;
-          } else if (day === 29 && (year % 4 !== 0 || (year % 100 === 0 && year % 400 !== 0))) {
-            return false;
-          }
-        }
-        date = '' + year + '/' + m[2] + '/' + m[3] + ' ' + m[4] + ':' + m[5] + ':' + m[7] + ' ' + tz;
-        date = new Date(date);
-        return true;
-      } catch (e) {
-        return false;
-      }
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#date'] = {
-    regex: /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
-    /** @ignore */
-    validate: function (v) {
-      var
-        m = this.regex.exec(v),
-        year = parseInt(m[1], 10),
-        month = parseInt(m[2], 10),
-        day = parseInt(m[3], 10),
-        tz = m[10] === undefined || m[10] === 'Z' ? '+0000' : m[10].replace(/:/, '');
-      if (year === 0 ||
-          month > 12 ||
-          day > 31 ||
-          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
-        return false;
-      } else {
-        return true;
-      }
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#gYear'] = {
-    regex: /^-?([0-9]{4,})$/,
-    /** @ignore */
-    validate: function (v) {
-      var i = parseInt(v, 10);
-      return i !== 0;
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return parseInt(v, 10);
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#gMonthDay'] = {
-    regex: /^--([0-9]{2})-([0-9]{2})((?:[\-\+]([0-9]{2}):([0-9]{2}))|Z)?$/,
-    /** @ignore */
-    validate: function (v) {
-      var
-        m = this.regex.exec(v),
-        month = parseInt(m[1], 10),
-        day = parseInt(m[2], 10),
-        tz = m[3] === undefined || m[3] === 'Z' ? '+0000' : m[3].replace(/:/, '');
-      if (month > 12 ||
-          day > 31 ||
-          parseInt(tz, 10) < -1400 || parseInt(tz, 10) > 1400) {
-        return false;
-      } else if (month === 2 && day > 29) {
-        return false;
-      } else if ((month === 4 || month === 6 || month === 9 || month === 11) && day > 30) {
-        return false;
-      } else {
-        return true;
-      }
-    },
-    strip: true,
-    /** @ignore */
-    value: function (v) {
-      return v;
-    }
-  };
-
-  $.typedValue.types['http://www.w3.org/2001/XMLSchema#anyURI'] = {
-    regex: /^.*$/,
-    strip: true,
-    /** @ignore */
-    value: function (v, options) {
-      var opts = $.extend({}, $.typedValue.defaults, options);
-      return $.uri.resolve(v, opts.base);
-    }
-  };
-
-  $.typedValue.defaults = {
-    base: $.uri.base(),
-    namespaces: {}
-  };
-
-  /**
-   * Checks whether a value is valid according to a given datatype. The datatype must be held in the {@link jQuery.typedValue.types} object.
-   * @param {String} value The value to validate.
-   * @param {String} datatype The URI for the datatype against which the value will be validated.
-   * @returns {boolean} True if the value is valid or the datatype is not recognised.
-   * @example validDate = $.typedValue.valid(date, 'http://www.w3.org/2001/XMLSchema#date');
-   */
-  $.typedValue.valid = function (value, datatype) {
-    var d = $.typedValue.types[datatype];
-    if (d === undefined) {
-      return true;
-    } else {
-      value = d.strip ? strip(value) : value;
-      if (d.regex.test(value)) {
-        return d.validate === undefined ? true : d.validate(value);
-      } else {
-        return false;
-      }
-    }
-  };
-
-})(jQuery);
-/*
- * jQuery CURIE @VERSION
- *
- * Copyright (c) 2008,2009 Jeni Tennison
- * Licensed under the MIT (MIT-LICENSE.txt)
- *
- * Depends:
- *  jquery.uri.js
- *  jquery.xmlns.js
- */
-
-/**
- * @fileOverview jQuery CURIE handling
- * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
- * @copyright (c) 2008,2009 Jeni Tennison
- * @license MIT license (MIT-LICENSE.txt)
- * @version 1.0
- * @requires jquery.uri.js
- * @requires jquery.xmlns.js
- */
-(function ($) {
-
-   /**
-    * Creates a {@link jQuery.uri} object by parsing a CURIE.
-    * @methodOf jQuery
-    * @param {String} curie The CURIE to be parsed
-    * @param {String} uri The URI string to be converted to a CURIE.
-    * @param {Object} [options] CURIE parsing options
-    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names
-    * @param {string} [options.defaultNamespace]  The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above.
-    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
-    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']] A list of local names that will always be mapped to the URI specified by reservedNamespace.
-    * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are:
-    * <dl>
-    * <dt>lower</dt><dd>Force the CURIE string to lower case.</dd>
-    * <dt>upper</dt><dd>Force the CURIE string to upper case.</dd>
-    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
-    * </dl>
-    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
-    */
-  $.curie = function (curie, options) {
-    var
-      opts = $.extend({}, $.curie.defaults, options || {}),
-      m = /^(([^:]*):)?(.+)$/.exec(curie),
-      prefix = m[2],
-      local = m[3],
-      ns = opts.namespaces[prefix];
-    if (/^:.+/.test(curie)) { // This is the case of a CURIE like ":test"
-      if (opts.reservedNamespace === undefined || opts.reservedNamespace === null) {
-        throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie;
-      } else {
-        ns = opts.reservedNamespace;
-      }
-    } else if (prefix) {
-      if (ns === undefined) {
-        throw "Malformed CURIE: No namespace binding for " + prefix + " in CURIE " + curie;
-      }
-    } else {
-      if (opts.charcase === 'lower') {
-        curie = curie.toLowerCase();
-      } else if (opts.charcase === 'upper') {
-        curie = curie.toUpperCase();
-      }
-      if (opts.reserved.length && $.inArray(curie, opts.reserved) >= 0) {
-        ns = opts.reservedNamespace;
-        local = curie;
-      } else if (opts.defaultNamespace === undefined || opts.defaultNamespace === null) {
-        // the default namespace is provided by the application; it's not clear whether
-        // the default XML namespace should be used if there's a colon but no prefix
-        throw "Malformed CURIE: No prefix and no default namespace for unprefixed CURIE " + curie;
-      } else {
-        ns = opts.defaultNamespace;
-      }
-    }
-    return $.uri(ns + local);
-  };
-
-  $.curie.defaults = {
-    namespaces: {},
-    reserved: [],
-    reservedNamespace: undefined,
-    defaultNamespace: undefined,
-    charcase: 'preserve'
-  };
-
-   /**
-    * Creates a {@link jQuery.uri} object by parsing a safe CURIE string (a CURIE
-    * contained within square brackets). If the input safeCurie string does not
-    * start with '[' and end with ']', the entire string content will be interpreted
-    * as a URI string.
-    * @methodOf jQuery
-    * @param {String} safeCurie The safe CURIE string to be parsed.
-    * @param {Object} [options] CURIE parsing options
-    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#'] The namespace to apply to a CURIE that has no prefix and either starts with a colon or is in the list of reserved local names
-    * @param {string} [options.defaultNamespace]  The namespace to apply to a CURIE with no prefix which is not mapped to the reserved namespace by the rules given above.
-    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
-    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
-      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
-      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']]
-                        A list of local names that will always be mapped to the URI specified by reservedNamespace.
-    * @param {string} [options.charcase='lower'] Specifies whether the curie's case is altered before it's interpreted. Acceptable values are:
-    * <dl>
-    * <dt>lower</dt><dd>Force the CURIE string to lower case.</dd>
-    * <dt>upper</dt><dd>Force the CURIE string to upper case.</dd>
-    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
-    * </dl>
-    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
-    */
-  $.safeCurie = function (safeCurie, options) {
-    var m = /^\[([^\]]+)\]$/.exec(safeCurie);
-    return m ? $.curie(m[1], options) : $.uri(safeCurie);
-  };
-
-   /**
-    * Creates a CURIE string from a URI string.
-    * @methodOf jQuery
-    * @param {String} uri The URI string to be converted to a CURIE.
-    * @param {Object} [options] CURIE parsing options
-    * @param {string} [options.reservedNamespace='http://www.w3.org/1999/xhtml/vocab#']
-    *        If the input URI starts with this value, the generated CURIE will
-    *        have no namespace prefix and will start with a colon character (:),
-    *        unless the local part of the CURIE is one of the reserved names specified
-    *        by the reservedNames option (see below), in which case the generated
-    *        CURIE will have no namespace prefix and will not start with a colon
-    *        character.
-    * @param {string} [options.defaultNamespace]  If the input URI starts with this value, the generated CURIE will have no namespace prefix and will not start with a colon.
-    * @param {Object} [options.namespaces] A map of namespace bindings used to map CURIE prefixes to URIs.
-    * @param {string[]} [options.reserved=['alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
-      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
-      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']]
-                        A list of local names that will always be mapped to the URI specified by reservedNamespace.
-    * @param {string} [options.charcase='lower'] Specifies the case normalisation done to the CURIE. Acceptable values are:
-    * <dl>
-    * <dt>lower</dt><dd>Normalise the CURIE to lower case.</dd>
-    * <dt>upper</dt><dd>Normalise the CURIE to upper case.</dd>
-    * <dt>preserve</dt><dd>Preserve the original case of the CURIE. Note that this might not be possible if the CURIE has been taken from an HTML attribute value because of the case conversions performed automatically by browsers. For this reason, it's a good idea to avoid mixed-case CURIEs within RDFa.</dd>
-    * </dl>
-    * @returns {jQuery.uri} A new {@link jQuery.uri} object representing the full absolute URI specified by the CURIE.
-    */
-  $.createCurie = function (uri, options) {
-    var opts = $.extend({}, $.curie.defaults, options || {}),
-      ns = opts.namespaces,
-      curie;
-    uri = $.uri(uri).toString();
-    if (opts.reservedNamespace !== undefined && 
-        uri.substring(0, opts.reservedNamespace.toString().length) === opts.reservedNamespace.toString()) {
-      curie = uri.substring(opts.reservedNamespace.toString().length);
-      if ($.inArray(curie, opts.reserved) === -1) {
-        curie = ':' + curie;
-      }
-    } else {
-      $.each(ns, function (prefix, namespace) {
-        if (uri.substring(0, namespace.toString().length) === namespace.toString()) {
-          curie = prefix + ':' + uri.substring(namespace.toString().length);
-          return null;
-        }
-      });
-    }
-    if (curie === undefined) {
-      throw "No Namespace Binding: There's no appropriate namespace binding for generating a CURIE from " + uri;
-    } else {
-      return curie;
-    }
-  };
-
-   /**
-    * Creates a {@link jQuery.uri} object by parsing the specified
-    * CURIE string in the context of the namespaces defined by the
-    * jQuery selection.
-    * @methodOf jQuery#
-    * @name jQuery#curie
-    * @param {String} curie The CURIE string to be parsed
-    * @param {Object} options The CURIE parsing options.
-    *        See {@link jQuery.curie} for details of the supported options.
-    *        The namespace declarations declared on the current jQuery
-    *        selection (and inherited from any ancestor elements) will automatically
-    *        be included in the options.namespaces property.
-    * @returns {jQuery.uri}
-    * @see jQuery.curie
-    */
-  $.fn.curie = function (curie, options) {
-    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
-    return $.curie(curie, opts);
-  };
-
-   /**
-    * Creates a {@link jQuery.uri} object by parsing the specified
-    * safe CURIE string in the context of the namespaces defined by
-    * the jQuery selection.
-    *
-    * @methodOf jQuery#
-    * @name jQuery#safeCurie
-    * @param {String} safeCurie The safe CURIE string to be parsed. See {@link jQuery.safeCurie} for details on how safe CURIE strings are processed.
-    * @param {Object} options   The CURIE parsing options.
-    *        See {@link jQuery.safeCurie} for details of the supported options.
-    *        The namespace declarations declared on the current jQuery
-    *        selection (and inherited from any ancestor elements) will automatically
-    *        be included in the options.namespaces property.
-    * @returns {jQuery.uri}
-    * @see jQuery.safeCurie
-    */
-  $.fn.safeCurie = function (safeCurie, options) {
-    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
-    return $.safeCurie(safeCurie, opts);
-  };
-
-   /**
-    * Creates a CURIE string from a URI string using the namespace
-    * bindings in the context of the current jQuery selection.
-    *
-    * @methodOf jQuery#
-    * @name jQuery#createCurie
-    * @param {String|jQuery.uri} uri The URI string to be converted to a CURIE
-    * @param {Object} options the CURIE parsing options.
-    *        See {@link jQuery.createCurie} for details of the supported options.
-    *        The namespace declarations declared on the current jQuery
-    *        selection (and inherited from any ancestor elements) will automatically
-    *        be included in the options.namespaces property.
-    * @returns {String}
-    * @see jQuery.createCurie
-    */
-  $.fn.createCurie = function (uri, options) {
-    var opts = $.extend({}, $.fn.curie.defaults, { namespaces: this.xmlns() }, options || {});
-    return $.createCurie(uri, opts);
-  };
-
-  $.fn.curie.defaults = {
-    reserved: [
-      'alternate', 'appendix', 'bookmark', 'cite', 'chapter', 'contents', 'copyright',
-      'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next',
-      'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up'
-    ],
-    reservedNamespace: 'http://www.w3.org/1999/xhtml/vocab#',
-    defaultNamespace: undefined,
-    charcase: 'lower'
-  };
-
-})(jQuery);
-/*
- * jQuery RDF @VERSION
- *
- * Copyright (c) 2008,2009 Jeni Tennison
- * Licensed under the MIT (MIT-LICENSE.txt)
- *
- * Depends:
- *  jquery.uri.js
- *  jquery.xmlns.js
- *  jquery.datatype.js
- *  jquery.curie.js
- *  jquery.json.js
- */
-/**
- * @fileOverview jQuery RDF
- * @author <a href="mailto:jeni@jenitennison.com">Jeni Tennison</a>
- * @copyright (c) 2008,2009 Jeni Tennison
- * @license MIT license (MIT-LICENSE.txt)
- * @version 1.0
- */
-/**
- * @exports $ as jQuery
- */
-/**
- * @ignore
- */
-(function ($) {
-  var
-    memResource = {},
-    memBlank = {},
-    memLiteral = {},
-    memTriple = {},
-    memPattern = {},
-    
-    xsdNs = "http://www.w3.org/2001/XMLSchema#",
-    rdfNs = "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    rdfsNs = "http://www.w3.org/2000/01/rdf-schema#",
-    
-    uriRegex = /^<(([^>]|\\>)*)>$/,
-    literalRegex = /^("""((\\"|[^"])*)"""|"((\\"|[^"])*)")(@([a-z]+(-[a-z0-9]+)*)|\^\^(.+))?$/,
-    tripleRegex = /(("""((\\"|[^"])*)""")|("(\\"|[^"]|)*")|(<(\\>|[^>])*>)|\S)+/g,
-
-    blankNodeSeed = databankSeed = new Date().getTime() % 1000,
-    blankNodeID = function () {
-      blankNodeSeed += 1;
-      return 'b' + blankNodeSeed.toString(16);
-    },
-
-    databankID = function () {
-      databankSeed += 1;
-      return 'data' + databankSeed.toString(16);
-    },
-    databanks = {},
-
-    documentQueue = {},
-
-    subject = function (subject, opts) {
-      if (typeof subject === 'string') {
-        try {
-          return $.rdf.resource(subject, opts);
-        } catch (e) {
-          try {
-            return $.rdf.blank(subject, opts);
-          } catch (f) {
-            throw "Bad Triple: Subject " + subject + " is not a resource: " + f;
-          }
-        }
-      } else {
-        return subject;
-      }
-    },
-
-    property = function (property, opts) {
-      if (property === 'a') {
-        return $.rdf.type;
-      } else if (typeof property === 'string') {
-        try {
-          return $.rdf.resource(property, opts);
-        } catch (e) {
-          throw "Bad Triple: Property " + property + " is not a resource: " + e;
-        }
-      } else {
-        return property;
-      }
-    },
-
-    object = function (object, opts) {
-      if (typeof object === 'string') {
-        try {
-          return $.rdf.resource(object, opts);
-        } catch (e) {
-          try {
-            return $.rdf.blank(object, opts);
-          } catch (f) {
-            try {
-              return $.rdf.literal(object, opts);
-            } catch (g) {
-              throw "Bad Triple: Object " + object + " is not a resource or a literal " + g;
-            }
-          }
-        }
-      } else {
-        return object;
-      }
-    },
-
-    testResource = function (resource, filter, existing) {
-      var variable;
-      if (typeof filter === 'string') {
-        variable = filter.substring(1);
-        if (existing[variable] && existing[variable] !== resource) {
-          return null;
-        } else {
-          existing[variable] = resource;
-          return existing;
-        }
-      } else if (filter === resource) {
-        return existing;
-      } else {
-        return null;
-      }
-    },
-
-    findMatches = function (databank, pattern) {
-      if (databank.union === undefined) {
-        if (pattern.subject.type !== undefined) {
-          if (databank.subjectIndex[pattern.subject] === undefined) {
-            return [];
-          }
-          return $.map(databank.subjectIndex[pattern.subject], function (triple) {
-            var bindings = pattern.exec(triple);
-            return bindings === null ? null : { bindings: bindings, triples: [triple] };
-          });
-        } else if (pattern.object.type === 'uri' || pattern.object.type === 'bnode') {
-          if (databank.objectIndex[pattern.object] === undefined) {
-            return [];
-          }
-          return $.map(databank.objectIndex[pattern.object], function (triple) {
-            var bindings = pattern.exec(triple);
-            return bindings === null ? null : { bindings: bindings, triples: [triple] };
-          });
-        } else if (pattern.property.type !== undefined) {
-          if (databank.propertyIndex[pattern.property] === undefined) {
-            return [];
-          }
-          return $.map(databank.propertyIndex[pattern.property], function (triple) {
-            var bindings = pattern.exec(triple);
-            return bindings === null ? null : { bindings: bindings, triples: [triple] };
-          });
-        }
-      }
-      return $.map(databank.triples(), function (triple) {
-        var bindings = pattern.exec(triple);
-        return bindings === null ? null : { bindings: bindings, triples: [triple] };
-      });
-    },
-
-    mergeMatches = function (existingMs, newMs, optional) {
-      return $.map(existingMs, function (existingM, i) {
-        var compatibleMs = $.map(newMs, function (newM) {
-          // For newM to be compatible with existingM, all the bindings
-          // in newM must either be the same as in existingM, or not
-          // exist in existingM
-          var k, b, isCompatible = true;
-          for (k in newM.bindings) {
-            b = newM.bindings[k];
-            if (!(existingM.bindings[k] === undefined ||
-                  existingM.bindings[k] === b)) {
-              isCompatible = false;
-              break;
-            }
-          }
-          return isCompatible ? newM : null;
-        });
-        if (compatibleMs.length > 0) {
-          return $.map(compatibleMs, function (compatibleM) {
-            return {
-              bindings: $.extend({}, existingM.bindings, compatibleM.bindings),
-              triples: $.unique(existingM.triples.concat(compatibleM.triples))
-            };
-          });
-        } else {
-          return optional ? existingM : null;
-        }
-      });
-    },
-
-    registerQuery = function (databank, query) {
-      var s, p, o;
-      if (query.filterExp !== undefined && !$.isFunction(query.filterExp)) {
-        if (databank.union === undefined) {
-          s = typeof query.filterExp.subject === 'string' ? '' : query.filterExp.subject;
-          p = typeof query.filterExp.property === 'string' ? '' : query.filterExp.property;
-          o = typeof query.filterExp.object === 'string' ? '' : query.filterExp.object;
-          if (databank.queries[s] === undefined) {
-            databank.queries[s] = {};
-          }
-          if (databank.queries[s][p] === undefined) {
-            databank.queries[s][p] = {};
-          }
-          if (databank.queries[s][p][o] === undefined) {
-            databank.queries[s][p][o] = [];
-          }
-          databank.queries[s][p][o].push(query);
-        } else {
-          $.each(databank.union, function (i, databank) {
-            registerQuery(databank, query);
-          });
-        }
-      }
-    },
-
-    resetQuery = function (query) {
-      query.length = 0;
-      query.matches = [];
-      $.each(query.children, function (i, child) {
-        resetQuery(child);
-      });
-      $.each(query.partOf, function (i, union) {
-        resetQuery(union);
-      });
-    },
-
-    updateQuery = function (query, matches) {
-      if (matches.length > 0) {
-        $.each(query.children, function (i, child) {
-          leftActivate(child, matches);
-        });
-        $.each(query.partOf, function (i, union) {
-          updateQuery(union, matches);
-        });
-        $.each(matches, function (i, match) {
-          query.matches.push(match);
-          Array.prototype.push.call(query, match.bindings);
-        });
-      }
-    },
-
-    leftActivate = function (query, matches) {
-      var newMatches;
-      if (query.union === undefined) {
-        if (query.top || query.parent.top) {
-          newMatches = query.alphaMemory;
-        } else {
-          matches = matches || query.parent.matches;
-          if ($.isFunction(query.filterExp)) {
-            newMatches = $.map(matches, function (match, i) {
-              return query.filterExp.call(match.bindings, i, match.bindings, match.triples) ? match : null;
-            });
-          } else {
-            newMatches = mergeMatches(matches, query.alphaMemory, query.filterExp.optional);
-          }
-        }
-      } else {
-        newMatches = $.map(query.union, function (q) {
-          return q.matches;
-        });
-      }
-      updateQuery(query, newMatches);
-    },
-
-    rightActivate = function (query, match) {
-      var newMatches;
-      if (query.filterExp.optional) {
-        resetQuery(query);
-        leftActivate(query);
-      } else {
-        if (query.top || query.parent.top) {
-          newMatches = [match];
-        } else {
-          newMatches = mergeMatches(query.parent.matches, [match], false);
-        }
-        updateQuery(query, newMatches);
-      }
-    },
-
-    addToQuery = function (query, triple) {
-      var match,
-        bindings = query.filterExp.exec(triple);
-      if (bindings !== null) {
-        match = { triples: [triple], bindings: bindings };
-        query.alphaMemory.push(match);
-        rightActivate(query, match);
-      }
-    },
-
-    removeFromQuery = function (query, triple) {
-      query.alphaMemory.splice($.inArray(triple, query.alphaMemory), 1);
-      resetQuery(query);
-      leftActivate(query);
-    },
-
-    addToQueries = function (queries, triple) {
-      $.each(queries, function (i, query) {
-        addToQuery(query, triple);
-      });
-    },
-
-    removeFromQueries = function (queries, triple) {
-      $.each(queries, function (i, query) {
-        removeFromQuery(query, triple);
-      });
-    },
-
-    addToDatabankQueries = function (databank, triple) {
-      var s = triple.subject,
-        p = triple.property,
-        o = triple.object;
-      if (databank.union === undefined) {
-        if (databank.queries[s] !== undefined) {
-          if (databank.queries[s][p] !== undefined) {
-            if (databank.queries[s][p][o] !== undefined) {
-              addToQueries(databank.queries[s][p][o], triple);
-            }
-            if (databank.queries[s][p][''] !== undefined) {
-              addToQueries(databank.queries[s][p][''], triple);
-            }
-          }
-          if (databank.queries[s][''] !== undefined) {
-            if (databank.queries[s][''][o] !== undefined) {
-              addToQueries(databank.queries[s][''][o], triple);
-            }
-            if (databank.queries[s][''][''] !== undefined) {
-              addToQueries(databank.queries[s][''][''], triple);
-            }
-          }
-        }
-        if (databank.queries[''] !== undefined) {
-          if (databank.queries[''][p] !== undefined) {
-            if (databank.queries[''][p][o] !== undefined) {
-              addToQueries(databank.queries[''][p][o], triple);
-            }
-            if (databank.queries[''][p][''] !== undefined) {
-              addToQueries(databank.queries[''][p][''], triple);
-            }
-          }
-          if (databank.queries[''][''] !== undefined) {
-            if (databank.queries[''][''][o] !== undefined) {
-              addToQueries(databank.queries[''][''][o], triple);
-            }
-            if (databank.queries[''][''][''] !== undefined) {
-              addToQueries(databank.queries[''][''][''], triple);
-            }
-          }
-        }
-      } else {
-        $.each(databank.union, function (i, databank) {
-          addToDatabankQueries(databank, triple);
-        });
-      }
-    },
-
-    removeFromDatabankQueries = function (databank, triple) {
-      var s = triple.subject,
-        p = triple.property,
-        o = triple.object;
-      if (databank.union === undefined) {
-        if (databank.queries[s] !== undefined) {
-          if (databank.queries[s][p] !== undefined) {
-            if (databank.queries[s][p][o] !== undefined) {
-              removeFromQueries(databank.queries[s][p][o], triple);
-            }
-            if (databank.queries[s][p][''] !== undefined) {
-              removeFromQueries(databank.queries[s][p][''], triple);
-            }
-          }
-          if (databank.queries[s][''] !== undefined) {
-            if (databank.queries[s][''][o] !== undefined) {
-              removeFromQueries(databank.queries[s][''][o], triple);
-            }
-            if (databank.queries[s][''][''] !== undefined) {
-              removeFromQueries(databank.queries[s][''][''], triple);
-            }
-          }
-        }
-        if (databank.queries[''] !== undefined) {
-          if (databank.queries[''][p] !== undefined) {
-            if (databank.queries[''][p][o] !== undefined) {
-              removeFromQueries(databank.queries[''][p][o], triple);
-            }
-            if (databank.queries[''][p][''] !== undefined) {
-              removeFromQueries(databank.queries[''][p][''], triple);
-            }
-          }
-          if (databank.queries[''][''] !== undefined) {
-            if (databank.queries[''][''][o] !== undefined) {
-              removeFromQueries(databank.queries[''][''][o], triple);
-            }
-            if (databank.queries[''][''][''] !== undefined) {
-              removeFromQueries(databank.queries[''][''][''], triple);
-            }
-          }
-        }
-      } else {
-        $.each(databank.union, function (i, databank) {
-          removeFromDatabankQueries(databank, triple);
-        });
-      }
-    },
-
-    createJson = function (triples) {
-      var e = {},
-        i, t, s, p;
-      for (i = 0; i < triples.length; i += 1) {
-        t = triples[i];
-        s = t.subject.value.toString();
-        p = t.property.value.toString();
-        if (e[s] === undefined) {
-          e[s] = {};
-        }
-        if (e[s][p] === undefined) {
-          e[s][p] = [];
-        }
-        e[s][p].push(t.object.dump());
-      }
-      return e;
-    },
-
-    parseJson = function (data) {
-      var s, subject, p, property, o, object, i, opts, triples = [];
-      for (s in data) {
-        subject = (s.substring(0, 2) === '_:') ? $.rdf.blank(s) : $.rdf.resource('<' + s + '>');
-        for (p in data[s]) {
-          property = $.rdf.resource('<' + p + '>');
-          for (i = 0; i < data[s][p].length; i += 1) {
-            o = data[s][p][i];
-            if (o.type === 'uri') {
-              object = $.rdf.resource('<' + o.value + '>');
-            } else if (o.type === 'bnode') {
-              object = $.rdf.blank(o.value);
-            } else {
-              // o.type === 'literal'
-              if (o.datatype !== undefined) {
-                object = $.rdf.literal(o.value, { datatype: o.datatype });
-              } else {
-                opts = {};
-                if (o.lang !== undefined) {
-                  opts.lang = o.lang;
-                }
-                object = $.rdf.literal('"' + o.value + '"', opts);
-              }
-            }
-            triples.push($.rdf.triple(subject, property, object));
-          }
-        }
-      }
-      return triples;
-    },
-
-    addAttribute = function (parent, namespace, name, value) {
-      var doc = parent.ownerDocument,
-        a;
-      if (namespace !== undefined && namespace !== null) {
-        if (doc.createAttributeNS) {
-          a = doc.createAttributeNS(namespace, name);
-          a.nodeValue = value;
-          parent.attributes.setNamedItemNS(a);
-        } else {
-          a = doc.createNode(2, name, namespace);
-          a.nodeValue = value;
-          parent.attributes.setNamedItem(a);
-        }
-      } else {
-        a = doc.createAttribute(name);
-        a.nodeValue = value;
-        parent.attributes.setNamedItem(a);
-      }
-      return parent;
-    },
-
-    createXmlnsAtt = function (parent, namespace, prefix) {
-      if (prefix) {
-        addAttribute(parent, 'http://www.w3.org/2000/xmlns/', 'xmlns:' + prefix, namespace);
-      } else {
-        addAttribute(parent, undefined, 'xmlns', namespace);
-      }
-      return parent;
-    },
-
-    createDocument = function (namespace, name) {
-      var doc, xmlns = '', prefix, addAttribute = false;
-      if (namespace !== undefined && namespace !== null) {
-        if (/:/.test(name)) {
-          prefix = /([^:]+):/.exec(name)[1];
-        }
-        addAttribute = true;
-      }
-      if (document.implementation &&
-          document.implementation.createDocument) {
-        doc = document.implementation.createDocument(namespace, name, null);
-        if (addAttribute) {
-          createXmlnsAtt(doc.documentElement, namespace, prefix);
-        }
-        return doc;
-      } else {
-        doc = new ActiveXObject("Microsoft.XMLDOM");
-        doc.async = "false";
-        if (prefix === undefined) {
-          xmlns = ' xmlns="' + namespace + '"';
-        } else {
-          xmlns = ' xmlns:' + prefix + '="' + namespace + '"';
-        }
-        doc.loadXML('<' + name + xmlns + '/>');
-        return doc;
-      }
-    },
-
-    appendElement = function (parent, namespace, name) {
-      var doc = parent.ownerDocument,
-        e;
-      if (namespace !== undefined && namespace !== null) {
-        e = doc.createElementNS ? doc.createElementNS(namespace, name) : doc.createNode(1, name, namespace);
-      } else {
-        e = doc.createElement(name);
-      }
-      parent.appendChild(e);
-      return e;
-    },
-
-    appendText = function (parent, text) {
-      var doc = parent.ownerDocument,
-        t;
-      t = doc.createTextNode(text);
-      parent.appendChild(t);
-      return parent;
-    },
-
-    appendXML = function (parent, xml) {
-      var parser, doc, i, child;
-      try {
-        doc = new ActiveXObject('Microsoft.XMLDOM');
-        doc.async = "false";
-        doc.loadXML('<temp>' + xml + '</temp>');
-      } catch(e) {
-        parser = new DOMParser();
-        doc = parser.parseFromString('<temp>' + xml + '</temp>', 'text/xml');
-      }
-      for (i = 0; i < doc.documentElement.childNodes.length; i += 1) {
-        parent.appendChild(doc.documentElement.childNodes[i].cloneNode(true));
-      }
-      return parent;
-    },
-
-    createRdfXml = function (triples, options) {
-      var doc = createDocument(rdfNs, 'rdf:RDF'),
-        dump = createJson(triples),
-        namespaces = options.namespaces || {},
-        n, s, se, p, pe, i, v,
-        m, local, ns, prefix;
-      for (n in namespaces) {
-        createXmlnsAtt(doc.documentElement, namespaces[n], n);
-      }
-      for (s in dump) {
-        if (dump[s][$.rdf.type.value] !== undefined) {
-          m = /(.+[#\/])([^#\/]+)/.exec(dump[s][$.rdf.type.value][0].value);
-          ns = m[1];
-          local = m[2];
-          for (n in namespaces) {
-            if (namespaces[n].toString() === ns) {
-              prefix = n;
-              break;
-            }
-          }
-          se = appendElement(doc.documentElement, ns, prefix + ':' + local);
-        } else {
-          se = appendElement(doc.documentElement, rdfNs, 'rdf:Description');
-        }
-        if (/^_:/.test(s)) {
-          addAttribute(se, rdfNs, 'rdf:nodeID', s.substring(2));
-        } else {
-          addAttribute(se, rdfNs, 'rdf:about', s);
-        }
-        for (p in dump[s]) {
-          if (p !== $.rdf.type.value.toString() || dump[s][p].length > 1) {
-            m = /(.+[#\/])([^#\/]+)/.exec(p);
-            ns = m[1];
-            local = m[2];
-            for (n in namespaces) {
-              if (namespaces[n].toString() === ns) {
-                prefix = n;
-                break;
-              }
-            }
-            for (i = (p === $.rdf.type.value.toString() ? 1 : 0); i < dump[s][p].length; i += 1) {
-              v = dump[s][p][i];
-              pe = appendElement(se, ns, prefix + ':' + local);
-              if (v.type === 'uri') {
-                addAttribute(pe, rdfNs, 'rdf:resource', v.value);
-              } else if (v.type === 'literal') {
-                if (v.datatype !== undefined) {
-                  if (v.datatype === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') {
-                    addAttribute(pe, rdfNs, 'rdf:parseType', 'Literal');
-                    appendXML(pe, v.value);
-                  } else {
-                    addAttribute(pe, rdfNs, 'rdf:datatype', v.datatype);
-                    appendText(pe, v.value);
-                  }
-                } else if (v.lang !== undefined) {
-                  addAttribute(pe, 'http://www.w3.org/XML/1998/namespace', 'xml:lang', v.lang);
-                  appendText(pe, v.value);
-                } else {
-                  appendText(pe, v.value);
-                }
-              } else {
-                // blank node
-                addAttribute(pe, rdfNs, 'rdf:nodeID', v.value.substring(2));
-              }
-            }
-          }
-        }
-      }
-      return doc;
-    },
-
-    getDefaultNamespacePrefix = function (namespaceUri) {
-      switch (namespaceUri) {
-        case 'http://www.w3.org/1999/02/22-rdf-syntax-ns':
-          return 'rdf';
-        case 'http://www.w3.org/XML/1998/namespace':
-          return 'xml';
-        case 'http://www.w3.org/2000/xmlns/':
-          return 'xmlns';
-        default:
-          throw ('No default prefix mapped for namespace ' + namespaceUri);
-      }
-    },
-
-    hasAttributeNS  = function(elem, namespace, name){
-      var basename;
-      if (elem.hasAttributeNS) {
-        return elem.hasAttributeNS(namespace, name);
-      } else {
-        try {
-          basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name;
-          return elem.attributes.getQualifiedItem(basename, namespace) !== null;
-        } catch (e) {
-          return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name) !== null;
-        }
-      }
-    },
-
-    getAttributeNS = function(elem, namespace, name){
-      var basename;
-      if (elem.getAttributeNS) {
-        return elem.getAttributeNS(namespace, name);
-      } else {
-        try {
-          basename = /:/.test(name) ? /:(.+)$/.exec(name)[1] : name;
-          return elem.attributes.getQualifiedItem(basename, namespace).nodeValue;
-        } catch (e) {
-          return elem.getAttribute(getDefaultNamespacePrefix(namespace) + ':' + name);
-        }
-      }
-    },
-
-    getLocalName = function(elem){
-      return elem.localName || elem.baseName;
-    },
-
-    parseRdfXmlSubject = function (elem, base) {
-      var s, subject;
-      if (hasAttributeNS(elem, rdfNs, 'about')) {
-        s = getAttributeNS(elem, rdfNs, 'about');
-        subject = $.rdf.resource('<' + s + '>', { base: base });
-      } else if (hasAttributeNS(elem, rdfNs, 'ID')) {
-        s = getAttributeNS(elem, rdfNs, 'ID');
-        subject = $.rdf.resource('<#' + s + '>', { base: base });
-      } else if (hasAttributeNS(elem, rdfNs, 'nodeID')) {
-        s = getAttributeNS(elem, rdfNs, 'nodeID');
-        subject = $.rdf.blank('_:' + s);
-      } else {
-        subject = $.rdf.blank('[]');
-      }
-      return subject;
-    },
-
-    parseRdfXmlDescription = function (elem, isDescription, base, lang) {
-      var subject, p, property, o, object, reified, lang, i, j, li = 1,
-        collection1, collection2, collectionItem, collectionItems = [],
-        parseType, serializer, literalOpts = {}, oTriples, triples = [];
-      lang = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'lang') || lang;
-      base = getAttributeNS(elem, 'http://www.w3.org/XML/1998/namespace', 'base') || base;
-      if (lang !== null && lang !== undefined && lang !== '') {
-        literalOpts = { lang: lang };
-      }
-      subject = parseRdfXmlSubject(elem, base);
-      if (isDescription && (elem.namespaceURI !== rdfNs || getLocalName(elem) !== 'Description')) {
-        property = $.rdf.type;
-        object = $.rdf.resource('<' + elem.namespaceURI + getLocalName(elem) + '>');
-        triples.push($.rdf.triple(subject, property, object));
-      }
-      for (i = 0; i < elem.attributes.length; i += 1) {
-        p = elem.attributes.item(i);
-        if (p.namespaceURI !== undefined &&
-            p.namespaceURI !== 'http://www.w3.org/2000/xmlns/' &&
-            p.namespaceURI !== 'http://www.w3.org/XML/1998/namespace' &&
-            p.prefix !== 'xmlns' &&
-            p.prefix !== 'xml') {
-          if (p.namespaceURI !== rdfNs) {
-            property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>');
-            object = $.rdf.literal(literalOpts.lang ? p.nodeValue : '"' + p.nodeValue + '"', literalOpts);
-            triples.push($.rdf.triple(subject, property, object));
-          } else if (getLocalName(p) === 'type') {
-            property = $.rdf.type;
-            object = $.rdf.resource('<' + p.nodeValue + '>', { base: base });
-            triples.push($.rdf.triple(subject, property, object));
-          }
-        }
-      }
-      for (i = 0; i < elem.childNodes.length; i += 1) {
-        p = elem.childNodes[i];
-        if (p.nodeType === 1) {
-          if (p.namespaceURI === rdfNs && getLocalName(p) === 'li') {
-            property = $.rdf.resource('<' + rdfNs + '_' + li + '>');
-            li += 1;
-          } else {
-            property = $.rdf.resource('<' + p.namespaceURI + getLocalName(p) + '>');
-          }
-          lang = getAttributeNS(p, 'http://www.w3.org/XML/1998/namespace', 'lang') || lang;
-          if (lang !== null && lang !== undefined && lang !== '') {
-            literalOpts = { lang: lang };
-          }
-          if (hasAttributeNS(p, rdfNs, 'resource')) {
-            o = getAttributeNS(p, rdfNs, 'resource');
-            object = $.rdf.resource('<' + o + '>', { base: base });
-          } else if (hasAttributeNS(p, rdfNs, 'nodeID')) {
-            o = getAttributeNS(p, rdfNs, 'nodeID');
-            object = $.rdf.blank('_:' + o);
-          } else if (hasAttributeNS(p, rdfNs, 'parseType')) {
-            parseType = getAttributeNS(p, rdfNs, 'parseType');
-            if (parseType === 'Literal') {
-              try {
-                serializer = new XMLSerializer();
-                o = serializer.serializeToString(p.getElementsByTagName('*')[0]);
-              } catch (e) {
-                o = "";
-                for (j = 0; j < p.childNodes.length; j += 1) {
-                  o += p.childNodes[j].xml;
-                }
-              }
-              object = $.rdf.literal(o, { datatype: rdfNs + 'XMLLiteral' });
-            } else if (parseType === 'Resource') {
-              oTriples = parseRdfXmlDescription(p, false, base, lang);
-              if (oTriples.length > 0) {
-                object = oTriples[oTriples.length - 1].subject;
-                triples = triples.concat(oTriples);
-              } else {
-                object = $.rdf.blank('[]');
-              }
-            } else if (parseType === 'Collection') {
-              if (p.getElementsByTagName('*').length > 0) {
-                for (j = 0; j < p.childNodes.length; j += 1) {
-                  o = p.childNodes[j];
-                  if (o.nodeType === 1) {
-                    collectionItems.push(o);
-                  }
-                }
-                collection1 = $.rdf.blank('[]');
-                object = collection1;
-                for (j = 0; j < collectionItems.length; j += 1) {
-                  o = collectionItems[j];
-                  oTriples = parseRdfXmlDescription(o, true, base, lang);
-                  if (oTriples.length > 0) {
-                    collectionItem = oTriples[oTriples.length - 1].subject;
-                    triples = triples.concat(oTriples);
-                  } else {
-                    collectionItem = parseRdfXmlSubject(o);
-                  }
-                  triples.push($.rdf.triple(collection1, $.rdf.first, collectionItem));
-                  if (j === collectionItems.length - 1) {
-                    triples.push($.rdf.triple(collection1, $.rdf.rest, $.rdf.nil));
-                  } else {
-                    collection2 = $.rdf.blank('[]');
-                    triples.push($.rdf.triple(collection1, $.rdf.rest, collection2));
-                    collection1 = collection2;
-                  }
-                }
-              } else {
-                object = $.rdf.nil;
-              }
-            }
-          } else if (hasAttributeNS(p, rdfNs, 'datatype')) {
-            o = p.childNodes[0].nodeValue;
-            object = $.rdf.literal(o, { datatype: getAttributeNS(p, rdfNs, 'datatype') });
-          } else if (p.getElementsByTagName('*').length > 0) {
-            for (j = 0; j < p.childNodes.length; j += 1) {
-              o = p.childNodes[j];
-              if (o.nodeType === 1) {
-                oTriples = parseRdfXmlDescription(o, true, base, lang);
-                if (oTriples.length > 0) {
-                  object = oTriples[oTriples.length - 1].subject;
-                  triples = triples.concat(oTriples);
-                } else {
-                  object = parseRdfXmlSubject(o);
-                }
-              }
-            }
-          } else if (p.childNodes.length > 0) {
-            o = p.childNodes[0].nodeValue;
-            object = $.rdf.literal(literalOpts.lang ? o : '"' + o + '"', literalOpts);
-          } else {
-            oTriples = parseRdfXmlDescription(p, false, base, lang);
-            if (oTriples.length > 0) {
-              object = oTriples[oTriples.length - 1].subject;
-              triples = triples.concat(oTriples);
-            } else {
-              object = $.rdf.blank('[]');
-            }
-          }
-          triples.push($.rdf.triple(subject, property, object));
-          if (hasAttributeNS(p, rdfNs, 'ID')) {
-            reified = $.rdf.resource('<#' + getAttributeNS(p, rdfNs, 'ID') + '>', { base: base });
-            triples.push($.rdf.triple(reified, $.rdf.subject, subject));
-            triples.push($.rdf.triple(reified, $.rdf.property, property));
-            triples.push($.rdf.triple(reified, $.rdf.object, object));
-          }
-        }
-      }
-      return triples;
-    },
-
-    parseRdfXml = function (doc) {
-      var i, lang, d, triples = [];
-      if (doc.documentElement.namespaceURI === rdfNs && getLocalName(doc.documentElement) === 'RDF') {
-        lang = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'lang');
-        base = getAttributeNS(doc.documentElement, 'http://www.w3.org/XML/1998/namespace', 'base') || $.uri.base();
-        triples = $.map(doc.documentElement.childNodes, function (d) {
-          if (d.nodeType === 1) {
-            return parseRdfXmlDescription(d, true, base, lang);
-          } else {
-            return null;
-          }
-        });
-        /*
-        for (i = 0; i < doc.documentElement.childNodes.length; i += 1) {
-          d = doc.documentElement.childNodes[i];
-          if (d.nodeType === 1) {
-            triples = triples.concat(parseRdfXmlDescription(d, true, base, lang));
-          }
-        }
-        */
-      } else {
-        triples = parseRdfXmlDescription(doc.documentElement, true);
-      }
-      return triples;
-    },
-    
-    group = function (bindings, variables, base) {
-      var variable = variables[0], grouped = {}, results = [], i, newbase;
-      base = base || {};
-      if (variables.length === 0) {
-        for (i = 0; i < bindings.length; i += 1) {
-          for (v in bindings[i]) {
-            if (base[v] === undefined) {
-              base[v] = [];
-            }
-            if ($.isArray(base[v])) {
-              base[v].push(bindings[i][v]);
-            }
-          }
-        }
-        return [base];
-      }
-      // collect together the grouped results
-      for (i = 0; i < bindings.length; i += 1) {
-        key = bindings[i][variable];
-        if (grouped[key] === undefined) {
-          grouped[key] = [];
-        }
-        grouped[key].push(bindings[i]);
-      }
-      // call recursively on each group
-      variables = variables.splice(1, 1);
-      for (v in grouped) {
-        newbase = $.extend({}, base);
-        newbase[variable] = grouped[v][0][variable];
-        results = results.concat(group(grouped[v], variables, newbase));
-      }
-      return results;
-    },
-    
-    queue = function (databank, url, callbacks) {
-      if (documentQueue[databank.id] === undefined) {
-        documentQueue[databank.id] = {};
-      }
-      if (documentQueue[databank.id][url] === undefined) {
-        documentQueue[databank.id][url] = callbacks;
-        return false;
-      }
-      return true;
-    }
-    
-    dequeue = function (databank, url, result, args) {
-      var callbacks = documentQueue[databank.id][url];
-      if ($.isFunction(callbacks[result])) {
-        callbacks[result].call(databank, args);
-      }
-      documentQueue[databank.id][url] = undefined;
-    };
-
-  $.typedValue.types['http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'] = {
-    regex: /^.*$/m,
-    strip: false,
-    value: function (v) {
-      return v;
-    }
-  };
-
-  /**
-   * <p>Creates a new jQuery.rdf object. This should be invoked as a method rather than constructed using new; indeed you will usually want to generate these objects using a method such as {@link jQuery#rdf} or {@link jQuery.rdf#where}.</p>
-   * @class <p>A jQuery.rdf object represents the results of a query over its {@link jQuery.rdf#databank}. The results of a query are a sequence of objects which represent the bindings of values to the variables used in filter expressions specified using {@link jQuery.rdf#where} or {@link jQuery.rdf#optional}. Each of the objects in this sequence has associated with it a set of triples that are the sources for the variable bindings, which you can get at using {@link jQuery.rdf#sources}.</p>
-    * <p>The {@link jQuery.rdf} object itself is a lot like a {@link jQuery} object. It has a {@link jQuery.rdf#length} and the individual matches can be accessed using <code>[<var>n</var>]</code>, but you can also iterate through the matches using {@link jQuery.rdf#map} or {@link jQuery.rdf#each}.</p>
-    * <p>{@link jQuery.rdf} is designed to mirror the functionality of <a href="http://www.w3.org/TR/rdf-sparql-query/">SPARQL</a> while providing an interface that's familiar and easy to use for jQuery programmers.</p>
-   * @param {Object} [options]
-   * @param {jQuery.rdf.databank} [options.databank] The databank that this query should operate over.
-   * @param {jQuery.rdf.triple[]} [options.triples] A set of triples over which the query operates; this is only used if options.databank isn't specified, in which case a new databank with these triples is generated.
-   * @param {Object} [options.namespaces] An object representing a set of namespace bindings. Rather than passing this in when you construct the {@link jQuery.rdf} instance, you will usually want to use the {@link jQuery.rdf#prefix} method.
-   * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the query.
-   * @returns {jQuery.rdf}
-   * @example rdf = jQuery.rdf();
-   * @see jQuery#rdf
-   */
-  $.rdf = function (options) {
-    return new $.rdf.fn.init(options);
-  };
-
-  $.rdf.fn = $.rdf.prototype = {
-    /**
-     * The version of rdfQuery.
-     * @type String
-     */
-    rdfquery: '1.1',
-
-    init: function (options) {
-      var databanks;
-      options = options || {};
-      /* must specify either a parent or a union, otherwise it's the top */
-      this.parent = options.parent;
-      this.union = options.union;
-      this.top = this.parent === undefined && this.union === undefined;
-      if (this.union === undefined) {
-        if (options.databank === undefined) {
-          /**
-           * The databank over which this query operates.
-           * @type jQuery.rdf.databank
-           */
-          this.databank = this.parent === undefined ? $.rdf.databank(options.triples, options) : this.parent.databank;
-        } else {
-          this.databank = options.databank;
-        }
-      } else {
-        databanks = $.map(this.union, function (query) {
-          return query.databank;
-        });
-        databanks = $.unique(databanks);
-        if (databanks[1] !== undefined) {
-          this.databank = $.rdf.databank(undefined, { union: databanks });
-        } else {
-          this.databank = databanks[0];
-        }
-      }
-      this.children = [];
-      this.partOf = [];
-      this.filterExp = options.filter;
-      this.alphaMemory = [];
-      this.matches = [];
-      /**
-       * The number of matches represented by the {@link jQuery.rdf} object.
-       * @type Integer
-       */
-      this.length = 0;
-      if (this.filterExp !== undefined) {
-        if (!$.isFunction(this.filterExp)) {
-          registerQuery(this.databank, this);
-          this.alphaMemory = findMatches(this.databank, this.filterExp);
-        }
-      }
-      leftActivate(this);
-      return this;
-    },
-
-    /**
-     * Sets or returns the base URI of the {@link jQuery.rdf#databank}.
-     * @param {String|jQuery.uri} [base]
-     * @returns A {@link jQuery.uri} if no base URI is specified, otherwise returns this {@link jQuery.rdf} object.
-     * @example baseURI = jQuery('html').rdf().base();
-     * @example jQuery('html').rdf().base('http://www.example.org/');
-     * @see jQuery.rdf.databank#base
-     */
-    base: function (base) {
-      if (base === undefined) {
-        return this.databank.base();
-      } else {
-        this.databank.base(base);
-        return this;
-      }
-    },
-
-    /**
-     * Sets or returns a namespace binding on the {@link jQuery.rdf#databank}.
-     * @param {String} [prefix]
-     * @param {String} [namespace]
-     * @returns {Object|jQuery.uri|jQuery.rdf} If no prefix or namespace is specified, returns an object providing all namespace bindings on the {@link jQuery.rdf.databank}. If a prefix is specified without a namespace, returns the {@link jQuery.uri} associated with that prefix. Otherwise returns this {@link jQuery.rdf} object after setting the namespace binding.
-     * @example namespace = jQuery('html').rdf().prefix('foaf');
-     * @example jQuery('html').rdf().prefix('foaf', 'http://xmlns.com/foaf/0.1/');
-     * @see jQuery.rdf.databank#prefix
-     */
-    prefix: function (prefix, namespace) {
-      if (namespace === undefined) {
-        return this.databank.prefix(prefix);
-      } else {
-        this.databank.prefix(prefix, namespace);
-        return this;
-      }
-    },
-
-    /**
-     * Adds a triple to the {@link jQuery.rdf#databank} or another {@link jQuery.rdf} object to create a union.
-     * @param {String|jQuery.rdf.triple|jQuery.rdf.pattern|jQuery.rdf} triple The triple, {@link jQuery.rdf.pattern} or {@link jQuery.rdf} object to be added to this one. If the triple is a {@link jQuery.rdf} object, the two queries are unioned together. If the triple is a string, it's parsed as a {@link jQuery.rdf.pattern}. The pattern will be completed using the current matches on the {@link jQuery.rdf} object to create multiple triples, one for each set of bindings.
-     * @param {Object} [options]
-     * @param {Object} [options.namespaces] An object representing a set of namespace bindings used to interpret CURIEs within the triple. Defaults to the namespace bindings defined on the {@link jQuery.rdf#databank}.
-     * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the triple. Defaults to the base URI defined on the {@link jQuery.rdf#databank}.
-     * @returns {jQuery.rdf} This {@link jQuery.rdf} object.
-     * @example
-     * var rdf = $.rdf()
-     *   .prefix('dc', ns.dc)
-     *   .prefix('foaf', ns.foaf)
-     *   .add('&lt;photo1.jpg> dc:creator &lt;http://www.blogger.com/profile/1109404> .')
-     *   .add('&lt;http://www.blogger.com/profile/1109404> foaf:img &lt;photo1.jpg> .');
-     * @example
-     * var rdfA = $.rdf()
-     *   .prefix('dc', ns.dc)
-     *   .add('&lt;photo1.jpg> dc:creator "Jane"');
-     * var rdfB = $.rdf()
-     *   .prefix('foaf', ns.foaf)
-     *   .add('&lt;photo1.jpg> foaf:depicts "Jane"');
-     * var rdf = rdfA.add(rdfB);
-     * @see jQuery.rdf.databank#add
-     */
-    add: function (triple, options) {
-      var query, databank;
-      if (triple.rdfquery !== undefined) {
-        if (triple.top) {
-          databank = this.databank.add(triple.databank);
-          query = $.rdf({ parent: this.parent, databank: databank });
-          return query;
-        } else if (this.top) {
-          databank = triple.databank.add(this.databank);
-          query = $.rdf({ parent: triple.parent, databank: databank });
-          return query;
-        } else if (this.union === undefined) {
-          query = $.rdf({ union: [this, triple] });
-          this.partOf.push(query);
-          triple.partOf.push(query);
-          return query;
-        } else {
-          this.union.push(triple);
-          triple.partOf.push(this);
-        }
-      } else {
-        if (typeof triple === 'string') {
-          options = $.extend({}, { base: this.base(), namespaces: this.prefix(), source: triple }, options);
-          triple = $.rdf.pattern(triple, options);
-        }
-        if (triple.isFixed()) {
-          this.databank.add(triple.triple(), options);
-        } else {
-          query = this;
-          this.each(function (i, data) {
-            var t = triple.triple(data);
-            if (t !== null) {
-              query.databank.add(t, options);
-            }
-          });
-        }
-      }
-      return this;
-    },
-
-    /**
-     * Removes a triple or several triples from the {@link jQuery.rdf#databank}.
-     * @param {String|jQuery.rdf.triple|jQuery.rdf.pattern} triple The triple to be removed, or a {@link jQuery.rdf.pattern} that matches the triples that should be removed.
-     * @param {Object} [options]
-     * @param {Object} [options.namespaces] An object representing a set of namespace bindings used to interpret any CURIEs within the triple or pattern. Defaults to the namespace bindings defined on the {@link jQuery.rdf#databank}.
-     * @param {String|jQuery.uri} [options.base] The base URI used to interpret any relative URIs used within the triple or pattern. Defaults to the base URI defined on the {@link jQuery.rdf#databank}.
-     * @returns {jQuery.rdf} The {@link jQuery.rdf} object itself.
-     * @example
-     * var rdf = $('html').rdf()
-     *   .prefix('foaf', ns.foaf)
-     *   .where('?person foaf:givenname ?gname')
-     *   .where('?person foaf:family_name ?fname')
-     *   .remove('?person foaf:family_name ?fname');
-     * @see jQuery.rdf.databank#remove
-     */
-    remove: function (triple, options) {
-      if (typeof triple === 'string') {
-        options = $.extend({}, { base: this.base(), namespaces: this.prefix() }, options);
-        triple = $.rdf.pattern(triple, options);
-      }
-      if (triple.isFixed()) {
-        this.databank.remove(triple.triple(), options);
-      } else {
-        query = this;
-        this.each(function (i, data) {
-          var t = triple.triple(data);
-          if (t !== null) {
-            query.databank.remove(t, options);
-          }
-        });
-      }
-      return this;
-    },
-
-    /**
-     * Loads some data into the {@link jQuery.rdf#databank}
-     * @param data
-     * @param {Object} [options]
-     * @see jQuery.rdf.databank#load
-     */
-    load: function (data, options) {
-      var rdf = this, success = options.success;
-      if (success !== undefined) {
-        options.success = function () {
-          success.call(rdf);
-        }
-      }
-      this.databank.load(data, options);
-      return this;
-    },
-
-    /**
-     * Creates a new {@link jQuery.rdf} object whose databank c

<TRUNCATED>

[69/87] [abbrv] clerezza git commit: CLEREZZA-982: using new package names for rdf-core

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
index f3678a7..e596520 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/ResultSetMessageBodyWriter.java
@@ -45,15 +45,15 @@ 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;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.RdfTerm;
+import org.apache.clerezza.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
 import org.apache.clerezza.rdf.core.sparql.SolutionMapping;
 import org.apache.clerezza.rdf.core.sparql.query.Variable;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
index fa29fde..6194ca8 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Smush.java
@@ -26,16 +26,16 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 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;
-import org.apache.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.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+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.FOAF;
 import org.apache.clerezza.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
index 69f318f..e63e018 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/SparqlEndpoint.java
@@ -61,16 +61,16 @@ import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPa
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Language;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Language;
+import org.apache.clerezza.commons.rdf.Graph;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.sparql.ParseException;
 import org.apache.clerezza.rdf.core.sparql.QueryParser;
 import org.apache.clerezza.rdf.core.sparql.ResultSet;
@@ -81,7 +81,7 @@ import org.apache.clerezza.rdf.core.sparql.query.Variable;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.web.ontologies.SPARQLENDPOINT;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.ProcessingInstruction;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
index 6a71c01..1369db8 100644
--- a/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
+++ b/rdf/web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/WebAccess.java
@@ -43,13 +43,13 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.jaxrs.utils.form.FormFile;
 import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+import org.apache.clerezza.commons.rdf.Graph;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.serializedform.Parser;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
----------------------------------------------------------------------
diff --git a/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
index a43a6a2..dbe5117 100644
--- a/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
+++ b/rdf/web/rdf.web.core/src/test/java/org/apache/clerezza/rdf/web/core/BackupAndRestoreTest.java
@@ -29,16 +29,16 @@ import java.util.Map;
 import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+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.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.access.TcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
@@ -47,7 +47,7 @@ import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
 import org.apache.clerezza.rdf.jena.serializer.JenaSerializerProvider;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.web.ontologies.BACKUP;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Literal;
 import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
index a40ecf2..883bcd1 100644
--- a/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
+++ b/templating.seedsnipe/src/main/java/org/apache/clerezza/templating/seedsnipe/graphnodeadapter/GraphNodeDataFieldResolver.java
@@ -26,9 +26,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.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.rdf.ontologies.OWL;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.utils.GraphNode;
@@ -40,7 +40,7 @@ import org.apache.clerezza.templating.seedsnipe.datastructure.FieldDoesNotHaveDi
 import org.apache.clerezza.templating.seedsnipe.datastructure.FieldIndexOutOfBoundsException;
 import org.apache.clerezza.templating.seedsnipe.datastructure.InvalidElementException;
 import org.apache.clerezza.templating.seedsnipe.simpleparser.DefaultParser;
-import org.apache.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Graph;
 
 /**
  * Data Model for {@link GraphNode} to be used with {@link DefaultParser}.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/1ad142ea/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
----------------------------------------------------------------------
diff --git a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
index 0a74afe..c2903ef 100644
--- a/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
+++ b/templating.seedsnipe/src/test/java/org/apache/clerezza/templating/seedsnipe/GraphNodeTest.java
@@ -27,14 +27,14 @@ import java.util.Map;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.commons.rdf.BlankNode;
-import org.apache.commons.rdf.ImmutableGraph;
-import org.apache.commons.rdf.BlankNodeOrIri;
-import org.apache.commons.rdf.RdfTerm;
-import org.apache.commons.rdf.Iri;
-import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
-import org.apache.commons.rdf.impl.utils.TripleImpl;
+import org.apache.clerezza.commons.rdf.BlankNode;
+import org.apache.clerezza.commons.rdf.ImmutableGraph;
+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.PlainLiteralImpl;
+import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -46,8 +46,8 @@ import org.apache.clerezza.templating.RenderingFunctions;
 import org.apache.clerezza.templating.seedsnipe.datastructure.DataFieldResolver;
 import org.apache.clerezza.templating.seedsnipe.graphnodeadapter.GraphNodeDataFieldResolver;
 import org.apache.clerezza.templating.seedsnipe.simpleparser.DefaultParser;
-import org.apache.commons.rdf.Graph;
-import org.apache.commons.rdf.Literal;
+import org.apache.clerezza.commons.rdf.Graph;
+import org.apache.clerezza.commons.rdf.Literal;
 
 /**
  * Unit Test for RDF Templating.


[57/87] [abbrv] clerezza git commit: CLEREZZA-975: All bundle dependencies in typerendering laucnher satisfied, however some exceptions probably because of scala-compiler version mismatch

Posted by re...@apache.org.
CLEREZZA-975: All bundle dependencies in typerendering laucnher satisfied, however some exceptions probably because of scala-compiler version mismatch

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

Branch: refs/heads/master
Commit: 9677f50ebae542f934e0f13d981672251ad9a59c
Parents: f0f8dce
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 21:19:09 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 21:19:09 2015 +0000

----------------------------------------------------------------------
 platform/config/pom.xml                         |   2 +-
 .../clerezza/platform/config/SystemConfig.java  |   6 +-
 platform/graphnodeprovider/pom.xml              |  14 +-
 platform/graphprovider.content/pom.xml          |  12 +-
 .../content/ContentGraphProvider.java           |  49 +++--
 .../content/GraphNameTransitioner.java          |  95 ---------
 .../TcPermissionDescriptionsProvider.java       |   4 +-
 platform/style.default/pom.xml                  |  20 +-
 .../src/main/scala/Activator.scala              |  13 +-
 .../src/main/scala/GlobalMenuRenderlet.scala    |  10 +-
 .../src/main/scala/HeadedPageRenderlet.scala    |   4 +-
 platform/typerendering.gui/pom.xml              |   1 -
 platform/typerendering.scalaserverpages/pom.xml |  10 +-
 .../ScalaServerPagesService.java                |   6 +-
 .../scalaserverpages/SspTypeRenderlet.java      |  10 +-
 platform/typerendering.seedsnipe/pom.xml        |  10 +-
 .../seedsnipe/WebRenderingFunctions.java        |  67 +++---
 .../typerendering/seedsnipe/GenericTest.java    |   8 +-
 .../seedsnipe/WebRenderingFunctionsTest.java    |  11 +-
 platform/usermanager/pom.xml                    |  16 +-
 .../platform/usermanager/UserComparator.java    |   2 +-
 .../platform/usermanager/UserManager.java       |  32 +--
 .../platform/usermanager/UserManagerImpl.java   | 173 ++++++++--------
 platform/users/core/pom.xml                     |  19 +-
 .../UserGraphAcessPermissionProvider.scala      |   4 +-
 .../platform/users/WebIdGraphsService.scala     |  39 ++--
 .../clerezza/platform/users/WebIdInfo.scala     |  13 +-
 .../launchers/typerendering-launcher/pom.xml    |   6 +-
 provisioning/platform.graphnodeprovider/pom.xml |  14 +-
 provisioning/rdf.tdb/pom.xml                    |   2 +-
 provisioning/rdf/pom.xml                        |   6 +-
 provisioning/typerendering/pom.xml              |  35 ++--
 rdf.file.storage/pom.xml                        |  14 +-
 .../clerezza/rdf/file/storage/FileGraph.java    | 205 ++++++++++++++++++
 .../clerezza/rdf/file/storage/FileMGraph.java   | 207 -------------------
 .../rdf/file/storage/FileTcProvider.java        |  69 +++----
 .../rdf/file/storage/FileGraphTest.java         | 132 ++++++++++++
 .../rdf/file/storage/FileMGraphTest.java        | 132 ------------
 .../rdf/file/storage/FileTcProviderTest.java    |  74 ++++---
 .../clerezza/rdf/file/storage/FileUtil.java     |   2 +-
 rdf.storage.web/pom.xml                         |  12 +-
 rdf.storage.web/src/main/scala/WebProxy.scala   |  63 +++---
 rdf/rdfa/pom.xml                                |   4 +
 templating.seedsnipe/pom.xml                    |  12 +-
 .../GraphNodeDataFieldResolver.java             |  44 ++--
 .../templating/seedsnipe/GraphNodeTest.java     | 126 +++++------
 templating/pom.xml                              |   4 +-
 47 files changed, 859 insertions(+), 954 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/config/pom.xml
----------------------------------------------------------------------
diff --git a/platform/config/pom.xml b/platform/config/pom.xml
index e2251bc..7537a21 100644
--- a/platform/config/pom.xml
+++ b/platform/config/pom.xml
@@ -73,7 +73,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.file.storage</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
----------------------------------------------------------------------
diff --git a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
index 537733f..cb07d36 100644
--- a/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
+++ b/platform/config/src/main/java/org/apache/clerezza/platform/config/SystemConfig.java
@@ -34,14 +34,12 @@ import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
 import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.clerezza.rdf.core.serializedform.ParsingProvider;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
-import org.apache.clerezza.rdf.file.storage.FileMGraph;
+import org.apache.clerezza.rdf.file.storage.FileGraph;
 import org.apache.felix.scr.annotations.Service;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.component.annotations.Activate;
@@ -94,7 +92,7 @@ public class SystemConfig implements WeightedTcProvider {
         File systemGraphFile = bundleContext.getDataFile(DATA_FILE_SYSTEM_GRAPH);
         boolean dataFileExisted = systemGraphFile.exists();
         //yould be good to use IndexedGraph to be faster
-        systemGraph = new FileMGraph(systemGraphFile, parser, serializer);
+        systemGraph = new FileGraph(systemGraphFile, parser, serializer);
         if (!dataFileExisted) {
             readConfigGraphFile(systemGraph);
             logger.info("Add initial configuration to system graph");

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/graphnodeprovider/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphnodeprovider/pom.xml b/platform/graphnodeprovider/pom.xml
index 6bdc520..fdd198f 100644
--- a/platform/graphnodeprovider/pom.xml
+++ b/platform/graphnodeprovider/pom.xml
@@ -45,22 +45,22 @@
         <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.config</artifactId>
-            <version>0.4</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.users.core</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -70,17 +70,17 @@
         <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>rdf.utils</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>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/graphprovider.content/pom.xml
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/pom.xml b/platform/graphprovider.content/pom.xml
index 75daca2..cecf185 100644
--- a/platform/graphprovider.content/pom.xml
+++ b/platform/graphprovider.content/pom.xml
@@ -25,15 +25,15 @@
     <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
 
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.graphprovider.content</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
-    <name>Clerezza - Platform Content-Graph Provider</name>
+    <name>Clerezza - Platform Graph Provider Content</name>
     <description>A service that provides the content-graph</description>
     <dependencies>
         <dependency>
@@ -43,17 +43,17 @@
         <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>rdf.core</artifactId>
-            <version>0.14</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>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
index 09c1d95..de3b483 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/ContentGraphProvider.java
@@ -25,13 +25,11 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.clerezza.platform.Constants;
 
 import org.osgi.service.component.ComponentContext;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.utils.UnionMGraph;
+import org.apache.clerezza.rdf.utils.UnionGraph;
 
 /**
  * A service providing a method to retrieve a <code>UnionGraph</code> containing
@@ -53,11 +51,11 @@ public class ContentGraphProvider {
 
     /**
      * Service property header, which contains the URIs of additional
-     * <code>TripleCollection</code>s that are united as read-only to the Graph
+     * <code>Graph</code>s that are united as read-only to the ImmutableGraph
      * returned by <code>getContentGraph</code>
      * 
      * @scr.property name="additions" values.name="" description="Contains
-     *               additional TripleCollections that are added to the content
+     *               additional Graphs that are added to the content
      *               graph for reading"
      */
     public static final String CONTENT_ADDITIONS = "additions";
@@ -70,62 +68,61 @@ public class ContentGraphProvider {
 
 
     /**
-     * The URIs of the read-only addition-<code>TripleCollection</code>s
+     * The URIs of the read-only addition-<code>Graph</code>s
      */
-    private UriRef[] additions;
+    private Iri[] additions;
 
     private ReentrantReadWriteLock configLock = new ReentrantReadWriteLock();
 
     protected void activate(ComponentContext context) {
-        GraphNameTransitioner.renameGraphsWithOldNames(tcManager);
         try {
-            tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
+            tcManager.getGraph(Constants.CONTENT_GRAPH_URI);
         } catch (NoSuchEntityException nsee) {
-            tcManager.createMGraph(Constants.CONTENT_GRAPH_URI);
+            tcManager.createGraph(Constants.CONTENT_GRAPH_URI);
         }
         String[] additionUriStrings = (String[]) context.getProperties().get(
                 CONTENT_ADDITIONS);
-        additions = new UriRef[additionUriStrings.length];
+        additions = new Iri[additionUriStrings.length];
         for (int i = 0; i < additionUriStrings.length; i++) {
-            additions[i] = new UriRef(additionUriStrings[i]);
+            additions[i] = new Iri(additionUriStrings[i]);
 
         }
     }
 
-    public LockableMGraph getContentGraph() {
+    public Graph getContentGraph() {
         configLock.readLock().lock();
         try {
-            TripleCollection[] united = new TripleCollection[additions.length + 1];
+            Graph[] united = new Graph[additions.length + 1];
             int i = 0;
-            united[i++] = tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
-            for (UriRef uriRef : additions) {
-                united[i++] = tcManager.getTriples(uriRef);
+            united[i++] = tcManager.getGraph(Constants.CONTENT_GRAPH_URI);
+            for (Iri uriRef : additions) {
+                united[i++] = tcManager.getGraph(uriRef);
             }
-            return new UnionMGraph(united);
+            return new UnionGraph(united);
         } finally {
             configLock.readLock().unlock();
         }
     }
 
-    public void addTemporaryAdditionGraph(UriRef graphName) {
+    public void addTemporaryAdditionGraph(Iri graphName) {
         configLock.writeLock().lock();
         try {
-            Set<UriRef> additionsSet = new HashSet<UriRef>(Arrays
+            Set<Iri> additionsSet = new HashSet<Iri>(Arrays
                     .asList(additions));
             additionsSet.add(graphName);
-            additions = additionsSet.toArray(new UriRef[additionsSet.size()]);
+            additions = additionsSet.toArray(new Iri[additionsSet.size()]);
         } finally {
             configLock.writeLock().unlock();
         }
     }
 
-    public void removeTemporaryAdditionGraph(UriRef graphName) {
+    public void removeTemporaryAdditionGraph(Iri graphName) {
         configLock.writeLock().lock();
         try {
-            Set<UriRef> additionsSet = new HashSet<UriRef>(Arrays
+            Set<Iri> additionsSet = new HashSet<Iri>(Arrays
                     .asList(additions));
             additionsSet.remove(graphName);
-            additions = additionsSet.toArray(new UriRef[additionsSet.size()]);
+            additions = additionsSet.toArray(new Iri[additionsSet.size()]);
         } finally {
             configLock.writeLock().unlock();
         }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
deleted file mode 100644
index 80b904c..0000000
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/GraphNameTransitioner.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.graphprovider.content;
-
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * A utility class to rename used in snapshot versions to the naming in the first released version
- *
- * @author reto
- */
-public class GraphNameTransitioner {
-
-    private final static Logger logger = LoggerFactory.getLogger(GraphNameTransitioner.class);
-
-    /**
-     * a hack to prevent double execution on the same start up process
-     */
-    private static boolean alreadyExecuted = false;
-
-    synchronized static public void renameGraphsWithOldNames(TcManager tcManager) {
-        if (alreadyExecuted) {
-            return;
-        } else {
-            alreadyExecuted = true;
-        }
-
-        /*try {
-            //just to see that nothing bad happens
-            Thread.sleep(20*1000);
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-        }*/
-
-        final String OLD_SYSTEM_GRAPH_URI_STRING =
-                "http://tpf.localhost/system.graph";
-        final UriRef OLD_SYSTEM_GRAPH_URI =
-                new UriRef(OLD_SYSTEM_GRAPH_URI_STRING);
-
-        final String OLD_CONFIG_GRAPH_URI_STRING =
-                "http://tpf.localhost/config.graph";
-        final UriRef OLD_CONFIG_GRAPH_URI =
-                new UriRef(OLD_CONFIG_GRAPH_URI_STRING);
-
-        final String OLD_CONTENT_GRAPH_URI_STRING =
-                "http://tpf.localhost/content.graph";
-        final UriRef OLD_CONTENT_GRAPH_URI =
-                new UriRef(OLD_CONTENT_GRAPH_URI_STRING);
-
-        renameGraphs(tcManager, OLD_SYSTEM_GRAPH_URI, Constants.SYSTEM_GRAPH_URI);
-        renameGraphs(tcManager, OLD_CONFIG_GRAPH_URI, Constants.CONFIG_GRAPH_URI);
-        renameGraphs(tcManager, OLD_CONTENT_GRAPH_URI, Constants.CONTENT_GRAPH_URI);
-        renameGraphs(tcManager, new UriRef("http://zz.localhost/graph-access.graph"),
-                new UriRef(Constants.URN_LOCAL_INSTANCE+"/graph-access.graph"));
-
-    }
-
-    private static void renameGraphs(TcManager tcManager, UriRef oldGraphUri, UriRef graphUri) {
-        try {
-            MGraph oldMGraph = tcManager.getMGraph(oldGraphUri);
-            MGraph newMGraph = tcManager.createMGraph(graphUri);
-            logger.info("renaming "+oldGraphUri+" to "+graphUri);
-            newMGraph.addAll(oldMGraph);
-            tcManager.deleteTripleCollection(oldGraphUri);
-        } catch (NoSuchEntityException ex) {
-        } catch (EntityAlreadyExistsException ex) {
-            logger.warn("could not rename " + oldGraphUri + " to " + 
-                    graphUri + " because target graph already exists", ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
----------------------------------------------------------------------
diff --git a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
index 9c6c85e..a7433b4 100644
--- a/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
+++ b/platform/graphprovider.content/src/main/java/org/apache/clerezza/platform/graphprovider/content/TcPermissionDescriptionsProvider.java
@@ -41,11 +41,11 @@ public class TcPermissionDescriptionsProvider implements PermissionDescriptionsP
     private static final Set<PermissionDescripton> GRAPH_ACCESS_PERMISSION_DESCRIPTIONS =
             new HashSet<PermissionDescripton>();
     static {
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content Graph Read Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content ImmutableGraph Read Permission",
                 "Grants permission to the user to read the content graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/content.graph\" \"read\")"));
 
-        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content Graph Read/Write Permission",
+        GRAPH_ACCESS_PERMISSION_DESCRIPTIONS.add(new PermissionDescripton("Content ImmutableGraph Read/Write Permission",
                 "Grants permission to the user to read and write the content graph", null, TcPermission.class,
                 "(org.apache.clerezza.rdf.core.access.security.TcPermission \"urn:x-localinstance:/content.graph\" \"readwrite\")"));
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/style.default/pom.xml
----------------------------------------------------------------------
diff --git a/platform/style.default/pom.xml b/platform/style.default/pom.xml
index 66b53df..0f661f0 100644
--- a/platform/style.default/pom.xml
+++ b/platform/style.default/pom.xml
@@ -24,13 +24,13 @@
     <parent>
         <groupId>org.apache.clerezza</groupId>
         <artifactId>clerezza</artifactId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <artifactId>platform.style.default</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
-    <name>Clerezza - Default Style</name>
+    <name>Clerezza - Platform - Style Default</name>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -43,27 +43,27 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.scala</artifactId>
-            <version>0.2</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>rdf.utils</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>
@@ -75,6 +75,10 @@
             <artifactId>scala-library</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.scala-lang.modules</groupId>
+            <artifactId>scala-xml_2.11</artifactId>
+        </dependency>
+        <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>jsr311-api</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/style.default/src/main/scala/Activator.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/Activator.scala b/platform/style.default/src/main/scala/Activator.scala
index a6a687b..2930ce4 100644
--- a/platform/style.default/src/main/scala/Activator.scala
+++ b/platform/style.default/src/main/scala/Activator.scala
@@ -21,21 +21,12 @@
 
 package org.apache.clerezza.platform.style.default
 
-import org.osgi.framework.{BundleActivator, BundleContext, ServiceRegistration}
-import scala.collection.JavaConversions.asJavaDictionary
-import org.apache.clerezza.platform.typerendering.{TypeRenderlet, RenderletManager}
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
-import org.apache.clerezza.rdf.core.access.TcManager
-import org.apache.clerezza.osgi.services.ActivationHelper
-import org.apache.clerezza.osgi.services.ServicesDsl
-import org.apache.clerezza.platform.Constants
-import org.apache.clerezza.rdf.core.event.{GraphEvent, FilterTriple, GraphListener}
-import org.apache.clerezza.rdf.core.serializedform.{Serializer, SupportedFormat, Parser}
-import java.io.{FileOutputStream, FileInputStream, File}
 
 /**
  * Activator for a bundle using Apache Clerezza.
  */
+import org.apache.clerezza.osgi.services.ActivationHelper
+
 class Activator extends ActivationHelper {
 
   registerRenderlet(new GlobalMenuRenderlet)

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
index 26c5272..75cf1eb 100644
--- a/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
+++ b/platform/style.default/src/main/scala/GlobalMenuRenderlet.scala
@@ -23,7 +23,7 @@ package org.apache.clerezza.platform.style.default
 
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.rdf.core.UriRef
+import org.apache.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
 import org.apache.clerezza.rdf.core._
@@ -50,10 +50,10 @@ class GlobalMenuRenderlet extends SRenderlet {
          <a href={href}>{label}</a>
       }
       override def content = {
-        def menu(s: Any) = new UriRef("http://clerezza.org/2009/11/global-menu#"+s)
-def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
-def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
-def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
+        def menu(s: Any) = new Iri("http://clerezza.org/2009/11/global-menu#"+s)
+def rdfs(s: Any) = new Iri("http://www.w3.org/2000/01/rdf-schema#"+s)
+def platform(s: Any) = new Iri("http://clerezza.org/2009/08/platform#"+s)
+def dct(s: Any) = new Iri("http://purl.org/dc/terms/"+s)
 
 <div class="column nav">
               <ul>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
index f5c0106..2ef6189 100644
--- a/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
+++ b/platform/style.default/src/main/scala/HeadedPageRenderlet.scala
@@ -24,7 +24,6 @@ package org.apache.clerezza.platform.style.default
 import java.net.URLEncoder
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.rdf.core.UriRef
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.apache.clerezza.rdf.ontologies._
@@ -33,6 +32,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import org.apache.clerezza.platform.typerendering.scala._
 import org.apache.clerezza.rdf.ontologies.DC
+import org.apache.commons.rdf.Iri
 
 /**
  * A Renderlet for the menu
@@ -92,7 +92,7 @@ resultDocModifier.addScriptReference("/scripts/status-message.js");
       <div class="zz-control">
         <div class="login">
             {
-              def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
+              def platform(s: Any) = new Iri("http://clerezza.org/2009/08/platform#"+s)
               val userName = context/platform("user")/platform("userName")*
               val displayName = if ((context/platform("user")/FOAF.name).length == 0) {
                     userName

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.gui/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.gui/pom.xml b/platform/typerendering.gui/pom.xml
index 1215a5d..fe51f01 100644
--- a/platform/typerendering.gui/pom.xml
+++ b/platform/typerendering.gui/pom.xml
@@ -82,7 +82,6 @@
         <dependency>
             <groupId>org.scala-lang.modules</groupId>
             <artifactId>scala-xml_2.11</artifactId>
-            <version>1.0.3</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.scalaserverpages/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/pom.xml b/platform/typerendering.scalaserverpages/pom.xml
index bd1aada..7d5cdc6 100644
--- a/platform/typerendering.scalaserverpages/pom.xml
+++ b/platform/typerendering.scalaserverpages/pom.xml
@@ -22,8 +22,8 @@
     <parent>
         <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.typerendering.scalaserverpages</artifactId>
@@ -35,17 +35,17 @@
         <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.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza.scala</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
index b180e9a..a14f640 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/ScalaServerPagesService.java
@@ -19,7 +19,7 @@
 package org.apache.clerezza.platform.typerendering.scalaserverpages;
 
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
@@ -66,7 +66,7 @@ public class ScalaServerPagesService {
      * @param mediaType
      * @return
      */
-    public ServiceRegistration registerScalaServerPage(URL location,  UriRef rdfType,
+    public ServiceRegistration registerScalaServerPage(URL location,  Iri rdfType,
             String modePattern, MediaType mediaType) {
         return registerScalaServerPage(location, rdfType, modePattern, mediaType, bundleContext);
     }
@@ -83,7 +83,7 @@ public class ScalaServerPagesService {
      * @param callerBundleContext
      * @return
      */
-    public ServiceRegistration registerScalaServerPage(URL location,  UriRef rdfType,
+    public ServiceRegistration registerScalaServerPage(URL location,  Iri rdfType,
             String modePattern, MediaType mediaType, BundleContext callerBundleContext) {
         TypeRenderlet sspTypeRenderlet = new SspTypeRenderlet(location, rdfType,
                 modePattern, mediaType, scalaCompilerService);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
index 0d67262..6a328e3 100644
--- a/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
+++ b/platform/typerendering.scalaserverpages/src/main/java/org/apache/clerezza/platform/typerendering/scalaserverpages/SspTypeRenderlet.java
@@ -21,7 +21,7 @@ package org.apache.clerezza.platform.typerendering.scalaserverpages;
 import java.util.logging.Level;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
 import org.apache.clerezza.platform.typerendering.TypeRenderlet;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.scala.scripting.CompilerService;
 import org.slf4j.Logger;
@@ -44,7 +44,7 @@ import java.util.Map;
 public class SspTypeRenderlet implements TypeRenderlet {
 
 
-    private static final Logger logger = LoggerFactory.getLogger(ScalaServerPagesRenderlet.class);
+    private static final Logger logger = LoggerFactory.getLogger(SspTypeRenderlet.class);
     private static final Charset UTF8 = Charset.forName("UTF-8");
     private static final char[] headerChars
             = getChars(SspTypeRenderlet.class.getResource("typerenderlet-header.txt"));
@@ -53,7 +53,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
             + lineSeparator + "}" + lineSeparator + "}" + lineSeparator).toCharArray();
     
 
-    private UriRef rdfType;
+    private Iri rdfType;
     private String modePattern;
     private MediaType mediaType;
     private URL sspLocation;
@@ -61,7 +61,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
     private TypeRenderlet lastCompiledSsp = null;
     private CompilerService scalaCompilerService;
 
-    SspTypeRenderlet(URL sspLocation, UriRef rdfType, String modePattern, MediaType mediaType,
+    SspTypeRenderlet(URL sspLocation, Iri rdfType, String modePattern, MediaType mediaType,
                      CompilerService scalaCompilerService) {
         this.sspLocation = sspLocation;
         this.rdfType = rdfType;
@@ -71,7 +71,7 @@ public class SspTypeRenderlet implements TypeRenderlet {
     }
 
     @Override
-    public UriRef getRdfType() {
+    public Iri getRdfType() {
         return rdfType;
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.seedsnipe/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/pom.xml b/platform/typerendering.seedsnipe/pom.xml
index 9d023f1..0591bf5 100644
--- a/platform/typerendering.seedsnipe/pom.xml
+++ b/platform/typerendering.seedsnipe/pom.xml
@@ -42,28 +42,28 @@
         <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>templating.seedsnipe</artifactId>
-            <version>0.9</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.typerendering.core</artifactId>
-            <version>0.3</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.jena.parser</artifactId>
             <scope>test</scope>
-            <version>0.12</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
index 5cdbdce..90e3cf4 100644
--- a/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
+++ b/platform/typerendering.seedsnipe/src/main/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctions.java
@@ -27,18 +27,16 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import org.apache.clerezza.platform.typerendering.CallbackRenderer;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.Literal;
 import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Language;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.templating.RenderingFunction;
 import org.apache.clerezza.templating.RenderingFunctions;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.Graph;
 
 /**
  * 
@@ -46,16 +44,16 @@ import org.apache.clerezza.templating.RenderingFunctions;
  */
 class WebRenderingFunctions implements RenderingFunctions {
 
-    private static final UriRef XML_DATE_LITERAL = new UriRef(
+    private static final Iri XML_DATE_LITERAL = new Iri(
             "http://www.w3.org/2001/XMLSchema#dateTime");
-    private final static UriRef RDF_XML_LITERAL = new UriRef(
+    private final static Iri RDF_XML_LITERAL = new Iri(
             "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
-    private TripleCollection graph;
+    private Graph graph;
     private GraphNode context;
     private CallbackRenderer callbackRenderer;
     private String mode;
 
-    WebRenderingFunctions(TripleCollection graph,
+    WebRenderingFunctions(Graph graph,
             GraphNode context,
             CallbackRenderer callbackRenderer, String mode) {
         this.graph = graph;
@@ -78,16 +76,16 @@ class WebRenderingFunctions implements RenderingFunctions {
                 }
                 String stringValue;
                 if (value instanceof Literal) {
-                    if (value instanceof TypedLiteral) {
-                        TypedLiteral typedLiteral = (TypedLiteral) value;
+                    if (value instanceof Literal) {
+                        Literal typedLiteral = (Literal) value;
                         if (typedLiteral.getDataType().equals(RDF_XML_LITERAL)) {
                             return typedLiteral.getLexicalForm();
                         }
                     }
                     stringValue = ((Literal) value).getLexicalForm();
                 } else {
-                    if (value instanceof UriRef) {
-                        stringValue = ((UriRef) value).getUnicodeString();
+                    if (value instanceof Iri) {
+                        stringValue = ((Iri) value).getUnicodeString();
                     } else {
                         stringValue = value.toString();
                     }
@@ -140,7 +138,7 @@ class WebRenderingFunctions implements RenderingFunctions {
 
         @Override
         public String process(Object... values) throws IOException {
-            NonLiteral resource = (NonLiteral) values[0];
+            BlankNodeOrIri resource = (BlankNodeOrIri) values[0];
             GraphNode graphNode = new GraphNode(resource, graph);
             String mode = null;
             if (values.length > 1) {
@@ -176,24 +174,24 @@ class WebRenderingFunctions implements RenderingFunctions {
         @Override
         public Language process(Object... values) {
             Object value = values[0];
-            if (value instanceof PlainLiteral) {
-                return ((PlainLiteral) value).getLanguage();
+            if (value instanceof Literal) {
+                return ((Literal) value).getLanguage();
             }
             return null;
         }
     };
 
     /**
-     * A function that returns the Datatype of a TypedLiteral or null if the
-     * Literal has no language or if the object is not a TypedLiteral
+     * A function that returns the Datatype of a Literal or null if the
+     * Literal has no language or if the object is not a Literal
      */
-    private static RenderingFunction datatypeFunction = new RenderingFunction<Object, UriRef>() {
+    private static RenderingFunction datatypeFunction = new RenderingFunction<Object, Iri>() {
 
         @Override
-        public UriRef process(Object... values) {
+        public Iri process(Object... values) {
             Object value = values[0];
-            if (value instanceof PlainLiteral) {
-                return ((TypedLiteral) value).getDataType();
+            if (value instanceof Literal) {
+                return ((Literal) value).getDataType();
             }
             return null;
         }
@@ -224,17 +222,14 @@ class WebRenderingFunctions implements RenderingFunctions {
         @Override
         public String process(Object... values) {
             Object value = values[0];
-            if (value instanceof PlainLiteral) {
-                return "plainLiteral";
+            if (value instanceof Literal) {
+                return "literal";
             }
-            if (value instanceof TypedLiteral) {
-                return "typedLiteral";
+            if (value instanceof Iri) {
+                return "iri";
             }
-            if (value instanceof UriRef) {
-                return "uriRef";
-            }
-            if (value instanceof BNode) {
-                return "bNode";
+            if (value instanceof BlankNode) {
+                return "blankNode";
             }
             return value.getClass().getSimpleName();
         }
@@ -250,8 +245,8 @@ class WebRenderingFunctions implements RenderingFunctions {
 
         @Override
         public String process(Object... values) {
-            TypedLiteral typedLiteral;
-            if (values[0] instanceof TypedLiteral && (typedLiteral = (TypedLiteral) values[0]).getDataType().equals(XML_DATE_LITERAL)) {
+            Literal typedLiteral;
+            if (values[0] instanceof Literal && (typedLiteral = (Literal) values[0]).getDataType().equals(XML_DATE_LITERAL)) {
 
                 String dateString = typedLiteral.getLexicalForm();
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
index b0ba432..6c01a8d 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/GenericTest.java
@@ -23,8 +23,8 @@ import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
@@ -34,7 +34,7 @@ import org.apache.clerezza.rdf.utils.GraphNode;
  */
 public class GenericTest {
 
-    private final UriRef root = new UriRef("http://tests.clerezza.org/root#");
+    private final Iri root = new Iri("http://tests.clerezza.org/root#");
     private final SeedsnipeRenderlet renderlet = new SeedsnipeRenderlet();
 
     @Test
@@ -55,7 +55,7 @@ public class GenericTest {
 
     private void testWithFiles(String triples, String template, String expected) 
             throws Exception {
-        TripleCollection tc = Parser.getInstance().parse(
+        Graph tc = Parser.getInstance().parse(
                 getClass().getResourceAsStream(triples),
                 "text/turtle");
         GraphNode res = new GraphNode(root, tc);

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
----------------------------------------------------------------------
diff --git a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
index 1ecec91..3af878d 100644
--- a/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
+++ b/platform/typerendering.seedsnipe/src/test/java/org/apache/clerezza/platform/typerendering/seedsnipe/WebRenderingFunctionsTest.java
@@ -22,13 +22,12 @@ import java.io.IOException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import org.apache.clerezza.rdf.core.LiteralFactory;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.Literal;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.TypedLiteral;
-import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.commons.rdf.Literal;
+import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.templating.RenderingFunction;
 
 /**
@@ -42,7 +41,7 @@ public class WebRenderingFunctionsTest {
     public void dateTest() throws IOException {
 
         Date date = new Date();
-        TypedLiteral dateLiteral = LiteralFactory.getInstance()
+        Literal dateLiteral = LiteralFactory.getInstance()
                 .createTypedLiteral(date);
 
         WebRenderingFunctions webRenderingFunctions = new WebRenderingFunctions(
@@ -106,7 +105,7 @@ public class WebRenderingFunctionsTest {
                 null, null, null, null);
         RenderingFunction<Object, Boolean> function = webRenderingFunctions
                 .getNamedFunctions().get("contains");
-        UriRef testObject = new UriRef("http://example.org/bla#fooBar");
+        Iri testObject = new Iri("http://example.org/bla#fooBar");
         Assert.assertTrue(function.process(testObject, "bla"));
         Assert.assertFalse(function.process(testObject, "hello"));
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/usermanager/pom.xml
----------------------------------------------------------------------
diff --git a/platform/usermanager/pom.xml b/platform/usermanager/pom.xml
index dc784f8..ba579d7 100644
--- a/platform/usermanager/pom.xml
+++ b/platform/usermanager/pom.xml
@@ -22,10 +22,10 @@
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
-        <version>0.5</version>
-        <relativePath>../parent</relativePath>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.usermanager</artifactId>
@@ -38,12 +38,12 @@
         <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.utils</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -56,7 +56,7 @@
         <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.felix</groupId>
@@ -65,12 +65,12 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</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>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
index f0086fc..2a8350d 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserComparator.java
@@ -22,7 +22,7 @@ import org.apache.clerezza.rdf.utils.GraphNode;
 import java.util.Comparator;
 import java.util.Iterator;
 
-import org.apache.clerezza.rdf.core.Literal;
+import org.apache.commons.rdf.Literal;
 import org.apache.clerezza.rdf.ontologies.PLATFORM;
 
 public class UserComparator implements Comparator<GraphNode> {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
index 6776ac1..b2b514f 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManager.java
@@ -22,7 +22,7 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.clerezza.rdf.core.NonLiteral;
+import org.apache.commons.rdf.BlankNodeOrIri;
 import org.apache.clerezza.rdf.utils.GraphNode;
 
 /**
@@ -57,24 +57,24 @@ public interface UserManager {
     /**
      *
      * @param title
-     * @return NonLiteral which is either a BNode or a UriRef
+     * @return BlankNodeOrIri which is either a BlankNode or a Iri
      */
-    public NonLiteral getRoleByTitle(String title);
+    public BlankNodeOrIri getRoleByTitle(String title);
 
     /**
      *
      * @return Iterator defining all roles, except base roles
      */
-    public Iterator<NonLiteral> getRoles();
+    public Iterator<BlankNodeOrIri> getRoles();
 
     /**
      *
      * @param user
-     *            the user is either a BNode or a UriRef
+     *            the user is either a BlankNode or a Iri
      *
      * @return Iterator defining all the Roles the specified user owns
      */
-    public Iterator<NonLiteral> getRolesOfUser(NonLiteral user);
+    public Iterator<BlankNodeOrIri> getRolesOfUser(BlankNodeOrIri user);
 
     /**
      *
@@ -95,11 +95,11 @@ public interface UserManager {
     /**
      *
      * @param role
-     *            the role is either a BNode or an UriRef
+     *            the role is either a BlankNode or an Iri
      *
      * @return Iterator defining all permissions of a role
      */
-    public Iterator<NonLiteral> getPermissionsOfRole(NonLiteral role);
+    public Iterator<BlankNodeOrIri> getPermissionsOfRole(BlankNodeOrIri role);
 
     /**
      *  Deletes the defined permissions of the role
@@ -171,13 +171,13 @@ public interface UserManager {
     /**
      *
      * @param name specifies the username of the user
-     * @return NonLiteral representing the user in the system Graph
+     * @return BlankNodeOrIri representing the user in the system ImmutableGraph
      */
     @Deprecated
-    public NonLiteral getUserByName(String name);
+    public BlankNodeOrIri getUserByName(String name);
 
     /**
-     * Returns the user with the specified name in an (editable) MGraph
+     * Returns the user with the specified name in an (editable) Graph
      * (i.e. a SimpleGraph but this is implementation specific) with the context
      * of the user node, editing the graphnode('s Mgraph) doesn't cause any
      * changes elsewhere. Returns null if the user does not exist.
@@ -185,7 +185,7 @@ public interface UserManager {
      * otherwise a AccessControlException will be thrown.
      *
      * @param name The username of the user
-     * @return GraphNode representing the user (WebID or blank node) with some context in a dedicated MGraph
+     * @return GraphNode representing the user (WebID or blank node) with some context in a dedicated Graph
      */
     public GraphNode getUserGraphNode(String name);
 
@@ -214,9 +214,9 @@ public interface UserManager {
     /**
      * Returns all users.
      *
-     * @return Iterator of users in the system Graph.
+     * @return Iterator of users in the system ImmutableGraph.
      */
-    public Iterator<NonLiteral> getUsers();
+    public Iterator<BlankNodeOrIri> getUsers();
 
     /**
      *
@@ -234,10 +234,10 @@ public interface UserManager {
     /**
      *
      * @param user
-     *            the user is either a BNode or a UriRef
+     *            the user is either a BlankNode or a Iri
      * @return  Iterator defining all permissions of the specified user
      */
-    public Iterator<NonLiteral> getPermissionsOfUser(NonLiteral user);
+    public Iterator<BlankNodeOrIri> getPermissionsOfUser(BlankNodeOrIri user);
 
     /**
      *

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
index f3e3281..a48362c 100644
--- a/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
+++ b/platform/usermanager/src/main/java/org/apache/clerezza/platform/usermanager/UserManagerImpl.java
@@ -38,19 +38,17 @@ import org.apache.felix.scr.annotations.Service;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-import org.apache.clerezza.rdf.core.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.SecuredMGraph;
+import org.apache.commons.rdf.BlankNode;
+import org.apache.commons.rdf.Graph;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
+import org.apache.commons.rdf.Triple;
+import org.apache.commons.rdf.Iri;
+import org.apache.clerezza.rdf.core.access.SecuredGraph;
 import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.commons.rdf.impl.utils.PlainLiteralImpl;
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph;
+import org.apache.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.DC;
 import org.apache.clerezza.rdf.ontologies.FOAF;
 import org.apache.clerezza.rdf.ontologies.OSGI;
@@ -59,6 +57,7 @@ import org.apache.clerezza.rdf.ontologies.PLATFORM;
 import org.apache.clerezza.rdf.ontologies.RDF;
 import org.apache.clerezza.rdf.ontologies.SIOC;
 import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.commons.rdf.Literal;
 
 /**
  * @author hasan, tio
@@ -76,10 +75,10 @@ public class UserManagerImpl implements UserManager {
     private final Logger logger = LoggerFactory.getLogger(getClass());
 
     @Reference(target = SystemConfig.SYSTEM_GRAPH_FILTER)
-    private MGraph securedSystemGraph;
+    private Graph securedSystemGraph;
 
-    private LockableMGraph getSystemGraph() {
-        return ((SecuredMGraph) securedSystemGraph).getUnsecuredMGraph();
+    private Graph getSystemGraph() {
+        return ((SecuredGraph) securedSystemGraph).getUnsecuredGraph();
     }
 
     @Override
@@ -90,8 +89,8 @@ public class UserManagerImpl implements UserManager {
         if (getRoleByTitle(title) != null) {
             return;
         }
-        BNode role = new BNode();
-        LockableMGraph systemGraph = getSystemGraph();
+        BlankNode role = new BlankNode();
+        Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
@@ -104,14 +103,14 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public NonLiteral getRoleByTitle(String title) {
-        LockableMGraph systemGraph = getSystemGraph();
+    public BlankNodeOrIri getRoleByTitle(String title) {
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             Iterator<Triple> triples = systemGraph.filter(null, DC.title,
                     new PlainLiteralImpl(title));
-            NonLiteral role = null;
+            BlankNodeOrIri role = null;
             while (triples.hasNext()) {
                 role = triples.next().getSubject();
                 if (systemGraph.filter(role, RDF.type, PERMISSION.Role).hasNext()) {
@@ -130,18 +129,18 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<NonLiteral> getRoles() {
-        LockableMGraph systemGraph = getSystemGraph();
+    public Iterator<BlankNodeOrIri> getRoles() {
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
-            final Iterator<NonLiteral> allRolesIter = getResourcesOfType(PERMISSION.Role);
-            final Set<NonLiteral> allRolesSet = new HashSet<NonLiteral>();
+            final Iterator<BlankNodeOrIri> allRolesIter = getResourcesOfType(PERMISSION.Role);
+            final Set<BlankNodeOrIri> allRolesSet = new HashSet<BlankNodeOrIri>();
             while (allRolesIter.hasNext()) {
                 allRolesSet.add(allRolesIter.next());
             }
-            final Set<NonLiteral> nonBaseRolesSet = new HashSet<NonLiteral>();
-            for (NonLiteral role : allRolesSet) {
+            final Set<BlankNodeOrIri> nonBaseRolesSet = new HashSet<BlankNodeOrIri>();
+            for (BlankNodeOrIri role : allRolesSet) {
                 if (!systemGraph.filter(role, RDF.type, PERMISSION.BaseRole).hasNext()) {
                     nonBaseRolesSet.add(role);
                 }
@@ -153,15 +152,15 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<NonLiteral> getRolesOfUser(NonLiteral user){
-        LockableMGraph systemGraph = getSystemGraph();
+    public Iterator<BlankNodeOrIri> getRolesOfUser(BlankNodeOrIri user){
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(user,SIOC.has_function, null);
-            Set<NonLiteral> userRoles = new HashSet<NonLiteral>();
+            Set<BlankNodeOrIri> userRoles = new HashSet<BlankNodeOrIri>();
             while (triples.hasNext()) {
-                userRoles.add((NonLiteral) triples.next().getObject());
+                userRoles.add((BlankNodeOrIri) triples.next().getObject());
             }
             return userRoles.iterator();
         } finally {
@@ -175,7 +174,7 @@ public class UserManagerImpl implements UserManager {
             return;
         }
 
-        NonLiteral role = getRoleByTitle(title);
+        BlankNodeOrIri role = getRoleByTitle(title);
         if (role == null) {
             return;
         }
@@ -185,8 +184,8 @@ public class UserManagerImpl implements UserManager {
         deleteTriplesOfASubject(role);
     }
 
-    private boolean isBaseRole(NonLiteral role) {
-        LockableMGraph systemGraph = getSystemGraph();
+    private boolean isBaseRole(BlankNodeOrIri role) {
+        Graph systemGraph = getSystemGraph();
         GraphNode roleNode = new GraphNode(role, systemGraph);
         Lock readLock = roleNode.readLock();
         readLock.lock();
@@ -198,8 +197,8 @@ public class UserManagerImpl implements UserManager {
         
     }
 
-    private void deleteTriplesOfASubject(NonLiteral subject) {
-        LockableMGraph systemGraph = getSystemGraph();
+    private void deleteTriplesOfASubject(BlankNodeOrIri subject) {
+        Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
@@ -226,7 +225,7 @@ public class UserManagerImpl implements UserManager {
                 permissionEntries);
     }
 
-    private void addPermissionEntriesForARole(NonLiteral role,
+    private void addPermissionEntriesForARole(BlankNodeOrIri role,
             String id, List<String> permissionEntries) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
@@ -236,7 +235,7 @@ public class UserManagerImpl implements UserManager {
         if (permissionEntries.isEmpty()) {
             return;
         }
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
@@ -262,10 +261,10 @@ public class UserManagerImpl implements UserManager {
      * @param permissionString the specified java permission entry
      * @return permission node
      */
-    private NonLiteral getPermissionOfAJavaPermEntry(
+    private BlankNodeOrIri getPermissionOfAJavaPermEntry(
             String permissionString) {
-        LockableMGraph systemGraph = getSystemGraph();
-        PlainLiteral javaPermEntry = new PlainLiteralImpl(permissionString);
+        Graph systemGraph = getSystemGraph();
+        Literal javaPermEntry = new PlainLiteralImpl(permissionString);
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
@@ -281,7 +280,7 @@ public class UserManagerImpl implements UserManager {
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
-            BNode result = new BNode();
+            BlankNode result = new BlankNode();
             systemGraph.add(new TripleImpl(result,
                     PERMISSION.javaPermissionEntry, javaPermEntry));
             return result;
@@ -291,16 +290,16 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<NonLiteral> getPermissionsOfRole(NonLiteral role) {
-        LockableMGraph systemGraph = getSystemGraph();
+    public Iterator<BlankNodeOrIri> getPermissionsOfRole(BlankNodeOrIri role) {
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(role,
                     PERMISSION.hasPermission, null);
-            Set<NonLiteral> permissions = new HashSet<NonLiteral>();
+            Set<BlankNodeOrIri> permissions = new HashSet<BlankNodeOrIri>();
             while (triples.hasNext()) {
-                permissions.add((NonLiteral) triples.next().getObject());
+                permissions.add((BlankNodeOrIri) triples.next().getObject());
             }
             return permissions.iterator();
         } finally {
@@ -321,7 +320,7 @@ public class UserManagerImpl implements UserManager {
                 permissionEntries);
     }
 
-    private void deletePermissionEntriesOfARole(NonLiteral role,
+    private void deletePermissionEntriesOfARole(BlankNodeOrIri role,
             String id, List<String> permissionEntries) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
@@ -331,12 +330,12 @@ public class UserManagerImpl implements UserManager {
         if (permissionEntries.isEmpty()) {
             return;
         }
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
             for (String permissionEntry : permissionEntries) {
-                NonLiteral permission = getPermissionOfAJavaPermEntry(permissionEntry);
+                BlankNodeOrIri permission = getPermissionOfAJavaPermEntry(permissionEntry);
                 systemGraph.remove(new TripleImpl(role, PERMISSION.hasPermission,
                         permission));
             }
@@ -357,12 +356,12 @@ public class UserManagerImpl implements UserManager {
                 getRoleByTitle(title));
     }
 
-    private void deleteAllPermissionEntriesOfARole(NonLiteral role) {
+    private void deleteAllPermissionEntriesOfARole(BlankNodeOrIri role) {
         AccessController.checkPermission(new SecurityPermission("getPolicy"));
         if (role == null) {
             return;
         }
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         GraphNode graphNode = new GraphNode(role, systemGraph);
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
@@ -392,8 +391,8 @@ public class UserManagerImpl implements UserManager {
                 throw new EmailAlreadyAssignedException(email, storedName);
             }
         }
-        BNode user = new BNode();
-        LockableMGraph systemGraph = getSystemGraph();
+        BlankNode user = new BlankNode();
+        Graph systemGraph = getSystemGraph();
         Lock writeLock = systemGraph.getLock().writeLock();
         writeLock.lock();
         try {
@@ -402,7 +401,7 @@ public class UserManagerImpl implements UserManager {
                     new PlainLiteralImpl(name)));
             if (email != null) {
                 systemGraph.add(new TripleImpl(user, FOAF.mbox,
-                        new UriRef("mailto:" + email)));
+                        new Iri("mailto:" + email)));
             }
             if (password != null) {
                 try {
@@ -442,22 +441,22 @@ public class UserManagerImpl implements UserManager {
         if (email == null) {
             return null;
         }
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             Iterator<Triple> triples = systemGraph.filter(null, FOAF.mbox,
-                    new UriRef("mailto:" + email));
+                    new Iri("mailto:" + email));
             if (!triples.hasNext()) {
                 return null;
             }
-            NonLiteral user = triples.next().getSubject();
+            BlankNodeOrIri user = triples.next().getSubject();
             triples = systemGraph.filter(user, PLATFORM.userName, null);
             if (!triples.hasNext()) {
                 throw new UserHasNoNameException("User with email address" + email
                         + " does not have a name");
             }
-            return ((PlainLiteral) triples.next().getObject()).getLexicalForm();
+            return ((Literal) triples.next().getObject()).getLexicalForm();
         } finally {
             readLock.unlock();
         }
@@ -471,17 +470,17 @@ public class UserManagerImpl implements UserManager {
         if (name == null) {
             throw new IllegalArgumentException("userName may not be null");
         }
-        NonLiteral user = getUserByUserName(name);
+        BlankNodeOrIri user = getUserByUserName(name);
         if (user == null) {
             throw new UserNotExistsException(name);
         }
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         GraphNode userGraphNode = new GraphNode(user, systemGraph);
         Lock writeLock = userGraphNode.writeLock();
         writeLock.lock();
         try {
             if (email != null) {
-                updateProperty(userGraphNode, FOAF.mbox, new UriRef("mailto:" + email));
+                updateProperty(userGraphNode, FOAF.mbox, new Iri("mailto:" + email));
             }
 
             if (password != null) {
@@ -500,7 +499,7 @@ public class UserManagerImpl implements UserManager {
             }
             if (!assignedRoles.isEmpty()) {
                 userGraphNode.deleteProperties(SIOC.has_function);
-                addRolesToUser(assignedRoles, (NonLiteral) userGraphNode.getNode());
+                addRolesToUser(assignedRoles, (BlankNodeOrIri) userGraphNode.getNode());
                 //refresh the policy so it will recheck the permissions
                 Policy.getPolicy().refresh();
             }
@@ -509,14 +508,14 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private void addRolesToUser(Collection<String> assignedRoles, NonLiteral user) throws RoleUnavailableException {
-        LockableMGraph systemGraph = getSystemGraph();
+    private void addRolesToUser(Collection<String> assignedRoles, BlankNodeOrIri user) throws RoleUnavailableException {
+        Graph systemGraph = getSystemGraph();
         for (String roleTitle : assignedRoles) {
             // skip empty strings
             if ((roleTitle == null) || (roleTitle.trim().length() == 0)) {
                 continue;
             }
-            NonLiteral role = getRoleByTitle(roleTitle);
+            BlankNodeOrIri role = getRoleByTitle(roleTitle);
             if (role == null) {
                 throw new RoleUnavailableException(roleTitle);
             }
@@ -524,14 +523,14 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private void updateProperty(GraphNode node, UriRef predicate, Resource object) {
+    private void updateProperty(GraphNode node, Iri predicate, RdfTerm object) {
         node.deleteProperties(predicate);
         node.addProperty(predicate, object);
     }
 
     @Override
     public boolean nameExists(String name) {
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
@@ -544,34 +543,34 @@ public class UserManagerImpl implements UserManager {
 
     @Override
     public boolean emailExists(String email) {
-        LockableMGraph systemGraph = getSystemGraph();
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             return systemGraph.filter(null, FOAF.mbox,
-                    new UriRef("mailto:" + email)).hasNext();
+                    new Iri("mailto:" + email)).hasNext();
         } finally {
             readLock.unlock();
         }
     }
 
     @Override
-    public NonLiteral getUserByName( String name) {
+    public BlankNodeOrIri getUserByName( String name) {
         return getUserByUserName(name);
     }
 
     @Override
-    public Iterator<NonLiteral> getUsers() {
+    public Iterator<BlankNodeOrIri> getUsers() {
         return getResourcesOfType(FOAF.Agent);
     }
 
-    private Iterator<NonLiteral> getResourcesOfType(UriRef type) {
-        LockableMGraph systemGraph = getSystemGraph();
+    private Iterator<BlankNodeOrIri> getResourcesOfType(Iri type) {
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {
             final Iterator<Triple> triples = systemGraph.filter(null, RDF.type, type);
-            Set<NonLiteral> userRoles = new HashSet<NonLiteral>();
+            Set<BlankNodeOrIri> userRoles = new HashSet<BlankNodeOrIri>();
             while (triples.hasNext()) {
                 userRoles.add(triples.next().getSubject());
             }
@@ -587,7 +586,7 @@ public class UserManagerImpl implements UserManager {
             return;
         }
 
-        NonLiteral user = getUserByUserName(name);
+        BlankNodeOrIri user = getUserByUserName(name);
         if (user != null) {
             deleteTriplesOfASubject(user);
         }
@@ -607,7 +606,7 @@ public class UserManagerImpl implements UserManager {
     }
 
     @Override
-    public Iterator<NonLiteral> getPermissionsOfUser(NonLiteral user) {
+    public Iterator<BlankNodeOrIri> getPermissionsOfUser(BlankNodeOrIri user) {
         return getPermissionsOfRole(user);
     }
 
@@ -653,8 +652,8 @@ public class UserManagerImpl implements UserManager {
 
     @Override
     public GraphNode getUserInSystemGraph(final String name) {
-        LockableMGraph systemGraph = getSystemGraph();
-        NonLiteral user = getUserByUserName(name);
+        Graph systemGraph = getSystemGraph();
+        BlankNodeOrIri user = getUserByUserName(name);
         if (user != null) {
             return new GraphNode(user, systemGraph);
         } else {
@@ -664,7 +663,7 @@ public class UserManagerImpl implements UserManager {
 
     @Override
     public GraphNode getUserInContentGraph(final String name) {
-        final LockableMGraph contentGraph = (LockableMGraph) cgProvider.getContentGraph();
+        final Graph contentGraph =  cgProvider.getContentGraph();
         Iterator<Triple> triples = contentGraph.filter(null, PLATFORM.userName,
                 new PlainLiteralImpl(name));
         GraphNode resultNode = null;
@@ -677,11 +676,11 @@ public class UserManagerImpl implements UserManager {
                 readLock.unlock();
             }            
         } else {
-            NonLiteral user = AccessController.doPrivileged(
-                    new PrivilegedAction<NonLiteral>() {
+            BlankNodeOrIri user = AccessController.doPrivileged(
+                    new PrivilegedAction<BlankNodeOrIri>() {
 
                         @Override
-                        public NonLiteral run() {
+                        public BlankNodeOrIri run() {
                             return getUserByUserName(name);
                         }
                     });
@@ -689,7 +688,7 @@ public class UserManagerImpl implements UserManager {
                 Lock writeLock = contentGraph.getLock().writeLock();
                 writeLock.lock();
                 try {
-                    resultNode = new GraphNode(new BNode(), contentGraph);
+                    resultNode = new GraphNode(new BlankNode(), contentGraph);
                 resultNode.addProperty(PLATFORM.userName,
                         new PlainLiteralImpl(name));
                 } finally {
@@ -703,12 +702,12 @@ public class UserManagerImpl implements UserManager {
 
     @Override
     public GraphNode getUserGraphNode(final String name) {
-        LockableMGraph systemGraph = getSystemGraph();
-        NonLiteral user = getUserByUserName(name);
+        Graph systemGraph = getSystemGraph();
+        BlankNodeOrIri user = getUserByUserName(name);
         if (user != null) {
             GraphNode userNodeInSystemGraph =
                     new GraphNode(getUserByUserName(name), systemGraph);
-            MGraph copiedUserContext = new SimpleMGraph(userNodeInSystemGraph.getNodeContext());
+            Graph copiedUserContext = new SimpleGraph(userNodeInSystemGraph.getNodeContext());
             return new GraphNode(userNodeInSystemGraph.getNode(),
                     copiedUserContext);
         } else {
@@ -716,8 +715,8 @@ public class UserManagerImpl implements UserManager {
         }
     }
 
-    private NonLiteral getUserByUserName(String name) {
-        LockableMGraph systemGraph = getSystemGraph();
+    private BlankNodeOrIri getUserByUserName(String name) {
+        Graph systemGraph = getSystemGraph();
         Lock readLock = systemGraph.getLock().readLock();
         readLock.lock();
         try {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/users/core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/users/core/pom.xml b/platform/users/core/pom.xml
index eb1a1b6..cf61c99 100644
--- a/platform/users/core/pom.xml
+++ b/platform/users/core/pom.xml
@@ -23,8 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.users</artifactId>
-        <version>0.2</version>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.users.core</artifactId>
@@ -39,32 +40,32 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
-        <dependency>
+        <!-- <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.security.foafssl.ontologies</artifactId>
             <version>0.2</version>
-        </dependency>
+        </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>rdf.storage.web</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
-            <version>0.4</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
index 72f2324..9758955 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
@@ -18,11 +18,11 @@
 /*package org.apache.clerezza.platform.users
 
 import org.apache.clerezza.platform.security.WebIdBasedPermissionProvider
-import org.apache.clerezza.rdf.core.UriRef
+import org.apache.commons.rdf.Iri
 
 class UserGraphAcessPermissionProvider extends WebIdBasedPermissionProvider {
   
-  override def getPermissions(webId: UriRef) : java.util.Collection[String] = {
+  override def getPermissions(webId: Iri) : java.util.Collection[String] = {
     import scala.collection.JavaConversions._
     val uriString = webId.getUnicodeString
     def uriStringWithoutFragment = {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9677f50e/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
----------------------------------------------------------------------
diff --git a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
index 78eca2a..37d5c33 100644
--- a/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
+++ b/platform/users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
@@ -25,18 +25,17 @@ import java.security.PrivilegedAction
 import org.apache.clerezza.platform.Constants
 import org.apache.clerezza.platform.config.PlatformConfig
 import org.apache.clerezza.platform.config.SystemConfig
-import org.apache.clerezza.rdf.core.MGraph
-import org.apache.clerezza.rdf.core.TripleCollection
-import org.apache.clerezza.rdf.core.UriRef
-import org.apache.clerezza.rdf.core.access.LockableMGraph
+import org.apache.commons.rdf.Graph
+import org.apache.commons.rdf.Graph
+import org.apache.commons.rdf.Iri
 import org.apache.clerezza.rdf.core.access.NoSuchEntityException
-import org.apache.clerezza.rdf.core.access.SecuredMGraph
+import org.apache.clerezza.rdf.core.access.SecuredGraph
 import org.apache.clerezza.rdf.core.access.TcManager
 import org.apache.clerezza.rdf.core.access.security.TcPermission
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph
+import org.apache.commons.rdf.impl.utils.simple.SimpleGraph
 import org.apache.clerezza.rdf.ontologies.PLATFORM
 import org.apache.clerezza.rdf.storage.web.WebProxy
-import org.apache.clerezza.rdf.utils.UnionMGraph
+import org.apache.clerezza.rdf.utils.UnionGraph
 import org.apache.clerezza.rdf.core.serializedform.{SupportedFormat, Parser}
 
 /**
@@ -79,7 +78,7 @@ class WebIdGraphsService {
    * @param uri the Web-Id
    * @return a WebIdInfo allowing to access the graphs of the user
    */
-  def getWebIdInfo(uri: UriRef): WebIdInfo = {
+  def getWebIdInfo(uri: Iri): WebIdInfo = {
     return new WebIdInfo {
 
       private val uriString = uri.getUnicodeString
@@ -104,7 +103,7 @@ class WebIdGraphsService {
       private lazy val localGraphUri = {
         if (isLocal) uri
         else {
-          new UriRef("urn:x-localinstance:/user/"+hashTruncatedUriString)
+          new Iri("urn:x-localinstance:/user/"+hashTruncatedUriString)
         }
       }
 
@@ -119,7 +118,7 @@ class WebIdGraphsService {
 
 
       private lazy val profileDocumentUri = {
-        new UriRef(profileDocumentUriString)
+        new Iri(profileDocumentUriString)
       }
 
       /**
@@ -158,11 +157,11 @@ class WebIdGraphsService {
 
 
       private def systemTriples = {
-        AccessController.doPrivileged(new PrivilegedAction[MGraph]() {
+        AccessController.doPrivileged(new PrivilegedAction[Graph]() {
           def run() = {
-            val systemGraph = tcManager.getMGraph(Constants.SYSTEM_GRAPH_URI)
+            val systemGraph = tcManager.getGraph(Constants.SYSTEM_GRAPH_URI)
             val triples = systemGraph.filter(uri, PLATFORM.userName, null)
-            val result = new SimpleMGraph
+            val result = new SimpleGraph
             while (triples.hasNext) {
               result.add(triples.next())
             }
@@ -172,7 +171,7 @@ class WebIdGraphsService {
       }
 
       private lazy val localGraph = try {
-        val g = tcManager.getMGraph(localGraphUri)
+        val g = tcManager.getGraph(localGraphUri)
         g
       } catch {
         case e: NoSuchEntityException => {
@@ -180,19 +179,19 @@ class WebIdGraphsService {
             tcManager.getTcAccessController.
             setRequiredReadPermissionStrings(localGraphUri,
                              List(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
-            tcManager.createMGraph(localGraphUri)
+            tcManager.createGraph(localGraphUri)
           }
       }
       //implementing exposed methods (from WebIdInfo trait)
-      def publicProfile: TripleCollection = {
-        tcManager.getMGraph(profileDocumentUri)
+      def publicProfile: Graph = {
+        tcManager.getGraph(profileDocumentUri)
       }
 
-      def localPublicUserData: LockableMGraph = {
+      def localPublicUserData: Graph = {
         if (isLocal) {
-          new UnionMGraph(tcManager.getMGraph(profileDocumentUri), systemTriples)
+          new UnionGraph(tcManager.getGraph(profileDocumentUri), systemTriples)
         } else {
-          new UnionMGraph(localGraph, systemTriples, publicProfile)
+          new UnionGraph(localGraph, systemTriples, publicProfile)
         }
       }
 


[19/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/lingvoj.rdf
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/lingvoj.rdf b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/lingvoj.rdf
new file mode 100644
index 0000000..4f35482
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/lingvoj.rdf
@@ -0,0 +1,20946 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+
+<rdf:RDF
+  xml:base="http://www.lingvoj.org/ontology"
+  xmlns:lingvoj="http://www.lingvoj.org/ontology#"
+  xmlns:owl="http://www.w3.org/2002/07/owl#"
+  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
+
+<lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/aa" 
+lingvoj:iso1="aa" 
+lingvoj:iso2b="aar" 
+lingvoj:iso2t="aar" 
+lingvoj:iso3="aar">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/aa.rdf"/>
+    <rdfs:label xml:lang="de">Afar (Sprache)</rdfs:label>
+    <rdfs:label xml:lang="fr">Afar (langue)</rdfs:label>
+    <rdfs:label xml:lang="no">Afar (språk)</rdfs:label>
+    <rdfs:label xml:lang="nl">Afar (taal)</rdfs:label>
+    <rdfs:label xml:lang="en">Afar language</rdfs:label>
+    <rdfs:label xml:lang="eo">Afara lingvo</rdfs:label>
+    <rdfs:label xml:lang="br">Afareg</rdfs:label>
+    <rdfs:label xml:lang="eu">Afariko</rdfs:label>
+    <rdfs:label xml:lang="fi">Afarin kieli</rdfs:label>
+    <rdfs:label xml:lang="hr">Afarski jezik</rdfs:label>
+    <rdfs:label xml:lang="cs">Afarština</rdfs:label>
+    <rdfs:label xml:lang="hsb">Afaršćina</rdfs:label>
+    <rdfs:label xml:lang="lt">Afarų kalba</rdfs:label>
+    <rdfs:label xml:lang="lv">Afāru valoda</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Afar</rdfs:label>
+    <rdfs:label xml:lang="sq">Gjuha afare</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma afar</rdfs:label>
+    <rdfs:label xml:lang="pl">Język afar</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua afar</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua afar</rdfs:label>
+    <rdfs:label xml:lang="ca">Llengua àfar</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua afar</rdfs:label>
+    <rdfs:label xml:lang="bg">Афарски език</rdfs:label>
+    <rdfs:label xml:lang="ru">Афарский язык</rdfs:label>
+    <rdfs:label xml:lang="am">አፋርኛ</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Afar_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#aa"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#aar"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/aaa"
+                   lingvoj:iso2b="aaa">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/aaa.rdf"/>
+    <rdfs:label xml:lang="en">Ghotuo language</rdfs:label>
+    <rdfs:label xml:lang="de">Ghotuo</rdfs:label>
+    <rdfs:label xml:lang="fi">Ghotuo</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Ghotuo"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/aac"
+                   lingvoj:iso2b="aac">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/aac.rdf"/>
+    <rdfs:label xml:lang="en">Ari language</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Ari_language"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f80000000056dc59f"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ab"
+                   lingvoj:iso1="ab"
+                   lingvoj:iso2b="abk"
+                   lingvoj:iso2t="abk"
+                   lingvoj:iso3="abk">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ab.rdf"/>
+    <rdfs:label xml:lang="br">Abc'hazeg</rdfs:label>
+    <rdfs:label xml:lang="br">Abc'hazeg</rdfs:label>
+    <rdfs:label xml:lang="cy">Abchaseg</rdfs:label>
+    <rdfs:label xml:lang="de">Abchasische Sprache</rdfs:label>
+    <rdfs:label xml:lang="nl">Abchazisch</rdfs:label>
+    <rdfs:label xml:lang="sv">Abchaziska</rdfs:label>
+    <rdfs:label xml:lang="lt">Abchazų kalba</rdfs:label>
+    <rdfs:label xml:lang="cs">Abcházština</rdfs:label>
+    <rdfs:label xml:lang="sk">Abcházština</rdfs:label>
+    <rdfs:label xml:lang="ga">Abcáisis</rdfs:label>
+    <rdfs:label xml:lang="fi">Abhaasin kieli</rdfs:label>
+    <rdfs:label xml:lang="hr">Abhaski jezik</rdfs:label>
+    <rdfs:label xml:lang="tk">Abhaz dili</rdfs:label>
+    <rdfs:label xml:lang="tr">Abhazca</rdfs:label>
+    <rdfs:label xml:lang="hu">Abház nyelv</rdfs:label>
+    <rdfs:label xml:lang="lv">Abhāzu valoda</rdfs:label>
+    <rdfs:label xml:lang="is">Abkasíska</rdfs:label>
+    <rdfs:label xml:lang="nn">Abkhasisk språk</rdfs:label>
+    <rdfs:label xml:lang="no">Abkhasisk</rdfs:label>
+    <rdfs:label xml:lang="en">Abkhaz language</rdfs:label>
+    <rdfs:label xml:lang="ca">Abkhaz</rdfs:label>
+    <rdfs:label xml:lang="fr">Abkhaze</rdfs:label>
+    <rdfs:label xml:lang="eu">Abkhazera</rdfs:label>
+    <rdfs:label xml:lang="eo">Abĥaza lingvo</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Abkhaz</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma abjasio</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma abjasio</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma abjaso</rdfs:label>
+    <rdfs:label xml:lang="pl">Język abchaski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba abhază</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua abcasa</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua abkhaza</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua abecásia</rdfs:label>
+    <rdfs:label xml:lang="ceb">Pinulongang Abhaso</rdfs:label>
+    <rdfs:label xml:lang="cv">Абхаз чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="os">Абхазаг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="bg">Абхазки език</rdfs:label>
+    <rdfs:label xml:lang="ru">Абхазский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Абхазька мова</rdfs:label>
+    <rdfs:label xml:lang="mk">Абхаски јазик</rdfs:label>
+    <rdfs:label xml:lang="ab">Аҧсуа бызшәа</rdfs:label>
+    <rdfs:label xml:lang="he">אבחזית</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان آبخازی</rdfs:label>
+    <rdfs:label xml:lang="bn">আবখাজ ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ka">აფხაზური ენა</rdfs:label>
+    <rdfs:label xml:lang="ja">アブハズ語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿布哈兹语</rdfs:label>
+    <rdfs:label xml:lang="ko">압하스어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Abkhazian_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ab"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#abk"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ace"
+                   lingvoj:iso2b="ace"
+                   lingvoj:iso2t="ace"
+                   lingvoj:iso3="ace">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ace.rdf"/>
+    <rdfs:label xml:lang="de">Acholi (Sprache)</rdfs:label>
+    <rdfs:label xml:lang="fr">Acholi (langue)</rdfs:label>
+    <rdfs:label xml:lang="en">Acholi language</rdfs:label>
+    <rdfs:label xml:lang="br">Atcholeg</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Acholi</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua acholi</rdfs:label>
+    <rdfs:label xml:lang="ru">Ачоли (язык)</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Acoli_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ace"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ach"
+                   lingvoj:iso2b="ach"
+                   lingvoj:iso2t="ach"
+                   lingvoj:iso3="ach">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ach.rdf"/>
+    <rdfs:label xml:lang="fr">Aceh (langue)</rdfs:label>
+    <rdfs:label xml:lang="fi">Aceh'n kieli</rdfs:label>
+    <rdfs:label xml:lang="en">Acehnese language</rdfs:label>
+    <rdfs:label xml:lang="sv">Acehnesiska</rdfs:label>
+    <rdfs:label xml:lang="fi">Aceh’n kieli</rdfs:label>
+    <rdfs:label xml:lang="nl">Atjehs</rdfs:label>
+    <rdfs:label xml:lang="eo">Aĉea lingvo</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Aceh</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Aceh</rdfs:label>
+    <rdfs:label xml:lang="jv">Basa Aceh</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma achenés</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua achinesa</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua achém</rdfs:label>
+    <rdfs:label xml:lang="ru">Ачехский язык</rdfs:label>
+    <rdfs:label xml:lang="bn">আচে ভাষা</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอาเจะห์</rdfs:label>
+    <rdfs:label xml:lang="ja">アチェ語</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Achinese_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ach"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ada"
+                   lingvoj:iso2b="ada"
+                   lingvoj:iso2t="ada"
+                   lingvoj:iso3="ada">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ada.rdf"/>
+    <rdfs:label xml:lang="fr">Adangme (langue)</rdfs:label>
+    <rdfs:label xml:lang="en">Adangme language</rdfs:label>
+    <rdfs:label xml:lang="pt">Adangme</rdfs:label>
+    <rdfs:label xml:lang="br">Adangmeg</rdfs:label>
+    <rdfs:label xml:lang="de">Dangme (Sprache)</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Adangme_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ada"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000053a030"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ady"
+                   lingvoj:iso2b="ady"
+                   lingvoj:iso2t="ady"
+                   lingvoj:iso3="ady">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ady.rdf"/>
+    <rdfs:label xml:lang="eo">Adigea lingvo</rdfs:label>
+    <rdfs:label xml:lang="tr">Adigece</rdfs:label>
+    <rdfs:label xml:lang="br">Adigeg</rdfs:label>
+    <rdfs:label xml:lang="hr">Adigejski jezik</rdfs:label>
+    <rdfs:label xml:lang="ca">Adigué</rdfs:label>
+    <rdfs:label xml:lang="de">Adygeische Sprache</rdfs:label>
+    <rdfs:label xml:lang="sv">Adygeiska</rdfs:label>
+    <rdfs:label xml:lang="cs">Adygejština</rdfs:label>
+    <rdfs:label xml:lang="fi">Adygen kieli</rdfs:label>
+    <rdfs:label xml:lang="is">Adygeyska</rdfs:label>
+    <rdfs:label xml:lang="nl">Adyghe (taal)</rdfs:label>
+    <rdfs:label xml:lang="en">Adyghe language</rdfs:label>
+    <rdfs:label xml:lang="ga">Adyghe</rdfs:label>
+    <rdfs:label xml:lang="fr">Adyguéen (langue)</rdfs:label>
+    <rdfs:label xml:lang="lt">Adygų kalba</rdfs:label>
+    <rdfs:label xml:lang="ku">Adîgeyî</rdfs:label>
+    <rdfs:label xml:lang="pl">Język adygejski</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua adigue</rdfs:label>
+    <rdfs:label xml:lang="mk">Адиге јазик</rdfs:label>
+    <rdfs:label xml:lang="uk">Адигейська мова</rdfs:label>
+    <rdfs:label xml:lang="ru">Адыгейский язык</rdfs:label>
+    <rdfs:label xml:lang="he">אדיגית</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أديغية</rdfs:label>
+    <rdfs:label xml:lang="bn">আদিগে ভাষা</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอะดืยเก</rdfs:label>
+    <rdfs:label xml:lang="ja">アディゲ語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿迪格語</rdfs:label>
+    <rdfs:label xml:lang="ko">아디게어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Adyghe_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ady"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ae"
+                   lingvoj:iso1="ae"
+                   lingvoj:iso2b="ave"
+                   lingvoj:iso2t="ave"
+                   lingvoj:iso3="ave">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ae.rdf"/>
+    <rdfs:label xml:lang="ga">Aivéistis</rdfs:label>
+    <rdfs:label xml:lang="lv">Avesta</rdfs:label>
+    <rdfs:label xml:lang="en">Avestan language</rdfs:label>
+    <rdfs:label xml:lang="br">Avesteg</rdfs:label>
+    <rdfs:label xml:lang="af">Avesties</rdfs:label>
+    <rdfs:label xml:lang="fr">Avestique</rdfs:label>
+    <rdfs:label xml:lang="nl">Avestisch</rdfs:label>
+    <rdfs:label xml:lang="de">Avestische Sprache</rdfs:label>
+    <rdfs:label xml:lang="da">Avestisk</rdfs:label>
+    <rdfs:label xml:lang="no">Avestisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Avestiska</rdfs:label>
+    <rdfs:label xml:lang="cs">Avestánština</rdfs:label>
+    <rdfs:label xml:lang="ca">Avèstic</rdfs:label>
+    <rdfs:label xml:lang="pt">Avéstico</rdfs:label>
+    <rdfs:label xml:lang="tk">Awesta dili</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Avesta</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma abestico</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma avéstico</rdfs:label>
+    <rdfs:label xml:lang="pl">Język awestyjski</rdfs:label>
+    <rdfs:label xml:lang="ceb">Pinulongang Abestiko</rdfs:label>
+    <rdfs:label xml:lang="ku">Zimanê avestayî</rdfs:label>
+    <rdfs:label xml:lang="el">Αβεστική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="sr">Авестански језик</rdfs:label>
+    <rdfs:label xml:lang="cv">Авести чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="ru">Авестийский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Авестійська мова</rdfs:label>
+    <rdfs:label xml:lang="tg">Забони авестоӣ</rdfs:label>
+    <rdfs:label xml:lang="fa">اوستایی (زبان)</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان اوستایی</rdfs:label>
+    <rdfs:label xml:lang="bn">অবেস্তা ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">அவெஸ்தான் மொழி</rdfs:label>
+    <rdfs:label xml:lang="kn">ಅವೇಶ್ಟಿ</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอเวสตะ</rdfs:label>
+    <rdfs:label xml:lang="ja">アヴェスター語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿維斯陀語</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Avestan_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ae"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ave"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000013b355"/>
+    <owl:sameAs rdf:resource="http://sw.opencyc.org/2008/06/10/concept/Mx4rvVjMaZwpEbGdrcN5Y29ycA"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/af"
+                   lingvoj:iso1="af"
+                   lingvoj:iso2b="afr"
+                   lingvoj:iso2t="afr"
+                   lingvoj:iso3="afr">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/af.rdf"/>
+    <rdfs:label xml:lang="ga">Afracáinis</rdfs:label>
+    <rdfs:label xml:lang="tr">Afrikaanca</rdfs:label>
+    <rdfs:label xml:lang="et">Afrikaani keel</rdfs:label>
+    <rdfs:label xml:lang="sco">Afrikaans leid</rdfs:label>
+    <rdfs:label xml:lang="fo">Afrikaans mál</rdfs:label>
+    <rdfs:label xml:lang="hu">Afrikaans nyelv</rdfs:label>
+    <rdfs:label xml:lang="af">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="an">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="ast">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="ca">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="cy">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="da">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="de">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="en">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="eu">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="fi">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="fr">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="gd">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="hr">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="kw">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="li">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="nds">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="nds-nl">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="nl">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="nn">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="no">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="scn">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="sv">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="tr">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="vi">Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="fy">Afrikaansk</rdfs:label>
+    <rdfs:label xml:lang="nah">Afrikaantlahtōlli</rdfs:label>
+    <rdfs:label xml:lang="lv">Afrikandu valoda</rdfs:label>
+    <rdfs:label xml:lang="br">Afrikaneg</rdfs:label>
+    <rdfs:label xml:lang="eo">Afrikansa lingvo</rdfs:label>
+    <rdfs:label xml:lang="sl">Afrikanščina</rdfs:label>
+    <rdfs:label xml:lang="lt">Afrikanų kalba</rdfs:label>
+    <rdfs:label xml:lang="es">Afrikáans</rdfs:label>
+    <rdfs:label xml:lang="se">Afrikánsagiella</rdfs:label>
+    <rdfs:label xml:lang="sk">Afrikánčina</rdfs:label>
+    <rdfs:label xml:lang="cs">Afrikánština</rdfs:label>
+    <rdfs:label xml:lang="is">Afríkanska</rdfs:label>
+    <rdfs:label xml:lang="bat-smg">Afrėkanu kalba</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Afrikaans</rdfs:label>
+    <rdfs:label xml:lang="sq">Gjuha afrikane</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma afrikáans</rdfs:label>
+    <rdfs:label xml:lang="xh">IsiBhulu</rdfs:label>
+    <rdfs:label xml:lang="zu">IsiBhunu</rdfs:label>
+    <rdfs:label xml:lang="pl">Język afrikaans</rdfs:label>
+    <rdfs:label xml:lang="sw">Kiafrikaans</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba afrikaans</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Africana</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua afrikaans</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua afrikaans</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua africâner</rdfs:label>
+    <rdfs:label xml:lang="el">Αφρικάανς γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="bg">Африкаанс</rdfs:label>
+    <rdfs:label xml:lang="ru">Африкаанс</rdfs:label>
+    <rdfs:label xml:lang="uk">Африкаанс</rdfs:label>
+    <rdfs:label xml:lang="mk">Африканс</rdfs:label>
+    <rdfs:label xml:lang="sr">Африканс</rdfs:label>
+    <rdfs:label xml:lang="be">Афрыкаанс</rdfs:label>
+    <rdfs:label xml:lang="hy">Աֆրիկանս</rdfs:label>
+    <rdfs:label xml:lang="he">אפריקאנס</rdfs:label>
+    <rdfs:label xml:lang="fa">آفریکانس</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان آفریکانس</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أفريكانية</rdfs:label>
+    <rdfs:label xml:lang="bn">আফ্রিকান্স ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">ஆபிரிக்கான மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาแอฟริคานส์</rdfs:label>
+    <rdfs:label xml:lang="ka">აფრიკაანსი</rdfs:label>
+    <rdfs:label xml:lang="ja">アフリカーンス語</rdfs:label>
+    <rdfs:label xml:lang="zh">南非語</rdfs:label>
+    <rdfs:label xml:lang="ko">아프리칸스어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Afrikaans_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#af"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#afr"/>
+    
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/afh"
+                   lingvoj:iso2b="afh"
+                   lingvoj:iso2t="afh"
+                   lingvoj:iso3="afh">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/afh.rdf"/>
+    <rdfs:label xml:lang="de">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="en">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="fi">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="fr">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="nl">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="no">Afrihili</rdfs:label>
+    <rdfs:label xml:lang="eo">Afrihilio</rdfs:label>
+    <rdfs:label xml:lang="uk">Афрігілі</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Afrihili_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#afh"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ain"
+                   lingvoj:iso2b="ain"
+                   lingvoj:iso2t="ain"
+                   lingvoj:iso3="ain">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ain.rdf"/>
+    <rdfs:label xml:lang="nl">Aino (taal)</rdfs:label>
+    <rdfs:label xml:lang="oc">Aino</rdfs:label>
+    <rdfs:label xml:lang="br">Ainoueg</rdfs:label>
+    <rdfs:label xml:lang="nds">Ainu (Spraak)</rdfs:label>
+    <rdfs:label xml:lang="de">Ainu (Sprache)</rdfs:label>
+    <rdfs:label xml:lang="no">Ainu (språk)</rdfs:label>
+    <rdfs:label xml:lang="sv">Ainu (språk)</rdfs:label>
+    <rdfs:label xml:lang="en">Ainu language</rdfs:label>
+    <rdfs:label xml:lang="zh-min-nan">Ainu-gú</rdfs:label>
+    <rdfs:label xml:lang="ca">Ainu</rdfs:label>
+    <rdfs:label xml:lang="eu">Ainuiko</rdfs:label>
+    <rdfs:label xml:lang="fi">Ainun kieli</rdfs:label>
+    <rdfs:label xml:lang="cs">Ainština</rdfs:label>
+    <rdfs:label xml:lang="lt">Ainų kalba</rdfs:label>
+    <rdfs:label xml:lang="eo">Ajnua lingvo</rdfs:label>
+    <rdfs:label xml:lang="is">Aínúmál</rdfs:label>
+    <rdfs:label xml:lang="fr">Aïnou (langue de l'ethnie du Japon)</rdfs:label>
+    <rdfs:label xml:lang="fr">Aïnu</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Ainu</rdfs:label>
+    <rdfs:label xml:lang="en">Hokkaidō Ainu language</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma ainu</rdfs:label>
+    <rdfs:label xml:lang="pl">Język ajnoski</rdfs:label>
+    <rdfs:label xml:lang="pl">Język ajnuski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba ainu</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Ainuana</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua ainu</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua ainu</rdfs:label>
+    <rdfs:label xml:lang="scn">Lingua ainu</rdfs:label>
+    <rdfs:label xml:lang="ast">Llingua ainu</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua ainu</rdfs:label>
+    <rdfs:label xml:lang="vi">Tiếng Ainu</rdfs:label>
+    <rdfs:label xml:lang="mk">Аину јазик</rdfs:label>
+    <rdfs:label xml:lang="sr">Аину језик</rdfs:label>
+    <rdfs:label xml:lang="mk">Аину</rdfs:label>
+    <rdfs:label xml:lang="os">Айнаг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="ru">Айнский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Айнська мова</rdfs:label>
+    <rdfs:label xml:lang="cv">Айну чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="he">שפת איינו</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان آینو</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة آينوية</rdfs:label>
+    <rdfs:label xml:lang="bn">আইনু ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">ஐனு மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาไอนุ</rdfs:label>
+    <rdfs:label xml:lang="ka">აინუს ენა</rdfs:label>
+    <rdfs:label xml:lang="ka">აინუური ენა</rdfs:label>
+    <rdfs:label xml:lang="ja">アイヌ語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿伊努語</rdfs:label>
+    <rdfs:label xml:lang="ko">아이누어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Ainu_language"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ak"
+                   lingvoj:iso1="ak"
+                   lingvoj:iso2b="aka"
+                   lingvoj:iso2t="aka"
+                   lingvoj:iso3="aka">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ak.rdf"/>
+    <rdfs:label xml:lang="de">Akan (Sprachen)</rdfs:label>
+    <rdfs:label xml:lang="no">Akan (språk)</rdfs:label>
+    <rdfs:label xml:lang="en">Akan language</rdfs:label>
+    <rdfs:label xml:lang="ak">Akan</rdfs:label>
+    <rdfs:label xml:lang="sv">Akan</rdfs:label>
+    <rdfs:label xml:lang="tw">Akan</rdfs:label>
+    <rdfs:label xml:lang="br">Akaneg</rdfs:label>
+    <rdfs:label xml:lang="fi">Akanin kieli</rdfs:label>
+    <rdfs:label xml:lang="is">Akanmál</rdfs:label>
+    <rdfs:label xml:lang="lv">Akanu valodas</rdfs:label>
+    <rdfs:label xml:lang="cs">Akanština</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma acano</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues akan</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua akán</rdfs:label>
+    <rdfs:label xml:lang="ast">Llingua Akán</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua akan</rdfs:label>
+    <rdfs:label xml:lang="ru">Акан</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أكانية</rdfs:label>
+    <rdfs:label xml:lang="zh">阿坎语</rdfs:label>
+    <rdfs:label xml:lang="ko">아칸어군</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Akan_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ak"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#aka"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/akk"
+                   lingvoj:iso2b="akk"
+                   lingvoj:iso2t="akk"
+                   lingvoj:iso3="akk">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/akk.rdf"/>
+    <rdfs:label xml:lang="cy">Acadeg</rdfs:label>
+    <rdfs:label xml:lang="ca">Accadi</rdfs:label>
+    <rdfs:label xml:lang="eo">Akada lingvo</rdfs:label>
+    <rdfs:label xml:lang="eu">Akadiko</rdfs:label>
+    <rdfs:label xml:lang="hr">Akadski jezik</rdfs:label>
+    <rdfs:label xml:lang="lt">Akadų kalba</rdfs:label>
+    <rdfs:label xml:lang="tr">Akatça</rdfs:label>
+    <rdfs:label xml:lang="br">Akkadeg</rdfs:label>
+    <rdfs:label xml:lang="en">Akkadian language</rdfs:label>
+    <rdfs:label xml:lang="fr">Akkadien</rdfs:label>
+    <rdfs:label xml:lang="eu">Akkadiko</rdfs:label>
+    <rdfs:label xml:lang="fi">Akkadin kieli</rdfs:label>
+    <rdfs:label xml:lang="li">Akkadisch</rdfs:label>
+    <rdfs:label xml:lang="nl">Akkadisch</rdfs:label>
+    <rdfs:label xml:lang="de">Akkadische Sprache</rdfs:label>
+    <rdfs:label xml:lang="nn">Akkadisk språk</rdfs:label>
+    <rdfs:label xml:lang="da">Akkadisk</rdfs:label>
+    <rdfs:label xml:lang="no">Akkadisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Akkadiska</rdfs:label>
+    <rdfs:label xml:lang="fy">Akkadysk</rdfs:label>
+    <rdfs:label xml:lang="is">Akkadíska</rdfs:label>
+    <rdfs:label xml:lang="sk">Akkadčina</rdfs:label>
+    <rdfs:label xml:lang="cs">Akkadština</rdfs:label>
+    <rdfs:label xml:lang="hu">Akkád nyelv</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Akkadia</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Akkadia</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma acadio</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma acadio</rdfs:label>
+    <rdfs:label xml:lang="pl">Język akadyjski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba akkadiană</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua acadia</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua accadica</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua acádia</rdfs:label>
+    <rdfs:label xml:lang="el">Ακκαδική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="bg">Акадски език</rdfs:label>
+    <rdfs:label xml:lang="mk">Акадски јазик</rdfs:label>
+    <rdfs:label xml:lang="cv">Аккад чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="ru">Аккадский язык</rdfs:label>
+    <rdfs:label xml:lang="he">אכדית</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان اکدی</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أكادية</rdfs:label>
+    <rdfs:label xml:lang="arc">ܠܫܢܐ ܐܟܕܝܐ</rdfs:label>
+    <rdfs:label xml:lang="bn">আক্কাদীয় ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">அக்காத் மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอัคคาเดีย</rdfs:label>
+    <rdfs:label xml:lang="ka">აქადური ენა</rdfs:label>
+    <rdfs:label xml:lang="ja">アッカド語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿卡德語</rdfs:label>
+    <rdfs:label xml:lang="ko">아카드어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Akkadian_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#akk"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f8000000000062c0c"/>
+    <owl:sameAs rdf:resource="http://sw.opencyc.org/2008/06/10/concept/Mx4rvVjNHpwpEbGdrcN5Y29ycA"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ale"
+                   lingvoj:iso2b="ale"
+                   lingvoj:iso2t="ale"
+                   lingvoj:iso3="ale">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ale.rdf"/>
+    <rdfs:label xml:lang="ga">Ailiúitis</rdfs:label>
+    <rdfs:label xml:lang="en">Aleut language</rdfs:label>
+    <rdfs:label xml:lang="de">Aleutische Sprache</rdfs:label>
+    <rdfs:label xml:lang="nn">Aleutisk språk</rdfs:label>
+    <rdfs:label xml:lang="no">Aleutisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Aleutiska</rdfs:label>
+    <rdfs:label xml:lang="ca">Aleutià</rdfs:label>
+    <rdfs:label xml:lang="fi">Aleutti</rdfs:label>
+    <rdfs:label xml:lang="is">Aleutíska</rdfs:label>
+    <rdfs:label xml:lang="sk">Aleutčina</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma aleutiano</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma aleutiano</rdfs:label>
+    <rdfs:label xml:lang="pl">Język aleucki</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua aleutiana</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua aleúte</rdfs:label>
+    <rdfs:label xml:lang="ru">Алеутский язык</rdfs:label>
+    <rdfs:label xml:lang="ka">ალეუტური ენა</rdfs:label>
+    <rdfs:label xml:lang="zh">阿留申语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Aleut_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ale"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/alg"
+                   lingvoj:iso2b="alg"
+                   lingvoj:iso2t="alg">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/alg.rdf"/>
+    <rdfs:label xml:lang="eo">Algonkena lingvaro</rdfs:label>
+    <rdfs:label xml:lang="hr">Algonkijski narodi i jezici</rdfs:label>
+    <rdfs:label xml:lang="hu">Algonkin nyelvcsalád</rdfs:label>
+    <rdfs:label xml:lang="de">Algonkin-Sprachen</rdfs:label>
+    <rdfs:label xml:lang="fi">Algonkin-kielet</rdfs:label>
+    <rdfs:label xml:lang="eo">Algonkina lingvaro</rdfs:label>
+    <rdfs:label xml:lang="is">Algonkinsk tungumál</rdfs:label>
+    <rdfs:label xml:lang="no">Algonkinske språk</rdfs:label>
+    <rdfs:label xml:lang="sv">Algonkinspråk</rdfs:label>
+    <rdfs:label xml:lang="nl">Algonkische talen</rdfs:label>
+    <rdfs:label xml:lang="en">Algonquian languages</rdfs:label>
+    <rdfs:label xml:lang="pl">Języki algonkińskie</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues algonquiennes</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas algonquinas</rdfs:label>
+    <rdfs:label xml:lang="pt">Línguas algonquinas</rdfs:label>
+    <rdfs:label xml:lang="ga">Teangacha Algóinciacha</rdfs:label>
+    <rdfs:label xml:lang="mg">Teny Algônkiana</rdfs:label>
+    <rdfs:label xml:lang="br">Yezhoù algonkek</rdfs:label>
+    <rdfs:label xml:lang="ru">Алгонкинские языки</rdfs:label>
+    <rdfs:label xml:lang="ja">アルゴンキン語族</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Algonquian_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#alg"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/als"
+                   lingvoj:iso2b="gsw"
+                   lingvoj:iso2t="gsw"
+                   lingvoj:iso3="gsw">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/als.rdf"/>
+    <rdfs:label xml:lang="ca">Alamànic</rdfs:label>
+    <rdfs:label xml:lang="eo">Alemana lingvo</rdfs:label>
+    <rdfs:label xml:lang="hu">Alemann nyelvjárás</rdfs:label>
+    <rdfs:label xml:lang="cy">Alemanneg</rdfs:label>
+    <rdfs:label xml:lang="en">Alemannic German</rdfs:label>
+    <rdfs:label xml:lang="af">Alemanniese Duits</rdfs:label>
+    <rdfs:label xml:lang="fi">Alemannimurteet</rdfs:label>
+    <rdfs:label xml:lang="nl">Alemannisch</rdfs:label>
+    <rdfs:label xml:lang="de">Alemannische Dialekte</rdfs:label>
+    <rdfs:label xml:lang="no">Alemannisk</rdfs:label>
+    <rdfs:label xml:lang="is">Alemanníska</rdfs:label>
+    <rdfs:label xml:lang="hr">Alemanski jezik</rdfs:label>
+    <rdfs:label xml:lang="es">Alemánico</rdfs:label>
+    <rdfs:label xml:lang="gl">Alemánico</rdfs:label>
+    <rdfs:label xml:lang="cs">Alemánština</rdfs:label>
+    <rdfs:label xml:lang="pt">Alemão alemânico</rdfs:label>
+    <rdfs:label xml:lang="fr">Alémanique</rdfs:label>
+    <rdfs:label xml:lang="pl">Dialekt alemański</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Alemannica</rdfs:label>
+    <rdfs:label xml:lang="rm">Lingua alemana</rdfs:label>
+    <rdfs:label xml:lang="it">Tedesco alemanno</rdfs:label>
+    <rdfs:label xml:lang="br">Yezhoù alemanek</rdfs:label>
+    <rdfs:label xml:lang="el">Αλεμαννική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="ru">Алеманнское наречие</rdfs:label>
+    <rdfs:label xml:lang="he">אלמאנית</rdfs:label>
+    <rdfs:label xml:lang="am">አለማንኛ</rdfs:label>
+    <rdfs:label xml:lang="ja">アレマン語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿勒曼尼语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Alemannic_language"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/am"
+                   lingvoj:iso1="am"
+                   lingvoj:iso2b="amh"
+                   lingvoj:iso2t="amh"
+                   lingvoj:iso3="amh">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/am.rdf"/>
+    <rdfs:label xml:lang="ga">Amairis</rdfs:label>
+    <rdfs:label xml:lang="nl">Amhaars</rdfs:label>
+    <rdfs:label xml:lang="nds">Amhaarsch</rdfs:label>
+    <rdfs:label xml:lang="io">Amhara linguo</rdfs:label>
+    <rdfs:label xml:lang="eo">Amhara lingvo</rdfs:label>
+    <rdfs:label xml:lang="fi">Amharan kieli</rdfs:label>
+    <rdfs:label xml:lang="tr">Amharca</rdfs:label>
+    <rdfs:label xml:lang="br">Amhareg</rdfs:label>
+    <rdfs:label xml:lang="cy">Amhareg</rdfs:label>
+    <rdfs:label xml:lang="eu">Amharera</rdfs:label>
+    <rdfs:label xml:lang="et">Amhari keel</rdfs:label>
+    <rdfs:label xml:lang="en">Amharic</rdfs:label>
+    <rdfs:label xml:lang="yo">Amharic</rdfs:label>
+    <rdfs:label xml:lang="af">Amharies</rdfs:label>
+    <rdfs:label xml:lang="fr">Amharique</rdfs:label>
+    <rdfs:label xml:lang="de">Amharische Sprache</rdfs:label>
+    <rdfs:label xml:lang="da">Amharisk</rdfs:label>
+    <rdfs:label xml:lang="nn">Amharisk</rdfs:label>
+    <rdfs:label xml:lang="no">Amharisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Amhariska</rdfs:label>
+    <rdfs:label xml:lang="bs">Amharski jezik</rdfs:label>
+    <rdfs:label xml:lang="lv">Amharu valoda</rdfs:label>
+    <rdfs:label xml:lang="is">Amharíska</rdfs:label>
+    <rdfs:label xml:lang="sk">Amharčina</rdfs:label>
+    <rdfs:label xml:lang="cs">Amharština</rdfs:label>
+    <rdfs:label xml:lang="hsb">Amharšćina</rdfs:label>
+    <rdfs:label xml:lang="sl">Amharščina</rdfs:label>
+    <rdfs:label xml:lang="lt">Amharų kalba</rdfs:label>
+    <rdfs:label xml:lang="ca">Amhàric</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Amhar</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Amhara</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma amhárico</rdfs:label>
+    <rdfs:label xml:lang="pl">Język amharski</rdfs:label>
+    <rdfs:label xml:lang="sc">Limba amarica</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua amarica</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua amárica</rdfs:label>
+    <rdfs:label xml:lang="el">Αμχαρική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="cu">Амха́рьскъ ѩꙁꙑ́къ</rdfs:label>
+    <rdfs:label xml:lang="bg">Амхарски език</rdfs:label>
+    <rdfs:label xml:lang="mk">Амхарски јазик</rdfs:label>
+    <rdfs:label xml:lang="ru">Амхарский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Амхарська мова</rdfs:label>
+    <rdfs:label xml:lang="cu">Амхарьскъ ѩзыкъ</rdfs:label>
+    <rdfs:label xml:lang="he">אמהרית</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان امهاری</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أمهرية</rdfs:label>
+    <rdfs:label xml:lang="new">आम्हारिक भाषा</rdfs:label>
+    <rdfs:label xml:lang="bn">আমহারীয় ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">அம்ஹாரிய மொழி</rdfs:label>
+    <rdfs:label xml:lang="ka">ამჰარული ენა</rdfs:label>
+    <rdfs:label xml:lang="am">አማርኛ</rdfs:label>
+    <rdfs:label xml:lang="ti">ኣምሓረኛ ፊደል</rdfs:label>
+    <rdfs:label xml:lang="ja">アムハラ語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿姆哈拉语</rdfs:label>
+    <rdfs:label xml:lang="ko">암하라어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Amharic_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#am"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#amh"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/an"
+                   lingvoj:iso1="an"
+                   lingvoj:iso2b="arg"
+                   lingvoj:iso2t="arg"
+                   lingvoj:iso3="arg">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/an.rdf"/>
+    <rdfs:label xml:lang="eu">Aragoiera</rdfs:label>
+    <rdfs:label xml:lang="eo">Aragona lingvo</rdfs:label>
+    <rdfs:label xml:lang="fr">Aragonais</rdfs:label>
+    <rdfs:label xml:lang="tr">Aragonca</rdfs:label>
+    <rdfs:label xml:lang="li">Aragonees</rdfs:label>
+    <rdfs:label xml:lang="nl">Aragonees</rdfs:label>
+    <rdfs:label xml:lang="kw">Aragonek</rdfs:label>
+    <rdfs:label xml:lang="en">Aragonese language</rdfs:label>
+    <rdfs:label xml:lang="de">Aragonesische Sprache</rdfs:label>
+    <rdfs:label xml:lang="no">Aragonesisk</rdfs:label>
+    <rdfs:label xml:lang="se">Aragoniagiella</rdfs:label>
+    <rdfs:label xml:lang="fi">Aragonian kieli</rdfs:label>
+    <rdfs:label xml:lang="lv">Aragoniešu valoda</rdfs:label>
+    <rdfs:label xml:lang="gv">Aragonish</rdfs:label>
+    <rdfs:label xml:lang="da">Aragonisk (sprog)</rdfs:label>
+    <rdfs:label xml:lang="sv">Aragonska</rdfs:label>
+    <rdfs:label xml:lang="hr">Aragonski jezik</rdfs:label>
+    <rdfs:label xml:lang="ca">Aragonès</rdfs:label>
+    <rdfs:label xml:lang="ast">Aragonés</rdfs:label>
+    <rdfs:label xml:lang="oc">Aragonés</rdfs:label>
+    <rdfs:label xml:lang="cs">Aragonština</rdfs:label>
+    <rdfs:label xml:lang="nds">Aragoonsche Spraak</rdfs:label>
+    <rdfs:label xml:lang="ga">Aragóinis</rdfs:label>
+    <rdfs:label xml:lang="hu">Aragóniai nyelv</rdfs:label>
+    <rdfs:label xml:lang="is">Aragónska</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Aragon</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Aragones</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma aragonés</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma aragonés</rdfs:label>
+    <rdfs:label xml:lang="pl">Język aragoński</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba aragoneză</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Aragonica</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua aragonesa</rdfs:label>
+    <rdfs:label xml:lang="ia">Lingua aragonese</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua aragonese</rdfs:label>
+    <rdfs:label xml:lang="co">Lingua aragunesa</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua aragonesa</rdfs:label>
+    <rdfs:label xml:lang="mi">Reo Aragon</rdfs:label>
+    <rdfs:label xml:lang="ku">Zimanê aragonî</rdfs:label>
+    <rdfs:label xml:lang="cv">Арагон чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="bg">Арагонски език</rdfs:label>
+    <rdfs:label xml:lang="sr">Арагонски језик</rdfs:label>
+    <rdfs:label xml:lang="ru">Арагонский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Арагонська мова</rdfs:label>
+    <rdfs:label xml:lang="hy">Առագոներեն</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أراغونية</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอารากอน</rdfs:label>
+    <rdfs:label xml:lang="ja">アラゴン語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿拉贡语</rdfs:label>
+    <rdfs:label xml:lang="ko">아라곤어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Aragonese_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#an"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#arg"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f8000000000008588"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ang"
+                   lingvoj:iso2b="ang"
+                   lingvoj:iso2t="ang"
+                   lingvoj:iso3="ang">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ang.rdf"/>
+    <rdfs:label xml:lang="de">Altenglische Sprache</rdfs:label>
+    <rdfs:label xml:lang="da">Angelsaksisk</rdfs:label>
+    <rdfs:label xml:lang="nds">Angelsassische Sprake</rdfs:label>
+    <rdfs:label xml:lang="fr">Anglo-saxon (langue)</rdfs:label>
+    <rdfs:label xml:lang="eo">Anglosaksa lingvo</rdfs:label>
+    <rdfs:label xml:lang="oc">Anglosaxon</rdfs:label>
+    <rdfs:label xml:lang="ca">Anglès antic</rdfs:label>
+    <rdfs:label xml:lang="it">Antico inglese</rdfs:label>
+    <rdfs:label xml:lang="sco">Auld Inglis leid</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Inggris Kuna</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Inggris Kuno</rdfs:label>
+    <rdfs:label xml:lang="ang">Englisc sprǣc</rdfs:label>
+    <rdfs:label xml:lang="tr">Eski İngilizce</rdfs:label>
+    <rdfs:label xml:lang="sv">Fornengelska</rdfs:label>
+    <rdfs:label xml:lang="is">Fornenska</rdfs:label>
+    <rdfs:label xml:lang="no">Gammelengelsk</rdfs:label>
+    <rdfs:label xml:lang="nah">Huehcāuh Inglatlahtōlli</rdfs:label>
+    <rdfs:label xml:lang="nah">Huēhcāuh Inglatlahtōlli</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma anglosajón</rdfs:label>
+    <rdfs:label xml:lang="gl">Inglés antigo</rdfs:label>
+    <rdfs:label xml:lang="ast">Inglés antiguu</rdfs:label>
+    <rdfs:label xml:lang="pl">Język staroangielski</rdfs:label>
+    <rdfs:label xml:lang="sw">Kiingereza cha Kale</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba engleză veche</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Anglica Antiqua</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua inglesa antiga</rdfs:label>
+    <rdfs:label xml:lang="fi">Muinaisenglanti</rdfs:label>
+    <rdfs:label xml:lang="en">Old English language</rdfs:label>
+    <rdfs:label xml:lang="en">Old English</rdfs:label>
+    <rdfs:label xml:lang="nl">Oudengels</rdfs:label>
+    <rdfs:label xml:lang="lt">Senoji anglų kalba</rdfs:label>
+    <rdfs:label xml:lang="sl">Stara angleščina</rdfs:label>
+    <rdfs:label xml:lang="cs">Stará angličtina</rdfs:label>
+    <rdfs:label xml:lang="et">Vanainglise keel</rdfs:label>
+    <rdfs:label xml:lang="hu">Óangol nyelv</rdfs:label>
+    <rdfs:label xml:lang="el">Αρχαία αγγλική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="ru">Древнеанглийский язык</rdfs:label>
+    <rdfs:label xml:lang="os">Рагон англисаг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="bg">Староанглийски език</rdfs:label>
+    <rdfs:label xml:lang="mk">Староанглиски јазик</rdfs:label>
+    <rdfs:label xml:lang="he">אנגלית עתיקה</rdfs:label>
+    <rdfs:label xml:lang="ar">إنجليزية عتيقة</rdfs:label>
+    <rdfs:label xml:lang="fa">انگلیسی قدیم</rdfs:label>
+    <rdfs:label xml:lang="bn">প্রাচীন ইংরেজি</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอังกฤษโบราณ</rdfs:label>
+    <rdfs:label xml:lang="am">ጥንታዊ እንግሊዝኛ</rdfs:label>
+    <rdfs:label xml:lang="ja">古英語</rdfs:label>
+    <rdfs:label xml:lang="zh">古英语</rdfs:label>
+    <rdfs:label xml:lang="ko">고대 영어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Anglo-Saxon_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ang"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/anp"
+                   lingvoj:iso2b="anp"
+                   lingvoj:iso2t="anp"
+                   lingvoj:iso3="anp">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/anp.rdf"/>
+    <rdfs:label xml:lang="en">Angika language</rdfs:label>
+    <rdfs:label xml:lang="es">Angika</rdfs:label>
+    <rdfs:label xml:lang="cs">Angičtina</rdfs:label>
+    <rdfs:label xml:lang="hi">अंगिका</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอังคิกา</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Angika"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/apa"
+                   lingvoj:iso2t="apa"
+                   lingvoj:iso3="apa">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/apa.rdf"/>
+    <rdfs:label xml:lang="da">Apache (sprog)</rdfs:label>
+    <rdfs:label xml:lang="de">Apache-Sprachen</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma apache</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues apaches</rdfs:label>
+    <rdfs:label xml:lang="it">Lingue apache</rdfs:label>
+    <rdfs:label xml:lang="lt">Pietų atapaskų kalbos</rdfs:label>
+    <rdfs:label xml:lang="en">Southern Athabaskan languages</rdfs:label>
+    <rdfs:label xml:lang="ga">Teangacha Atapascacha Deisceartacha</rdfs:label>
+    <rdfs:label xml:lang="br">Yezhoù atabaskek ar su</rdfs:label>
+    <rdfs:label xml:lang="zh">阿帕切语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Apachean_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#apa"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ar"
+                   lingvoj:iso1="ar"
+                   lingvoj:iso2b="ara"
+                   lingvoj:iso2t="ara"
+                   lingvoj:iso3="ara">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ar.rdf"/>
+    <rdfs:label xml:lang="zh-min-nan">A-la-pek-gí</rdfs:label>
+    <rdfs:label xml:lang="et">Araabia keel</rdfs:label>
+    <rdfs:label xml:lang="nds">Araabsche Spraak</rdfs:label>
+    <rdfs:label xml:lang="hu">Arab nyelv</rdfs:label>
+    <rdfs:label xml:lang="kaa">Arab tili</rdfs:label>
+    <rdfs:label xml:lang="eo">Araba lingvo</rdfs:label>
+    <rdfs:label xml:lang="fr">Arabe (langue)</rdfs:label>
+    <rdfs:label xml:lang="fr">Arabe</rdfs:label>
+    <rdfs:label xml:lang="wa">Arabe</rdfs:label>
+    <rdfs:label xml:lang="cy">Arabeg</rdfs:label>
+    <rdfs:label xml:lang="kw">Arabek</rdfs:label>
+    <rdfs:label xml:lang="oc">Arabi</rdfs:label>
+    <rdfs:label xml:lang="fi">Arabian kieli</rdfs:label>
+    <rdfs:label xml:lang="io">Arabiana linguo</rdfs:label>
+    <rdfs:label xml:lang="en">Arabic language</rdfs:label>
+    <rdfs:label xml:lang="sco">Arabic</rdfs:label>
+    <rdfs:label xml:lang="eu">Arabiera</rdfs:label>
+    <rdfs:label xml:lang="af">Arabies</rdfs:label>
+    <rdfs:label xml:lang="ceb">Arabiko</rdfs:label>
+    <rdfs:label xml:lang="ang">Arabisc sprǣc</rdfs:label>
+    <rdfs:label xml:lang="li">Arabisch</rdfs:label>
+    <rdfs:label xml:lang="nl">Arabisch</rdfs:label>
+    <rdfs:label xml:lang="de">Arabische Sprache</rdfs:label>
+    <rdfs:label xml:lang="da">Arabisk (sprog)</rdfs:label>
+    <rdfs:label xml:lang="nn">Arabisk språk</rdfs:label>
+    <rdfs:label xml:lang="no">Arabisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Arabiska</rdfs:label>
+    <rdfs:label xml:lang="fo">Arabiskt (mál)</rdfs:label>
+    <rdfs:label xml:lang="nah">Arabitlahtōlli</rdfs:label>
+    <rdfs:label xml:lang="dsb">Arabska rěc</rdfs:label>
+    <rdfs:label xml:lang="bat-smg">Arabu kalba</rdfs:label>
+    <rdfs:label xml:lang="qu">Arabya simi</rdfs:label>
+    <rdfs:label xml:lang="fy">Arabysk</rdfs:label>
+    <rdfs:label xml:lang="is">Arabíska</rdfs:label>
+    <rdfs:label xml:lang="sk">Arabčina</rdfs:label>
+    <rdfs:label xml:lang="cs">Arabština</rdfs:label>
+    <rdfs:label xml:lang="hsb">Arabšćina</rdfs:label>
+    <rdfs:label xml:lang="sl">Arabščina</rdfs:label>
+    <rdfs:label xml:lang="lt">Arabų kalba</rdfs:label>
+    <rdfs:label xml:lang="ga">Araibis</rdfs:label>
+    <rdfs:label xml:lang="crh">Arap tili</rdfs:label>
+    <rdfs:label xml:lang="bs">Arapski jezik</rdfs:label>
+    <rdfs:label xml:lang="hr">Arapski jezik</rdfs:label>
+    <rdfs:label xml:lang="tr">Arapça</rdfs:label>
+    <rdfs:label xml:lang="se">Arábagiella</rdfs:label>
+    <rdfs:label xml:lang="lv">Arābu valoda</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Arab</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Arab</rdfs:label>
+    <rdfs:label xml:lang="jv">Basa Arab</rdfs:label>
+    <rdfs:label xml:lang="map-bms">Basa Arab</rdfs:label>
+    <rdfs:label xml:lang="su">Basa Arab</rdfs:label>
+    <rdfs:label xml:lang="sq">Gjuha arabe</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma arabe</rdfs:label>
+    <rdfs:label xml:lang="lad">Idioma arabo</rdfs:label>
+    <rdfs:label xml:lang="ast">Idioma Árabe</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma árabe</rdfs:label>
+    <rdfs:label xml:lang="pl">Język arabski</rdfs:label>
+    <rdfs:label xml:lang="sw">Kiarabu</rdfs:label>
+    <rdfs:label xml:lang="kg">Kilabu</rdfs:label>
+    <rdfs:label xml:lang="ln">Liarabi</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba arabă</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Arabica</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua araba</rdfs:label>
+    <rdfs:label xml:lang="ia">Lingua arabe</rdfs:label>
+    <rdfs:label xml:lang="lad">Lingua arábiga</rdfs:label>
+    <rdfs:label xml:lang="scn">Lingua àrabba</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua árabe</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua árabe</rdfs:label>
+    <rdfs:label xml:lang="kab">Taɛrabt</rdfs:label>
+    <rdfs:label xml:lang="vi">Tiếng Ả Rập</rdfs:label>
+    <rdfs:label xml:lang="tl">Wikang Arabe</rdfs:label>
+    <rdfs:label xml:lang="ku">Zimanê erebî</rdfs:label>
+    <rdfs:label xml:lang="ca">Àrab</rdfs:label>
+    <rdfs:label xml:lang="tt">Ğäräp tele</rdfs:label>
+    <rdfs:label xml:lang="az">Ərəb dili</rdfs:label>
+    <rdfs:label xml:lang="el">Αραβική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="ce">Іаьрбийн мотт</rdfs:label>
+    <rdfs:label xml:lang="cu">Ара́вьскъ ѩꙁꙑ́къ</rdfs:label>
+    <rdfs:label xml:lang="kv">Араб кыв</rdfs:label>
+    <rdfs:label xml:lang="sah">Араб тыла</rdfs:label>
+    <rdfs:label xml:lang="kk">Араб тілі</rdfs:label>
+    <rdfs:label xml:lang="os">Араббаг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="mdf">Арабонь кяль</rdfs:label>
+    <rdfs:label xml:lang="bg">Арабски език</rdfs:label>
+    <rdfs:label xml:lang="ru">Арабский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Арабська мова</rdfs:label>
+    <rdfs:label xml:lang="cu">Аравьскъ ѩзыкъ</rdfs:label>
+    <rdfs:label xml:lang="cv">Арап чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="mk">Арапски јазик</rdfs:label>
+    <rdfs:label xml:lang="sr">Арапски језик</rdfs:label>
+    <rdfs:label xml:lang="tt">Гәрәп теле</rdfs:label>
+    <rdfs:label xml:lang="tg">Забони арабӣ</rdfs:label>
+    <rdfs:label xml:lang="hy">Արաբերեն</rdfs:label>
+    <rdfs:label xml:lang="he">ערבית</rdfs:label>
+    <rdfs:label xml:lang="ug">ئەرەب تىلى</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان عربی</rdfs:label>
+    <rdfs:label xml:lang="ps">عربي</rdfs:label>
+    <rdfs:label xml:lang="ur">عربی زبان</rdfs:label>
+    <rdfs:label xml:lang="fa">عربی</rdfs:label>
+    <rdfs:label xml:lang="ur">عربی</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة عربية</rdfs:label>
+    <rdfs:label xml:lang="arc">ܠܫܢܐ ܥܪܒܝܐ</rdfs:label>
+    <rdfs:label xml:lang="dv">ޢަރަބި</rdfs:label>
+    <rdfs:label xml:lang="hi">अरबी भाषा</rdfs:label>
+    <rdfs:label xml:lang="mr">अरबी भाषा</rdfs:label>
+    <rdfs:label xml:lang="new">अरबी भाषा</rdfs:label>
+    <rdfs:label xml:lang="bn">আরবি ভাষা</rdfs:label>
+    <rdfs:label xml:lang="pa">ਅਰਬੀ</rdfs:label>
+    <rdfs:label xml:lang="ta">அரபு மொழி</rdfs:label>
+    <rdfs:label xml:lang="te">అరబ్బీ భాష</rdfs:label>
+    <rdfs:label xml:lang="kn">ಅರಬ್ಬೀ ಭಾಷೆ</rdfs:label>
+    <rdfs:label xml:lang="ml">അറബി ഭാഷ</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอาหรับ</rdfs:label>
+    <rdfs:label xml:lang="lo">ພາສາອາຣັບ</rdfs:label>
+    <rdfs:label xml:lang="ka">არაბული ენა</rdfs:label>
+    <rdfs:label xml:lang="am">ዓረብኛ</rdfs:label>
+    <rdfs:label xml:lang="iu">ᐊᕋᕕ/aravi</rdfs:label>
+    <rdfs:label xml:lang="haw">‘Ōlelo ‘Alapia</rdfs:label>
+    <rdfs:label xml:lang="ja">アラビア語</rdfs:label>
+    <rdfs:label xml:lang="zh-yue">阿剌伯話</rdfs:label>
+    <rdfs:label xml:lang="zh">阿拉伯语</rdfs:label>
+    <rdfs:label xml:lang="ko">아랍어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Arabic_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ar"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ara"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f80000000000043cb"/>
+    <owl:sameAs rdf:resource="http://sw.opencyc.org/2008/06/10/concept/Mx4rvVj5VZwpEbGdrcN5Y29ycA"/>
+    
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/arc"
+                   lingvoj:iso2b="arc"
+                   lingvoj:iso2t="arc"
+                   lingvoj:iso3="arc">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/arc.rdf"/>
+    <rdfs:label xml:lang="en">Assyrian Neo-Aramaic</rdfs:label>
+    <rdfs:label xml:lang="is">Assyríska</rdfs:label>
+    <rdfs:label xml:lang="br">Aturayeg</rdfs:label>
+    <rdfs:label xml:lang="es">Neoarameo asirio</rdfs:label>
+    <rdfs:label xml:lang="sv">Nyöstsyriska</rdfs:label>
+    <rdfs:label xml:lang="mk">Асириски неоарамејски јазик</rdfs:label>
+    <rdfs:label xml:lang="arc">ܠܫܢܐ ܣܘܪܝܝܐ</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอราเมอิกใหม่อัสซีเรีย</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Assyrian_Neo-Aramaic_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#arc"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/arp"
+                   lingvoj:iso2b="arp"
+                   lingvoj:iso2t="arp"
+                   lingvoj:iso3="arp">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/arp.rdf"/>
+    <rdfs:label xml:lang="fr">Arapaho (langue)</rdfs:label>
+    <rdfs:label xml:lang="en">Arapaho language</rdfs:label>
+    <rdfs:label xml:lang="fi">Arapaho</rdfs:label>
+    <rdfs:label xml:lang="br">Arapahoeg</rdfs:label>
+    <rdfs:label xml:lang="cs">Arapažština</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Arapaho_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#arp"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/arw"
+                   lingvoj:iso2b="arw"
+                   lingvoj:iso2t="arw"
+                   lingvoj:iso3="arw">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/arw.rdf"/>
+    <rdfs:label xml:lang="eo">Aravakeca lingvaro</rdfs:label>
+    <rdfs:label xml:lang="is">Aravakíska</rdfs:label>
+    <rdfs:label xml:lang="hr">Aravački narodi i jezici</rdfs:label>
+    <rdfs:label xml:lang="de">Arawak-Sprachen</rdfs:label>
+    <rdfs:label xml:lang="no">Arawak-språk</rdfs:label>
+    <rdfs:label xml:lang="nn">Arawak</rdfs:label>
+    <rdfs:label xml:lang="en">Arawakan languages</rdfs:label>
+    <rdfs:label xml:lang="no">Arawakspråk</rdfs:label>
+    <rdfs:label xml:lang="nl">Arawaktalen</rdfs:label>
+    <rdfs:label xml:lang="eo">Araŭakaj lingvoj</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Arawak</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues arawakiennes</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas arahuacas</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas arawakanas</rdfs:label>
+    <rdfs:label xml:lang="an">Luengas arawakanas</rdfs:label>
+    <rdfs:label xml:lang="pt">Línguas aruaques</rdfs:label>
+    <rdfs:label xml:lang="ru">Аравакские языки</rdfs:label>
+    <rdfs:label xml:lang="zh">阿拉瓦克语系</rdfs:label>
+    <rdfs:label xml:lang="zh">阿拉瓦语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Arawak_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#arw"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/as"
+                   lingvoj:iso1="as"
+                   lingvoj:iso2b="asm"
+                   lingvoj:iso2t="asm"
+                   lingvoj:iso3="asm">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/as.rdf"/>
+    <rdfs:label xml:lang="eo">Asama lingvo</rdfs:label>
+    <rdfs:label xml:lang="br">Asameg</rdfs:label>
+    <rdfs:label xml:lang="lv">Asamiešu valoda</rdfs:label>
+    <rdfs:label xml:lang="ast">Asamés</rdfs:label>
+    <rdfs:label xml:lang="lt">Asamų kalba</rdfs:label>
+    <rdfs:label xml:lang="fr">Assamais</rdfs:label>
+    <rdfs:label xml:lang="nl">Assamees</rdfs:label>
+    <rdfs:label xml:lang="en">Assamese language</rdfs:label>
+    <rdfs:label xml:lang="de">Assamesische Sprache</rdfs:label>
+    <rdfs:label xml:lang="da">Assamesisk</rdfs:label>
+    <rdfs:label xml:lang="no">Assamesisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Assamesiska</rdfs:label>
+    <rdfs:label xml:lang="is">Assameíska</rdfs:label>
+    <rdfs:label xml:lang="fi">Assami</rdfs:label>
+    <rdfs:label xml:lang="ca">Assamès</rdfs:label>
+    <rdfs:label xml:lang="hu">Asszámi nyelv</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Assam</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Assam</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma asamés</rdfs:label>
+    <rdfs:label xml:lang="pl">Język assamski</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua assamese</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua assamesa</rdfs:label>
+    <rdfs:label xml:lang="cs">Ásámština</rdfs:label>
+    <rdfs:label xml:lang="sr">Асамски језик</rdfs:label>
+    <rdfs:label xml:lang="ru">Ассамский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Ассамська мова</rdfs:label>
+    <rdfs:label xml:lang="he">אסאמית</rdfs:label>
+    <rdfs:label xml:lang="ur">آسامی زبان</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان آسامی</rdfs:label>
+    <rdfs:label xml:lang="hi">असमिया</rdfs:label>
+    <rdfs:label xml:lang="sa">असमिया</rdfs:label>
+    <rdfs:label xml:lang="mr">आसामी भाषा</rdfs:label>
+    <rdfs:label xml:lang="new">आसामी भाषा</rdfs:label>
+    <rdfs:label xml:lang="as">অসমীয়া ভাষা আৰু লিপি</rdfs:label>
+    <rdfs:label xml:lang="bn">অসমীয়া ভাষা</rdfs:label>
+    <rdfs:label xml:lang="gu">આસામીઝ ભાષા</rdfs:label>
+    <rdfs:label xml:lang="ta">அசாமிய மொழி</rdfs:label>
+    <rdfs:label xml:lang="te">అస్సామీ భాష</rdfs:label>
+    <rdfs:label xml:lang="kn">ಅಸ್ಸಾಮಿ</rdfs:label>
+    <rdfs:label xml:lang="ml">ആസ്സാമീസ്</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอัสสัม</rdfs:label>
+    <rdfs:label xml:lang="ka">ასამური ენა</rdfs:label>
+    <rdfs:label xml:lang="ja">アッサム語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿萨姆语</rdfs:label>
+    <rdfs:label xml:lang="ko">아삼어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Assamese_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#as"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#asm"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000014ebd9"/>
+    <owl:sameAs rdf:resource="http://sw.opencyc.org/2008/06/10/concept/Mx4rvVjPOpwpEbGdrcN5Y29ycA"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ast"
+                   lingvoj:iso2b="ast"
+                   lingvoj:iso2t="ast"
+                   lingvoj:iso3="ast">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ast.rdf"/>
+    <rdfs:label xml:lang="br">Astureg</rdfs:label>
+    <rdfs:label xml:lang="eo">Asturia lingvo</rdfs:label>
+    <rdfs:label xml:lang="li">Asturiaans</rdfs:label>
+    <rdfs:label xml:lang="se">Asturiagiella</rdfs:label>
+    <rdfs:label xml:lang="fi">Asturian kieli</rdfs:label>
+    <rdfs:label xml:lang="en">Asturian language</rdfs:label>
+    <rdfs:label xml:lang="oc">Asturian</rdfs:label>
+    <rdfs:label xml:lang="no">Asturiansk</rdfs:label>
+    <rdfs:label xml:lang="ast">Asturianu</rdfs:label>
+    <rdfs:label xml:lang="fr">Asturien</rdfs:label>
+    <rdfs:label xml:lang="eu">Asturiera</rdfs:label>
+    <rdfs:label xml:lang="af">Asturies</rdfs:label>
+    <rdfs:label xml:lang="nl">Asturisch</rdfs:label>
+    <rdfs:label xml:lang="de">Asturische Sprache</rdfs:label>
+    <rdfs:label xml:lang="sv">Asturiska</rdfs:label>
+    <rdfs:label xml:lang="hr">Asturleonski jezik</rdfs:label>
+    <rdfs:label xml:lang="hr">Asturski jezik</rdfs:label>
+    <rdfs:label xml:lang="tr">Asturyasça</rdfs:label>
+    <rdfs:label xml:lang="kw">Asturyek</rdfs:label>
+    <rdfs:label xml:lang="cs">Asturština</rdfs:label>
+    <rdfs:label xml:lang="nds">Astuursche Spraak</rdfs:label>
+    <rdfs:label xml:lang="cy">Astwrieg</rdfs:label>
+    <rdfs:label xml:lang="is">Astúríska</rdfs:label>
+    <rdfs:label xml:lang="sk">Astúrčina</rdfs:label>
+    <rdfs:label xml:lang="lv">Astūriešu valoda</rdfs:label>
+    <rdfs:label xml:lang="hu">Asztúriai nyelv</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Asturia</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Asturia</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma asturiano</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma asturiano</rdfs:label>
+    <rdfs:label xml:lang="pl">Język asturyjski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba asturiană</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Asturiana</rdfs:label>
+    <rdfs:label xml:lang="co">Lingua asturiana</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua asturiana</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua asturiana</rdfs:label>
+    <rdfs:label xml:lang="scn">Lingua asturiana</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua asturiana</rdfs:label>
+    <rdfs:label xml:lang="el">Αστουριανή γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="ru">Астурийский язык</rdfs:label>
+    <rdfs:label xml:lang="sr">Астуријски језик</rdfs:label>
+    <rdfs:label xml:lang="hy">Աստուրիերեն</rdfs:label>
+    <rdfs:label xml:lang="he">אסטורית</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أستورية</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอัสตูเรียส</rdfs:label>
+    <rdfs:label xml:lang="ja">アストゥリア語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿斯图里亚斯语</rdfs:label>
+    <rdfs:label xml:lang="ko">아스투리아스어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Asturian_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ast"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ath"
+                   lingvoj:iso2t="ath"
+                   lingvoj:iso3="ath">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ath.rdf"/>
+    <rdfs:label xml:lang="eo">Atabaska lingvaro</rdfs:label>
+    <rdfs:label xml:lang="tr">Atabaşkan Dilleri</rdfs:label>
+    <rdfs:label xml:lang="lt">Atapaskų kalbos</rdfs:label>
+    <rdfs:label xml:lang="fi">Athabasca-kielet</rdfs:label>
+    <rdfs:label xml:lang="en">Athabaskan languages</rdfs:label>
+    <rdfs:label xml:lang="hr">Athabaskanski narodi i jezici</rdfs:label>
+    <rdfs:label xml:lang="nl">Athabaskische talen</rdfs:label>
+    <rdfs:label xml:lang="sv">Athabaskiska språk</rdfs:label>
+    <rdfs:label xml:lang="de">Athapaskische Sprachen</rdfs:label>
+    <rdfs:label xml:lang="pl">Języki atapaskańskie</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues athapascanes</rdfs:label>
+    <rdfs:label xml:lang="oc">Lengas atabascanas</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas atabascanas</rdfs:label>
+    <rdfs:label xml:lang="gl">Linguas atapascanas</rdfs:label>
+    <rdfs:label xml:lang="it">Lingue athabaska</rdfs:label>
+    <rdfs:label xml:lang="an">Luengas atapascas</rdfs:label>
+    <rdfs:label xml:lang="pt">Línguas atabascanas</rdfs:label>
+    <rdfs:label xml:lang="ga">Teangacha Atapascacha</rdfs:label>
+    <rdfs:label xml:lang="mk">Атабаскански јазици</rdfs:label>
+    <rdfs:label xml:lang="ru">Атабаскские языки</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان\u200cهای آتاباسکی</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Athapascan_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ath"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/aus"
+                   lingvoj:iso2t="aus"
+                   lingvoj:iso3="aus">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/aus.rdf"/>
+    <rdfs:label xml:lang="lt">Australijos aborigenų kalbos</rdfs:label>
+    <rdfs:label xml:lang="de">Australische Sprachen</rdfs:label>
+    <rdfs:label xml:lang="nl">Australische talen</rdfs:label>
+    <rdfs:label xml:lang="sv">Australiska språk</rdfs:label>
+    <rdfs:label xml:lang="nn">Australske språk</rdfs:label>
+    <rdfs:label xml:lang="no">Australske språk</rdfs:label>
+    <rdfs:label xml:lang="hu">Ausztráliai nyelvek</rdfs:label>
+    <rdfs:label xml:lang="eo">Aŭstralia lingvaro</rdfs:label>
+    <rdfs:label xml:lang="en">Indigenous Australian languages</rdfs:label>
+    <rdfs:label xml:lang="pl">Języki australijskie</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues aborigènes d'Australie</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues aborigènes d'Australie</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas aborígenes australianas</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas aborígenes de Australia</rdfs:label>
+    <rdfs:label xml:lang="la">Linguae Australianae</rdfs:label>
+    <rdfs:label xml:lang="it">Lingue aborigene australiane</rdfs:label>
+    <rdfs:label xml:lang="it">Lingue australiane aborigene</rdfs:label>
+    <rdfs:label xml:lang="ca">Llengües australianes</rdfs:label>
+    <rdfs:label xml:lang="an">Luengas australianas</rdfs:label>
+    <rdfs:label xml:lang="ru">Австралийские языки</rdfs:label>
+    <rdfs:label xml:lang="uk">Австралійські мови</rdfs:label>
+    <rdfs:label xml:lang="bn">অস্ট্রেলীয় আদিবাসী ভাষাসমূহ</rdfs:label>
+    <rdfs:label xml:lang="ja">オーストラリア・アボリジニ諸語</rdfs:label>
+    <rdfs:label xml:lang="ko">오스트레일리아 원주민 언어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Australian_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#aus"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/av"
+                   lingvoj:iso1="av"
+                   lingvoj:iso2b="ava"
+                   lingvoj:iso2t="ava"
+                   lingvoj:iso3="ava">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/av.rdf"/>
+    <rdfs:label xml:lang="en">Avaric language</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Avaric_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#av"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ava"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/awa"
+                   lingvoj:iso2b="awa"
+                   lingvoj:iso2t="awa"
+                   lingvoj:iso3="awa">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/awa.rdf"/>
+    <rdfs:label xml:lang="nn">Avadhi</rdfs:label>
+    <rdfs:label xml:lang="br">Awadeg</rdfs:label>
+    <rdfs:label xml:lang="en">Awadhi language</rdfs:label>
+    <rdfs:label xml:lang="fr">Awadhi</rdfs:label>
+    <rdfs:label xml:lang="hi">अवधी</rdfs:label>
+    <rdfs:label xml:lang="ta">அவதி மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอวธี</rdfs:label>
+    <rdfs:label xml:lang="ja">アワディー語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿瓦德语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Awadhi_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#awa"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ay"
+                   lingvoj:iso1="ay"
+                   lingvoj:iso2b="aym"
+                   lingvoj:iso2t="aym"
+                   lingvoj:iso3="aym">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ay.rdf"/>
+    <rdfs:label xml:lang="ca">Aimara</rdfs:label>
+    <rdfs:label xml:lang="eu">Aimara</rdfs:label>
+    <rdfs:label xml:lang="fr">Aimara</rdfs:label>
+    <rdfs:label xml:lang="fi">Aimaran kieli</rdfs:label>
+    <rdfs:label xml:lang="nah">Aimaratlahtōlli</rdfs:label>
+    <rdfs:label xml:lang="gn">Aimarañe'ẽ</rdfs:label>
+    <rdfs:label xml:lang="gn">Aimarañe'ẽ</rdfs:label>
+    <rdfs:label xml:lang="bat-smg">Aimaru kalba</rdfs:label>
+    <rdfs:label xml:lang="lv">Aimaru valoda</rdfs:label>
+    <rdfs:label xml:lang="lt">Aimarų kalba</rdfs:label>
+    <rdfs:label xml:lang="eo">Ajmara lingvo</rdfs:label>
+    <rdfs:label xml:lang="hr">Ajmarski jezik</rdfs:label>
+    <rdfs:label xml:lang="cs">Ajmarština</rdfs:label>
+    <rdfs:label xml:lang="sl">Ajmarščina</rdfs:label>
+    <rdfs:label xml:lang="ay">Aymar aru</rdfs:label>
+    <rdfs:label xml:lang="nds">Aymara (Spraak)</rdfs:label>
+    <rdfs:label xml:lang="de">Aymara (Sprache)</rdfs:label>
+    <rdfs:label xml:lang="da">Aymara (sprog)</rdfs:label>
+    <rdfs:label xml:lang="no">Aymara (språk)</rdfs:label>
+    <rdfs:label xml:lang="sv">Aymara (språk)</rdfs:label>
+    <rdfs:label xml:lang="nl">Aymara (taal)</rdfs:label>
+    <rdfs:label xml:lang="nv">Aymara bizaad</rdfs:label>
+    <rdfs:label xml:lang="en">Aymara language</rdfs:label>
+    <rdfs:label xml:lang="qu">Aymara simi</rdfs:label>
+    <rdfs:label xml:lang="fr">Aymara</rdfs:label>
+    <rdfs:label xml:lang="nn">Aymara</rdfs:label>
+    <rdfs:label xml:lang="wa">Aymara</rdfs:label>
+    <rdfs:label xml:lang="io">Aymarana linguo</rdfs:label>
+    <rdfs:label xml:lang="br">Aymareg</rdfs:label>
+    <rdfs:label xml:lang="is">Aímaríska</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Aymara</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Aymara</rdfs:label>
+    <rdfs:label xml:lang="sq">Gjuha aymara</rdfs:label>
+    <rdfs:label xml:lang="an">Idioma aimara</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma aimara</rdfs:label>
+    <rdfs:label xml:lang="pl">Język ajmara</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua aimara</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua aimará</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua aymara</rdfs:label>
+    <rdfs:label xml:lang="ast">Llingua aymara</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua aimará</rdfs:label>
+    <rdfs:label xml:lang="uk">Аймара (мова)</rdfs:label>
+    <rdfs:label xml:lang="ru">Аймара (язык)</rdfs:label>
+    <rdfs:label xml:lang="bg">Аймара</rdfs:label>
+    <rdfs:label xml:lang="os">Аймараг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="sr">Ајмара (језик)</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أيمارا</rdfs:label>
+    <rdfs:label xml:lang="mr">आयमारा भाषा</rdfs:label>
+    <rdfs:label xml:lang="bn">আইমারা ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ja">アイマラ語</rdfs:label>
+    <rdfs:label xml:lang="zh">艾馬拉語</rdfs:label>
+    <rdfs:label xml:lang="ko">아이마라어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Aymara_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ay"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#aym"/>
+    <owl:sameAs rdf:resource="http://rdf.freebase.com/ns/guid.9202a8c04000641f80000000001e9736"/>
+    <owl:sameAs rdf:resource="http://sw.opencyc.org/2008/06/10/concept/Mx4rvVi_u5wpEbGdrcN5Y29ycA"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/az"
+                   lingvoj:iso1="az"
+                   lingvoj:iso2b="aze"
+                   lingvoj:iso2t="aze"
+                   lingvoj:iso3="aze">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/az.rdf"/>
+    <rdfs:label xml:lang="ga">Asarbaiseáinis</rdfs:label>
+    <rdfs:label xml:lang="nds">Aserbaidschaansche Spraak</rdfs:label>
+    <rdfs:label xml:lang="de">Aserbaidschanische Sprache</rdfs:label>
+    <rdfs:label xml:lang="et">Aserbaidžaani keel</rdfs:label>
+    <rdfs:label xml:lang="cy">Aserbaijaneg</rdfs:label>
+    <rdfs:label xml:lang="no">Aserbajdsjansk</rdfs:label>
+    <rdfs:label xml:lang="is">Aserbaídsjanska</rdfs:label>
+    <rdfs:label xml:lang="li">Azerbaidzjaans</rdfs:label>
+    <rdfs:label xml:lang="lt">Azerbaidžaniečių kalba</rdfs:label>
+    <rdfs:label xml:lang="lv">Azerbaidžāņu valoda</rdfs:label>
+    <rdfs:label xml:lang="en">Azerbaijani language</rdfs:label>
+    <rdfs:label xml:lang="sco">Azerbaijani leid</rdfs:label>
+    <rdfs:label xml:lang="sv">Azerbajdzjanska</rdfs:label>
+    <rdfs:label xml:lang="eo">Azerbajĝana lingvo</rdfs:label>
+    <rdfs:label xml:lang="crh">Azerbaycan tili</rdfs:label>
+    <rdfs:label xml:lang="br">Azereg (yezh)</rdfs:label>
+    <rdfs:label xml:lang="nl">Azeri (taal)</rdfs:label>
+    <rdfs:label xml:lang="hu">Azeri nyelv</rdfs:label>
+    <rdfs:label xml:lang="da">Azeri</rdfs:label>
+    <rdfs:label xml:lang="nl">Azeri</rdfs:label>
+    <rdfs:label xml:lang="tr">Azerice</rdfs:label>
+    <rdfs:label xml:lang="fi">Azerin kieli</rdfs:label>
+    <rdfs:label xml:lang="ast">Azerí</rdfs:label>
+    <rdfs:label xml:lang="fr">Azéri</rdfs:label>
+    <rdfs:label xml:lang="az">Azərbaycan dili</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Azeri</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Azeri</rdfs:label>
+    <rdfs:label xml:lang="sq">Gjuha azerbajxhane</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma azerí</rdfs:label>
+    <rdfs:label xml:lang="pl">Język azerski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba azeră</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Atropatenica</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua azera</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua azerí</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua azeri</rdfs:label>
+    <rdfs:label xml:lang="ca">Àzeri</rdfs:label>
+    <rdfs:label xml:lang="cs">Ázerbájdžánština</rdfs:label>
+    <rdfs:label xml:lang="el">Αζερική γλώσσα</rdfs:label>
+    <rdfs:label xml:lang="os">Азербайджайнаг æвзаг</rdfs:label>
+    <rdfs:label xml:lang="cv">Азербайджан чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="bg">Азербайджански език</rdfs:label>
+    <rdfs:label xml:lang="ru">Азербайджанский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Азербайджанська мова</rdfs:label>
+    <rdfs:label xml:lang="ky">Азербайжан тили</rdfs:label>
+    <rdfs:label xml:lang="mk">Азербејџански јазик</rdfs:label>
+    <rdfs:label xml:lang="tg">Забони озарбойҷонӣ</rdfs:label>
+    <rdfs:label xml:lang="he">אזרית</rdfs:label>
+    <rdfs:label xml:lang="fa">ترکی آذربایجانی</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان ترکی آذربایجانی</rdfs:label>
+    <rdfs:label xml:lang="ar">لغة أذرية</rdfs:label>
+    <rdfs:label xml:lang="bn">আজারবাইজানি ভাষা</rdfs:label>
+    <rdfs:label xml:lang="ta">அசர்பைஜான் மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาอาเซอร์ไบจาน</rdfs:label>
+    <rdfs:label xml:lang="ka">აზერბაიჯანული ენა</rdfs:label>
+    <rdfs:label xml:lang="ja">アゼルバイジャン語</rdfs:label>
+    <rdfs:label xml:lang="zh">阿塞拜疆语</rdfs:label>
+    <rdfs:label xml:lang="ko">아제르바이잔어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Azerbaijani_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#az"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#aze"/>
+    
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ba"
+                   lingvoj:iso1="ba"
+                   lingvoj:iso2b="bak"
+                   lingvoj:iso2t="bak"
+                   lingvoj:iso3="bak">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ba.rdf"/>
+    <rdfs:label xml:lang="fr">Bachkir</rdfs:label>
+    <rdfs:label xml:lang="br">Bachkireg</rdfs:label>
+    <rdfs:label xml:lang="id">Bahasa Bashkir</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Bashkir</rdfs:label>
+    <rdfs:label xml:lang="ca">Baixkir</rdfs:label>
+    <rdfs:label xml:lang="de">Baschkirische Sprache</rdfs:label>
+    <rdfs:label xml:lang="en">Bashkir language</rdfs:label>
+    <rdfs:label xml:lang="nl">Basjkiers</rdfs:label>
+    <rdfs:label xml:lang="sv">Basjkiriska</rdfs:label>
+    <rdfs:label xml:lang="da">Basjkirsk (sprog)</rdfs:label>
+    <rdfs:label xml:lang="nn">Basjkirsk språk</rdfs:label>
+    <rdfs:label xml:lang="no">Basjkirsk</rdfs:label>
+    <rdfs:label xml:lang="gl">Baskir</rdfs:label>
+    <rdfs:label xml:lang="hu">Baskír nyelv</rdfs:label>
+    <rdfs:label xml:lang="eo">Baŝkira lingvo</rdfs:label>
+    <rdfs:label xml:lang="tr">Başkurtça</rdfs:label>
+    <rdfs:label xml:lang="crh">Başqurt tili</rdfs:label>
+    <rdfs:label xml:lang="az">Başqırd dili</rdfs:label>
+    <rdfs:label xml:lang="fi">Baškiirin kieli</rdfs:label>
+    <rdfs:label xml:lang="cs">Baškirština</rdfs:label>
+    <rdfs:label xml:lang="sl">Baškirščina</rdfs:label>
+    <rdfs:label xml:lang="lt">Baškirų kalba</rdfs:label>
+    <rdfs:label xml:lang="lv">Baškīru valoda</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma baskir</rdfs:label>
+    <rdfs:label xml:lang="pl">Język baszkirski</rdfs:label>
+    <rdfs:label xml:lang="ro">Limba başchiră</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua baskir</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua baškira</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua bashkir</rdfs:label>
+    <rdfs:label xml:lang="bg">Башкирски език</rdfs:label>
+    <rdfs:label xml:lang="mk">Башкирски јазик</rdfs:label>
+    <rdfs:label xml:lang="ru">Башкирский язык</rdfs:label>
+    <rdfs:label xml:lang="uk">Башкирська мова</rdfs:label>
+    <rdfs:label xml:lang="myv">Башкирэнь кель</rdfs:label>
+    <rdfs:label xml:lang="cu">Башко́ртьскъ ѩꙁꙑ́къ</rdfs:label>
+    <rdfs:label xml:lang="tt">Башкорт теле</rdfs:label>
+    <rdfs:label xml:lang="cu">Башкортьскъ ѩзыкъ</rdfs:label>
+    <rdfs:label xml:lang="kk">Башқұрт тілі</rdfs:label>
+    <rdfs:label xml:lang="ba">Башҡорт теле</rdfs:label>
+    <rdfs:label xml:lang="cv">Пушкăрт чĕлхи</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان باشقیر</rdfs:label>
+    <rdfs:label xml:lang="hi">बाश्किर भाषा</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาบัชคีร์</rdfs:label>
+    <rdfs:label xml:lang="ja">バシキール語</rdfs:label>
+    <rdfs:label xml:lang="zh">巴什基尔语</rdfs:label>
+    <rdfs:label xml:lang="ko">바시키르어</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Bashkir_language"/>
+    <owl:sameAs rdf:resource="http://downlode.org/rdf/iso-639/languages#ba"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#bak"/>
+    
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bad"
+                   lingvoj:iso2t="bad"
+                   lingvoj:iso3="bad">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bad.rdf"/>
+    <rdfs:label xml:lang="en">Banda languages</rdfs:label>
+    <rdfs:label xml:lang="de">Banda-Sprachen</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Banda_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#bad"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bai"
+                   lingvoj:iso2t="bai"
+                   lingvoj:iso3="bai">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bai.rdf"/>
+    <rdfs:label xml:lang="en">Bamileke languages</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues bamilékées</rdfs:label>
+    <rdfs:label xml:lang="pt">Línguas Bamileke</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Bamileke_languages"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#bai"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bal"
+                   lingvoj:iso2b="bal"
+                   lingvoj:iso2t="bal"
+                   lingvoj:iso3="bal">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bal.rdf"/>
+    <rdfs:label xml:lang="id">Bahasa Baluchi</rdfs:label>
+    <rdfs:label xml:lang="en">Balochi language</rdfs:label>
+    <rdfs:label xml:lang="br">Balotcheg</rdfs:label>
+    <rdfs:label xml:lang="fr">Baloutche</rdfs:label>
+    <rdfs:label xml:lang="ast">Baluchi</rdfs:label>
+    <rdfs:label xml:lang="sv">Baluchiska</rdfs:label>
+    <rdfs:label xml:lang="no">Balutsji (språk)</rdfs:label>
+    <rdfs:label xml:lang="eo">Baluĉa lingvo</rdfs:label>
+    <rdfs:label xml:lang="cs">Balúčština</rdfs:label>
+    <rdfs:label xml:lang="nl">Beloetsji (taal)</rdfs:label>
+    <rdfs:label xml:lang="hu">Beludzs nyelv</rdfs:label>
+    <rdfs:label xml:lang="de">Belutschische Sprache</rdfs:label>
+    <rdfs:label xml:lang="fi">Belutšin kieli</rdfs:label>
+    <rdfs:label xml:lang="ku">Belûçî</rdfs:label>
+    <rdfs:label xml:lang="pl">Język beludżi</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua baluchi</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua balúchi</rdfs:label>
+    <rdfs:label xml:lang="bg">Белуджки език</rdfs:label>
+    <rdfs:label xml:lang="ru">Белуджский язык</rdfs:label>
+    <rdfs:label xml:lang="tg">Забони балучӣ</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان بلوچی</rdfs:label>
+    <rdfs:label xml:lang="hi">बलूची भाषा</rdfs:label>
+    <rdfs:label xml:lang="ta">பலூச்சி மொழி</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาบาลูจิ</rdfs:label>
+    <rdfs:label xml:lang="ja">バローチー語</rdfs:label>
+    <rdfs:label xml:lang="zh">俾路支语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Baluchi_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#bal"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/ban"
+                   lingvoj:iso2b="ban"
+                   lingvoj:iso2t="ban"
+                   lingvoj:iso3="ban">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/ban.rdf"/>
+    <rdfs:label xml:lang="id">Bahasa Bali</rdfs:label>
+    <rdfs:label xml:lang="ms">Bahasa Bali</rdfs:label>
+    <rdfs:label xml:lang="eo">Balia lingvo</rdfs:label>
+    <rdfs:label xml:lang="fi">Balin kieli</rdfs:label>
+    <rdfs:label xml:lang="fr">Balinais (langue)</rdfs:label>
+    <rdfs:label xml:lang="nl">Balinees (taal)</rdfs:label>
+    <rdfs:label xml:lang="en">Balinese language</rdfs:label>
+    <rdfs:label xml:lang="yo">Balinese</rdfs:label>
+    <rdfs:label xml:lang="de">Balinesische Sprache</rdfs:label>
+    <rdfs:label xml:lang="no">Balinesisk</rdfs:label>
+    <rdfs:label xml:lang="sv">Balinesiska</rdfs:label>
+    <rdfs:label xml:lang="ca">Balinès</rdfs:label>
+    <rdfs:label xml:lang="jv">Basa Bali</rdfs:label>
+    <rdfs:label xml:lang="pl">Język balijski</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua balinese</rdfs:label>
+    <rdfs:label xml:lang="pt">Língua balinesa</rdfs:label>
+    <rdfs:label xml:lang="hi">बहासा बाली</rdfs:label>
+    <rdfs:label xml:lang="th">ภาษาบาหลี</rdfs:label>
+    <rdfs:label xml:lang="ja">バリ語</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Balinese_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#ban"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bar"
+                   lingvoj:iso2b="bar">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bar.rdf"/>
+    <rdfs:label xml:lang="en">Austro-Bavarian</rdfs:label>
+    <rdfs:label xml:lang="nds">Baiersch</rdfs:label>
+    <rdfs:label xml:lang="de">Bairische Dialekte</rdfs:label>
+    <rdfs:label xml:lang="nn">Bairisk</rdfs:label>
+    <rdfs:label xml:lang="no">Bairisk</rdfs:label>
+    <rdfs:label xml:lang="eo">Bavara lingvo</rdfs:label>
+    <rdfs:label xml:lang="it">Bavarese</rdfs:label>
+    <rdfs:label xml:lang="fr">Bavarois</rdfs:label>
+    <rdfs:label xml:lang="ca">Bavarès</rdfs:label>
+    <rdfs:label xml:lang="sv">Bayerska</rdfs:label>
+    <rdfs:label xml:lang="li">Beiers-Oosterieks</rdfs:label>
+    <rdfs:label xml:lang="nl">Beiers</rdfs:label>
+    <rdfs:label xml:lang="af">Beierse taal</rdfs:label>
+    <rdfs:label xml:lang="gl">Bávaro</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma bávaro</rdfs:label>
+    <rdfs:label xml:lang="pl">Język bawarski</rdfs:label>
+    <rdfs:label xml:lang="la">Lingua Bavarica</rdfs:label>
+    <rdfs:label xml:lang="it">Lingua bavarese</rdfs:label>
+    <rdfs:label xml:lang="gl">Lingua bávara</rdfs:label>
+    <rdfs:label xml:lang="br">Yezhoù aostriek-bavarek</rdfs:label>
+    <rdfs:label xml:lang="ja">バイエルン・オーストリア語</rdfs:label>
+    <rdfs:label xml:lang="zh">奥地利-巴伐利亚语</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Bavarian_language"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bas"
+                   lingvoj:iso2b="bas"
+                   lingvoj:iso2t="bas"
+                   lingvoj:iso3="bas">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bas.rdf"/>
+    <rdfs:label xml:lang="en">Basaa language</rdfs:label>
+    <rdfs:label xml:lang="br">Basaeg</rdfs:label>
+    <rdfs:label xml:lang="es">Idioma basaa</rdfs:label>
+    <rdfs:label xml:lang="pl">Język basaa</rdfs:label>
+    <owl:sameAs rdf:resource="http://dbpedia.org/resource/Basa_language"/>
+    <owl:sameAs rdf:resource="http://psi.oasis-open.org/iso/639/#bas"/>
+  </lingvoj:Lingvo>
+
+  <lingvoj:Lingvo rdf:about="http://www.lingvoj.org/lang/bat"
+                   lingvoj:iso2t="bat"
+                   lingvoj:iso3="bat">
+    <rdfs:isDefinedBy rdf:resource="http://www.lingvoj.org/lingvo/bat.rdf"/>
+    <rdfs:label xml:lang="id">Bahasa Baltik</rdfs:label>
+    <rdfs:label xml:lang="eo">Balta lingvaro</rdfs:label>
+    <rdfs:label xml:lang="et">Balti keeled</rdfs:label>
+    <rdfs:label xml:lang="en">Baltic languages</rdfs:label>
+    <rdfs:label xml:lang="af">Baltiese tale</rdfs:label>
+    <rdfs:label xml:lang="se">Baltijalaš gielat</rdfs:label>
+    <rdfs:label xml:lang="az">Baltik qrupu</rdfs:label>
+    <rdfs:label xml:lang="de">Baltische Sprachen</rdfs:label>
+    <rdfs:label xml:lang="nl">Baltische talen</rdfs:label>
+    <rdfs:label xml:lang="li">Baltische taole</rdfs:label>
+    <rdfs:label xml:lang="sv">Baltiska språk</rdfs:label>
+    <rdfs:label xml:lang="hsb">Baltiske rěče</rdfs:label>
+    <rdfs:label xml:lang="nn">Baltiske språk</rdfs:label>
+    <rdfs:label xml:lang="no">Baltiske språk</rdfs:label>
+    <rdfs:label xml:lang="hr">Baltički jezici</rdfs:label>
+    <rdfs:label xml:lang="is">Baltnesk tungumál</rdfs:label>
+    <rdfs:label xml:lang="sl">Baltski jeziki</rdfs:label>
+    <rdfs:label xml:lang="cs">Baltské jazyky</rdfs:label>
+    <rdfs:label xml:lang="sk">Baltské jazyky</rdfs:label>
+    <rdfs:label xml:lang="fi">Balttilaiset kielet</rdfs:label>
+    <rdfs:label xml:lang="bat-smg">Baltu kalbas</rdfs:label>
+    <rdfs:label xml:lang="lv">Baltu valodas</rdfs:label>
+    <rdfs:label xml:lang="lt">Baltų kalbos</rdfs:label>
+    <rdfs:label xml:lang="pl">Języki bałtyckie</rdfs:label>
+    <rdfs:label xml:lang="fr">Langues baltes</rdfs:label>
+    <rdfs:label xml:lang="es">Lenguas bálticas</rdfs:label>
+    <rdfs:label xml:lang="ro">Limbile baltice</rdfs:label>
+    <rdfs:label xml:lang="la">Linguae Balticae</rdfs:label>
+    <rdfs:label xml:lang="gl">Linguas bálticas</rdfs:label>
+    <rdfs:label xml:lang="it">Lingue baltiche</rdfs:label>
+    <rdfs:label xml:lang="ca">Llengües bàltiques</rdfs:label>
+    <rdfs:label xml:lang="an">Luengas balticas</rdfs:label>
+    <rdfs:label xml:lang="pt">Línguas bálticas</rdfs:label>
+    <rdfs:label xml:lang="vi">Nhóm ngôn ngữ gốc Balt</rdfs:label>
+    <rdfs:label xml:lang="ku">Zimanên baltî</rdfs:label>
+    <rdfs:label xml:lang="el">Βαλτικές γλώσσες</rdfs:label>
+    <rdfs:label xml:lang="bg">Балтийски езици</rdfs:label>
+    <rdfs:label xml:lang="ru">Балтийские языки</rdfs:label>
+    <rdfs:label xml:lang="mk">Балтички јазици</rdfs:label>
+    <rdfs:label xml:lang="be">Балтыйскія мовы</rdfs:label>
+    <rdfs:label xml:lang="uk">Балтійські мови</rdfs:label>
+    <rdfs:label xml:lang="tg">Забонҳои балтикӣ</rdfs:label>
+    <rdfs:label xml:lang="he">שפות בלטיות</rdfs:label>
+    <rdfs:label xml:lang="fa">زبان\u200cهای بالتیک</rdfs:label>
+    <rdfs:label xml:lang="ka">ბალტიკური ენები</rdfs:label>
+    <rdfs:label xml:lang="ja"

<TRUNCATED>

[54/87] [abbrv] clerezza git commit: CLEREZZA-979: added scala.xml to dependency management

Posted by re...@apache.org.
CLEREZZA-979: added scala.xml to dependency management

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

Branch: refs/heads/master
Commit: 32abd37f5257916c51b3288501151e7d80a786bf
Parents: f69f4e1
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 19:35:21 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 19:35:21 2015 +0000

----------------------------------------------------------------------
 parent/pom.xml | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/32abd37f/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 3ce46ec..6c80e01 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -34,7 +34,7 @@
     <description>The direct or indirect parent of all Clerezza Artifacts</description>
     <properties>
         <sourceReleaseAssemblyDescriptor>multimodule-source-release</sourceReleaseAssemblyDescriptor>
-	<stanbol.version>0.12.0</stanbol.version>
+        <stanbol.version>0.12.0</stanbol.version>
     </properties>
     <licenses>
         <license>
@@ -351,6 +351,11 @@
                 <version>2.11.6</version>
             </dependency>
             <dependency>
+                <groupId>org.scala-lang.modules</groupId>
+                <artifactId>scala-xml_2.11</artifactId>
+                <version>1.0.3</version>
+            </dependency>
+            <dependency>
                 <groupId>org.scala-lang</groupId>
                 <artifactId>scala-compiler</artifactId>
                 <version>2.11.6</version>
@@ -531,16 +536,16 @@
                 <version>1.46</version>
             </dependency>
 	    
-	    <!-- Apache Stanbol dependencies -->
-	    <dependency>
-              <groupId>org.apache.stanbol</groupId>
-              <artifactId>org.apache.stanbol.commons.security.core</artifactId>
-              <version>1.0.0</version>
+            <!-- Apache Stanbol dependencies -->
+            <dependency>
+                <groupId>org.apache.stanbol</groupId>
+                <artifactId>org.apache.stanbol.commons.security.core</artifactId>
+                <version>1.0.0</version>
             </dependency>
-	    <dependency>
-              <groupId>org.apache.stanbol</groupId>
-              <artifactId>org.apache.stanbol.commons.web.base</artifactId>
-	      <version>${stanbol.version}</version>
+            <dependency>
+                <groupId>org.apache.stanbol</groupId>
+                <artifactId>org.apache.stanbol.commons.web.base</artifactId>
+                <version>${stanbol.version}</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
@@ -579,8 +584,8 @@
         <url>http://git.apache.org/clerezza.git/</url>
         <connection>scm:git:git://git.apache.org/clerezza.git</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/clerezza.git</developerConnection>
-      <tag>reactor-0.3</tag>
-  </scm>
+        <tag>reactor-0.3</tag>
+    </scm>
 
     <!-- lets generate reports -->
     <reporting>


[13/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/LICENSE
----------------------------------------------------------------------
diff --git a/platform/logging/LICENSE b/platform/logging/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/logging/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/logging/core/LICENSE b/platform/logging/core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/logging/core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/core/pom.xml b/platform/logging/core/pom.xml
new file mode 100644
index 0000000..68bcf42
--- /dev/null
+++ b/platform/logging/core/pom.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.logging.parent</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.logging.core</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Logging Core</name>
+    <description>
+        Configure logging for the Clerezza Platform Core
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.logging.ontologies</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
new file mode 100644
index 0000000..ec342d3
--- /dev/null
+++ b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.logging;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URISyntaxException;
+import java.security.AccessControlException;
+import java.security.AccessController;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import org.apache.clerezza.jaxrs.utils.RedirectUtil;
+import org.apache.clerezza.jaxrs.utils.TrailingSlash;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.logging.ontologies.LOGGING;
+import org.apache.clerezza.platform.typerendering.RenderletManager;
+import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.ontologies.PLATFORM;
+import org.apache.clerezza.rdf.ontologies.RDF;
+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;
+import org.apache.felix.scr.annotations.Services;
+import org.osgi.framework.Bundle;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+
+@Component
+@Services({
+    @Service(value = Object.class),
+    @Service(value = GlobalMenuItemsProvider.class)
+})
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("admin/logging")
+public class LoggingManager implements GlobalMenuItemsProvider {
+
+    @Reference
+    private RenderletManager renderletManager;
+    @Reference
+    private ConfigurationAdmin configurationAdmin;
+    private String paxLoggingLocation = null;
+
+    public void activate(ComponentContext context)
+            throws URISyntaxException, IOException {
+        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
+                new UriRef(getClass().getResource(
+                "config-page-naked.ssp").toURI().toString()),
+                LOGGING.LoggingConfigPage, "naked",
+                MediaType.APPLICATION_XHTML_XML_TYPE, true);
+
+        for (Bundle bundle : context.getBundleContext().getBundles()) {
+            if (bundle.getSymbolicName().equals("org.ops4j.pax.logging.pax-logging-service")) {
+                paxLoggingLocation = bundle.getLocation();
+                break;
+            }
+        }
+
+    }
+
+    private void setProperties(Dictionary props)
+            throws IOException {
+        Configuration config = getServiceConfig();
+        config.update(props);
+    }
+
+    /*private void setProperties(Hashtable properties) {
+    setProperties
+    }*/
+    private Configuration getServiceConfig()
+            throws IOException {
+        Configuration config = configurationAdmin.getConfiguration("org.ops4j.pax.logging", paxLoggingLocation);
+        return config;
+    }
+
+    @GET
+    public GraphNode entry(@Context UriInfo uriInfo)
+            throws IOException {
+        AccessController.checkPermission(new LoggingManagerAccessPermission());
+        TrailingSlash.enforcePresent(uriInfo);
+        SimpleMGraph resultMGraph = new SimpleMGraph();
+        GraphNode result = new GraphNode(new BNode(), resultMGraph);
+        result.addPropertyValue(LOGGING.loggingConfig, getPropertiesAsString());
+        result.addProperty(RDF.type, PLATFORM.HeadedPage);
+        result.addProperty(RDF.type, LOGGING.LoggingConfigPage);
+        return result;
+    }
+
+    private String getPropertiesAsString()
+            throws IOException {
+        Configuration config = getServiceConfig();
+        Properties properties = new Properties();
+        Dictionary propertyDictionary = config.getProperties();
+        Enumeration<String> keys = propertyDictionary.keys();
+        while (keys.hasMoreElements()) {
+            String key = keys.nextElement();
+            properties.put(key, propertyDictionary.get(key));
+        }
+        StringWriter stringWriter = new StringWriter();
+        properties.store(stringWriter, "properties of the pax-logging service");
+        return stringWriter.toString();
+    }
+
+    @POST
+    @Path("setConfiguration")
+    public Response setConfiguration(@Context UriInfo uriInfo,
+            @FormParam("configuration") String configuration)
+            throws IOException {
+        AccessController.checkPermission(new LoggingManagerAccessPermission());
+        Properties properties = new Properties();
+        properties.load(new StringReader(configuration));
+        setProperties(properties);
+        return RedirectUtil.createSeeOtherResponse("./", uriInfo);
+    }
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        try {
+            AccessController.checkPermission(new LoggingManagerAccessPermission());
+        } catch (AccessControlException e) {
+            return items;
+        }
+        items.add(new GlobalMenuItem("/admin/logging", "Logging", "Logging", 3,
+                "Administration"));
+        return items;
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManagerAccessPermission.java
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManagerAccessPermission.java b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManagerAccessPermission.java
new file mode 100644
index 0000000..ba0d302
--- /dev/null
+++ b/platform/logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManagerAccessPermission.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.platform.logging;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Grants access to the logging manager. Additionally the user needs permission to
+ * update the configuration via ConfigurationAdmin.
+ *
+ *
+ * @author tio
+ */
+@PermissionInfo(value="Logging Manager Access Permission", description="Grants access " +
+    "to the logging manager.")
+public class LoggingManagerAccessPermission extends Permission {
+
+    public LoggingManagerAccessPermission() {
+        super("LoggingMangerAccess");
+    }
+
+    public LoggingManagerAccessPermission(String name, String actions) {
+        super("LoggingMangerAccess");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return (permission instanceof LoggingManagerAccessPermission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 13;
+        hash = 101 * hash + "LoggingMangerAccess".hashCode();
+        return hash;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/core/src/main/resources/org/apache/clerezza/platform/logging/config-page-naked.ssp
----------------------------------------------------------------------
diff --git a/platform/logging/core/src/main/resources/org/apache/clerezza/platform/logging/config-page-naked.ssp b/platform/logging/core/src/main/resources/org/apache/clerezza/platform/logging/config-page-naked.ssp
new file mode 100644
index 0000000..d9ea5d0
--- /dev/null
+++ b/platform/logging/core/src/main/resources/org/apache/clerezza/platform/logging/config-page-naked.ssp
@@ -0,0 +1,32 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+def logging(s: Any) = new UriRef("http://clerezza.apache.org/2010/12/03/logging#" + s)
+
+<div id="tx-content">
+	<h3>Logging Configuration:</h3>
+	<form action="setConfiguration" method="POST">
+	<textarea name="configuration" style="width: 80%; height: 20em">{res/logging("loggingConfig")*}</textarea>
+	<br/>
+	<input type="submit" value="Save" />
+	</form>
+
+</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/initializer/LICENSE
----------------------------------------------------------------------
diff --git a/platform/logging/initializer/LICENSE b/platform/logging/initializer/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/logging/initializer/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/initializer/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/initializer/pom.xml b/platform/logging/initializer/pom.xml
new file mode 100644
index 0000000..99e8299
--- /dev/null
+++ b/platform/logging/initializer/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.logging.parent</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.logging.initializer</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Logging Initializer</name>
+    <description>
+        Configure logging for the Clerezza Platform Initializer
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>org.apache.clerezza.platform.logging.initializer.Activator</Bundle-Activator>
+                        <Private-Package>org.apache.clerezza.platform.logging.initializer</Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/initializer/src/main/scala/org/apache/clerezza/platform/logging/initializer/Activator.scala
----------------------------------------------------------------------
diff --git a/platform/logging/initializer/src/main/scala/org/apache/clerezza/platform/logging/initializer/Activator.scala b/platform/logging/initializer/src/main/scala/org/apache/clerezza/platform/logging/initializer/Activator.scala
new file mode 100644
index 0000000..c8220db
--- /dev/null
+++ b/platform/logging/initializer/src/main/scala/org/apache/clerezza/platform/logging/initializer/Activator.scala
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.logging.initializer;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.framework.BundleActivator
+
+class Activator extends BundleActivator {
+
+  private val configurationAdminClassName = classOf[ConfigurationAdmin].getName
+
+  def start(context: BundleContext) {
+    import scala.collection.JavaConversions._
+    val paxLoggingLocation: String = context.getBundles().
+      find(bundle => bundle.getSymbolicName().equals("org.ops4j.pax.logging.pax-logging-service")) match {
+        case Some(b) => b.getLocation();
+        case _ => throw new RuntimeException("org.ops4j.pax.logging.pax-logging-service not found")
+      }
+    val serviceReference = context.getServiceReference(configurationAdminClassName);
+    def configureIfUnconfigured(serviceReference: ServiceReference[_]) {
+      val configurationAdmin = context.getService(serviceReference).asInstanceOf[ConfigurationAdmin]
+      val config: Configuration = configurationAdmin.getConfiguration(
+        "org.ops4j.pax.logging", paxLoggingLocation);
+      if (config.getProperties() == null) {
+        val props: Dictionary[String, String] = new Hashtable[String, String]();
+        props.put("log4j.rootLogger", "INFO, R, stdout");
+        props.put("log4j.logger.org.apache.clerezza","DEBUG")
+        props.put("log4j.appender.stdout", "org.apache.log4j.ConsoleAppender");
+        props.put("log4j.appender.stdout.layout", "org.apache.log4j.PatternLayout");
+        props.put("log4j.appender.stdout.Threshold", "WARN");
+        // Pattern to output the caller's file name and line number.
+        props.put("log4j.appender.stdout.layout.ConversionPattern", "%d [%t] %5p [%t] (%F\\:%L) - %m%n");
+        props.put("log4j.appender.R", "org.apache.log4j.FileAppender");
+        props.put("log4j.appender.R.File", "clerezza.log");
+        props.put("log4j.appender.R.layout", "org.apache.log4j.PatternLayout");
+        props.put("log4j.appender.R.layout.ConversionPattern", "%d [%t] %p %t %c - %m%n");
+
+        config.update(props);
+      }
+    }
+    if (serviceReference != null) {
+      configureIfUnconfigured(serviceReference);
+    } else {
+      val filter: String = "(objectclass=" + configurationAdminClassName + ")";
+      context.addServiceListener(new ServiceListener{
+        def serviceChanged(e: ServiceEvent) {
+          if (e.getType == ServiceEvent.REGISTERED) {
+            configureIfUnconfigured(e.getServiceReference)
+          }
+        }
+      },filter)
+    }
+    
+  }
+
+  def stop(context: BundleContext) {
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/logging/ontologies/LICENSE b/platform/logging/ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/logging/ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/ontologies/pom.xml b/platform/logging/ontologies/pom.xml
new file mode 100644
index 0000000..cfb8f09
--- /dev/null
+++ b/platform/logging/ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.logging.parent</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.logging.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Logging Ontologies</name>
+    <description>
+        Skeleton Ontologies
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/ontologies/src/main/resources/org/apache/clerezza/platform/logging/ontologies/logging.ttl
----------------------------------------------------------------------
diff --git a/platform/logging/ontologies/src/main/resources/org/apache/clerezza/platform/logging/ontologies/logging.ttl b/platform/logging/ontologies/src/main/resources/org/apache/clerezza/platform/logging/ontologies/logging.ttl
new file mode 100644
index 0000000..a4dab43
--- /dev/null
+++ b/platform/logging/ontologies/src/main/resources/org/apache/clerezza/platform/logging/ontologies/logging.ttl
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+@prefix : <http://clerezza.apache.org/2010/12/03/logging#>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
+@prefix skos: <http://www.w3.org/2008/05/skos#>.
+@prefix owl: <http://www.w3.org/2002/07/owl#>.
+
+
+: a owl:Ontology.
+
+:LoggingConfigPage a rdfs:Class;
+	skos:definition "A page to configure logging."@en.
+
+:loggingConfig a rdf:Property;
+	skos:definition "Points to the logging configuration pertinent to the subject."@en.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/logging/pom.xml
----------------------------------------------------------------------
diff --git a/platform/logging/pom.xml b/platform/logging/pom.xml
new file mode 100644
index 0000000..11ac529
--- /dev/null
+++ b/platform/logging/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.logging.parent</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Logging</name>
+    <modules>
+        <module>ontologies</module>
+        <module>core</module>
+        <module>initializer</module>
+    </modules>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.clerezza.platform.logging</groupId>
+                <artifactId>ontologies</artifactId>
+                <version>0.1-SNAPSHOT</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>
\ No newline at end of file


[30/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/resources/documentation/style/style.css b/platform/dashboard/platform.dashboard.core/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/resources/images/clerezza.png b/platform/dashboard/platform.dashboard.core/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/dashboard/platform.dashboard.core/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/site.xml b/platform/dashboard/platform.dashboard.core/src/site/site.xml
new file mode 100644
index 0000000..8d5a4cb
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/site/site.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Usage" href="documentation/usage.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/xsite/content/sitemap.xml b/platform/dashboard/platform.dashboard.core/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..1df89fc
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,26 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>usage.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/xsite/content/usage.xhtml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/xsite/content/usage.xhtml b/platform/dashboard/platform.dashboard.core/src/site/xsite/content/usage.xhtml
new file mode 100644
index 0000000..f7fee85
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/site/xsite/content/usage.xhtml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Usage: How to use the dashboard service</title>
+	</head>
+	<body>
+		<h1>Usage: How to use the dashboard service</h1>
+		<p>Author: Tsuyoshi Ito - clerezza.org</p>
+		<p>Date: June 7, 2009</p>
+		<h2 id="access">Using the service</h2>
+		<p>
+			A JaxRs resource can reference the service <code>org.apache.clerezza.platform.dashboard.DashBoard</code> and 
+			can use the Method createGraphNodeWithDashBoardMenu to add the dashboard menu to a created graph 
+			of the JaxRs Resource. 
+			<br />
+            <br />
+			JaxRs resources can register themselves to  the dashboard by adding the service properties: 
+            <ul> 
+            <li><code>@scr.property name="org.apache.clerezza.platform.dashboard.visible" type="Boolean" value="true""org.apache.clerezza.platform.dashboard.visible" type="Boolean" value="true", </code></li>
+            <li><code>@scr.property type="String" value="Name of module/bundle" description="Specifies the label of the menu entry."</code>,</li>    
+            <li><code>@scr.property type="String" value="XY" description="Specifies the the group label"</code>, and </li>
+            <li><code>@scr.property type="Integer" value="0" description="Specifies the index of the entry in the menu"</code>.  </li>         
+            </ul>
+            <br />, 
+            <br />
+            
+		</p>
+        <h2 id="access">Add dashboard to seedsnipe template</h2>
+		<p>
+			 Insert the following javascript references <code>/jquery/jquery-1.3.2.min.js</code> and <code>/jquery/jquery.menu.js</code>.             
+             
+             After the tag &lt;body> of your template insert the follwing code:
+         	&lt;div id="header">
+			
+			${render(dhb:includeDashBoardMenu, "naked")}
+            
+			
+			&lt;h1>Titel of Bundle&lt;/h1>
+			
+			&lt;/div>
+			<br />
+            <br />
+		</p>
+        <p>
+            That's all. Enjoy.
+        </p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.core/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.core/src/site/xsite/templates/skin.html b/platform/dashboard/platform.dashboard.core/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..6ce9762
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.core/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.ontologies/LICENSE b/platform/dashboard/platform.dashboard.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.ontologies/pom.xml b/platform/dashboard/platform.dashboard.ontologies/pom.xml
new file mode 100644
index 0000000..037753d
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.dashboard</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.dashboard.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Dashboard Ontologies</name>
+    <description>
+        Dashboard Ontologies
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/dashboard.rdf
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/dashboard.rdf b/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/dashboard.rdf
new file mode 100644
index 0000000..a1077c6
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/dashboard.rdf
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/06/dashboard#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Dashboard
+	</dc:title>
+</owl:Ontology>
+
+
+<!-- Classes -->
+
+<rdfs:Class rdf:about="http://clerezza.org/2009/06/dashboard#DashBoard">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">Dashboard</rdfs:label>
+	<skos:definition xml:lang="en">A page containing information of the dashboard.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/06/dashboard#" />
+</rdfs:Class>
+
+</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/globalmenu.rdf
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/globalmenu.rdf b/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/globalmenu.rdf
new file mode 100644
index 0000000..846af57
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.ontologies/src/main/resources/org/apache/clerezza/platform/dashboard/ontologies/globalmenu.rdf
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/11/global-menu#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Global Menu
+	</dc:title>
+</owl:Ontology>
+
+
+<!-- Classes -->
+
+<rdfs:Class rdf:about="http://clerezza.org/2009/11/global-menu#MenuItem">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">MenuItem</rdfs:label>
+	<skos:definition xml:lang="en">An item within a menu</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/11/globalMenu#" />
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://clerezza.org/2009/11/global-menu#Menu">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">Menu</rdfs:label>
+	<skos:definition xml:lang="en">A labled menu with menu items and/or other
+		menus as children.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/11/globalMenu#" />
+</rdfs:Class>
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="http://clerezza.org/2009/11/global-menu#globalMenu">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
+	<rdfs:label xml:lang="en">globalMenu</rdfs:label>
+	<skos:definition xml:lang="en">Points to the rdf list containing menu items
+	and/or menus.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/11/globalMenu#" />
+	<rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
+</rdf:Property>
+
+<rdf:Property rdf:about="http://clerezza.org/2009/11/global-menu#children">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
+	<rdfs:label xml:lang="en">globalMenu</rdfs:label>
+	<skos:definition xml:lang="en">Points to an rdf list containing
+		the children of the subject.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/11/globalMenu#" />
+	<rdfs:domain rdf:resource="http://clerezza.org/2009/11/global-menu#Menu" />
+	<rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List" />
+</rdf:Property>
+<rdf:Property rdf:about="http://clerezza.org/2009/11/global-menu#path">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
+	<rdfs:label xml:lang="en">path</rdfs:label>
+	<skos:definition xml:lang="en">Points to the URI path of the subject.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/11/globalMenu#" />
+	<rdfs:domain rdf:resource="http://clerezza.org/2009/11/global-menu#MenuItem" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string" />
+</rdf:Property>
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.tests/LICENSE
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.tests/LICENSE b/platform/dashboard/platform.dashboard.tests/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.tests/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.tests/pom.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.tests/pom.xml b/platform/dashboard/platform.dashboard.tests/pom.xml
new file mode 100644
index 0000000..6e2a418
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.tests/pom.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>platform.dashboard</artifactId>
+        <groupId>org.apache.clerezza</groupId>
+        <version>0.4-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.dashboard.tests</artifactId>
+    <version>0.2-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Dashboard Tests</name>
+    <description>Tests for Dashboard in an OSGi container.</description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <scope>provided</scope>
+            <version>0.13-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <scope>provided</scope>
+            <version>0.7-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <scope>provided</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.ontologies</artifactId>
+            <scope>provided</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <scope>provided</scope>
+            <version>0.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>                              
+            <artifactId>platform.typerendering.scala</artifactId>
+            <scope>provided</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.scala.utils</artifactId>
+            <scope>provided</scope>
+            <version>0.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <scope>provided</scope>
+            <version>0.7-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <scope>provided</scope>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <scope>provided</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils</artifactId>
+            <scope>provided</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.json.simple</artifactId>
+            <scope>provided</scope>
+            <version>0.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <scope>provided</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.dashboard.ontologies</artifactId>
+            <scope>provided</scope>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <scope>provided</scope>
+            <version>0.12-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>templating</artifactId>
+            <scope>provided</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>templating.seedsnipe</artifactId>
+            <scope>provided</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.extensions</artifactId>
+            <scope>provided</scope>
+            <version>0.6-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.wymiwyg</groupId>
+            <artifactId>wymiwyg-commons-core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>utils</artifactId>
+            <scope>provided</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore-osgi</artifactId>
+            <scope>provided</scope>
+        </dependency>
+<!-- pax exam related stuff -->
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>servlet-api-2.5</artifactId>
+            <version>6.1.12</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>com.ibm.icu</artifactId>
+            <scope>provided</scope>
+            <version>0.6-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <!-- <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient-osgi</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency> -->
+        <dependency>
+            <groupId>org.apache.clerezza.scala</groupId>
+            <artifactId>scala-library-osgi</artifactId>
+            <scope>provided</scope>
+            <version>0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.scala</groupId>
+            <artifactId>scala-compiler-osgi</artifactId>
+            <scope>provided</scope>
+            <version>0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.scala</groupId>
+            <artifactId>script-engine</artifactId>
+            <scope>provided</scope>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <!-- no sources here, preventing failing invocation -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase/>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>maven-paxexam-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <!-- <repositories>
+        <repository>
+            <id>codehaus-repository</id>
+            <name>Codehaus Repository</name>
+            <url>http://repository.codehaus.org</url>
+        </repository>
+    </repositories> -->
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/FelixContextualMenuGeneratorTest.java
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/FelixContextualMenuGeneratorTest.java b/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/FelixContextualMenuGeneratorTest.java
new file mode 100644
index 0000000..808f567
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/FelixContextualMenuGeneratorTest.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.dashboard.blackbox.osgi;
+
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+
+import static org.ops4j.pax.exam.CoreOptions.*;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*;
+import static org.ops4j.pax.exam.junit.JUnitOptions.*;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import junit.framework.Assert;
+import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.dashboard.ontologies.GLOBALMENU;
+import org.apache.clerezza.platform.typerendering.UserContextProvider;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Literal;
+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.SimpleMGraph;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.rdf.utils.RdfList;
+import org.junit.Before;
+import org.junit.Test;
+import org.ops4j.pax.exam.Inject;
+import org.osgi.framework.BundleContext;
+
+import org.osgi.util.tracker.ServiceTracker;
+import org.wymiwyg.wrhapi.Handler;
+
+/**
+ *
+ * @author mir, reto
+ */
+@RunWith(JUnit4TestRunner.class)
+public class FelixContextualMenuGeneratorTest {
+    
+    @Configuration
+    public static Option[] configuration() {
+        return options(
+                mavenConfiguration(),
+                dsProfile(),
+                configProfile(),
+                webProfile(),
+                junitBundles(),
+                frameworks(
+                felix()),
+                systemProperty("org.osgi.service.http.port").value(
+                Integer.toString(testHttpPort)));
+    }
+
+
+    protected final static int testHttpPort = 8976;
+    @Inject
+    private BundleContext bundleContext;
+    
+    private boolean webServerExist;
+
+    @Before
+    public void registerServices() throws Exception {
+        System.out.println("@Before");
+        webServerExist = waitForWebserver();
+        if (webServerExist) {
+            waitFor(Handler.class, 10000);
+            bundleContext.registerService(GlobalMenuItemsProvider.class.getName(),
+                    new GlobalMenuItemsProviderA(), null);
+            Thread.sleep(10000);
+        }
+    }
+
+    @Test
+    public void checkMenu() throws Exception {
+        Assert.assertTrue(webServerExist);
+        UserContextProvider contextProvider = (UserContextProvider)
+                waitFor(UserContextProvider.class, 300000);
+        Assert.assertTrue(contextProvider != null);
+        GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
+        contextProvider.addUserContext(node);
+        Iterator<Resource> iter = node.getObjects(GLOBALMENU.globalMenu);
+        Assert.assertTrue(iter.hasNext());
+        TripleCollection graph = node.getGraph();
+        RdfList list = new RdfList((NonLiteral)iter.next(), graph);
+        Assert.assertEquals(3, list.size());
+        Assert.assertEquals(GlobalMenuItemsProviderA.groupALabel,
+                getLabel(graph, list.get(0)));
+        Assert.assertEquals(GlobalMenuItemsProviderA.groupCLabel,
+                getLabel(graph, list.get(1)));
+        Assert.assertEquals(GlobalMenuItemsProviderA.implicitGroupBLabel,
+                getLabel(graph, list.get(2)));        
+        Assert.assertEquals(GLOBALMENU.Menu, getRdfType(graph, list.get(0)));
+        Assert.assertEquals(GLOBALMENU.MenuItem, getRdfType(graph, list.get(1)));        
+        Assert.assertEquals(GlobalMenuItemsProviderA.groupAPath,
+                getPath(graph, list.get(0)));
+        RdfList children = getChildren(graph, list.get(0));
+        Assert.assertEquals(2, children.size());
+        Assert.assertEquals(GlobalMenuItemsProviderA.itemA2Label,
+                getLabel(graph, children.get(0)));
+        Assert.assertEquals(GlobalMenuItemsProviderA.itemA1Label,
+                getLabel(graph, children.get(1)));
+        Assert.assertEquals(GlobalMenuItemsProviderA.itemA2Path,
+                getPath(graph, children.get(0)));
+    }
+
+    private String getLabel(TripleCollection graph, Resource res) {
+        Iterator<Triple> labels = graph.filter((NonLiteral) res, RDFS.label, null);
+        if (labels.hasNext()) {
+            return ((Literal) labels.next().getObject()).getLexicalForm();
+        } else {
+            return null;
+        }
+    }
+
+    private String getPath(TripleCollection graph, Resource res) {
+        Resource path = graph.filter((NonLiteral) res,
+                GLOBALMENU.path, null).next().getObject();
+        return ((Literal) path).getLexicalForm();
+    }
+
+    private RdfList getChildren(TripleCollection graph, Resource res) {
+        NonLiteral children = (NonLiteral) graph.filter((NonLiteral) res,
+                GLOBALMENU.children, null).next().getObject();
+        return new RdfList(children, graph);
+    }
+
+    private UriRef getRdfType(TripleCollection graph, Resource res) {
+        return (UriRef) graph.filter((NonLiteral) res, RDF.type, null).next().
+                getObject();
+    }
+
+    private Object waitFor(Class<?> aClass, long timeout)
+            throws InterruptedException {
+        System.out.println("waiting for a " + aClass);
+        ServiceTracker tracker = new ServiceTracker(bundleContext,
+                aClass.getName(), null);
+        tracker.open();
+        Object service = tracker.waitForService(timeout);
+        return service;
+    }
+
+    private boolean waitForWebserver() throws InterruptedException {
+        int j = 0;
+        try {
+            URL serverURL = new URL("http://localhost:" + testHttpPort + "/");
+            boolean succeded = false;
+            while (!succeded) {
+                try {
+                    serverURL.openConnection().getInputStream();
+                } catch (FileNotFoundException ex) {
+                    break;
+                } catch (IOException ex) {
+                    System.out.println("waiting ("+ex+")");
+                    Thread.sleep(3000);
+                    if (j++ < 100) {
+                        continue;
+                    }
+                }
+                succeded = true;
+            }
+        } catch (MalformedURLException ex) {
+            Logger.getLogger(FelixContextualMenuGeneratorTest.class.getName())
+                    .log(Level.SEVERE, null, ex);
+        }
+        return j < 100;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/GlobalMenuItemsProviderA.java
----------------------------------------------------------------------
diff --git a/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/GlobalMenuItemsProviderA.java b/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/GlobalMenuItemsProviderA.java
new file mode 100644
index 0000000..1ac96ab
--- /dev/null
+++ b/platform/dashboard/platform.dashboard.tests/src/test/java/org/apache/clerezza/platform/dashboard/blackbox/osgi/GlobalMenuItemsProviderA.java
@@ -0,0 +1,52 @@
+    /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.dashboard.blackbox.osgi;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
+import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+
+/**
+ *
+ * @author mir
+ */
+public class GlobalMenuItemsProviderA implements GlobalMenuItemsProvider{
+    public static String groupALabel = "MyGroupA";
+    public static String groupAPath = "test/pathA/";
+    public static String groupAId = "idGroupA";
+    public static String implicitGroupBLabel = "idGroupB";
+    public static String groupCLabel = "MyGroupC";        
+    public static String itemA1Label = "MyLabelA1";
+    public static String itemA2Label = "MyLabelA2";
+    public static String itemA2Path = "test/pathA2/";
+    
+
+    @Override
+    public Set<GlobalMenuItem> getMenuItems() {
+        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
+        items.add(new GlobalMenuItem(groupAPath, groupAId, groupALabel, 5, null));
+        items.add(new GlobalMenuItem("test/pathC/", "idGroupC", groupCLabel, 5, null));
+        items.add(new GlobalMenuItem("test/pathA1/", "idLabelA1", itemA1Label, 2, groupAId));
+        items.add(new GlobalMenuItem(itemA2Path, "idLabelA2", itemA2Label, 7, groupAId));
+        items.add(new GlobalMenuItem("test/pathB1/", "idLabelB1", "MyLabelB1", 1, "idGroupB"));
+        items.add(new GlobalMenuItem("test/pathB2/", "idLabelB2", "MyLabelB2", 2, "idGroupB"));
+        return items;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/dashboard/pom.xml
----------------------------------------------------------------------
diff --git a/platform/dashboard/pom.xml b/platform/dashboard/pom.xml
new file mode 100644
index 0000000..c55db94
--- /dev/null
+++ b/platform/dashboard/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.dashboard</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Dashboard</name>
+    <description>Provides a global contextual menu.</description>
+    
+    <modules>
+        <module>platform.dashboard.ontologies</module>
+        <module>platform.dashboard.core</module>
+        <!-- disabled because of problems with pax-exam: <module>platform.dashboard.tests</module> -->
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/documentation.viewer/LICENSE
----------------------------------------------------------------------
diff --git a/platform/documentation.viewer/LICENSE b/platform/documentation.viewer/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/documentation.viewer/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


[23/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/rdfstore.js
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/rdfstore.js b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/rdfstore.js
new file mode 100644
index 0000000..41ecf4d
--- /dev/null
+++ b/platform/editor/src/main/resources/META-INF/resources/tools/editor/scripts/rdfstore.js
@@ -0,0 +1,31836 @@
+(function() {
+
+
+  if(typeof(console)=='undefined') {
+     console = {};
+     console.log = function(e){};
+  }
+  
+  window.process = {};
+  process.nextTick = function(f) {
+    setTimeout(f,0);
+  };
+var Utils = {};
+
+
+
+Utils['extends'] = function(supertype, descendant) {
+    descendant.prototype = new supertype();
+};
+
+
+Utils.stackCounterLimit = 1000;
+Utils.stackCounter = 0;
+
+Utils.recur = function(c){
+    if(Utils.stackCounter === Utils.stackCounterLimit) {
+        Utils.stackCounter = 0;
+        setTimeout(c, 0);
+    } else {
+        Utils.stackCounter++;
+        c();
+    } 
+};
+
+Utils.clone = function(o) {
+    return JSON.parse(JSON.stringify(o));
+};
+
+Utils.shuffle = function(o){ //v1.0
+    for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x){};
+    return o;
+};
+
+Utils.include = function(a,v) {
+    var cmp = arguments[2];
+
+    for(var i=(a.length-1); i>=0; i--) {
+        var res = false;
+        if(cmp == null) {
+            res = (a[i] === v);
+        } else {
+            res = (cmp(a[i],v) === 0);
+        }
+
+        if(res === true) {
+            return true;
+        }
+    }
+
+    return false;
+};
+
+Utils.remove = function(a,v) {
+    var acum = [];
+    for(var i=0; i<a.length; i++) {
+        if(a[i] !== v) {
+            acum.push(a[i]);
+        }
+    }
+
+    return acum;
+};
+
+Utils.repeat = function(c,max,floop,fend,env) {
+    if(arguments.length===4) { env = {}; }
+    if(c<max) {
+        env._i = c;
+        floop(function(floop,env){
+            // avoid stack overflow
+            // deadly hack
+            Utils.recur(function(){ Utils.repeat(c+1, max, floop, fend, env); });
+        },env);
+    } else {
+        fend(env);
+    }
+};
+
+
+Utils.meanwhile = function(c,floop,fend,env) {
+    if(arguments.length===3) { env = {}; }
+
+    if(env['_stack_counter'] == null) {
+        env['_stack_counter'] = 0;
+    }
+
+    if(c===true) {
+        floop(function(c,floop,env){
+            if(env['_stack_counter'] % 40 == 39) {
+                env['_stack_counter'] = env['_stack_counter'] + 1;
+                setTimeout(function(){ Utils.neanwhile(c, floop, fend, env); }, 0);
+            } else {
+                env['_stack_counter'] = env['_stack_counter'] + 1;
+                Utils.meanwhile(c, floop, fend, env);
+            }
+        },env);
+    } else {
+        fend(env);
+    }
+};
+
+Utils.seq = function() {
+    var fs = arguments;
+    return function(callback) {
+        Utils.repeat(0, fs.length, function(k,env){
+            var floop = arguments.callee;
+            fs[env._i](function(){
+                k(floop, env);
+            });
+        }, function(){
+            callback();
+        });
+    };
+};
+
+
+Utils.partition = function(c, n) {
+    var rem = c.length % n;
+    var currentGroup = [];
+    for(var i=0; i<rem; i++) {
+        currentGroup.push(null);
+    }
+    
+    var groups = [];
+    for(var i=0; i<c.length; i++) {
+        currentGroup.push(c[i]);
+        if(currentGroup.length % n == 0) {
+            groups.push(currentGroup);
+            currentGroup = [];
+        }
+    }
+    return groups;
+};
+
+Utils.keys = function(obj) {
+    var variables = [];
+    for(var variable in obj) {
+        variables.push(variable);
+    }
+
+    return variables;
+};
+
+Utils.iso8601 = function(date) {
+    function pad(n){
+        return n<10 ? '0'+n : n;
+    }    
+    return date.getUTCFullYear()+'-'
+        + pad(date.getUTCMonth()+1)+'-'
+        + pad(date.getUTCDate())+'T'
+        + pad(date.getUTCHours())+':'
+        + pad(date.getUTCMinutes())+':'
+        + pad(date.getUTCSeconds())+'Z';
+};
+
+
+Utils.parseStrictISO8601 = function (str) {
+    var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
+        "(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?" +
+        "(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?";
+    var d = str.match(new RegExp(regexp));
+
+    var offset = 0;
+    var date = new Date(d[1], 0, 1);
+
+    if (d[3]) {
+        date.setMonth(d[3] - 1);
+    } else {
+        throw "missing ISO8061 component"
+    }
+    if (d[5]) {
+        date.setDate(d[5]);
+    } else {
+        throw "missing ISO8061 component"
+    }
+    if (d[7]) {
+        date.setHours(d[7]);
+    } else {
+        throw "missing ISO8061 component"
+    }
+    if (d[8]) {
+        date.setMinutes(d[8]);
+    } else {
+        throw "missing ISO8061 component"
+    }
+    if (d[10]) {
+        date.setSeconds(d[10]);
+    } else {
+        throw "missing ISO8061 component"
+    }
+    if (d[12]) {
+        date.setMilliseconds(Number("0." + d[12]) * 1000);
+    }
+    if (d[14]) {
+        offset = (Number(d[16]) * 60) + Number(d[17]);
+        offset *= ((d[15] == '-') ? 1 : -1);
+    }
+
+    offset -= date.getTimezoneOffset();
+    var time = (Number(date) + (offset * 60 * 1000));
+    var toReturn = new Date();
+    toReturn.setTime(Number(time));
+    return toReturn;
+};
+
+
+Utils.parseISO8601 = function (str) {
+    var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
+        "(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?" +
+        "(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?";
+    var d = str.match(new RegExp(regexp));
+
+    var offset = 0;
+    var date = new Date(d[1], 0, 1);
+
+    if (d[3]) { date.setMonth(d[3] - 1); }
+    if (d[5]) { date.setDate(d[5]);  }
+    if (d[7]) { date.setHours(d[7]);  }
+    if (d[8]) { date.setMinutes(d[8]);  }
+    if (d[10]) { date.setSeconds(d[10]);  }
+    if (d[12]) { date.setMilliseconds(Number("0." + d[12]) * 1000); }
+    if (d[14]) {
+        offset = (Number(d[16]) * 60) + Number(d[17]);
+        offset *= ((d[15] == '-') ? 1 : -1);
+    }
+
+    offset -= date.getTimezoneOffset();
+    var time = (Number(date) + (offset * 60 * 1000));
+    var toReturn = new Date();
+    toReturn.setTime(Number(time));
+    return toReturn;
+};
+
+Utils.parseISO8601Components = function (str) {
+    var regexp = "([0-9]{4})(-([0-9]{2}))(-([0-9]{2}))(T([0-9]{2}):([0-9]{2})(:([0-9]{2}))?(\.([0-9]+))?)?(Z|([-+])([0-9]{2})(:([0-9]{2}))?)?";
+    var d = str.match(new RegExp(regexp));
+    var year, month, date, hours, minutes, seconds, millisecs, timezone;
+    year = Number(d[1]);
+    month = d[3] - 1;
+    date  = Number(d[5]);
+    hours = Number(d[7]);
+    minutes = Number(d[8]);
+    seconds = Number(d[10]);
+
+    if(d[12]) { millisecs = Number("0." + d[12]) * 1000; }
+
+    if(d[13]==="Z") {
+        timezone = 0;
+    } else if (d[14]) {
+        timezone = 0;
+        if(d[17]) {
+            timezone = Number(d[17]);
+        }
+        timezone = timezone+(Number(d[15]) * 60);
+        timezone *= ((d[14] == '-') ? -1 : +1);
+    } else if(d[14]==null && d[11]) {
+        timezone = Number(d[12])*60;
+    }    
+
+    return {'year': isNaN(year) ? null : year,
+            'month': isNaN(month) ? null : month,
+            'date': isNaN(date) ? null : date,
+            'hours': isNaN(hours) ? null : hours,
+            'minutes': isNaN(minutes) ? null : minutes,
+            'seconds': isNaN(seconds) ? null : seconds,
+            'millisecs':isNaN(millisecs) ? null : millisecs,
+            'timezone': isNaN(timezone) ? null : timezone};
+};
+
+Utils.compareDateComponents = function(stra,strb) {
+    var a = Utils.parseISO8601Components(stra);
+    var b = Utils.parseISO8601Components(strb);
+
+    if((a.timezone == null && b.timezone == null) ||
+       (a.timezone != null && b.timezone != null)) {        
+        var da = Utils.parseISO8601(stra);
+        var db = Utils.parseISO8601(strb);
+        
+        if(da.getTime() == db.getTime()) {
+            return 0;
+        } else if(da.getTime() < db.getTime()){
+            return -1;
+        } else {
+            return 1;
+        }
+    } else if (a.timezone != null && b.timezone == null){
+        da = Utils.parseISO8601(stra);
+        db = Utils.parseISO8601(strb);
+        var ta = da.getTime();
+        var tb = db.getTime();
+
+        var offset = 14*60*60;
+
+        if(ta < tb && ta < (tb + offset)) {
+            return -1;
+        } else if(ta > tb && ta > (tb - offset)) {
+            return 1;
+        } else {
+        return null;
+        }
+    } else {
+        da = Utils.parseISO8601(stra);
+        db = Utils.parseISO8601(strb);
+        ta = da.getTime();
+        tb = db.getTime();
+
+        var offset = 14*60*60;
+        if(ta < tb && (ta + offset)  < tb) {
+            return -1;
+        } else if(ta > tb && (ta + offset) > tb) {
+            return 1;
+        } else {
+        return null;
+        }
+    }
+};
+
+// RDF utils
+Utils.lexicalFormLiteral = function(term, env) {
+    var value = term.value;
+    var lang = term.lang;
+    var type = term.type;
+
+    var indexedValue = null;
+    if(value != null && type != null && typeof(type) != 'string') {
+        var typeValue = type.value;
+
+        if(typeValue == null) {
+            var typePrefix = type.prefix;
+            var typeSuffix = type.suffix;
+
+            var resolvedPrefix = env.namespaces[typePrefix];
+            term.type = resolvedPrefix+typeSuffix;
+	    typeValue = resolvedPrefix+typeSuffix;
+        }
+	// normalization
+	if(typeValue.indexOf('hexBinary') != -1) {
+            indexedValue = '"' + term.value.toLowerCase() + '"^^<' + typeValue + '>';
+	} else {
+            indexedValue = '"' + term.value + '"^^<' + typeValue + '>';
+	}
+    } else {
+        if(lang == null && type == null) {
+            indexedValue = '"' + value + '"';
+        } else if(type == null) {
+            indexedValue = '"' + value + '"' + "@" + lang;        
+        } else {
+	    // normalization
+	    if(type.indexOf('hexBinary') != -1) {
+		indexedValue = '"' + term.value.toLowerCase() + '"^^<'+type+'>';
+	    } else {
+		indexedValue = '"' + term.value + '"^^<'+type+'>';
+	    }
+        }
+    }
+    return indexedValue;
+};
+
+Utils.lexicalFormBaseUri = function(term, env) {
+    var uri = null;
+    env = env || {};
+    //console.log("*** normalizing URI token:");
+    //console.log(term);
+    if(term.value == null) {
+        //console.log(" - URI has prefix and suffix");
+        //console.log(" - prefix:"+term.prefix);
+        //console.log(" - suffixx:"+term.suffix);
+        var prefix = term.prefix;
+        var suffix = term.suffix;
+        var resolvedPrefix = env.namespaces[prefix];
+        if(resolvedPrefix != null) {            
+            uri = resolvedPrefix+suffix;
+        } else {
+            uri = prefix+":"+suffix;
+        }
+    } else {
+        //console.log(" - URI is not prefixed");
+        uri = term.value;
+    }
+
+    if(uri===null) {
+        return null;
+    } else {
+        //console.log(" - resolved URI is "+uri);
+        if(uri.indexOf(":") == -1) {
+            //console.log(" - URI is partial");
+            uri = (env.base||"") + uri; // applyBaseUri
+        } else {
+            //console.log(" - URI is complete");
+        }
+        //console.log(" -> FINAL URI: "+uri);
+    }
+
+    return uri;
+};
+
+
+Utils.lexicalFormTerm = function(term, ns) {
+    if(term.token === 'uri') {
+        return {'uri': Utils.lexicalFormBaseUri(term, ns)};
+    } else if(term.token === 'literal') {
+        return {'literal': Utils.lexicalFormLiteral(term, ns)};
+    } else if(term.token === 'blank') {
+        var label = '_:'+term.value;
+        return {'blank': label};
+    } else {
+	throw "Error, cannot get lexical form of unknown token: "+term.token;
+    }
+};
+
+Utils.normalizeUnicodeLiterals = function (string) {
+    var escapedUnicode = string.match(/\\u[0-9abcdefABCDEF]{4,4}/g) || [];
+    var dups = {};
+    for (var i = 0; i < escapedUnicode.length; i++) {
+        if (dups[escapedUnicode[i]] == null) {
+            dups[escapedUnicode[i]] = true;
+            string = string.replace(new RegExp("\\" + escapedUnicode[i], "g"), eval("'" + escapedUnicode[i] + "'"));
+        }
+    }
+
+    return string;
+};
+
+Utils.hashTerm = function(term) {
+    try {
+      if(term == null) {
+          return "";
+      } if(term.token==='uri') {
+          return "u"+term.value;
+      } else if(term.token === 'blank') {
+          return "b"+term.value;
+      } else if(term.token === 'literal') {
+          var l = "l"+term.value;
+          l = l + (term.type || "");
+          l = l + (term.lang || "");        
+   
+          return l;
+      }
+    } catch(e) {
+        if(typeof(term) === 'object') {
+            var key = "";
+            for(p in term) {
+                key = key + p + term[p];
+            }
+
+            return key;
+        }
+        return term;
+    }
+};
+
+// end of ./src/js-trees/src/utils.js 
+// exports
+var InMemoryBTree = {};
+
+var left = -1;
+var right = 1;
+
+
+/**
+ * @doc
+ * Implementation based on <http://www.gossamer-threads.com/lists/linux/kernel/667935>
+ *
+ */
+
+/**
+ * Tree
+ *
+ * Implements the interface of BinarySearchTree.Tree
+ *
+ * An implementation of an in memory B-Tree.
+ */
+
+InMemoryBTree.Tree = function(order) {
+    if(arguments.length != 0) {
+        this.order = order;
+        this.root = this._allocateNode();
+        this.root.isLeaf = true;
+        this.root.level = 0;
+        this._diskWrite(this.root);
+        this._updateRootNode(this.root);
+
+        this.comparator = function(a,b) {
+            if(a < b) {
+                return -1;
+            } else if(a > b){
+                return 1;
+            } else {
+                return 0;
+            }
+        };
+        this.merger = null;
+    }
+};
+
+/**
+ * Creates the new node.
+ *
+ * This class can be overwritten by different versions of
+ * the tree t select the right kind of node to be used
+ *
+ * @returns the new alloacted node
+ */
+InMemoryBTree.Tree.prototype._allocateNode = function () {
+    return new InMemoryBTree.Node();
+};
+
+/**
+ * _diskWrite
+ *
+ * Persists the node to secondary memory.
+ */
+InMemoryBTree.Tree.prototype._diskWrite= function(node) {
+    // dummy implementation;
+    // no-op
+};
+
+
+/**
+ * _diskRead
+ *
+ * Retrieves a node from secondary memory using the provided
+ * pointer
+ */
+InMemoryBTree.Tree.prototype._diskRead = function(pointer) {
+    // dummy implementation;
+    // no-op
+    return pointer;
+};
+
+
+InMemoryBTree.Tree.prototype._diskDelete= function(node) {
+    // dummy implmentation
+    // no-op
+};
+
+/**
+ * _updateRootNode
+ *
+ * Updates the pointer to the root node stored in disk.
+ */
+InMemoryBTree.Tree.prototype._updateRootNode = function(node) {
+    // dummy implementation;
+    // no-op
+    return node;
+};
+
+InMemoryBTree.Tree.prototype.clear = function() {
+        this.root = this._allocateNode();
+        this.root.isLeaf = true;
+        this.root.level = 0;
+        this._updateRootNode(this.root);
+};
+
+/**
+ * search
+ *
+ * Retrieves the node matching the given value.
+ * If no node is found, null is returned.
+ */
+InMemoryBTree.Tree.prototype.search = function(key, checkExists) {
+    var searching = true;
+    var node = this.root;
+
+    while(searching) {
+        var idx = 0;
+        while(idx < node.numberActives && this.comparator(key, node.keys[idx].key) === 1) {
+            idx++;
+        }
+
+        if(idx < node.numberActives && this.comparator(node.keys[idx].key,key) === 0) {
+            if(checkExists != null && checkExists == true) {
+                return true;
+            } else {
+                return node.keys[idx].data;
+            }
+        } else {
+            if(node.isLeaf === true) {
+                searching = false;
+            } else {
+                node = this._diskRead(node.children[idx]);
+            }
+        }
+    }
+
+    return null;
+};
+
+
+/**
+ * walk
+ * Applies a function to all the nodes key and data in the the
+ * tree in key order.
+ */
+InMemoryBTree.Tree.prototype.walk = function(f) {
+    this._walk(f,this.root);
+};
+
+InMemoryBTree.Tree.prototype._walk = function(f,node) {
+    if(node.isLeaf) {
+        for(var i=0; i<node.numberActives; i++) {
+            f(node.keys[i]);
+        }
+    } else {
+        for(var i=0; i<node.numberActives; i++) {
+            this._walk(f,this._diskRead(node.children[i]));
+            f(node.keys[i]);
+        }
+        this._walk(f,this._diskRead(node.children[node.numberActives]));
+    }
+};
+
+/**
+ * walkNodes
+ * Applies a function to all the nodes in the the
+ * tree in key order.
+ */
+InMemoryBTree.Tree.prototype.walkNodes = function(f) {
+    this._walkNodes(f,this.root);
+};
+
+InMemoryBTree.Tree.prototype._walkNodes = function(f,node) {
+    if(node.isLeaf) {
+        f(node);
+    } else {
+        f(node);
+        for(var i=0; i<node.numberActives; i++) {
+            this._walkNodes(f,this._diskRead(node.children[i]));
+        }
+        this._walkNodes(f,this._diskRead(node.children[node.numberActives]));
+    }
+};
+
+/**
+ * _splitChild
+ *
+ * Split the child node and adjusts the parent.
+ */
+InMemoryBTree.Tree.prototype._splitChild = function(parent, index, child) {
+    var newChild = this._allocateNode();
+    newChild.isLeaf = child.isLeaf;
+    newChild.level = child.level;
+    newChild.numberActives = this.order - 1;
+
+    // Copy the higher order keys to the new child
+    var newParentChild = child.keys[this.order-1];
+    child.keys[this.order-1] = null;
+
+    for(var i=0; i< this.order-1; i++) {
+	newChild.keys[i]=child.keys[i+this.order];
+	child.keys[i+this.order] = null;
+	if(!child.isLeaf) {
+	    newChild.children[i] = child.children[i+this.order];
+            child.children[i+this.order] = null;
+	}
+    }
+
+    // Copy the last child pointer
+    if(!child.isLeaf) {
+	newChild.children[i] = child.children[i+this.order];
+        child.children[i+this.order] = null;
+    }
+
+    child.numberActives = this.order - 1;
+
+
+    for(i = parent.numberActives + 1; i>index+1; i--) {
+	parent.children[i] = parent.children[i-1];
+    }
+
+    parent.children[index+1] = newChild;
+
+    for(i = parent.numberActives; i>index; i--) {
+	parent.keys[i] = parent.keys[i-1];
+    }
+
+    parent.keys[index] = newParentChild;
+    parent.numberActives++;
+
+    this._diskWrite(newChild);
+    this._diskWrite(parent);
+    this._diskWrite(child);
+};
+
+/**
+ * insert
+ *
+ * Creates a new node with value key and data and inserts it
+ * into the tree.
+ */
+InMemoryBTree.Tree.prototype.insert = function(key,data) {
+    if(this.root.numberActives === (2 * this.order - 1)) {
+        var newRoot = this._allocateNode();
+        newRoot.isLeaf = false;
+        newRoot.level = this.root.level + 1;
+        newRoot.numberActives = 0;
+        newRoot.children[0] = this.root;
+
+        this._splitChild(newRoot, 0, this.root);
+        this.root = newRoot;
+        this._updateRootNode(this.root);
+        this._insertNonFull(newRoot, key, data);
+    } else {
+        this._insertNonFull(this.root, key, data);
+    }
+};
+
+/**
+ * _insertNonFull
+ *
+ * Recursive function that tries to insert the new key in
+ * in the prvided node, or splits it and go deeper
+ * in the BTree hierarchy.
+ */
+InMemoryBTree.Tree.prototype._insertNonFull = function(node,key,data) {
+    var idx = node.numberActives - 1;
+
+    while(!node.isLeaf) {
+        while(idx>=0 && this.comparator(key,node.keys[idx].key) === -1) {
+            idx--;
+        }
+        idx++;
+        var child = this._diskRead(node.children[idx]);
+
+        if(child.numberActives === 2*this.order -1) {
+            this._splitChild(node,idx,child);
+            if(this.comparator(key, node.keys[idx].key)===1) {
+                idx++;
+            }
+        }
+        node = this._diskRead(node.children[idx]);
+        idx = node.numberActives -1;
+    }
+
+    while(idx>=0 && this.comparator(key,node.keys[idx].key) === -1) {
+        node.keys[idx+1] = node.keys[idx];
+        idx--;
+    }
+
+    node.keys[idx + 1] = {key:key, data:data};
+    node.numberActives++;
+    this._diskWrite(node);
+};
+
+/**
+ * delete
+ *
+ * Deletes the key from the BTree.
+ * If the key is not found, an exception is thrown.
+ *
+ * @param key the key to be deleted
+ * @returns true if the key is deleted false otherwise
+ */
+InMemoryBTree.Tree.prototype['delete'] = function(key) {
+    var node = this.root;
+    var parent = null;
+    var searching = true;
+    var idx = null;
+    var lsibling = null;
+    var rsibling = null;
+    var shouldContinue = true;
+
+    while(shouldContinue === true) {
+        shouldContinue = false;
+
+        while(searching === true) {
+            i = 0;
+
+            if(node.numberActives === 0) {
+                return false;
+            }
+
+            while(i<node.numberActives && this.comparator(key, node.keys[i].key) === 1) {
+                i++;
+            }
+
+            idx = i;
+
+            if(i<node.numberActives && this.comparator(key, node.keys[i].key) === 0) {
+                searching = false;
+            }
+
+            if(searching === true) {
+
+                if(node.isLeaf === true) {
+                    return false;
+                }
+
+                parent = node;
+                node = this._diskRead(node.children[i]);
+
+                if(node===null) {
+                    return false;
+                }
+
+                if(idx === parent.numberActives) {
+                    lsibling = this._diskRead(parent.children[idx-1]);
+                    rsibling = null;
+                } else if(idx === 0) {
+                    lsibling = null;
+                    rsibling = this._diskRead(parent.children[1]);
+                } else {
+                    lsibling = this._diskRead(parent.children[idx-1]);
+                    rsibling = this._diskRead(parent.children[idx+1]);
+                }
+
+
+                if(node.numberActives === (this.order-1) && parent != null) {
+                    if(rsibling != null && rsibling.numberActives > (this.order-1)) {
+                        // The current node has (t - 1) keys but the right sibling has > (t - 1) keys
+                        this._moveKey(parent,i,left);
+                    } else if(lsibling != null && lsibling.numberActives > (this.order-1)) {
+                        // The current node has (t - 1) keys but the left sibling has > (t - 1) keys
+                        this._moveKey(parent,i,right);
+                    } else if(lsibling != null && lsibling.numberActives === (this.order-1)) {
+                        // The current node has (t - 1) keys but the left sibling has (t - 1) keys
+                        node = this._mergeSiblings(parent,i,left);
+                    } else if(rsibling != null && rsibling.numberActives === (this.order-1)){
+                        // The current node has (t - 1) keys but the left sibling has (t - 1) keys
+                        node = this._mergeSiblings(parent,i,right);
+                    }
+                }
+            }
+        }
+
+
+        //Case 1 : The node containing the key is found and is the leaf node.
+        //Also the leaf node has keys greater than the minimum required.
+        //Simply remove the key
+        if(node.isLeaf && (node.numberActives > (this.order-1))) {
+            this._deleteKeyFromNode(node,idx);
+            return true;
+        }
+
+
+        //If the leaf node is the root permit deletion even if the number of keys is
+        //less than (t - 1)
+        if(node.isLeaf && (node === this.root)) {
+            this._deleteKeyFromNode(node,idx);
+            return true;
+        }
+
+
+        //Case 2: The node containing the key is found and is an internal node
+        if(node.isLeaf === false) {
+            var tmpNode = null;
+            var tmpNode2 = null;
+            if((tmpNode=this._diskRead(node.children[idx])).numberActives > (this.order-1)) {
+                var subNodeIdx = this._getMaxKeyPos(tmpNode);
+                key = subNodeIdx.node.keys[subNodeIdx.index];
+
+                node.keys[idx] = key;
+
+                //this._delete(node.children[idx],key.key);
+                this._diskWrite(node);
+                node = tmpNode;
+                key = key.key;
+                shouldContinue = true;
+                searching = true;
+            } else if ((tmpNode = this._diskRead(node.children[idx+1])).numberActives >(this.order-1)) {
+                var subNodeIdx = this._getMinKeyPos(tmpNode);
+                key = subNodeIdx.node.keys[subNodeIdx.index];
+
+                node.keys[idx] = key;
+
+                //this._delete(node.children[idx+1],key.key);
+                this._diskWrite(node);
+                node = tmpNode;
+                key = key.key;
+                shouldContinue = true;
+                searching = true;
+            } else if((tmpNode = this._diskRead(node.children[idx])).numberActives === (this.order-1) &&
+                      (tmpNode2 = this._diskRead(node.children[idx+1])).numberActives === (this.order-1)) {
+
+                var combNode = this._mergeNodes(tmpNode, node.keys[idx], tmpNode2);
+                node.children[idx] = combNode;
+
+                idx++;
+                for(var i=idx; i<node.numberActives; i++) {
+          	    node.children[i] = node.children[i+1];
+          	    node.keys[i-1] = node.keys[i];
+                }
+                // freeing unused references
+                node.children[i] = null;
+                node.keys[i-1] = null;
+
+                node.numberActives--;
+                if (node.numberActives === 0 && this.root === node) {
+                    this.root = combNode;
+                }
+
+                this._diskWrite(node);
+
+                node = combNode;
+                shouldContinue = true;
+                searching = true;
+            }
+        }
+
+
+        // Case 3:
+	// In this case start from the top of the tree and continue
+	// moving to the leaf node making sure that each node that
+	// we encounter on the way has atleast 't' (order of the tree)
+	// keys
+	if(node.isLeaf && (node.numberActives > this.order - 1) && searching===false) {
+            this._deleteKeyFromNode(node,idx);
+	}
+
+        if(shouldContinue === false) {
+            return true;
+        }
+    }
+};
+
+/**
+ * _moveKey
+ *
+ * Move key situated at position i of the parent node
+ * to the left or right child at positions i-1 and i+1
+ * according to the provided position
+ *
+ * @param parent the node whose is going to be moved to a child
+ * @param i Index of the key in the parent
+ * @param position left, or right
+ */
+InMemoryBTree.Tree.prototype._moveKey = function (parent, i, position) {
+
+    if (position === right) {
+        i--;
+    }
+
+    //var lchild = parent.children[i-1];
+    var lchild = this._diskRead(parent.children[i]);
+    var rchild = this._diskRead(parent.children[i + 1]);
+
+
+    if (position == left) {
+        lchild.keys[lchild.numberActives] = parent.keys[i];
+        lchild.children[lchild.numberActives + 1] = rchild.children[0];
+        rchild.children[0] = null;
+        lchild.numberActives++;
+
+        parent.keys[i] = rchild.keys[0];
+
+        for (var _i = 1; _i < rchild.numberActives; _i++) {
+            rchild.keys[_i - 1] = rchild.keys[_i];
+            rchild.children[_i - 1] = rchild.children[_i];
+        }
+        rchild.children[rchild.numberActives - 1] = rchild.children[rchild.numberActives];
+        rchild.numberActives--;
+    } else {
+        rchild.children[rchild.numberActives + 1] = rchild.children[rchild.numberActives];
+        for (var _i = rchild.numberActives; _i > 0; _i--) {
+            rchild.children[_i] = rchild.children[_i - 1];
+            rchild.keys[_i] = rchild.keys[_i - 1];
+        }
+        rchild.keys[0] = null;
+        rchild.children[0] = null;
+
+        rchild.children[0] = lchild.children[lchild.numberActives];
+        rchild.keys[0] = parent.keys[i];
+        rchild.numberActives++;
+
+        lchild.children[lchild.numberActives] = null;
+        parent.keys[i] = lchild.keys[lchild.numberActives - 1];
+        lchild.keys[lchild.numberActives - 1] = null;
+        lchild.numberActives--;
+    }
+
+    this._diskWrite(lchild);
+    this._diskWrite(rchild);
+    this._diskWrite(parent);
+};
+
+/**
+ * _mergeSiblings
+ *
+ * Merges two nodes at the left and right of the provided
+ * index in the parent node.
+ *
+ * @param parent the node whose children will be merged
+ * @param i Index of the key in the parent pointing to the nodes to merge
+ */
+InMemoryBTree.Tree.prototype._mergeSiblings = function (parent, index, pos) {
+    var i, j;
+    var n1, n2;
+
+    if (index === (parent.numberActives)) {
+        index--;
+        n1 = this._diskRead(parent.children[parent.numberActives - 1]);
+        n2 = this._diskRead(parent.children[parent.numberActives]);
+    } else {
+        n1 = this._diskRead(parent.children[index]);
+        n2 = this._diskRead(parent.children[index + 1]);
+    }
+
+    //Merge the current node with the left node
+    var newNode = this._allocateNode();
+    newNode.isLeaf = n1.isLeaf;
+    newNode.level = n1.level;
+
+    for (j = 0; j < this.order - 1; j++) {
+        newNode.keys[j] = n1.keys[j];
+        newNode.children[j] = n1.children[j];
+    }
+
+    newNode.keys[this.order - 1] = parent.keys[index];
+    newNode.children[this.order - 1] = n1.children[this.order - 1];
+
+    for (j = 0; j < this.order - 1; j++) {
+        newNode.keys[j + this.order] = n2.keys[j];
+        newNode.children[j + this.order] = n2.children[j];
+    }
+    newNode.children[2 * this.order - 1] = n2.children[this.order - 1];
+
+    parent.children[index] = newNode;
+
+    for (j = index; j < parent.numberActives; j++) {
+        parent.keys[j] = parent.keys[j + 1];
+        parent.children[j + 1] = parent.children[j + 2];
+    }
+
+    newNode.numberActives = n1.numberActives + n2.numberActives + 1;
+    parent.numberActives--;
+
+    for (i = parent.numberActives; i < 2 * this.order - 1; i++) {
+        parent.keys[i] = null;
+    }
+
+    if (parent.numberActives === 0 && this.root === parent) {
+        this.root = newNode;
+        if (newNode.level) {
+            newNode.isLeaf = false;
+        } else {
+            newNode.isLeaf = true;
+        }
+    }
+
+    this._diskWrite(newNode);
+    if (this.root === newNode) {
+        this._updateRootNode(this.root);
+    }
+    this._diskWrite(parent);
+    this._diskDelete(n1);
+    this._diskDelete(n2);
+
+    return newNode;
+};
+
+/**
+ * _deleteKeyFromNode
+ *
+ * Deletes the key at position index from the provided node.
+ *
+ * @param node The node where the key will be deleted.
+ * @param index The index of the key that will be deletd.
+ * @return true if the key can be deleted, false otherwise
+ */
+InMemoryBTree.Tree.prototype._deleteKeyFromNode = function (node, index) {
+    var keysMax = (2 * this.order) - 1;
+    if (node.numberActives < keysMax) {
+        keysMax = node.numberActives;
+    }
+    ;
+
+    var i;
+
+    if (node.isLeaf === false) {
+        return false;
+    }
+
+    var key = node.keys[index];
+
+    for (i = index; i < keysMax - 1; i++) {
+        node.keys[i] = node.keys[i + 1];
+    }
+
+    // cleaning invalid reference
+    node.keys.pop();
+
+    node.numberActives--;
+
+    this._diskWrite(node);
+
+    return true;
+};
+
+InMemoryBTree.Tree.prototype._mergeNodes = function (n1, key, n2) {
+    var newNode;
+    var i;
+
+    newNode = this._allocateNode();
+    newNode.isLeaf = true;
+
+    for (i = 0; i < n1.numberActives; i++) {
+        newNode.keys[i] = n1.keys[i];
+        newNode.children[i] = n1.children[i];
+    }
+    newNode.children[n1.numberActives] = n1.children[n1.numberActives];
+    newNode.keys[n1.numberActives] = key;
+
+    for (i = 0; i < n2.numberActives; i++) {
+        newNode.keys[i + n1.numberActives + 1] = n2.keys[i];
+        newNode.children[i + n1.numberActives + 1] = n2.children[i];
+    }
+    newNode.children[(2 * this.order) - 1] = n2.children[n2.numberActives];
+
+    newNode.numberActives = n1.numberActives + n2.numberActives + 1;
+    newNode.isLeaf = n1.isLeaf;
+    newNode.level = n1.level;
+
+
+    this._diskWrite(newNode);
+    // @todo
+    // delte old nodes from disk
+    return newNode;
+};
+
+/**
+ * audit
+ *
+ * Checks that the tree data structure is
+ * valid.
+ */
+InMemoryBTree.Tree.prototype.audit = function (showOutput) {
+    var errors = [];
+    var alreadySeen = [];
+    var that = this;
+
+    var foundInArray = function (data) {
+        for (var i = 0; i < alreadySeen.length; i++) {
+            if (that.comparator(alreadySeen[i], data) === 0) {
+                var error = " !!! duplicated key " + data;
+                if (showOutput === true) {
+                    console.log(error);
+                }
+                errors.push(error);
+            }
+        }
+    };
+
+    var length = null;
+    var that = this;
+    this.walkNodes(function (n) {
+        if (showOutput === true) {
+            console.log("--- Node at " + n.level + " level");
+            console.log(" - leaf? " + n.isLeaf);
+            console.log(" - num actives? " + n.numberActives);
+            console.log(" - keys: ");
+        }
+        for (var i = n.numberActives; i < n.keys.length; i++) {
+            if (n.keys[i] != null) {
+                if (showOutput === true) {
+                    console.log(" * warning : redundant key data");
+                    errors.push(" * warning : redundant key data");
+                }
+            }
+        }
+
+        for (var i = n.numberActives + 1; i < n.children.length; i++) {
+            if (n.children[i] != null) {
+                if (showOutput === true) {
+                    console.log(" * warning : redundant children data");
+                    errors.push(" * warning : redundant key data");
+                }
+            }
+        }
+
+
+        if (n.isLeaf === false) {
+            for (var i = 0; i < n.numberActives; i++) {
+                var maxLeft = that._diskRead(n.children[i]).keys[that._diskRead(n.children[i]).numberActives - 1 ].key;
+                var minRight = that._diskRead(n.children[i + 1]).keys[0].key;
+                if (showOutput === true) {
+                    console.log("   " + n.keys[i].key + "(" + maxLeft + "," + minRight + ")");
+                }
+                if (that.comparator(n.keys[i].key, maxLeft) === -1) {
+                    var error = " !!! value max left " + maxLeft + " > key " + n.keys[i].key;
+                    if (showOutput === true) {
+                        console.log(error);
+                    }
+                    errors.push(error);
+                }
+                if (that.comparator(n.keys[i].key, minRight) === 1) {
+                    var error = " !!! value min right " + minRight + " < key " + n.keys[i].key;
+                    if (showOutput === true) {
+                        console.log(error);
+                    }
+                    errors.push(error);
+                }
+
+                foundInArray(n.keys[i].key);
+                alreadySeen.push(n.keys[i].key);
+            }
+        } else {
+            if (length === null) {
+                length = n.level;
+            } else {
+                if (length != n.level) {
+                    var error = " !!! Leaf node with wrong level value";
+                    if (showOutput === true) {
+                        console.log(error);
+                    }
+                    errors.push(error);
+                }
+            }
+            for (var i = 0; i < n.numberActives; i++) {
+                if (showOutput === true) {
+                    console.log(" " + n.keys[i].key);
+                }
+                foundInArray(n.keys[i].key);
+                alreadySeen.push(n.keys[i].key);
+
+            }
+        }
+
+        if (n != that.root) {
+            if (n.numberActives > ((2 * that.order) - 1)) {
+                if (showOutput === true) {
+                    var error = " !!!! MAX num keys restriction violated ";
+                }
+                console.log(error);
+                errors.push(error);
+            }
+            if (n.numberActives < (that.order - 1)) {
+                if (showOutput === true) {
+                    var error = " !!!! MIN num keys restriction violated ";
+                }
+                console.log(error);
+                errors.push(error);
+            }
+
+        }
+    });
+
+    return errors;
+};
+
+/**
+ *  _getMaxKeyPos
+ *
+ *  Used to get the position of the MAX key within the subtree
+ *  @return An object containing the key and position of the key
+ */
+InMemoryBTree.Tree.prototype._getMaxKeyPos = function (node) {
+    var node_pos = {};
+
+    while (true) {
+        if (node === null) {
+            break;
+        }
+
+        if (node.isLeaf === true) {
+            node_pos.node = node;
+            node_pos.index = node.numberActives - 1;
+            return node_pos;
+        } else {
+            node_pos.node = node;
+            node_pos.index = node.numberActives - 1;
+            node = this._diskRead(node.children[node.numberActives]);
+        }
+    }
+
+    return node_pos;
+};
+
+/**
+ *  _getMinKeyPos
+ *
+ *  Used to get the position of the MAX key within the subtree
+ *  @return An object containing the key and position of the key
+ */
+InMemoryBTree.Tree.prototype._getMinKeyPos = function (node) {
+    var node_pos = {};
+
+    while (true) {
+        if (node === null) {
+            break;
+        }
+
+        if (node.isLeaf === true) {
+            node_pos.node = node;
+            node_pos.index = 0;
+            return node_pos;
+        } else {
+            node_pos.node = node;
+            node_pos.index = 0;
+            node = this._diskRead(node.children[0]);
+        }
+    }
+
+    return node_pos;
+};
+
+
+/**
+ * Node
+ *
+ * Implements the interface of BinarySearchTree.Node
+ *
+ * A Tree node augmented with BTree
+ * node structures
+ */
+InMemoryBTree.Node = function() {
+    this.numberActives = 0;
+    this.isLeaf = null;
+    this.keys = [];
+    this.children = [];
+    this.level = 0;
+};
+
+// end of ./src/js-trees/src/in_memory_b_tree.js 
+// exports
+var QuadIndexCommon = {};
+
+/**
+ * NodeKey
+ *
+ * Implements the interface of BinarySearchTree.Node
+ *
+ * A Tree node augmented with BPlusTree
+ * node structures
+ */
+QuadIndexCommon.NodeKey = function(components, order) {
+    this.subject = components.subject;
+    this.predicate = components.predicate;
+    this.object = components.object;
+    this.graph = components.graph;
+    this.order = order;
+};
+
+QuadIndexCommon.NodeKey.prototype.comparator = function(keyPattern) {
+    for(var i=0; i<this.order.length; i++) {
+        var component = this.order[i];
+        if(keyPattern[component] == null) {
+            return 0;
+        } else {
+            if(this[component] < keyPattern[component] ) {
+                return -1
+            } else if(this[component] > keyPattern[component]) {
+                return 1
+            }
+        }
+    }
+
+    return 0;
+};
+
+/**
+ * Pattern
+ *
+ * A pattern with some variable components
+ */
+QuadIndexCommon.Pattern = function (components) {
+    this.subject = components.subject;
+    this.predicate = components.predicate;
+    this.object = components.object;
+    this.graph = components.graph;
+    this.indexKey = [];
+
+    this.keyComponents = {};
+
+    var order = [];
+    var indif = [];
+    var components = ['subject', 'predicate', 'object', 'graph'];
+
+    // components must have been already normalized and
+    // inserted in the lexicon.
+    // OIDs retrieved from the lexicon *are* numbers so
+    // they can be told apart from variables (strings)
+    for (var i = 0; i < components.length; i++) {
+        if (typeof(this[components[i]]) === 'string') {
+            indif.push(components[i]);
+            this.keyComponents[components[i]] = null;
+        } else {
+            order.push(components[i]);
+            this.keyComponents[components[i]] = this[components[i]];
+            this.indexKey.push(components[i]);
+        }
+    }
+
+    this.order = order.concat(indif);
+    this.key = new QuadIndexCommon.NodeKey(this.keyComponents, this.order);
+};
+
+// end of ./src/js-rdf-persistence/src/quad_index_common.js 
+// exports
+var QuadIndex = {};
+
+// imports
+var BaseTree = InMemoryBTree;
+
+QuadIndex.Tree = function(params,callback) {
+    if(arguments != 0) {
+        this.componentOrder = params.componentOrder;
+
+
+        // @todo change this if using the file backed implementation
+        BaseTree.Tree.call(this, params.order, params['name'], params['persistent'], params['cacheMaxSize']);
+
+        this.comparator = function (a, b) {
+            for (var i = 0; i < this.componentOrder.length; i++) {
+                var component = this.componentOrder[i];
+                var vala = a[component];
+                var valb = b[component];
+                if (vala < valb) {
+                    return -1;
+                } else if (vala > valb) {
+                    return 1;
+                }
+            }
+            return 0;
+        };
+
+        this.rangeComparator = function (a, b) {
+            for (var i = 0; i < this.componentOrder.length; i++) {
+                var component = this.componentOrder[i];
+                if (b[component] == null || a[component] == null) {
+                    return 0;
+                } else {
+                    if (a[component] < b[component]) {
+                        return -1
+                    } else if (a[component] > b[component]) {
+                        return 1
+                    }
+                }
+            }
+
+            return 0;
+        };
+
+        if(callback!=null) {
+            callback(this);
+        }
+    }
+};
+
+Utils['extends'](BaseTree.Tree, QuadIndex.Tree);
+
+QuadIndex.Tree.prototype.insert = function(quad, callback) {
+    BaseTree.Tree.prototype.insert.call(this, quad, null);
+    if(callback)
+        callback(true);
+
+    return true
+};
+
+QuadIndex.Tree.prototype.search = function(quad, callback) {
+    var result = BaseTree.Tree.prototype.search.call(this, quad, true); // true -> check exists : not present in all the b-tree implementations, check first.
+    if(callback)
+        callback(result);
+
+    return result;
+};
+
+QuadIndex.Tree.prototype.range = function (pattern, callback) {
+    var result = null;
+    if (typeof(this.root) === 'string') {
+        result = this._rangeTraverse(this, this._diskRead(this.root), pattern);
+    } else {
+        result = this._rangeTraverse(this, this.root, pattern);
+    }
+
+    if (callback)
+        callback(result);
+
+    return result;
+};
+
+QuadIndex.Tree.prototype._rangeTraverse = function(tree,node, pattern) {
+    var patternKey  = pattern.key;
+    var acum = [];
+    var pendingNodes = [node];
+    var node, idxMin, idxMax;
+    while(pendingNodes.length > 0) {
+        node = pendingNodes.shift();
+        idxMin = 0;
+
+        while(idxMin < node.numberActives && tree.rangeComparator(node.keys[idxMin].key,patternKey) === -1) {
+            idxMin++;
+        }
+        if(node.isLeaf === true) {
+            idxMax = idxMin;
+
+            while(idxMax < node.numberActives && tree.rangeComparator(node.keys[idxMax].key,patternKey) === 0) {
+                acum.push(node.keys[idxMax].key);
+                idxMax++;
+            }
+
+        } else {
+            var pointer = node.children[idxMin];
+            var childNode = tree._diskRead(pointer);
+            pendingNodes.push(childNode);
+
+            var idxMax = idxMin;
+            while(true) {
+                if(idxMax < node.numberActives && tree.rangeComparator(node.keys[idxMax].key,patternKey) === 0) {
+                    acum.push(node.keys[idxMax].key);
+                    idxMax++;
+                    childNode = tree._diskRead(node.children[idxMax]);
+                    pendingNodes.push(childNode);
+                } else {
+                    break;
+                }
+            }
+        }
+    }
+    return acum;
+};
+
+// end of ./src/js-rdf-persistence/src/quad_index.js 
+// exports
+var QuadBackend = {};
+
+
+// imports
+
+
+/*
+ * "perfect" indices for RDF indexing
+ *
+ * SPOG (?, ?, ?, ?), (s, ?, ?, ?), (s, p, ?, ?), (s, p, o, ?), (s, p, o, g)
+ * GP   (?, ?, ?, g), (?, p, ?, g)
+ * OGS  (?, ?, o, ?), (?, ?, o, g), (s, ?, o, g)
+ * POG  (?, p, ?, ?), (?, p, o, ?), (?, p, o, g)
+ * GSP  (s, ?, ?, g), (s, p, ?, g)
+ * OS   (s, ?, o, ?)
+ */
+QuadBackend.QuadBackend = function (configuration, callback) {
+    if (arguments != 0) {
+        this.indexMap = {};
+        this.treeOrder = configuration['treeOrder'];
+        this.indices = ['SPOG', 'GP', 'OGS', 'POG', 'GSP', 'OS'];
+        this.componentOrders = {
+            SPOG:['subject', 'predicate', 'object', 'graph'],
+            GP:['graph', 'predicate', 'subject', 'object'],
+            OGS:['object', 'graph', 'subject', 'predicate'],
+            POG:['predicate', 'object', 'graph', 'subject'],
+            GSP:['graph', 'subject', 'predicate', 'object'],
+            OS:['object', 'subject', 'predicate', 'graph']
+        };
+
+        for (var i = 0; i < this.indices.length; i++) {
+            var indexKey = this.indices[i];
+            this.indexMap[indexKey] = new QuadIndex.Tree({order:this.treeOrder,
+                componentOrder:this.componentOrders[indexKey],
+                persistent:configuration['persistent'],
+                name:(configuration['name'] || "") + indexKey,
+                cacheMaxSize:configuration['cacheMaxSize']});
+        }
+
+        if (callback)
+            callback(this);
+    }
+};
+
+QuadBackend.QuadBackend.prototype.clear = function() {
+        for(var i=0; i<this.indices.length; i++) {
+            var indexKey = this.indices[i];
+            this.indexMap[indexKey].clear();
+        }
+};
+
+QuadBackend.QuadBackend.prototype._indexForPattern = function (pattern) {
+    var indexKey = pattern.indexKey;
+    var matchingIndices = this.indices;
+
+    for (var i = 0; i < matchingIndices.length; i++) {
+        var index = matchingIndices[i];
+        var indexComponents = this.componentOrders[index];
+        for (var j = 0; j < indexComponents.length; j++) {
+            if (Utils.include(indexKey, indexComponents[j]) === false) {
+                break;
+            }
+            if (j == indexKey.length - 1) {
+                return index;
+            }
+        }
+    }
+
+    return 'SPOG'; // If no other match, we erturn the more generic index
+};
+
+
+QuadBackend.QuadBackend.prototype.index = function (quad, callback) {
+    for (var i = 0; i < this.indices.length; i++) {
+        var indexKey = this.indices[i];
+        var index = this.indexMap[indexKey];
+
+        index.insert(quad);
+    }
+
+    if (callback)
+        callback(true);
+
+    return true;
+};
+
+QuadBackend.QuadBackend.prototype.range = function (pattern, callback) {
+    var indexKey = this._indexForPattern(pattern);
+    var index = this.indexMap[indexKey];
+    var quads = index.range(pattern);
+    if (callback)
+        callback(quads);
+
+    return quads;
+};
+
+QuadBackend.QuadBackend.prototype.search = function (quad, callback) {
+    var indexKey = this.indices[0];
+    var index = this.indexMap[indexKey];
+    var result = index.search(quad);
+
+    if (callback)
+        callback(result != null);
+
+    return (result != null)
+};
+
+
+QuadBackend.QuadBackend.prototype['delete'] = function (quad, callback) {
+    var indexKey, index;
+    for (var i = 0; i < this.indices.length; i++) {
+        indexKey = this.indices[i];
+        index = this.indexMap[indexKey];
+
+        index['delete'](quad);
+    }
+
+    if (callback)
+        callback(true);
+
+    return true;
+};
+
+// end of ./src/js-rdf-persistence/src/quad_backend.js 
+// exports
+var Lexicon = {};
+
+// imports
+
+/**
+ * Temporal implementation of the lexicon
+ */
+
+
+Lexicon.Lexicon = function(callback){
+    this.uriToOID = {};
+    this.OIDToUri = {};
+
+    this.literalToOID = {};
+    this.OIDToLiteral = {};
+
+    this.blankToOID = {};
+    this.OIDToBlank = {};
+
+    this.defaultGraphOid = 0;
+
+    this.defaultGraphUri = "https://github.com/antoniogarrote/rdfstore-js#default_graph";
+    this.defaultGraphUriTerm = {"token": "uri", "prefix": null, "suffix": null, "value": this.defaultGraphUri, "oid": this.defaultGraphOid};
+    this.oidCounter = 1;
+
+    this.knownGraphs = {};
+    
+    if(callback != null) {
+        callback(this);
+    }
+};
+
+Lexicon.Lexicon.prototype.registerGraph = function(oid){
+    if(oid != this.defaultGraphOid) {
+        this.knownGraphs[oid] = true;
+    }
+    return true
+};
+
+Lexicon.Lexicon.prototype.registeredGraphs = function(shouldReturnUris) {
+    var acum = [];
+
+    for(var g in this.knownGraphs) {
+        if(shouldReturnUris === true) {
+            acum.push(this.OIDToUri['u'+g]);
+        } else {
+            acum.push(g);
+        }
+    }
+    return acum;
+};
+
+Lexicon.Lexicon.prototype.registerUri = function(uri) {
+    if(uri === this.defaultGraphUri) {
+        return(this.defaultGraphOid);
+    } else if(this.uriToOID[uri] == null){
+        var oid = this.oidCounter;
+        var oidStr = 'u'+oid;
+        this.oidCounter++;
+
+        this.uriToOID[uri] =[oid, 0];
+        this.OIDToUri[oidStr] = uri;
+
+        return(oid);
+    } else {
+        var oidCounter = this.uriToOID[uri];
+        var oid = oidCounter[0];
+        var counter = oidCounter[1] + 1;
+        this.uriToOID[uri] = [oid, counter];
+        return(oid);
+    }
+};
+
+Lexicon.Lexicon.prototype.resolveUri = function(uri) {
+    if(uri === this.defaultGraphUri) {
+        return(this.defaultGraphOid);
+    } else {
+        var oidCounter = this.uriToOID[uri];
+        if(oidCounter != null) {
+            return(oidCounter[0]);
+        } else {
+            return(-1);
+        }
+    }
+};
+
+Lexicon.Lexicon.prototype.resolveUriCost = function(uri) {
+    if(uri === this.defaultGraphUri) {
+        return(this.defaultGraphOid);
+    } else {
+        var oidCounter = this.uriToOID[uri];
+        if(oidCounter != null) {
+            return(oidCounter[1]);
+        } else {
+            return(-1);
+        }
+    }
+};
+
+Lexicon.Lexicon.prototype.registerBlank = function(label) {
+    var oid = this.oidCounter;
+    this.oidCounter++;
+    var oidStr = ""+oid;
+    this.OIDToBlank[oidStr] = true;
+    return(oidStr);
+};
+
+Lexicon.Lexicon.prototype.resolveBlank = function(label) {
+//    @todo
+//    this is failing with unicode tests... e.g. kanji2
+
+//    var id = label.split(":")[1];
+//    callback(id);
+
+    var oid = this.oidCounter;
+    this.oidCounter++;
+    return(""+oid);
+};
+
+Lexicon.Lexicon.prototype.resolveBlankCost = function(label) {
+    return 0;
+};
+
+Lexicon.Lexicon.prototype.registerLiteral = function(literal) {
+    if(this.literalToOID[literal] == null){
+        var oid = this.oidCounter;
+        var oidStr =  'l'+ oid;
+        this.oidCounter++;
+
+        this.literalToOID[literal] = [oid, 0];
+        this.OIDToLiteral[oidStr] = literal;
+
+        return(oid);
+    } else {
+        var oidCounter = this.literalToOID[literal];
+        var oid = oidCounter[0];
+        var counter = oidCounter[1] + 1;
+        this.literalToOID[literal] = [oid, counter];
+        return(oid);
+    }
+};
+
+Lexicon.Lexicon.prototype.resolveLiteral = function (literal) {
+    var oidCounter = this.literalToOID[literal];
+    if (oidCounter != null) {
+        return(oidCounter[0]);
+    } else {
+        return(-1);
+    }
+};
+
+Lexicon.Lexicon.prototype.resolveLiteralCost = function (literal) {
+    var oidCounter = this.literalToOID[literal];
+    if (oidCounter != null) {
+        return(oidCounter[1]);
+    } else {
+        return(0);
+    }
+};
+
+
+Lexicon.Lexicon.prototype.parseLiteral = function(literalString) {
+    var parts = literalString.lastIndexOf("@");
+    if(parts!=-1 && literalString[parts-1]==='"' && literalString.substring(parts, literalString.length).match(/^@[a-zA-Z\-]+$/g)!=null) {
+        var value = literalString.substring(1,parts-1);
+        var lang = literalString.substring(parts+1, literalString.length);
+        return {token: "literal", value:value, lang:lang};
+    }
+
+    var parts = literalString.lastIndexOf("^^");
+    if(parts!=-1 && literalString[parts-1]==='"' && literalString[parts+2] === '<' && literalString[literalString.length-1] === '>') {
+        var value = literalString.substring(1,parts-1);
+        var type = literalString.substring(parts+3, literalString.length-1);
+
+        return {token: "literal", value:value, type:type};
+    }
+
+    var value = literalString.substring(1,literalString.length-1);
+    return {token:"literal", value:value};
+};
+
+Lexicon.Lexicon.prototype.parseUri = function(uriString) {
+    return {token: "uri", value:uriString};
+};
+
+Lexicon.Lexicon.prototype.retrieve = function(oid) {
+    try {
+        if(oid === this.defaultGraphOid) {
+            return({ token: "uri", 
+                       value:this.defaultGraphUri,
+                       prefix: null,
+                       suffix: null,
+                       defaultGraph: true });
+        } else {
+          var maybeUri = this.OIDToUri['u'+oid];
+          if(maybeUri != null) {
+              return(this.parseUri(maybeUri));
+          } else {
+              var maybeLiteral = this.OIDToLiteral['l'+oid];
+              if(maybeLiteral != null) {
+                  return(this.parseLiteral(maybeLiteral));
+              } else {
+                  var maybeBlank = this.OIDToBlank[""+oid];
+                  if(maybeBlank != null) {
+                      return({token:"blank", value:"_:"+oid});
+                  } else {
+                      throw("Null value for OID");
+                  }
+              }
+          }
+        }
+    } catch(e) {
+        console.log("error in lexicon retrieving OID:");
+        console.log(oid);
+        if(e.message || e.stack) {
+            if(e.message) {
+                console.log(e.message); 
+            }
+            if(e.stack) {
+                console.log(e.stack);
+            }
+        } else {
+            console.log(e);
+        }
+        throw new Error("Unknown retrieving OID in lexicon:"+oid);
+
+    }
+};
+
+Lexicon.Lexicon.prototype.clear = function() {
+    this.uriToOID = {};
+    this.OIDToUri = {};
+
+    this.literalToOID = {};
+    this.OIDToLiteral = {};
+
+    this.blankToOID = {};
+    this.OIDToBlank = {};
+};
+
+Lexicon.Lexicon.prototype.unregister = function (quad, key) {
+    try {
+        this.unregisterTerm(quad.subject.token, key.subject);
+        this.unregisterTerm(quad.predicate.token, key.predicate);
+        this.unregisterTerm(quad.object.token, key.object);
+        if (quad.graph != null) {
+            this.unregisterTerm(quad.graph.token, key.graph);
+        }
+        return(true);
+    } catch (e) {
+        console.log("Error unregistering quad");
+        console.log(e.message);
+        return(false);
+    }
+};
+
+Lexicon.Lexicon.prototype.unregisterTerm = function (kind, oid) {
+    if (kind === 'uri') {
+        if (oid != this.defaultGraphOid) {
+            var oidStr = 'u' + oid;
+            var uri = this.OIDToUri[oidStr];     // = uri;
+            var oidCounter = this.uriToOID[uri]; // =[oid, 0];
+
+            var counter = oidCounter[1];
+            if ("" + oidCounter[0] === "" + oid) {
+                if (counter === 0) {
+                    delete this.OIDToUri[oidStr];
+                    delete this.uriToOID[uri];
+                    // delete the graph oid from known graphs
+                    // in case this URI is a graph identifier
+                    delete this.knownGraphs[oid];
+                } else {
+                    this.uriToOID[uri] = [oid, counter - 1];
+                }
+            } else {
+                throw("Not matching OID : " + oid + " vs " + oidCounter[0]);
+            }
+        }
+    } else if (kind === 'literal') {
+        this.oidCounter++;
+        var oidStr = 'l' + oid;
+        var literal = this.OIDToLiteral[oidStr];  // = literal;
+        var oidCounter = this.literalToOID[literal]; // = [oid, 0];
+
+        var counter = oidCounter[1];
+        if ("" + oidCounter[0] === "" + oid) {
+            if (counter === 0) {
+                delete this.OIDToLiteral[oidStr];
+                delete this.literalToOID[literal];
+            } else {
+                this.literalToOID[literal] = [oid, counter - 1];
+            }
+        } else {
+            throw("Not matching OID : " + oid + " vs " + oidCounter[0]);
+        }
+
+    } else if (kind === 'blank') {
+        delete this.OIDToBlank["" + oid];
+    }
+};
+
+// end of ./src/js-rdf-persistence/src/lexicon.js 
+// exports
+var NetworkTransport = {};
+
+NetworkTransport.load = function (uri, accept, callback, redirect) {
+    var transport = jQuery;
+
+    transport.ajax({
+        url:uri,
+        headers:{"Accept":accept},
+
+        success:function (data, status, xhr) {
+            if (("" + xhr.status)[0] == '2') {
+                var headers = xhr.getAllResponseHeaders().split("\n");
+                var acum = {};
+                for (var i = 0; i < headers.length; i++) {
+                    var header = headers[i].split(":");
+                    acum[header[0]] = header[1];
+                }
+
+                callback(true, {headers:acum,
+                                data:data});
+            }
+        },
+
+        error:function (xhr, textStatus, ex) {
+            if (("" + xhr.status)[0] == '3') {
+                if (redirection == 0) {
+                    callback(false, 500);
+                } else {
+                    var location = (xhr.getAllResponseHeaders()["Location"] || xhr.getAllResponseHeaders()["location"]);
+                    if (location != null) {
+                        NetworkTransport.load(location, accept, callback, (redirection - 1));
+                    } else {
+                        callback(false, 500);
+                    }
+                }
+            } else {
+                callback(false, xhr.statusCode());
+            }
+        }
+    });
+};
+
+// end of ./src/js-communication/src/ajax_transport.js 
+
+/**
+ * Javascript implementation of JSON-LD.
+ *
+ * @author Dave Longley
+ *
+ * Copyright (c) 2011 Digital Bazaar, Inc. All rights reserved.
+ */
+
+var jsonldParser = null;
+
+(function()
+{
+
+// used by Exception
+var _setMembers = function(self, obj)
+{
+   self.stack = '';
+   for(var key in obj)
+   {
+      self[key] = obj[key];
+   }
+};
+
+// define jsonld
+if(typeof(window) !== 'undefined')
+{
+   var jsonld = window.jsonld = window.jsonld || {};
+   Exception = function(obj)
+   {
+      _setMembers(this, obj);
+   };
+
+   // define js 1.8.5 Object.keys method unless present
+   if(!Object.keys)
+   {
+      Object.keys = function(o)
+      {  
+         if(o !== Object(o))
+         {
+            throw new TypeError('Object.keys called on non-object');
+         }
+         var rval = [];
+         for(var p in o)
+         {
+            if(Object.prototype.hasOwnProperty.call(o, p))
+            {
+               rval.push(p);
+            }
+         }
+         return rval;
+      };
+   }
+
+   if (!Array.prototype.filter)
+   {
+     Array.prototype.filter = function(fun /*, thisp */)
+     {
+       "use strict";
+    
+       if (this == null)
+         throw new TypeError();
+    
+       var t = Object(this);
+       var len = t.length >>> 0;
+       if (typeof fun != "function")
+         throw new TypeError();
+    
+       var res = [];
+       var thisp = arguments[1];
+       for (var i = 0; i < len; i++)
+       {
+         if (i in t)
+         {
+           var val = t[i]; // in case fun mutates this
+           if (fun.call(thisp, val, i, t))
+             res.push(val);
+         }
+       }
+    
+       return res;
+     };
+   }
+
+}
+// define node.js module
+else if(typeof(module) !== 'undefined' && module.exports)
+{
+   var jsonld = {};
+   //module.exports = jsonld;
+   Exception = function(obj)
+   {
+      _setMembers(this, obj);
+      this.stack = new Error().stack;
+   };
+}
+
+
+jsonldParser = jsonld;
+
+var defaultContext = { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+                       "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+                       "owl": "http://www.w3.org/2002/07/owl#",
+                       "xsd": "http://www.w3.org/2001/XMLSchema#",
+                       "dcterms": "http://purl.org/dc/terms/",
+                       "foaf": "http://xmlns.com/foaf/0.1/",
+                       "cal": "http://www.w3.org/2002/12/cal/ical#",
+                       "vcard": "http://www.w3.org/2006/vcard/ns# ",
+                       "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+                       "cc": "http://creativecommons.org/ns#",
+                       "sioc": "http://rdfs.org/sioc/ns#",
+                       "doap": "http://usefulinc.com/ns/doap#",
+                       "com": "http://purl.org/commerce#",
+                       "ps": "http://purl.org/payswarm#",
+                       "gr": "http://purl.org/goodrelations/v1#",
+                       "sig": "http://purl.org/signature#",
+                       "ccard": "http://purl.org/commerce/creditcard#"
+                     };
+
+/*
+ * Globals and helper functions.
+ */
+var ns =
+{
+   xsd: 'http://www.w3.org/2001/XMLSchema#'
+};
+
+var xsd =
+{
+   'boolean': ns.xsd + 'boolean',
+   'double': ns.xsd + 'double',
+   'integer': ns.xsd + 'integer'
+};
+
+/**
+ * Sets a subject's property to the given object value. If a value already
+ * exists, it will be appended to an array.
+ *
+ * @param s the subject.
+ * @param p the property.
+ * @param o the object.
+ */
+var _setProperty = function(s, p, o)
+{
+   if(p in s)
+   {
+      if(s[p].constructor === Array)
+      {
+         s[p].push(o);
+      }
+      else
+      {
+         s[p] = [s[p], o];
+      }
+   }
+   else
+   {
+      s[p] = o;
+   }
+};
+
+/**
+ * Clones an object, array, or string/number. If cloning an object, the keys
+ * will be sorted.
+ * 
+ * @param value the value to clone.
+ * 
+ * @return the cloned value.
+ */
+var _clone = function(value)
+{
+   var rval;
+   
+   if(value.constructor === Object)
+   {
+      rval = {};
+      var keys = Object.keys(value).sort();
+      for(var i in keys)
+      {
+         var key = keys[i];
+         rval[key] = _clone(value[key]);
+      }
+   }
+   else if(value.constructor === Array)
+   {
+      rval = [];
+      for(var i in value)
+      {
+         rval[i] = _clone(value[i]);
+      }
+   }
+   else
+   {
+      rval = value;
+   }
+   
+   return rval;
+};
+
+/**
+ * Gets the keywords from a context.
+ * 
+ * @param ctx the context.
+ * 
+ * @return the keywords.
+ */
+var _getKeywords = function(ctx)
+{
+   // TODO: reduce calls to this function by caching keywords in processor
+   // state
+   
+   var rval =
+   {
+      '@id': '@id',
+      '@language': '@language',
+      '@literal': '@literal',
+      '@type': '@type'
+   };
+   
+   if(ctx)
+   {
+      // gather keyword aliases from context
+      var keywords = {};
+      for(var key in ctx)
+      {
+         if(ctx[key].constructor === String && ctx[key] in rval)
+         {
+            keywords[ctx[key]] = key;
+         }
+      }
+      
+      // overwrite keywords
+      for(var key in keywords)
+      {
+         rval[key] = keywords[key];
+      }
+   }
+   
+   return rval;
+};
+
+/**
+ * Gets the iri associated with a term.
+ * 
+ * @param ctx the context.
+ * @param term the term.
+ * 
+ * @return the iri or NULL.
+ */
+var _getTermIri = function(ctx, term)
+{
+   var rval = null;
+   if(term in ctx)
+   {
+      if(ctx[term].constructor === String)
+      {
+         rval = ctx[term];
+      }
+      else if(ctx[term].constructor === Object && '@id' in ctx[term])
+      {
+         rval = ctx[term]['@id'];
+      }
+   }
+   return rval;
+};
+
+/**
+ * Compacts an IRI into a term or prefix if it can be. IRIs will not be
+ * compacted to relative IRIs if they match the given context's default
+ * vocabulary.
+ *
+ * @param ctx the context to use.
+ * @param iri the IRI to compact.
+ * @param usedCtx a context to update if a value was used from "ctx".
+ *
+ * @return the compacted IRI as a term or prefix or the original IRI.
+ */
+var _compactIri = function(ctx, iri, usedCtx)
+{
+   var rval = null;
+   
+   // check the context for a term that could shorten the IRI
+   // (give preference to terms over prefixes)
+   for(var key in ctx)
+   {
+      // skip special context keys (start with '@')
+      if(key.length > 0 && key[0] !== '@')
+      {
+         // compact to a term
+         if(iri === _getTermIri(ctx, key))
+         {
+            rval = key;
+            if(usedCtx !== null)
+            {
+               usedCtx[key] = _clone(ctx[key]);
+            }
+            break;
+         }
+      }
+   }
+   
+   // term not found, if term is @type, use keyword
+   if(rval === null && iri === '@type')
+   {
+      rval = _getKeywords(ctx)['@type'];
+   }
+   
+   // term not found, check the context for a prefix
+   if(rval === null)
+   {
+      for(var key in ctx)
+      {
+         // skip special context keys (start with '@')
+         if(key.length > 0 && key[0] !== '@')
+         {
+            // see if IRI begins with the next IRI from the context
+            var ctxIri = _getTermIri(ctx, key);
+            if(ctxIri !== null)
+            {
+               var idx = iri.indexOf(ctxIri);
+               
+               // compact to a prefix
+               if(idx === 0 && iri.length > ctxIri.length)
+               {
+                  rval = key + ':' + iri.substr(ctxIri.length);
+                  if(usedCtx !== null)
+                  {
+                     usedCtx[key] = _clone(ctx[key]);
+                  }
+                  break;
+               }
+            }
+         }
+      }
+   }
+
+   // could not compact IRI
+   if(rval === null)
+   {
+      rval = iri;
+   }
+
+   return rval;
+};
+
+/**
+ * Expands a term into an absolute IRI. The term may be a regular term, a
+ * prefix, a relative IRI, or an absolute IRI. In any case, the associated
+ * absolute IRI will be returned.
+ *
+ * @param ctx the context to use.
+ * @param term the term to expand.
+ * @param usedCtx a context to update if a value was used from "ctx".
+ *
+ * @return the expanded term as an absolute IRI.
+ */
+var _expandTerm = function(ctx, term, usedCtx)
+{
+   var rval = term;
+   
+   // get JSON-LD keywords
+   var keywords = _getKeywords(ctx);
+   
+   // 1. If the property has a colon, it is a prefix or an absolute IRI:
+   var idx = term.indexOf(':');
+   if(idx !== -1)
+   {
+      // get the potential prefix
+      var prefix = term.substr(0, idx);
+
+      // expand term if prefix is in context, otherwise leave it be
+      if(prefix in ctx)
+      {
+         // prefix found, expand property to absolute IRI
+         var iri = _getTermIri(ctx, prefix);
+         rval = iri + term.substr(idx + 1);
+         if(usedCtx !== null)
+         {
+            usedCtx[prefix] = _clone(ctx[prefix]);
+         }
+      }
+   }
+   // 2. If the property is in the context, then it's a term.
+   else if(term in ctx)
+   {
+      rval = _getTermIri(ctx, term);
+      if(usedCtx !== null)
+      {
+         usedCtx[term] = _clone(ctx[term]);
+      }
+   }
+   // 3. The property is a keyword.
+   else
+   {
+      for(var key in keywords)
+      {
+         if(term === keywords[key])
+         {
+            rval = key;
+            break;
+         }
+      }
+   }
+   
+   return rval;
+};
+
+/**
+ * Sorts the keys in a context.
+ * 
+ * @param ctx the context to sort.
+ * 
+ * @return the sorted context.
+ */
+var _sortContextKeys = function(ctx)
+{
+   // sort keys
+   var rval = {};
+   var keys = Object.keys(ctx).sort();
+   for(var k in keys)
+   {
+      var key = keys[k];
+      rval[key] = ctx[key];
+   }
+   return rval;
+};
+
+/**
+ * Gets whether or not a value is a reference to a subject (or a subject with
+ * no properties).
+ * 
+ * @param value the value to check.
+ * 
+ * @return true if the value is a reference to a subject, false if not.
+ */
+var _isReference = function(value)
+{
+   // Note: A value is a reference to a subject if all of these hold true:
+   // 1. It is an Object.
+   // 2. It is has an @id key.
+   // 3. It has only 1 key.
+   return (value !== null &&
+      value.constructor === Object &&
+      '@id' in value &&
+      Object.keys(value).length === 1);
+};
+
+/**
+ * Gets whether or not a value is a subject with properties.
+ * 
+ * @param value the value to check.
+ * 
+ * @return true if the value is a subject with properties, false if not.
+ */
+var _isSubject = function(value)
+{
+   var rval = false;
+   
+   // Note: A value is a subject if all of these hold true:
+   // 1. It is an Object.
+   // 2. It is not a literal.
+   // 3. It has more than 1 key OR any existing key is not '@id'.
+   if(value !== null && value.constructor === Object && !('@literal' in value))
+   {
+      var keyCount = Object.keys(value).length;
+      rval = (keyCount > 1 || !('@id' in value));
+   }
+   
+   return rval;
+};
+
+/*
+ * JSON-LD API.
+ */
+
+/**
+ * Normalizes a JSON-LD object.
+ *
+ * @param input the JSON-LD object to normalize.
+ * 
+ * @return the normalized JSON-LD object.
+ */
+jsonld.normalize = function(input)
+{
+   return new Processor().normalize(input);
+};
+
+/**
+ * Removes the context from a JSON-LD object, expanding it to full-form.
+ *
+ * @param input the JSON-LD object to remove the context from.
+ * 
+ * @return the context-neutral JSON-LD object.
+ */
+jsonld.expand = function(input)
+{
+   return new Processor().expand({}, null, input);
+};
+
+/**
+ * Expands the given JSON-LD object and then compacts it using the
+ * given context.
+ *
+ * @param ctx the new context to use.
+ * @param input the input JSON-LD object.
+ * 
+ * @return the output JSON-LD object.
+ */
+jsonld.compact = function(ctx, input)
+{
+   var rval = null;
+   
+   // TODO: should context simplification be optional? (ie: remove context
+   // entries that are not used in the output)
+
+   if(input !== null)
+   {
+      // fully expand input
+      input = jsonld.expand(input);
+      
+      var tmp;
+      if(input.constructor === Array)
+      {
+         rval = [];
+         tmp = input;
+      }
+      else
+      {
+         tmp = [input];
+      }
+      
+      // merge context if it is an array
+      if(ctx.constructor === Array)
+      {
+         ctx = jsonld.mergeContexts({}, ctx);
+      }
+      
+      for(var i in tmp)
+      {
+         // setup output context
+         var ctxOut = {};
+         
+         // compact
+         var out = new Processor().compact(_clone(ctx), null, tmp[i], ctxOut);
+         
+         // add context if used
+         if(Object.keys(ctxOut).length > 0)
+         {
+            // sort context keys
+            ctxOut = _sortContextKeys(ctxOut);
+            
+            // sort keys
+            var keys = Object.keys(out);
+            keys.sort();
+            
+            // put @context first
+            keys.unshift('@context');
+            out['@context'] = ctxOut;
+            
+            // order keys in output
+            var ordered = {};
+            for(var k in keys)
+            {
+               var key = keys[k];
+               ordered[key] = out[key];
+            }
+            out = ordered;
+         }
+         
+         if(rval === null)
+         {
+            rval = out;
+         }
+         else
+         {
+            rval.push(out);
+         }
+      }
+   }
+
+   return rval;
+};
+
+/**
+ * Merges one context with another.
+ *
+ * @param ctx1 the context to overwrite/append to.
+ * @param ctx2 the new context to merge onto ctx1.
+ *
+ * @return the merged context.
+ */
+jsonld.mergeContexts = function(ctx1, ctx2)
+{
+   // merge first context if it is an array
+   if(ctx1.constructor === Array)
+   {
+      ctx1 = jsonld.mergeContexts({}, ctx1);
+   }
+   
+   // copy context to merged output
+   var merged = _clone(ctx1);
+   
+   if(ctx2.constructor === Array)
+   {
+      // merge array of contexts in order
+      for(var i in ctx2)
+      {
+         merged = jsonld.mergeContexts(merged, ctx2[i]);
+      }
+   }
+   else
+   {
+      // if the new context contains any IRIs that are in the merged context,
+      // remove them from the merged context, they will be overwritten
+      for(var key in ctx2)
+      {
+         // ignore special keys starting with '@'
+         if(key.indexOf('@') !== 0)
+         {
+            for(var mkey in merged)
+            {
+               if(merged[mkey] === ctx2[key])
+               {
+                  // FIXME: update related coerce rules
+                  delete merged[mkey];
+                  break;
+               }
+            }
+         }
+      }
+   
+      // merge contexts
+      for(var key in ctx2)
+      {
+         merged[key] = _clone(ctx2[key]);
+      }
+   }
+
+   return merged;
+};
+
+/**
+ * Expands a term into an absolute IRI. The term may be a regular term, a
+ * prefix, a relative IRI, or an absolute IRI. In any case, the associated
+ * absolute IRI will be returned.
+ *
+ * @param ctx the context to use.
+ * @param term the term to expand.
+ *
+ * @return the expanded term as an absolute IRI.
+ */
+jsonld.expandTerm = _expandTerm;
+
+/**
+ * Compacts an IRI into a term or prefix if it can be. IRIs will not be
+ * compacted to relative IRIs if they match the given context's default
+ * vocabulary.
+ *
+ * @param ctx the context to use.
+ * @param iri the IRI to compact.
+ *
+ * @return the compacted IRI as a term or prefix or the original IRI.
+ */
+jsonld.compactIri = function(ctx, iri)
+{
+   return _compactIri(ctx, iri, null);
+};
+
+/**
+ * Frames JSON-LD input.
+ * 
+ * @param input the JSON-LD input.
+ * @param frame the frame to use.
+ * @param options framing options to use.
+ * 
+ * @return the framed output.
+ */
+jsonld.frame = function(input, frame, options)
+{
+   return new Processor().frame(input, frame, options);
+};
+
+/**
+ * Generates triples given a JSON-LD input. Each triple that is generated
+ * results in a call to the given callback. The callback takes 3 parameters:
+ * subject, property, and object. If the callback returns false then this
+ * method will stop generating triples and return. If the callback is null,
+ * then an array with triple objects containing "s", "p", "o" properties will
+ * be returned.
+ * 
+ * The object or "o" property will be a JSON-LD formatted object.
+ * 
+ * @param input the JSON-LD input.
+ * @param callback the triple callback.
+ * 
+ * @return an array of triple objects if callback is null, null otherwise.
+ */
+jsonld.toTriples = function(input, graph, callback)
+{
+   var rval = null;
+   
+   // normalize input
+   var normalized = jsonld.normalize(input);
+   
+   // setup default callback
+   callback = callback || null;
+   if(callback === null)
+   {
+      rval = [];
+      callback = function(s, p, o)
+      {
+         rval.push({'subject': Utils.lexicalFormTerm(s), 
+                    'predicate': Utils.lexicalFormTerm(p), 
+                    'object': Utils.lexicalFormTerm(o), 
+                    'graph': graph});
+      };
+   }
+   
+   // generate triples
+   var quit = false;
+   for(var i1 in normalized)
+   {
+      var e = normalized[i1];
+      var s = e['@id'];
+       if(s[0] == "_") {
+           s = {'token':'blank', 'value':s.split(":")[1]};
+       } else {
+           s = {'token':'uri', 'value':s};
+       }
+
+      for(var p in e)
+      {
+         if(p !== '@id')
+         {
+	     var obj = e[p];
+             if(obj.constructor !== Array)
+             {
+		 obj = [obj];
+             }
+            for(var i2 in obj)
+            {
+                var obji2 = obj[i2];
+		if(p === '@type' || p === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') {
+		    p = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type';
+                    obji2 = {'token':'uri', 'value':obji2};		    
+                } else if(typeof(obji2) === 'string') {
+                    obji2 = {'token': 'literal', 'value':obji2};
+                } else if(obji2['@id'] != null) {
+                    if(obji2['@id'][0] == "_") {
+                        obji2 = {'token':'blank', 'value':obji2['@id'].split(":")[1]};
+                    } else {
+                        obji2 = {'token':'uri', 'value':obji2['@id']};
+                    }
+                } else if(obji2['@type'] != null) {
+                    obji2 = {'token':'literal', 'value':obji2['@literal'], 'type':obji2['@type']};
+                } else if(obji2['@language'] != null) {
+                    obji2 = {'token':'literal', 'value':obji2['@literal'], 'lang':obji2['@language']};
+                }
+
+		quit = (callback(s, {'token':'uri', 'value':p}, obji2) === false);
+		if(quit)
+		{
+                    break;
+		}
+            }
+            if(quit)
+            {
+               break;
+            }
+         }
+      }
+      if(quit)
+      {
+         break;
+      }
+   }
+   
+   return rval;
+};
+
+/**
+ * Resolves external @context URLs. Every @context URL in the given JSON-LD
+ * object is resolved using the given URL-resolver function. Once all of
+ * the @contexts have been resolved, the given result callback is invoked.
+ * 
+ * @param input the JSON-LD input object (or array).
+ * @param resolver the resolver method that takes a URL and a callback that
+ *           receives a JSON-LD serialized @context or null on error (with
+ *           optional an error object as the second parameter).
+ * @param callback the callback to be invoked with the fully-resolved
+ *           JSON-LD output (object or array) or null on error (with an
+ *           optional error array as the second parameter).
+ */
+jsonld.resolve = function(input, resolver, callback)
+{
+   // find all @context URLs
+   var urls = {};
+   var findUrls = function(input, replace)
+   {
+      if(input.constructor === Array)
+      {
+         for(var i in input)
+         {
+            findUrls(input[i]);
+         }
+      }
+      else if(input.constructor === Object)
+      {
+         for(var key in input)
+         {
+            if(key === '@context')
+            {
+               // @context is an array that might contain URLs
+               if(input[key].constructor === Array)
+               {
+                  var list = input[key];
+                  for(var i in list)
+                  {
+                     if(list[i].constructor === String)
+                     {
+                        // replace w/resolved @context if appropriate
+                        if(replace)
+                        {
+                           list[i] = urls[list[i]];
+                        }
+                        // unresolved @context found
+                        else
+                        {
+                           urls[list[i]] = {};
+                        }
+                     }
+                  }
+               }
+               else if(input[key].constructor === String)
+               {
+                  // replace w/resolved @context if appropriate
+                  if(replace)
+                  {
+                     input[key] = urls[input[key]];
+                  }
+                  // unresolved @context found
+                  else
+                  {
+                     urls[input[key]] = {};
+                  }
+               }
+            }
+         }
+      }
+   };
+   findUrls(input, false);
+   
+   // state for resolving URLs
+   var count = Object.keys(urls).length;
+   var errors = null;
+   
+   if(count === 0)
+   {
+      callback(input, errors);
+   }
+   else
+   {
+      // resolve all URLs
+      for(var url in urls)
+      {
+         resolver(url, function(result, error)
+         {
+            --count;
+            
+            if(result === null)
+            {
+               errors = errors || [];
+               errors.push({ url: url, error: error });
+            }
+            else
+            {
+               try
+               {
+                  if(result.constructor === String)
+                  {
+                     urls[url] = JSON.parse(result)['@context'];
+                  }
+                  else
+                  {
+                     urls[url] = result['@context'];
+                  }
+               }
+               catch(ex)
+               {
+                  errors = errors || [];
+                  errors.push({ url: url, error: ex });
+               }
+            }
+            
+            if(count === 0)
+            {
+               if(errors === null)
+               {
+                  findUrls(input, true);
+               }
+               callback(input, errors);
+            }
+         });
+      }
+   }
+};
+
+// TODO: organizational rewrite
+
+/**
+ * Constructs a new JSON-LD processor.
+ */
+var Processor = function()
+{
+};
+
+/**
+ * Recursively compacts a value. This method will compact IRIs to prefixes or
+ * terms and do reverse type coercion to compact a value.
+ *
+ * @param ctx the context to use.
+ * @param property the property that points to the value, NULL for none.
+ * @param value the value to compact.
+ * @param usedCtx a context to update if a value was used from "ctx".
+ *
+ * @return the compacted value.
+ */
+Processor.prototype.compact = function(ctx, property, value, usedCtx)
+{
+   var rval;
+   
+   // get JSON-LD keywords
+   var keywords = _getKeywords(ctx);
+   
+   if(value === null)
+   {
+      // return null, but check coerce type to add to usedCtx
+      rval = null;
+      this.getCoerceType(ctx, property, usedCtx);
+   }
+   else if(value.constructor === Array)
+   {
+      // recursively add compacted values to array
+      rval = [];
+      for(var i in value)
+      {
+         rval.push(this.compact(ctx, property, value[i], usedCtx));
+      }
+   }
+   // graph literal/disjoint graph
+   else if(
+      value.constructor === Object &&
+      '@id' in value && value['@id'].constructor === Array)
+   {
+      rval = {};
+      rval[keywords['@id']] = this.compact(
+         ctx, property, value['@id'], usedCtx);
+   }
+   // recurse if value is a subject
+   else if(_isSubject(value))
+   {
+      // recursively handle sub-properties that aren't a sub-context
+      rval = {};
+      for(var key in value)
+      {
+         if(value[key] !== '@context')
+         {
+            // set object to compacted property, only overwrite existing
+            // properties if the property actually compacted
+            var p = _compactIri(ctx, key, usedCtx);
+            if(p !== key || !(p in rval))
+            {
+               // FIXME: clean old values from the usedCtx here ... or just
+               // change usedCtx to be built at the end of processing?
+               rval[p] = this.compact(ctx, key, value[key], usedCtx);
+            }
+         }
+      }
+   }
+   else
+   {
+      // get coerce type
+      var coerce = this.getCoerceType(ctx, property, usedCtx);
+      
+      // get type from value, to ensure coercion is valid
+      var type = null;
+      if(value.constructor === Object)
+      {
+         // type coercion can only occur if language is not specified
+         if(!('@language' in value))
+         {
+            // type must match coerce type if specified
+            if('@type' in value)
+            {
+               type = value['@type'];
+            }
+            // type is ID (IRI)
+            else if('@id' in value)
+            {
+               type = '@id';
+            }
+            // can be coerced to any type
+            else
+            {
+               type = coerce;
+            }
+         }
+      }
+      // type can be coerced to anything
+      else if(value.constructor === String)
+      {
+         type = coerce;
+      }
+
+      // types that can be auto-coerced from a JSON-builtin
+      if(coerce === null &&
+         (type === xsd['boolean'] || type === xsd['integer'] ||
+         type === xsd['double']))
+      {
+         coerce = type;
+      }
+
+      // do reverse type-coercion
+      if(coerce !== null)
+      {
+         // type is only null if a language was specified, which is an error
+         // if type coercion is specified
+         if(type === null)
+         {
+            throw {
+               message: 'Cannot coerce type when a language is specified. ' +
+                  'The language information would be lost.'
+            };
+         }
+         // if the value type does not match the coerce type, it is an error
+         else if(type !== coerce)
+         {
+            throw new Exception({
+               message: 'Cannot coerce type because the type does ' +
+                  'not match.',
+               type: type,
+               expected: coerce
+            });
+         }
+         // do reverse type-coercion
+         else
+         {
+            if(value.constructor === Object)
+            {
+               if('@id' in value)
+               {
+                  rval = value['@id'];
+               }
+               else if('@literal' in value)
+               {
+                  rval = value['@literal'];
+               }
+            }
+            else
+            {
+               rval = value;
+            }
+
+            // do basic JSON types conversion
+            if(coerce === xsd['boolean'])
+            {
+               rval = (rval === 'true' || rval != 0);
+            }
+            else if(coerce === xsd['double'])
+            {
+               rval = parseFloat(rval);
+            }
+            else if(coerce === xsd['integer'])
+            {
+               rval = parseInt(rval);
+            }
+         }
+      }
+      // no type-coercion, just change keywords/copy value
+      else if(value.constructor === Object)
+      {
+         rval = {};
+         for(var key in value)
+         {
+            rval[keywords[key]] = value[key];
+         }
+      }
+      else
+      {
+         rval = _clone(value);
+      }
+
+      // compact IRI
+      if(type === '@id')
+      {
+         if(rval.constructor === Object)
+         {
+            rval[keywords['@id']] = _compactIri(
+               ctx, rval[keywords['@id']], usedCtx);
+         }
+         else
+         {
+            rval = _compactIri(ctx, rval, usedCtx);
+         }
+      }
+   }
+
+   return rval;
+};
+
+/**
+ * Recursively expands a value using the given context. Any context in
+ * the value will be removed.
+ *
+ * @param ctx the context.
+ * @param property the property that points to the value, NULL for none.
+ * @param value the value to expand.
+ *
+ * @return the expanded value.
+ */
+Processor.prototype.expand = function(ctx, property, value)
+{
+   var rval;
+   
+   // TODO: add data format error detection?
+   
+   // value is null, nothing to expand
+   if(value === null)
+   {
+      rval = null;
+   }
+   // if no property is specified and the value is a string (this means the
+   // value is a property itself), expand to an IRI
+   else if(property === null && value.constructor === String)
+   {
+      rval = _expandTerm(ctx, value, null);
+   }
+   else if(value.constructor === Array)
+   {
+      // recursively add expanded values to array
+      rval = [];
+      for(var i in value)
+      {
+         rval.push(this.expand(ctx, property, value[i]));
+      }
+   }
+   else if(value.constructor === Object)
+   {
+      // if value has a context, use it
+      if('@context' in value)
+      {
+         ctx = jsonld.mergeContexts(ctx, value['@context']);
+      }
+      
+      // recursively handle sub-properties that aren't a sub-context
+      rval = {};
+      for(var key in value)
+      {
+         // preserve frame keywords
+         if(key === '@embed' || key === '@explicit' ||
+            key === '@default' || key === '@omitDefault')
+         {
+            _setProperty(rval, key, _clone(value[key]));
+         }
+         else if(key !== '@context')
+         {
+

<TRUNCATED>

[09/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/LICENSE b/platform/platform.concepts/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.concepts/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/README.txt
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/README.txt b/platform/platform.concepts/README.txt
deleted file mode 100644
index 9edd812..0000000
--- a/platform/platform.concepts/README.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-JAX-RS resource called GenericResourcePage can be used to retrieve a resource and its associated concepts. 
-Go to http://[your.server]/concepts/generic-resource?uri=[resource] where [resource] 
-specifies the UriRef of the resource. Furthermore there is a JAX-RS resource called ResourceTagger
- for associating concepts with resources. POST to http://[your.server]/concepts/tagger/set a form 
-with form parameter uri which specifies the UriRef of the resource and a form parameter 
-concepts which contains the UriRefs of the concepts.
-
-JAX-RS resource called ConceptManipulator can be used to add concept into the content graph
-The resource path is "/concepts/manipulator/add-concept" and the form parameters are
-pref-label, lang, and comment.
-
-On the client side there is a ConceptManipulator widget to add free concepts to the content graph
-and there is also a ConceptFinder widget to find exisiting concepts to be suggested for a specified search term.
- 
-In ConceptManipulator widget and ConceptFinder widget a developer can register a callback function
-which is called when a concept is added to the list of selected concept.
-
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/LICENSE b/platform/platform.concepts/platform.concepts.core/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform/platform.concepts/platform.concepts.core/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/pom.xml b/platform/platform.concepts/platform.concepts.core/pom.xml
deleted file mode 100644
index 579930a..0000000
--- a/platform/platform.concepts/platform.concepts.core/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.clerezza</groupId>
-        <artifactId>platform.concepts</artifactId>
-        <version>0.2</version>
-    </parent>
-    <groupId>org.apache.clerezza</groupId>
-    <artifactId>platform.concepts.core</artifactId>
-    <packaging>bundle</packaging>
-    <version>1.0.0-SNAPSHOT</version>
-    <name>Clerezza - Platform Concepts Core</name>
-    <description>The core part of Platform Concepts</description>
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.core</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.ontologies</artifactId>
-            <version>0.12</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>rdf.utils</artifactId>
-            <version>0.14</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.concepts.ontologies</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.graphprovider.content</artifactId>
-            <version>0.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.core</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.config</artifactId>
-            <version>0.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.globalmenu.api</artifactId>
-            <version>0.3</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>permissiondescriptions</artifactId>
-            <version>0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>web.fileserver</artifactId>
-            <scope>compile</scope>
-            <version>0.10</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.wink</groupId>
-            <artifactId>wink-common</artifactId>
-            <version>1.2.1-incubating</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
deleted file mode 100644
index 25409bc..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.util.Date;
-import java.util.Iterator;
-import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.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.Resource;
-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.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.DC;
-import org.apache.clerezza.rdf.ontologies.OWL;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-import org.apache.clerezza.rdf.ontologies.SKOS;
-import org.apache.clerezza.rdf.utils.GraphNode;
-
-/**
- * This class manages caches of SPARQL query results against a specific EndPoint
- * and Graph.
- *
- * @author hasan
- */
-class ConceptCache {
-    private UriRef sparqlEndPoint;
-    private UriRef defaultGraph;
-    private UriRef CONCEPT_CACHE_MGRAPH = new UriRef("urn:x-localinstance:/concept.cache");
-
-    /**
-     * Constructs a {@link ConceptCache} for the specified SPARQL EndPoint and
-     * Graph.
-     *
-     * @param sparqlEndPoint
-     *        the SPARQL EndPoint used in the query.
-     * @param defaultGraph
-     *        the Graph against which the query was executed.
-     *
-     */
-    public ConceptCache(UriRef sparqlEndPoint, UriRef defaultGraph) {
-        this.sparqlEndPoint = sparqlEndPoint;
-        this.defaultGraph = defaultGraph;
-    }
-
-    /**
-     * Caches the query results available in the specified Graph under a
-     * particular search term.
-     *
-     * @param searchTerm
-     *        the term used for querying concepts.
-     * @param parsedGraph
-     *        the Graph which contains query results.
-     */
-    void cache(String searchTerm, Graph parsedGraph) {
-        MGraph conceptCacheMGraph = getConceptCacheMGraph();
-        NonLiteral conceptCacheNode = getConceptCacheNode(conceptCacheMGraph);
-        if (conceptCacheNode != null) {
-            removeCachedConcepts(searchTerm, conceptCacheNode, conceptCacheMGraph);
-        }
-        addCacheEntry(searchTerm, conceptCacheNode, conceptCacheMGraph,
-                parsedGraph);
-    }
-
-    private MGraph getConceptCacheMGraph() {
-        MGraph conceptCacheMGraph = null;
-        TcManager tcManager = TcManager.getInstance();
-        try {
-            conceptCacheMGraph = tcManager.getMGraph(CONCEPT_CACHE_MGRAPH);
-        } catch (NoSuchEntityException nsee) {
-            conceptCacheMGraph = tcManager.createMGraph(CONCEPT_CACHE_MGRAPH);
-        }
-        return conceptCacheMGraph;
-    }
-
-    private NonLiteral getConceptCacheNode(MGraph conceptCacheMGraph) {
-        Iterator<Triple> conceptCaches = conceptCacheMGraph.filter(
-                null, RDF.type, CONCEPTS.ConceptCache);
-        while (conceptCaches.hasNext()) {
-            NonLiteral conceptCacheNode = conceptCaches.next().getSubject();
-            if (!conceptCacheMGraph.filter(conceptCacheNode,
-                    CONCEPTS.sparqlEndPoint, sparqlEndPoint).hasNext()) {
-                continue;
-            }
-            if (defaultGraph != null) {
-                if (!conceptCacheMGraph.filter(conceptCacheNode,
-                        CONCEPTS.defaultGraph, defaultGraph).hasNext()) {
-                    continue;
-                }
-            }
-            return conceptCacheNode;
-        }
-        return null;
-    }
-
-    private void removeCachedConcepts(String searchTerm,
-            NonLiteral conceptCacheNode, MGraph conceptCacheMGraph) {
-        NonLiteral conceptCacheEntryNode = getConceptCacheEntryNode(
-                searchTerm, conceptCacheNode, conceptCacheMGraph);
-        if (conceptCacheEntryNode == null) {
-            return;
-        }
-        GraphNode conceptCacheEntryGraphNode = new GraphNode(
-                conceptCacheEntryNode, conceptCacheMGraph);
-        removeCachedConcepts(conceptCacheEntryGraphNode);
-        conceptCacheMGraph.remove(new TripleImpl(conceptCacheNode,
-                CONCEPTS.cacheEntry, conceptCacheEntryNode));
-    }
-
-    private NonLiteral getConceptCacheEntryNode(String searchTerm,
-            NonLiteral conceptCacheNode, MGraph conceptCacheMGraph) {
-        TypedLiteral searchLiteral = LiteralFactory.getInstance()
-                .createTypedLiteral(searchTerm);
-        Iterator<Triple> cacheEntries = conceptCacheMGraph.filter(
-                conceptCacheNode, CONCEPTS.cacheEntry, null);
-        while (cacheEntries.hasNext()) {
-            NonLiteral conceptCacheEntryNode = (NonLiteral) cacheEntries.next()
-                    .getObject();
-            if (!conceptCacheMGraph.filter(conceptCacheEntryNode,
-                    CONCEPTS.searchTerm, searchLiteral).hasNext()) {
-                continue;
-            }
-            return conceptCacheEntryNode;
-        }
-        return null;
-    }
-
-    private void removeCachedConcepts(GraphNode conceptCacheEntryGraphNode) {
-        Iterator<Resource> searchResults =
-                conceptCacheEntryGraphNode.getObjects(CONCEPTS.searchResult);
-        while (searchResults.hasNext()) {
-            Resource concept = searchResults.next();
-            GraphNode conceptGraphNode = new GraphNode(concept,
-                    conceptCacheEntryGraphNode.getGraph());
-            conceptGraphNode.deleteProperties(OWL.sameAs);
-            conceptGraphNode.deleteProperties(RDFS.comment);
-            conceptGraphNode.deleteProperties(SKOS.prefLabel);
-            conceptGraphNode.deleteProperties(RDF.type);
-        }
-        conceptCacheEntryGraphNode.deleteProperties(CONCEPTS.searchResult);
-        conceptCacheEntryGraphNode.deleteProperties(DC.date);
-        conceptCacheEntryGraphNode.deleteProperties(CONCEPTS.searchTerm);
-        conceptCacheEntryGraphNode.deleteProperties(RDF.type);
-    }
-
-    private void addCacheEntry(String searchTerm, NonLiteral conceptCacheNode,
-            MGraph conceptCacheMGraph, Graph parsedGraph) {
-        GraphNode conceptCacheGraphNode = null;
-        if (conceptCacheNode == null) {
-            conceptCacheGraphNode = addConceptCacheNode(conceptCacheMGraph);
-        } else {
-            conceptCacheGraphNode = new GraphNode(conceptCacheNode,
-                    conceptCacheMGraph);
-        }
-        GraphNode conceptCacheEntryGraphNode = new GraphNode(new BNode(),
-                conceptCacheMGraph);
-        conceptCacheGraphNode.addProperty(CONCEPTS.cacheEntry,
-                conceptCacheEntryGraphNode.getNode());
-        conceptCacheEntryGraphNode.addProperty(RDF.type, CONCEPTS.SearchTerm);
-        conceptCacheEntryGraphNode.addProperty(CONCEPTS.searchTerm,
-                LiteralFactory.getInstance().createTypedLiteral(searchTerm));
-        conceptCacheEntryGraphNode.addProperty(DC.date,
-                LiteralFactory.getInstance().createTypedLiteral(new Date()));
-
-        Iterator<Triple> concepts = parsedGraph.filter(null, RDF.type, SKOS.Concept);
-        while (concepts.hasNext()) {
-            conceptCacheEntryGraphNode.addProperty(CONCEPTS.searchResult,
-                    concepts.next().getSubject());
-        }
-        conceptCacheMGraph.addAll(parsedGraph);
-    }
-
-    private GraphNode addConceptCacheNode(MGraph conceptCacheMGraph) {
-        GraphNode conceptCacheGraphNode = new GraphNode(new BNode(),
-                conceptCacheMGraph);
-        conceptCacheGraphNode.addProperty(RDF.type, CONCEPTS.ConceptCache);
-        conceptCacheGraphNode.addProperty(CONCEPTS.sparqlEndPoint,
-                sparqlEndPoint);
-        if (defaultGraph != null) {
-            conceptCacheGraphNode.addProperty(CONCEPTS.defaultGraph,
-                    defaultGraph);
-        }
-        return     conceptCacheGraphNode;
-    }
-
-    /**
-     * Retrieves concepts from the cache stored under the specified search term.
-     * Cache entries are invalid if they are older than the specified date.
-     *
-     * @param searchTerm
-     *        the search term under which the concepts are cached.
-     * @param acceptableOldestCachingDate
-     *        the Date before which a cache entry is considered invalid.
-     * @return
-     *        an {@link MGraph} containing the valid cached concepts.
-     */
-    MGraph retrieve(String searchTerm, Date acceptableOldestCachingDate) {
-        MGraph conceptCacheMGraph = getConceptCacheMGraph();
-
-        NonLiteral conceptCacheNode = getConceptCacheNode(conceptCacheMGraph);
-        if (conceptCacheNode == null) {
-            return null;
-        }
-        NonLiteral conceptCacheEntryNode = getConceptCacheEntryNode(searchTerm,
-                conceptCacheNode, conceptCacheMGraph);
-        if (conceptCacheEntryNode == null) {
-            return null;
-        }
-        GraphNode conceptCacheEntryGraphNode = new GraphNode(
-                conceptCacheEntryNode, conceptCacheMGraph);
-        Date cachingDate = getCachingDate(conceptCacheEntryGraphNode);
-        if (cachingDate == null || cachingDate.before(acceptableOldestCachingDate)) {
-            removeCachedConcepts(conceptCacheEntryGraphNode);
-            conceptCacheMGraph.remove(new TripleImpl(conceptCacheNode,
-                    CONCEPTS.cacheEntry, conceptCacheEntryNode));
-            return null;
-        }
-        return getCachedConcepts(conceptCacheEntryGraphNode);
-    }
-
-    private Date getCachingDate(GraphNode conceptCacheEntryGraphNode) {
-        Iterator<Literal> cachingDates = conceptCacheEntryGraphNode.getLiterals(
-                DC.date);
-        if (cachingDates.hasNext()) {
-            return LiteralFactory.getInstance().createObject(Date.class,
-                    (TypedLiteral) cachingDates.next());
-        }
-        return null;
-    }
-
-    private MGraph getCachedConcepts(GraphNode conceptCacheEntryGraphNode) {
-        MGraph resultMGraph = new SimpleMGraph();
-        MGraph conceptCacheMGraph = (MGraph) conceptCacheEntryGraphNode.getGraph();
-        NonLiteral conceptCacheNode = (NonLiteral) conceptCacheEntryGraphNode.getNode();
-        Iterator<Triple> triples = conceptCacheMGraph.filter(
-                conceptCacheNode, CONCEPTS.searchResult, null);
-        while (triples.hasNext()) {
-            UriRef concept = (UriRef) triples.next().getObject();
-            GraphNode graphNode = new GraphNode(concept, conceptCacheMGraph);
-            resultMGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
-
-            Iterator<Literal> prefLabelStatements = graphNode.getLiterals(SKOS.prefLabel);
-            while (prefLabelStatements.hasNext()) {
-                resultMGraph.add(new TripleImpl(concept, SKOS.prefLabel,
-                        prefLabelStatements.next()));
-            }
-            Iterator<Literal> commentStatements = graphNode.getLiterals(RDFS.comment);
-            while (commentStatements.hasNext()) {
-                resultMGraph.add(new TripleImpl(concept, RDFS.comment,
-                        commentStatements.next()));
-            }
-            Iterator<UriRef> sameAsStatements = graphNode.getUriRefObjects(OWL.sameAs);
-            while (sameAsStatements.hasNext()) {
-                resultMGraph.add(new TripleImpl(concept, OWL.sameAs,
-                        sameAsStatements.next()));
-            }
-        }
-        return resultMGraph;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
deleted file mode 100644
index 18b1e6c..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import javax.ws.rs.FormParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import org.apache.clerezza.platform.config.PlatformConfig;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.Language;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.PlainLiteral;
-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.RDF;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-import org.apache.clerezza.rdf.ontologies.SKOS;
-import org.apache.clerezza.rdf.utils.UriRefUtil;
-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;
-
-/**
- * This JAX-RS resource can be used to add free concepts to the content graph.
- * The URI path of this resource is /concepts/manipulator.
- * 
- * @author hasan
- */
-@Component
-@Service(Object.class)
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/concepts/manipulator")
-public class ConceptManipulator {
-
-    public static String FREE_CONCEPT_SCHEME = "concept-scheme/free-concepts";
-
-    @Reference
-    protected ContentGraphProvider cgProvider;
-
-    @Reference
-    private PlatformConfig platformConfig;
-
-    /**
-     * Creates and stores a concept with the specified prefLabel and comment
-     * into the content graph if a concept with this prefLabel does not already
-     * exist in the graph.
-     *
-     * @param prefLabel
-     *        if it is an empty string no concept is generated
-     * @param lang
-     *        the language of the prefLabel
-     * @param comment
-     *        is a human-readable description of the concept
-     * @return
-     *        - BAD REQUEST response if prefLabel is undefined or empty
-     *        - CONFLICT response if a concept with the same prefLabel and lang exists
-     *        - CREATED if everything is ok
-     */
-    @POST
-    @Path("add-concept")
-    public Response addConcept(@FormParam("pref-label") String prefLabel,
-            @FormParam("lang") String lang,
-            @FormParam("comment") String comment) {
-
-        if ((prefLabel == null) || (prefLabel.isEmpty())) {
-            return Response.status(Status.BAD_REQUEST)
-                    .entity("A concept must have a label!")
-                    .build();
-        }
-        MGraph contentGraph = cgProvider.getContentGraph();
-        PlainLiteral preferredLabel = new PlainLiteralImpl(prefLabel,
-                new Language(lang));
-
-        if (contentGraph.filter(null, SKOS.prefLabel, preferredLabel).hasNext()) {
-            return Response.status(Status.CONFLICT)
-                    .entity("A concept with the same label and language already exists!")
-                    .build();
-        }
-        
-        UriRef concept = getConceptUriRef(platformConfig, prefLabel);
-        contentGraph.add(new TripleImpl(concept, RDF.type,
-                SKOS.Concept));
-        String baseUri = platformConfig.getDefaultBaseUri().getUnicodeString();
-        contentGraph.add(new TripleImpl(concept, SKOS.inScheme,
-                new UriRef(baseUri + FREE_CONCEPT_SCHEME)));
-        contentGraph.add(new TripleImpl(concept, SKOS.prefLabel, preferredLabel));
-        if (!comment.isEmpty()) {
-            contentGraph.add(new TripleImpl(concept, RDFS.comment,
-                    new PlainLiteralImpl(comment, new Language(lang))));
-        }
-        return Response.status(Status.CREATED).entity(concept.getUnicodeString())
-                .build();
-    }
-
-    static UriRef getConceptUriRef(PlatformConfig platformConfig, String prefLabel) {
-        String baseUri = platformConfig.getDefaultBaseUri().getUnicodeString();
-        return new UriRef(baseUri + "concept/" +
-                UriRefUtil.stripNonUriRefChars(prefLabel));
-    }
-}
-
-
-
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
deleted file mode 100644
index cedd350..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import org.apache.clerezza.rdf.core.Graph;
-
-/**
- * An implementation of this interface provides a function to retrieve
- * concepts based on a search term.
- * 
- * @author hasan
- */
-public interface ConceptProvider {
-    /**
-     * Returns a graph containing all concepts whose SKOS:prefLabels
-     * or SKOS:altLabels contain the search term.
-     *
-     * @param searchTerm a filter condition that specifies the term that must
-     *        be contained within SKOS:prefLabels or SKOS:altLabels of a concept.
-     * @return a Graph containing all concepts that meet the filter condition.
-     *
-     */
-    public Graph retrieveConcepts(String searchTerm);
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
deleted file mode 100644
index a7b39ec..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.util.List;
-
-/**
- * An implementation of this class manages {@link ConceptProvider}s.
- *
- * @author hasan
- */
-public interface ConceptProviderManager {
-
-    /**
-     * Returns a list of {@link ConceptProvider}s. The list order determines
-     * the priority of a {@link ConceptProvider}. The meaning of the priority
-     * is left to the implementation and application.
-     * 
-     * @return
-     *        a list of managed {@link ConceptProvider}s.
-     */
-    public List<ConceptProvider> getConceptProviders();
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
deleted file mode 100644
index c346a12..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Copyright 2010 reto.
- * 
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- * 
- *       http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *  under the License.
- */
-
-package org.apache.clerezza.platform.concepts.core;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permssion to use an application to Manage Concept-Providers. Note that the
- * user additionally need the respecitive rights on the underlying graphs.
- *
- * @author reto
- */
-@PermissionInfo(value="Concept Provider Manager Access Permission", description="Grants access " +
-    "to the Concept Provider Manager page")
-public class ConceptProviderManagerAppPermission extends Permission {
-
-    public ConceptProviderManagerAppPermission() {
-        super("Graph Management permission");
-    }
-
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public ConceptProviderManagerAppPermission(String target, String actions) {
-        super("Graph Management permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 77985;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
deleted file mode 100644
index f3ac14e..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptsFinder.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.clerezza.platform.concepts.ontologies.QUERYRESULT;
-import org.apache.clerezza.platform.config.PlatformConfig;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.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.Resource;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.OWL;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.RDFS;
-import org.apache.clerezza.rdf.ontologies.SKOS;
-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;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * This JAX-RS resource can be used to search concepts accessible through
- * registered {@link ConceptProvider}s. If no {@link LocalConceptProvider} is
- * registered for {@link ConceptManipulator.FREE_CONCEPT_SCHEME}, then one is
- * created to find free concepts in the content graph.
- * Concept providers are prioritized.
- * The URI, SKOS:prefLabel and RDFS:comment of a concept from a provider of a 
- * higher priority will be used instead of those concepts having an OWL:sameAs
- * relation with this concept, but from a provider of lower priority.
- * Implicitly created {@link LocalConceptProvider} for free concepts has the
- * lowest priority.
- * 
- * The URI path of this service is /concepts/find.
- * 
- * @author hasan
- */
-@Component
-@Service(Object.class)
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/concepts/find")
-public class ConceptsFinder {
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    @Reference
-    protected ConceptProviderManager conceptProviderManager;
-
-    @Reference
-    private TcManager tcManager;
-
-    @Reference
-    private ContentGraphProvider cgProvider;
-
-    @Reference
-    private PlatformConfig platformConfig;
-
-    private LocalConceptProvider freeConceptProvider = null;
-
-    private UriRef freeConceptScheme = null;
-
-    protected void activate(ComponentContext context) throws URISyntaxException {
-        URL template = getClass().getResource("skos-collection-json.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(template.toURI().toString()),
-                SKOS.Collection, null,
-                MediaType.APPLICATION_JSON_TYPE, true);
-
-        freeConceptScheme =
-                new UriRef(platformConfig.getDefaultBaseUri().getUnicodeString()
-                + ConceptManipulator.FREE_CONCEPT_SCHEME);
-        freeConceptProvider = new LocalConceptProvider(tcManager, cgProvider,
-                freeConceptScheme);
-    }
-
-    /**
-     * Searches concepts for a specified search term. The actual search task
-     * is delegated to each {@link ConceptProvider} instance. The results from
-     * each {@link ConceptProvider} are merged into a single result graph.
-     * However, concepts from providers of lower priority are only considered if
-     * they are not staying in an OWL:sameAs relation with concepts from
-     * providers of higher priority.
-     * 
-     * @param searchTerm
-     *            The search term in form of a String.
-     * @return
-     *        A GraphNode containing the search results.
-     */
-    @GET
-    @Produces("application/rdf+json")
-    public GraphNode findConcepts(@QueryParam(value="searchTerm")
-            String searchTerm) {
-
-        boolean freeConceptProviderFound = false;
-
-        List<ConceptProvider> conceptProviderList = conceptProviderManager
-                .getConceptProviders();
-
-        MGraph resultMGraph = new SimpleMGraph();
-        GraphNode resultNode = new GraphNode(new BNode(), resultMGraph);
-        boolean first = true;
-        for (ConceptProvider cp : conceptProviderList) {
-            if (!freeConceptProviderFound) {
-                if (cp instanceof LocalConceptProvider) {
-                    if (((LocalConceptProvider) cp).getSelectedScheme().equals(
-                            freeConceptScheme)) {
-                        freeConceptProviderFound = true;
-                    }
-                }
-            }
-            retrieveConcepts(cp, first, resultNode, searchTerm);
-            if (first) {
-                first = false;
-            }
-        }
-        if (!freeConceptProviderFound && freeConceptProvider != null) {
-            retrieveConcepts(freeConceptProvider, first, resultNode, searchTerm);
-        }
-        addCreationOfNewFreeConceptSuggested(resultNode, searchTerm);
-        resultNode.addProperty(RDF.type, QUERYRESULT.QueryResult);
-        return resultNode;
-    }
-
-    /**
-     * Adds a boolean value that answers whether the UI shall suggest to create
-     * a new free concept. A new free concept may not be added if the has the
-     * same base uri and search term. Therefore the consumer shall be suggested
-     * not to propose creation.
-     * 
-     * @param resultNode
-     *            the result node to add the property to
-     * @param searchTerm
-     *            the search term the data was searched for
-     */
-    private void addCreationOfNewFreeConceptSuggested(GraphNode resultNode,
-            String searchTerm) {
-        UriRef conceptUriRef = ConceptManipulator.getConceptUriRef(
-                platformConfig, searchTerm);
-        resultNode.addProperty(QUERYRESULT.creationOfNewFreeConceptSuggested,
-                LiteralFactory.getInstance().createTypedLiteral(
-                        !cgProvider.getContentGraph().contains(
-                                new TripleImpl(conceptUriRef, RDF.type,
-                                        SKOS.Concept))));
-    }
-
-    /**
-     * Retrieve concepts for the given search term.
-     * 
-     * @param conceptProvider
-     *            the provider delivers concepts
-     * @param first
-     *            is this the first execution
-     * @param resultNode
-     *            the node to attach the concepts to
-     * @param searchTerm
-     *            the search term that the concepts have to match against
-     */
-    private void retrieveConcepts(ConceptProvider conceptProvider,
-            boolean first, GraphNode resultNode, String searchTerm) {
-        MGraph resultMGraph = (MGraph) resultNode.getGraph();
-        Graph graph = conceptProvider.retrieveConcepts(searchTerm);
-        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
-        if (first) {
-            while (concepts.hasNext()) {
-                resultNode.addProperty(QUERYRESULT.concept, concepts.next()
-                        .getSubject());
-            }
-            resultMGraph.addAll(graph);
-        } else {
-            while (concepts.hasNext()) {
-                NonLiteral concept = concepts.next().getSubject();
-                GraphNode conceptGraphNode = new GraphNode(concept, graph);
-                Iterator<Resource> sameAsConcepts = conceptGraphNode
-                        .getObjects(OWL.sameAs);
-                if (!(hasSameAs(resultMGraph, concept) || hasAnyConcept(
-                        resultMGraph, sameAsConcepts))) {
-                    resultNode.addProperty(QUERYRESULT.concept, concept);
-                    addConceptToResultMGraph(resultMGraph, conceptGraphNode);
-                }
-
-            }
-        }
-    }
-
-    private boolean hasSameAs(MGraph graph, NonLiteral sameAsConcept) {
-        Iterator<Triple> concepts = graph.filter(null, RDF.type, SKOS.Concept);
-        while (concepts.hasNext()) {
-            NonLiteral concept = concepts.next().getSubject();
-            if (graph.filter(concept, OWL.sameAs, sameAsConcept).hasNext()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean hasAnyConcept(MGraph graph, Iterator<Resource> concepts) {
-        while (concepts.hasNext()) {
-            NonLiteral concept = (NonLiteral) concepts.next();
-            if (graph.filter(concept, RDF.type, SKOS.Concept).hasNext()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void addConceptToResultMGraph(MGraph resultMGraph,
-            GraphNode graphNode) {
-        NonLiteral concept = (NonLiteral) graphNode.getNode();
-        resultMGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
-
-        Iterator<Literal> prefLabelStatements = graphNode.getLiterals(SKOS.prefLabel);
-        while (prefLabelStatements.hasNext()) {
-            resultMGraph.add(new TripleImpl(concept, SKOS.prefLabel,
-                    prefLabelStatements.next()));
-        }
-        Iterator<Literal> commentStatements = graphNode.getLiterals(RDFS.comment);
-        while (commentStatements.hasNext()) {
-            resultMGraph.add(new TripleImpl(concept, RDFS.comment,
-                    commentStatements.next()));
-        }
-        Iterator<UriRef> sameAsStatements = graphNode.getUriRefObjects(OWL.sameAs);
-        while (sameAsStatements.hasNext()) {
-            resultMGraph.add(new TripleImpl(concept, OWL.sameAs,
-                    sameAsStatements.next()));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
deleted file mode 100644
index e96069e..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/GenericResourcePage.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import javax.ws.rs.core.Response.Status;
-
-import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-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.utils.UriException;
-import org.apache.clerezza.web.fileserver.FileServer;
-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;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * This JAX-RS resource can be used to show selected concepts of a resource.
- * The URI path of this service is /concepts/generic-resource.
- * 
- * @author tio
- */
-@Component
-@Service(Object.class)
-@Property(name = "javax.ws.rs", boolValue = true)
-@Path("/concepts/generic-resource")
-public class GenericResourcePage extends FileServer {
-
-    @Reference
-    protected ContentGraphProvider cgProvider;
-    @Reference
-    private RenderletManager renderletManager;
-
-    private RemoteConceptsDescriptionManager remoteConceptsDescriptionManager = null;
-
-    protected void activate(ComponentContext context)
-            throws URISyntaxException {
-        
-        configure(context.getBundleContext());
-        
-        URL template = getClass().getResource("generic-resource-page.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(template.toURI().toString()),
-                CONCEPTS.GenericResourcePage, "naked",
-                MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-        remoteConceptsDescriptionManager = new RemoteConceptsDescriptionManager();
-    }
-
-    /**
-     * Retrieves a resource and its associated concepts to be rendered with a template
-     * registered for CONCEPTS.GenericResourcePage.
-     * 
-     * @param uri specifies the uri of a resource
-     * 
-     * @return GraphNode
-     */
-    @GET
-    public GraphNode GenericResourcePage(@QueryParam("uri") UriRef uri,
-            @Context UriInfo uriInfo) {
-
-        GraphNode node = new GraphNode(new BNode(), new UnionMGraph(new SimpleMGraph(),
-                cgProvider.getContentGraph(),
-                remoteConceptsDescriptionManager.getRemoteConceptsDescriptionMGraph()));
-        node.addProperty(RDF.type, PLATFORM.HeadedPage);
-        node.addProperty(RDF.type, CONCEPTS.GenericResourcePage);
-        if (uri != null) {
-            node.addProperty(CONCEPTS.resource, uri);
-        } else {
-            throw new WebApplicationException(Response.status(Status.BAD_REQUEST)
-                    .entity("No resource uri defined.").build());
-        }
-        return node;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
deleted file mode 100644
index 4b96110..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/LocalConceptProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-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.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.sparql.ParseException;
-import org.apache.clerezza.rdf.core.sparql.QueryParser;
-import org.apache.clerezza.rdf.core.sparql.query.ConstructQuery;
-
-/**
- * This {@link ConceptProvider} operates on concepts available in the localhost.
- *
- * @author tio, hasan
- */
-public class LocalConceptProvider implements ConceptProvider {
-
-    private TcManager tcManager = null;
-    private ContentGraphProvider contentGraphProvider = null;
-    private UriRef selectedScheme = null;
-
-    /**
-     * Constructs a {@link LocalConceptProvider} with the specified parameters.
-     *
-     * @param tcManager
-     *        Reference to the {@link TcManager}
-     * @param contentGraphProvider
-     *        Reference to a {@link ContentGraphProvider}
-     * @param selectedScheme
-     *        The scheme in which concepts are to be searched.
-     */
-    public LocalConceptProvider(TcManager tcManager,
-            ContentGraphProvider contentGraphProvider, UriRef selectedScheme) {
-        this.tcManager = tcManager;
-        this.contentGraphProvider = contentGraphProvider;
-        this.selectedScheme = selectedScheme;
-    }
-
-    public UriRef getSelectedScheme() {
-        return this.selectedScheme;
-    }
-
-    @Override
-    public Graph retrieveConcepts(String searchTerm) {
-        QueryParser queryParser = QueryParser.getInstance();
-
-        String query = "PREFIX owl: <http://www.w3.org/2002/07/owl#> " +
-                "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
-                "PREFIX skos: <http://www.w3.org/2008/05/skos#> " +
-                "CONSTRUCT {?concept a skos:Concept; skos:prefLabel ?prefLabel; " +
-                "rdfs:comment ?comment; owl:sameAs ?sameConcept .} " +
-                "WHERE {?concept skos:inScheme " + selectedScheme.toString() +
-                "; skos:prefLabel ?prefLabel . " +
-                "OPTIONAL { ?concept skos:altLabel ?altLabel .} " +
-                "OPTIONAL { ?concept rdfs:comment ?comment .} " +
-                "OPTIONAL { ?concept owl:sameAs ?sameConcept .} " +
-                "FILTER (REGEX(STR(?prefLabel), '" +
-                searchTerm + "', 'i') || REGEX(STR(?altLabel), '" +
-                searchTerm + "', 'i'))}";
-
-        ConstructQuery constructQuery;
-        try {
-            constructQuery = (ConstructQuery) queryParser.parse(query);
-        } catch (ParseException ex) {
-            throw new RuntimeException(ex);
-        }
-
-        MGraph defaultGraph = contentGraphProvider.getContentGraph();
-        return tcManager.executeSparqlQuery(constructQuery, defaultGraph);
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java b/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
deleted file mode 100644
index f933a53..0000000
--- a/platform/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/RemoteConceptProvider.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.concepts.core;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.ProtocolException;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.util.Calendar;
-import java.util.Date;
-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.rdf.core.serializedform.Parser;
-import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
-
-/**
- * This implementation of {@link ConceptProvider} provides a functionality
- * to query a SPARQL End Point for a given search term. The query is to be
- * generated from a template by replacing the place holder for the search term
- * with the specified search term.
- *
- * @author tio, hasan
- */
-public class RemoteConceptProvider implements ConceptProvider {
-
-    private UriRef sparqlEndPoint = null;
-    private UriRef defaultGraph = null;
-    private String queryTemplate = null;
-    private ConceptCache conceptCache = null;
-    private RemoteConceptsDescriptionManager remoteConceptsDescriptionManager = null;
-
-    /**
-     * Constructs a {@link RemoteConceptProvider} with the specified parameters.
-     * 
-     * @param sparqlEndPoint
-     *        the SPARQL End Point to connect to
-     * @param defaultGraph
-     *        the Graph to query for concepts
-     * @param queryTemplate
-     *        the template for query containing place holders for the search term.
-     */
-    public RemoteConceptProvider(
-            UriRef sparqlEndPoint, UriRef defaultGraph, String queryTemplate) {
-        this.sparqlEndPoint = sparqlEndPoint;
-        this.defaultGraph = defaultGraph;
-        this.queryTemplate = queryTemplate;
-        this.conceptCache = new ConceptCache(sparqlEndPoint, defaultGraph);
-        this.remoteConceptsDescriptionManager = new RemoteConceptsDescriptionManager();
-    }
-
-    @Override
-    public Graph retrieveConcepts(String searchTerm) {
-
-        Calendar calendar = Calendar.getInstance();
-        calendar.add(Calendar.DAY_OF_MONTH, -30);
-        Date acceptableOldestCachingDate = calendar.getTime();
-        MGraph cachedConcepts = conceptCache.retrieve(searchTerm.toLowerCase(),
-                acceptableOldestCachingDate);
-        if (cachedConcepts != null) {
-            return cachedConcepts.getGraph();
-        } else {
-            final int connectionTimeout = 4000;
-            String query = queryTemplate.replace("${searchTerm}", searchTerm);
-            try {
-                String param = "query=" + URLEncoder.encode(query, "UTF-8");
-                if (defaultGraph != null) {
-                    param += "&default-graph-uri=" + defaultGraph.getUnicodeString();
-                }
-                final URL url = new URL(sparqlEndPoint.getUnicodeString());
-                final HttpURLConnection con =
-                        (HttpURLConnection) url.openConnection();
-                con.setRequestProperty("Accept", "application/rdf+xml");
-                con.setRequestMethod("POST");
-                con.setDoOutput(true);
-                con.setDoInput(true);
-                con.setUseCaches(false);
-                con.setConnectTimeout(connectionTimeout);
-
-                final OutputStream os = con.getOutputStream();
-                os.write(param.getBytes());
-                os.close();
-
-                if (con.getResponseCode() < 400) {
-                    final InputStream is = con.getInputStream();
-                    Graph parsedGraph = Parser.getInstance().parse(is,
-                            SupportedFormat.RDF_XML);
-                    is.close();
-                    conceptCache.cache(searchTerm.toLowerCase(), parsedGraph);
-                    remoteConceptsDescriptionManager.storeConceptsDescription(parsedGraph);
-                    return parsedGraph;
-                } else {
-                    final InputStream es = con.getErrorStream();
-                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                    for (int ch = es.read(); ch != -1; ch = es.read()) {
-                        baos.write(ch);
-                    }
-                    es.close();
-                    throw new RuntimeException(baos.toString());
-                }
-            } catch (ProtocolException ex) {
-                throw new RuntimeException(ex);
-            } catch (MalformedURLException ex) {
-                throw new RuntimeException(ex);
-            } catch (UnsupportedEncodingException ex) {
-                throw new RuntimeException(ex);
-            } catch (IOException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-    }
-}


[48/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
new file mode 100644
index 0000000..023237b
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.accountcontrolpanel</artifactId>
+        <version>0.10</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.accountcontrolpanel.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Account Contral Panel Ontologies</name>
+    <description>
+        Ontologies of the Account Control Panel
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
new file mode 100644
index 0000000..e6c76a8
--- /dev/null
+++ b/platform/accountcontrolpanel/platform.accountcontrolpanel.ontologies/src/main/resources/org/apache/clerezza/platform/accountcontrolpanel/ontologies/controlpanel.rdf
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xml:base="http://clerezza.org/2009/03/controlpanel#"
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2009/03/controlpanel#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Concept Manager
+	</dc:title>
+</owl:Ontology>
+
+<!-- Classes -->
+
+<rdfs:Class rdf:about="#SettingsPage">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">account settings Page</rdfs:label>
+	<skos:definition xml:lang="en">A web page containing a list of bundles of a user. Over the page
+		bundles can be managed.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ProfilePage">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">personal profile management page</rdfs:label>
+	<skos:definition xml:lang="en">A web page allowing users to change  
+	their profile.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+</rdfs:Class>
+
+<rdfs:Class rdf:about="#ContactConfirmPage">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+	<rdfs:label xml:lang="en">ContactConfirmPage</rdfs:label>
+	<skos:definition xml:lang="en">page for confiming a new contact
+	</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+</rdfs:Class>
+
+<!-- Properties -->
+
+<rdf:Property rdf:about="#userBundlePermission">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">User Bundle Permission</rdfs:label>
+	<skos:definition xml:lang="en">Points to a boolean indicating if the user has
+		the permission to install bundles over his/her account control page, which is the subject.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+	<rdfs:domain rdf:resource="#SettingsPage" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#changePasswordPermission">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">Change Password Permission</rdfs:label>
+	<skos:definition xml:lang="en">Points to a boolean indicating if the user has
+		the permission to change the password over his/her account control page, which is the subject.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+	<rdfs:domain rdf:resource="#SettingsPage" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#changedPassword">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">change password</rdfs:label>
+	<skos:definition xml:lang="en">Points from a settings page over which an attempt was made to change the password of the user owning it
+		to a boolean indicating if an attempt succeeded.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+	<rdfs:domain rdf:resource="#SettingsPage" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#isLocalProfile">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">profile local</rdfs:label>
+	<skos:definition xml:lang="en">Points from a profile page to a boolean 
+indicating if the server considers itself as authoritative for that profile.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+	<rdfs:domain rdf:resource="#SettingsPage" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="#suggestedPPDUri">
+	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
+	<rdfs:label xml:lang="en">Suggested PPD URI</rdfs:label>
+	<skos:definition xml:lang="en">Points to a uri suggested for a new local 
+	personal profile document of the subject.</skos:definition>
+	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/03/controlpanel#" />
+	<rdfs:domain rdf:resource="#SettingsPage" />
+	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#anyURI"/>
+</rdf:Property>
+
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/accountcontrolpanel/pom.xml
----------------------------------------------------------------------
diff --git a/platform/accountcontrolpanel/pom.xml b/platform/accountcontrolpanel/pom.xml
new file mode 100644
index 0000000..a23edbd
--- /dev/null
+++ b/platform/accountcontrolpanel/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.accountcontrolpanel</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Account Control Panel</name>
+    <description>A web interface that provides functions to configure the account of a platform user.</description>
+    
+    <modules>
+        <module>platform.accountcontrolpanel.ontologies</module>
+        <module>platform.accountcontrolpanel.core</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/LICENSE
----------------------------------------------------------------------
diff --git a/platform/concepts/LICENSE b/platform/concepts/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/concepts/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/README.txt
----------------------------------------------------------------------
diff --git a/platform/concepts/README.txt b/platform/concepts/README.txt
new file mode 100644
index 0000000..9edd812
--- /dev/null
+++ b/platform/concepts/README.txt
@@ -0,0 +1,18 @@
+JAX-RS resource called GenericResourcePage can be used to retrieve a resource and its associated concepts. 
+Go to http://[your.server]/concepts/generic-resource?uri=[resource] where [resource] 
+specifies the UriRef of the resource. Furthermore there is a JAX-RS resource called ResourceTagger
+ for associating concepts with resources. POST to http://[your.server]/concepts/tagger/set a form 
+with form parameter uri which specifies the UriRef of the resource and a form parameter 
+concepts which contains the UriRefs of the concepts.
+
+JAX-RS resource called ConceptManipulator can be used to add concept into the content graph
+The resource path is "/concepts/manipulator/add-concept" and the form parameters are
+pref-label, lang, and comment.
+
+On the client side there is a ConceptManipulator widget to add free concepts to the content graph
+and there is also a ConceptFinder widget to find exisiting concepts to be suggested for a specified search term.
+ 
+In ConceptManipulator widget and ConceptFinder widget a developer can register a callback function
+which is called when a concept is added to the list of selected concept.
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/LICENSE
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/LICENSE b/platform/concepts/platform.concepts.core/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/pom.xml b/platform/concepts/platform.concepts.core/pom.xml
new file mode 100644
index 0000000..579930a
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/pom.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.concepts</artifactId>
+        <version>0.2</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.concepts.core</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Concepts Core</name>
+    <description>The core part of Platform Concepts</description>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>jsr311-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.ontologies</artifactId>
+            <version>0.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.utils</artifactId>
+            <version>0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.concepts.ontologies</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.graphprovider.content</artifactId>
+            <version>0.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>jaxrs.utils</artifactId>
+            <version>0.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.config</artifactId>
+            <version>0.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.globalmenu.api</artifactId>
+            <version>0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>permissiondescriptions</artifactId>
+            <version>0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>web.fileserver</artifactId>
+            <scope>compile</scope>
+            <version>0.10</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.wink</groupId>
+            <artifactId>wink-common</artifactId>
+            <version>1.2.1-incubating</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
new file mode 100644
index 0000000..25409bc
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptCache.java
@@ -0,0 +1,285 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.util.Date;
+import java.util.Iterator;
+import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.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.Resource;
+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.NoSuchEntityException;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
+import org.apache.clerezza.rdf.core.impl.TripleImpl;
+import org.apache.clerezza.rdf.ontologies.DC;
+import org.apache.clerezza.rdf.ontologies.OWL;
+import org.apache.clerezza.rdf.ontologies.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.ontologies.SKOS;
+import org.apache.clerezza.rdf.utils.GraphNode;
+
+/**
+ * This class manages caches of SPARQL query results against a specific EndPoint
+ * and Graph.
+ *
+ * @author hasan
+ */
+class ConceptCache {
+    private UriRef sparqlEndPoint;
+    private UriRef defaultGraph;
+    private UriRef CONCEPT_CACHE_MGRAPH = new UriRef("urn:x-localinstance:/concept.cache");
+
+    /**
+     * Constructs a {@link ConceptCache} for the specified SPARQL EndPoint and
+     * Graph.
+     *
+     * @param sparqlEndPoint
+     *        the SPARQL EndPoint used in the query.
+     * @param defaultGraph
+     *        the Graph against which the query was executed.
+     *
+     */
+    public ConceptCache(UriRef sparqlEndPoint, UriRef defaultGraph) {
+        this.sparqlEndPoint = sparqlEndPoint;
+        this.defaultGraph = defaultGraph;
+    }
+
+    /**
+     * Caches the query results available in the specified Graph under a
+     * particular search term.
+     *
+     * @param searchTerm
+     *        the term used for querying concepts.
+     * @param parsedGraph
+     *        the Graph which contains query results.
+     */
+    void cache(String searchTerm, Graph parsedGraph) {
+        MGraph conceptCacheMGraph = getConceptCacheMGraph();
+        NonLiteral conceptCacheNode = getConceptCacheNode(conceptCacheMGraph);
+        if (conceptCacheNode != null) {
+            removeCachedConcepts(searchTerm, conceptCacheNode, conceptCacheMGraph);
+        }
+        addCacheEntry(searchTerm, conceptCacheNode, conceptCacheMGraph,
+                parsedGraph);
+    }
+
+    private MGraph getConceptCacheMGraph() {
+        MGraph conceptCacheMGraph = null;
+        TcManager tcManager = TcManager.getInstance();
+        try {
+            conceptCacheMGraph = tcManager.getMGraph(CONCEPT_CACHE_MGRAPH);
+        } catch (NoSuchEntityException nsee) {
+            conceptCacheMGraph = tcManager.createMGraph(CONCEPT_CACHE_MGRAPH);
+        }
+        return conceptCacheMGraph;
+    }
+
+    private NonLiteral getConceptCacheNode(MGraph conceptCacheMGraph) {
+        Iterator<Triple> conceptCaches = conceptCacheMGraph.filter(
+                null, RDF.type, CONCEPTS.ConceptCache);
+        while (conceptCaches.hasNext()) {
+            NonLiteral conceptCacheNode = conceptCaches.next().getSubject();
+            if (!conceptCacheMGraph.filter(conceptCacheNode,
+                    CONCEPTS.sparqlEndPoint, sparqlEndPoint).hasNext()) {
+                continue;
+            }
+            if (defaultGraph != null) {
+                if (!conceptCacheMGraph.filter(conceptCacheNode,
+                        CONCEPTS.defaultGraph, defaultGraph).hasNext()) {
+                    continue;
+                }
+            }
+            return conceptCacheNode;
+        }
+        return null;
+    }
+
+    private void removeCachedConcepts(String searchTerm,
+            NonLiteral conceptCacheNode, MGraph conceptCacheMGraph) {
+        NonLiteral conceptCacheEntryNode = getConceptCacheEntryNode(
+                searchTerm, conceptCacheNode, conceptCacheMGraph);
+        if (conceptCacheEntryNode == null) {
+            return;
+        }
+        GraphNode conceptCacheEntryGraphNode = new GraphNode(
+                conceptCacheEntryNode, conceptCacheMGraph);
+        removeCachedConcepts(conceptCacheEntryGraphNode);
+        conceptCacheMGraph.remove(new TripleImpl(conceptCacheNode,
+                CONCEPTS.cacheEntry, conceptCacheEntryNode));
+    }
+
+    private NonLiteral getConceptCacheEntryNode(String searchTerm,
+            NonLiteral conceptCacheNode, MGraph conceptCacheMGraph) {
+        TypedLiteral searchLiteral = LiteralFactory.getInstance()
+                .createTypedLiteral(searchTerm);
+        Iterator<Triple> cacheEntries = conceptCacheMGraph.filter(
+                conceptCacheNode, CONCEPTS.cacheEntry, null);
+        while (cacheEntries.hasNext()) {
+            NonLiteral conceptCacheEntryNode = (NonLiteral) cacheEntries.next()
+                    .getObject();
+            if (!conceptCacheMGraph.filter(conceptCacheEntryNode,
+                    CONCEPTS.searchTerm, searchLiteral).hasNext()) {
+                continue;
+            }
+            return conceptCacheEntryNode;
+        }
+        return null;
+    }
+
+    private void removeCachedConcepts(GraphNode conceptCacheEntryGraphNode) {
+        Iterator<Resource> searchResults =
+                conceptCacheEntryGraphNode.getObjects(CONCEPTS.searchResult);
+        while (searchResults.hasNext()) {
+            Resource concept = searchResults.next();
+            GraphNode conceptGraphNode = new GraphNode(concept,
+                    conceptCacheEntryGraphNode.getGraph());
+            conceptGraphNode.deleteProperties(OWL.sameAs);
+            conceptGraphNode.deleteProperties(RDFS.comment);
+            conceptGraphNode.deleteProperties(SKOS.prefLabel);
+            conceptGraphNode.deleteProperties(RDF.type);
+        }
+        conceptCacheEntryGraphNode.deleteProperties(CONCEPTS.searchResult);
+        conceptCacheEntryGraphNode.deleteProperties(DC.date);
+        conceptCacheEntryGraphNode.deleteProperties(CONCEPTS.searchTerm);
+        conceptCacheEntryGraphNode.deleteProperties(RDF.type);
+    }
+
+    private void addCacheEntry(String searchTerm, NonLiteral conceptCacheNode,
+            MGraph conceptCacheMGraph, Graph parsedGraph) {
+        GraphNode conceptCacheGraphNode = null;
+        if (conceptCacheNode == null) {
+            conceptCacheGraphNode = addConceptCacheNode(conceptCacheMGraph);
+        } else {
+            conceptCacheGraphNode = new GraphNode(conceptCacheNode,
+                    conceptCacheMGraph);
+        }
+        GraphNode conceptCacheEntryGraphNode = new GraphNode(new BNode(),
+                conceptCacheMGraph);
+        conceptCacheGraphNode.addProperty(CONCEPTS.cacheEntry,
+                conceptCacheEntryGraphNode.getNode());
+        conceptCacheEntryGraphNode.addProperty(RDF.type, CONCEPTS.SearchTerm);
+        conceptCacheEntryGraphNode.addProperty(CONCEPTS.searchTerm,
+                LiteralFactory.getInstance().createTypedLiteral(searchTerm));
+        conceptCacheEntryGraphNode.addProperty(DC.date,
+                LiteralFactory.getInstance().createTypedLiteral(new Date()));
+
+        Iterator<Triple> concepts = parsedGraph.filter(null, RDF.type, SKOS.Concept);
+        while (concepts.hasNext()) {
+            conceptCacheEntryGraphNode.addProperty(CONCEPTS.searchResult,
+                    concepts.next().getSubject());
+        }
+        conceptCacheMGraph.addAll(parsedGraph);
+    }
+
+    private GraphNode addConceptCacheNode(MGraph conceptCacheMGraph) {
+        GraphNode conceptCacheGraphNode = new GraphNode(new BNode(),
+                conceptCacheMGraph);
+        conceptCacheGraphNode.addProperty(RDF.type, CONCEPTS.ConceptCache);
+        conceptCacheGraphNode.addProperty(CONCEPTS.sparqlEndPoint,
+                sparqlEndPoint);
+        if (defaultGraph != null) {
+            conceptCacheGraphNode.addProperty(CONCEPTS.defaultGraph,
+                    defaultGraph);
+        }
+        return     conceptCacheGraphNode;
+    }
+
+    /**
+     * Retrieves concepts from the cache stored under the specified search term.
+     * Cache entries are invalid if they are older than the specified date.
+     *
+     * @param searchTerm
+     *        the search term under which the concepts are cached.
+     * @param acceptableOldestCachingDate
+     *        the Date before which a cache entry is considered invalid.
+     * @return
+     *        an {@link MGraph} containing the valid cached concepts.
+     */
+    MGraph retrieve(String searchTerm, Date acceptableOldestCachingDate) {
+        MGraph conceptCacheMGraph = getConceptCacheMGraph();
+
+        NonLiteral conceptCacheNode = getConceptCacheNode(conceptCacheMGraph);
+        if (conceptCacheNode == null) {
+            return null;
+        }
+        NonLiteral conceptCacheEntryNode = getConceptCacheEntryNode(searchTerm,
+                conceptCacheNode, conceptCacheMGraph);
+        if (conceptCacheEntryNode == null) {
+            return null;
+        }
+        GraphNode conceptCacheEntryGraphNode = new GraphNode(
+                conceptCacheEntryNode, conceptCacheMGraph);
+        Date cachingDate = getCachingDate(conceptCacheEntryGraphNode);
+        if (cachingDate == null || cachingDate.before(acceptableOldestCachingDate)) {
+            removeCachedConcepts(conceptCacheEntryGraphNode);
+            conceptCacheMGraph.remove(new TripleImpl(conceptCacheNode,
+                    CONCEPTS.cacheEntry, conceptCacheEntryNode));
+            return null;
+        }
+        return getCachedConcepts(conceptCacheEntryGraphNode);
+    }
+
+    private Date getCachingDate(GraphNode conceptCacheEntryGraphNode) {
+        Iterator<Literal> cachingDates = conceptCacheEntryGraphNode.getLiterals(
+                DC.date);
+        if (cachingDates.hasNext()) {
+            return LiteralFactory.getInstance().createObject(Date.class,
+                    (TypedLiteral) cachingDates.next());
+        }
+        return null;
+    }
+
+    private MGraph getCachedConcepts(GraphNode conceptCacheEntryGraphNode) {
+        MGraph resultMGraph = new SimpleMGraph();
+        MGraph conceptCacheMGraph = (MGraph) conceptCacheEntryGraphNode.getGraph();
+        NonLiteral conceptCacheNode = (NonLiteral) conceptCacheEntryGraphNode.getNode();
+        Iterator<Triple> triples = conceptCacheMGraph.filter(
+                conceptCacheNode, CONCEPTS.searchResult, null);
+        while (triples.hasNext()) {
+            UriRef concept = (UriRef) triples.next().getObject();
+            GraphNode graphNode = new GraphNode(concept, conceptCacheMGraph);
+            resultMGraph.add(new TripleImpl(concept, RDF.type, SKOS.Concept));
+
+            Iterator<Literal> prefLabelStatements = graphNode.getLiterals(SKOS.prefLabel);
+            while (prefLabelStatements.hasNext()) {
+                resultMGraph.add(new TripleImpl(concept, SKOS.prefLabel,
+                        prefLabelStatements.next()));
+            }
+            Iterator<Literal> commentStatements = graphNode.getLiterals(RDFS.comment);
+            while (commentStatements.hasNext()) {
+                resultMGraph.add(new TripleImpl(concept, RDFS.comment,
+                        commentStatements.next()));
+            }
+            Iterator<UriRef> sameAsStatements = graphNode.getUriRefObjects(OWL.sameAs);
+            while (sameAsStatements.hasNext()) {
+                resultMGraph.add(new TripleImpl(concept, OWL.sameAs,
+                        sameAsStatements.next()));
+            }
+        }
+        return resultMGraph;
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
new file mode 100644
index 0000000..18b1e6c
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptManipulator.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+import org.apache.clerezza.platform.config.PlatformConfig;
+import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
+import org.apache.clerezza.rdf.core.Language;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.PlainLiteral;
+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.RDF;
+import org.apache.clerezza.rdf.ontologies.RDFS;
+import org.apache.clerezza.rdf.ontologies.SKOS;
+import org.apache.clerezza.rdf.utils.UriRefUtil;
+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;
+
+/**
+ * This JAX-RS resource can be used to add free concepts to the content graph.
+ * The URI path of this resource is /concepts/manipulator.
+ * 
+ * @author hasan
+ */
+@Component
+@Service(Object.class)
+@Property(name = "javax.ws.rs", boolValue = true)
+@Path("/concepts/manipulator")
+public class ConceptManipulator {
+
+    public static String FREE_CONCEPT_SCHEME = "concept-scheme/free-concepts";
+
+    @Reference
+    protected ContentGraphProvider cgProvider;
+
+    @Reference
+    private PlatformConfig platformConfig;
+
+    /**
+     * Creates and stores a concept with the specified prefLabel and comment
+     * into the content graph if a concept with this prefLabel does not already
+     * exist in the graph.
+     *
+     * @param prefLabel
+     *        if it is an empty string no concept is generated
+     * @param lang
+     *        the language of the prefLabel
+     * @param comment
+     *        is a human-readable description of the concept
+     * @return
+     *        - BAD REQUEST response if prefLabel is undefined or empty
+     *        - CONFLICT response if a concept with the same prefLabel and lang exists
+     *        - CREATED if everything is ok
+     */
+    @POST
+    @Path("add-concept")
+    public Response addConcept(@FormParam("pref-label") String prefLabel,
+            @FormParam("lang") String lang,
+            @FormParam("comment") String comment) {
+
+        if ((prefLabel == null) || (prefLabel.isEmpty())) {
+            return Response.status(Status.BAD_REQUEST)
+                    .entity("A concept must have a label!")
+                    .build();
+        }
+        MGraph contentGraph = cgProvider.getContentGraph();
+        PlainLiteral preferredLabel = new PlainLiteralImpl(prefLabel,
+                new Language(lang));
+
+        if (contentGraph.filter(null, SKOS.prefLabel, preferredLabel).hasNext()) {
+            return Response.status(Status.CONFLICT)
+                    .entity("A concept with the same label and language already exists!")
+                    .build();
+        }
+        
+        UriRef concept = getConceptUriRef(platformConfig, prefLabel);
+        contentGraph.add(new TripleImpl(concept, RDF.type,
+                SKOS.Concept));
+        String baseUri = platformConfig.getDefaultBaseUri().getUnicodeString();
+        contentGraph.add(new TripleImpl(concept, SKOS.inScheme,
+                new UriRef(baseUri + FREE_CONCEPT_SCHEME)));
+        contentGraph.add(new TripleImpl(concept, SKOS.prefLabel, preferredLabel));
+        if (!comment.isEmpty()) {
+            contentGraph.add(new TripleImpl(concept, RDFS.comment,
+                    new PlainLiteralImpl(comment, new Language(lang))));
+        }
+        return Response.status(Status.CREATED).entity(concept.getUnicodeString())
+                .build();
+    }
+
+    static UriRef getConceptUriRef(PlatformConfig platformConfig, String prefLabel) {
+        String baseUri = platformConfig.getDefaultBaseUri().getUnicodeString();
+        return new UriRef(baseUri + "concept/" +
+                UriRefUtil.stripNonUriRefChars(prefLabel));
+    }
+}
+
+
+
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
new file mode 100644
index 0000000..cedd350
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProvider.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import org.apache.clerezza.rdf.core.Graph;
+
+/**
+ * An implementation of this interface provides a function to retrieve
+ * concepts based on a search term.
+ * 
+ * @author hasan
+ */
+public interface ConceptProvider {
+    /**
+     * Returns a graph containing all concepts whose SKOS:prefLabels
+     * or SKOS:altLabels contain the search term.
+     *
+     * @param searchTerm a filter condition that specifies the term that must
+     *        be contained within SKOS:prefLabels or SKOS:altLabels of a concept.
+     * @return a Graph containing all concepts that meet the filter condition.
+     *
+     */
+    public Graph retrieveConcepts(String searchTerm);
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
new file mode 100644
index 0000000..a7b39ec
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManager.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.platform.concepts.core;
+
+import java.util.List;
+
+/**
+ * An implementation of this class manages {@link ConceptProvider}s.
+ *
+ * @author hasan
+ */
+public interface ConceptProviderManager {
+
+    /**
+     * Returns a list of {@link ConceptProvider}s. The list order determines
+     * the priority of a {@link ConceptProvider}. The meaning of the priority
+     * is left to the implementation and application.
+     * 
+     * @return
+     *        a list of managed {@link ConceptProvider}s.
+     */
+    public List<ConceptProvider> getConceptProviders();
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
----------------------------------------------------------------------
diff --git a/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
new file mode 100644
index 0000000..c346a12
--- /dev/null
+++ b/platform/concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/ConceptProviderManagerAppPermission.java
@@ -0,0 +1,66 @@
+/*
+ *  Copyright 2010 reto.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+
+package org.apache.clerezza.platform.concepts.core;
+
+import java.security.Permission;
+import org.apache.clerezza.permissiondescriptions.PermissionInfo;
+
+/**
+ * Permssion to use an application to Manage Concept-Providers. Note that the
+ * user additionally need the respecitive rights on the underlying graphs.
+ *
+ * @author reto
+ */
+@PermissionInfo(value="Concept Provider Manager Access Permission", description="Grants access " +
+    "to the Concept Provider Manager page")
+public class ConceptProviderManagerAppPermission extends Permission {
+
+    public ConceptProviderManagerAppPermission() {
+        super("Graph Management permission");
+    }
+
+    /**
+     *
+     * @param target ignored
+     * @param action ignored
+     */
+    public ConceptProviderManagerAppPermission(String target, String actions) {
+        super("Graph Management permission");
+    }
+
+    @Override
+    public boolean implies(Permission permission) {
+        return equals(permission);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return getClass().equals(obj.getClass());
+    }
+
+    @Override
+    public int hashCode() {
+        return 77985;
+    }
+
+    @Override
+    public String getActions() {
+        return "";
+    }
+
+}


[55/87] [abbrv] clerezza git commit: CLEREZZA-961: re-added accidentaly removed methos

Posted by re...@apache.org.
CLEREZZA-961: re-added accidentaly removed methos

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

Branch: refs/heads/master
Commit: f0f8dce131f0f72de5ff765e6ea110d29f80ff96
Parents: 32abd37
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 20:43:38 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 20:44:52 2015 +0000

----------------------------------------------------------------------
 .../clerezza/rdf/core/access/SecuredGraph.java  | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/f0f8dce1/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
index 8620563..add4c7d 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/SecuredGraph.java
@@ -18,6 +18,7 @@
  */
 package org.apache.clerezza.rdf.core.access;
 
+import java.security.AccessControlException;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.locks.ReadWriteLock;
@@ -27,6 +28,7 @@ import org.apache.commons.rdf.Triple;
 import org.apache.commons.rdf.Graph;
 import org.apache.commons.rdf.Iri;
 import org.apache.clerezza.rdf.core.access.security.TcAccessController;
+import org.apache.clerezza.rdf.core.impl.WriteBlockedGraph;
 import org.apache.commons.rdf.impl.utils.simple.SimpleImmutableGraph;
 import org.apache.commons.rdf.ImmutableGraph;
 import org.apache.commons.rdf.WatchableGraph;
@@ -173,4 +175,24 @@ public class SecuredGraph implements Graph {
     public ReadWriteLock getLock() {
         return wrapped.getLock();
     }
+    
+    /**
+     * Returns the wrapped Graph if the caller has all access rights.
+     * If the caller has only the read access right, then a write-blocked
+     * Graph is returned. If the caller has neither the read nor the write
+     * access right then an AccessControlException is thrown.
+     *
+     * @return the wrapped Graph or a write-block Graph depending
+     *        on the access rights of the caller.
+     */
+    public Graph getUnsecuredGraph() {
+        try {
+            checkWrite();
+            return wrapped;
+        } catch (AccessControlException ex) {
+            checkRead();
+            return new WriteBlockedGraph(wrapped);
+        }
+        
+    }
 }


[18/87] [abbrv] [partial] clerezza git commit: CLEREZZA-966: removed platform. prefix of folder names

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/staticweb/scripts/language-list.js
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/staticweb/scripts/language-list.js b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/staticweb/scripts/language-list.js
new file mode 100644
index 0000000..f88737e
--- /dev/null
+++ b/platform/language/platform.language.core/src/main/resources/org/apache/clerezza/platform/language/staticweb/scripts/language-list.js
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * The LanguageList is a global object which provides a function to retrieve
+ * the language selected in the language list widget.
+ * 
+ */
+
+LanguageList = new Object();
+
+
+LanguageList.getLanguage = function() {
+	var language = "";
+	$('#availablelanguages option:selected').each(function() {
+			language =  $(this).val();
+	});
+	return language;
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.ontologies/LICENSE
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.ontologies/LICENSE b/platform/language/platform.language.ontologies/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/platform/language/platform.language.ontologies/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.ontologies/pom.xml
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.ontologies/pom.xml b/platform/language/platform.language.ontologies/pom.xml
new file mode 100644
index 0000000..e836b09
--- /dev/null
+++ b/platform/language/platform.language.ontologies/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>platform.language</artifactId>
+        <version>0.3</version>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.language.ontologies</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Clerezza - Platform Language Ontologies</name>
+    <description>
+        Language Ontologies
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.core</artifactId>
+            <version>0.14</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.clerezza</groupId>
+                <artifactId>maven-ontologies-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <resourcePath>${basedir}/src/main/resources</resourcePath>
+                            <sources>
+                                <source>${basedir}/target/generated-sources/main/java</source>
+                            </sources>
+                        </configuration>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>0.4</version>
+        </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/platform.language.ontologies/src/main/resources/org/apache/clerezza/platform/language/ontologies/language.rdf
----------------------------------------------------------------------
diff --git a/platform/language/platform.language.ontologies/src/main/resources/org/apache/clerezza/platform/language/ontologies/language.rdf b/platform/language/platform.language.ontologies/src/main/resources/org/apache/clerezza/platform/language/ontologies/language.rdf
new file mode 100644
index 0000000..9e8ff8c
--- /dev/null
+++ b/platform/language/platform.language.ontologies/src/main/resources/org/apache/clerezza/platform/language/ontologies/language.rdf
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<rdf:RDF
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+	xmlns:owl="http://www.w3.org/2002/07/owl#"
+	xmlns:dc="http://purl.org/dc/elements/1.1/"
+	xmlns:skos="http://www.w3.org/2008/05/skos#"
+>
+
+<!-- Ontology -->
+
+<owl:Ontology rdf:about="http://clerezza.org/2010/01/language#">
+	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
+	<dc:title xml:lang="en">
+		Clerezza Language
+	</dc:title>
+</owl:Ontology>
+
+
+<!-- Classes -->
+
+<rdfs:Class rdf:about="http://clerezza.org/2010/01/language#LanguageList">
+	 <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List"/>
+     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+     <rdfs:label xml:lang="en">Language List</rdfs:label>
+     <skos:definition xml:lang="en">A list containing Lingvoj language uris</skos:definition>
+     <rdfs:isDefinedBy rdf:resource="http://clerezza.org/2010/01/language#"/>
+</rdfs:Class>
+
+</rdf:RDF>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/language/pom.xml
----------------------------------------------------------------------
diff --git a/platform/language/pom.xml b/platform/language/pom.xml
new file mode 100644
index 0000000..cb1cae0
--- /dev/null
+++ b/platform/language/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.language</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <name>Clerezza - Platform Language</name>
+    <description>This bundles provides methods to manage languages in the Clerezza platform.
+    </description>
+    <modules>
+        <module>platform.language.ontologies</module>
+        <module>platform.language.core</module>
+    </modules>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/LICENSE b/platform/launcher.mulgara/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/platform/launcher.mulgara/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/pom.xml b/platform/launcher.mulgara/pom.xml
new file mode 100644
index 0000000..2c44d16
--- /dev/null
+++ b/platform/launcher.mulgara/pom.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ 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.2-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.mulgara</artifactId>
+    <version>0.5-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Launcher with Mulgara</name>
+    <description>Mulgara variant of standalone java application for launching the clerezza.org platform. It is also a bundle, but there is no OSGi container known to support this (we are working on it :-) ).</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.xsite</groupId>
+                <artifactId>xsite-maven-plugin</artifactId>
+                <configuration>
+                    <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                    <sitemapPath>content/sitemap.xml</sitemapPath>
+                    <skinPath>templates/skin.html</skinPath>
+                    <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>pre-site</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
+                <executions>
+                    <execution>
+                        <id>inline-jars</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                org.apache.clerezza.platform.launcher.storageless
+                            </includeArtifactIds>
+                            <outputDirectory>target/extracted</outputDirectory>
+                            <includes>**</includes>
+                            <excludes>
+                                META-INF/**
+                            </excludes>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-platform-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-3</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <excludeArtifactIds>slf4j-api</excludeArtifactIds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.clerezza.platform.launcher.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-Name>Clerezza - Platform Launcher</Bundle-Name>
+                            <Bundle-SymbolicName>org.apache.clerezza.platform.launcher.tdb</Bundle-SymbolicName>
+                            <Bundle-Activator>org.apache.clerezza.platform.launcher.Main</Bundle-Activator>
+                            <Import-Package>org.osgi.framework,org.osgi.service.startlevel</Import-Package>
+                            <Private-Package>*</Private-Package>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>target/extracted/</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+            </resource>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <filtering>false</filtering>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>NOTICE.txt</include>
+                    <include>LICENSE.*</include>
+                </includes>
+            </resource>
+            <!-- the exclude rules are here because the maven-dependency-plugin
+            copies both -SNAPSHOT version as well as the one with the timestamp,
+            see http://jira.codehaus.org/browse/MDEP-209 -->
+            <resource>
+                <targetPath>bundles</targetPath>
+                <directory>target/bundles</directory>
+                <excludes>
+                    <exclude>**/*20*.*-*.jar</exclude>
+                </excludes>
+            </resource>
+        </resources>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.launcher.storageless</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <!-- what makes this variant special -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.mulgara.storage</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.mulgara</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.openrdf.sesame</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/main/appended-resources/META-INF/NOTICE b/platform/launcher.mulgara/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..27c71d2
--- /dev/null
+++ b/platform/launcher.mulgara/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,6 @@
+
+
+- Mort Bay Jetty Project (http://www.mortbay.org/jetty/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- WYMIWYG (http://wymiwyg.org/)
+- HP Labs Semantic Web Research (http://www.hpl.hp.com/semweb/)

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/resources/documentation/images/tut_1_class_diagram.png
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/resources/documentation/images/tut_1_class_diagram.png b/platform/launcher.mulgara/src/site/resources/documentation/images/tut_1_class_diagram.png
new file mode 100644
index 0000000..0bd04f4
Binary files /dev/null and b/platform/launcher.mulgara/src/site/resources/documentation/images/tut_1_class_diagram.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/resources/documentation/style/style.css
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/resources/documentation/style/style.css b/platform/launcher.mulgara/src/site/resources/documentation/style/style.css
new file mode 100644
index 0000000..ff49a4d
--- /dev/null
+++ b/platform/launcher.mulgara/src/site/resources/documentation/style/style.css
@@ -0,0 +1,421 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/*---------------------------------------------------------------------------
+ *  Two- and three-column layout
+ */
+
+#banner {
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    height: 116px;
+}
+
+#left {
+    position: absolute;
+    z-index: 2;
+    left: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+#right {
+    position: absolute;
+    z-index: 1;
+    right: 8px;
+    width: 184px;
+    top: 125px;
+    bottom: 8px;
+    margin: 0px;
+    padding: 0px;
+}
+
+.Content3Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 216px;
+}
+
+.Content2Column {
+    position: absolute;
+    top: 125px;
+    bottom: 8px;
+    left: 208px;
+    right: 16px;
+}
+
+#center {
+    z-index: 3;
+    margin: 0px;
+    border: none;
+    padding-bottom: 8px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Default element styles
+ */
+
+body {
+    padding: 0px;
+    margin: 0px;
+    border: 0px;
+
+    font-family: helvetica, arial, sans-serif;
+    font-size: 12px;
+
+    background-color: white;
+    color: black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0px;
+    border: 0px;
+    padding: 0px;
+    font-weight: normal;
+}
+
+a:link { color: #008DA8; }
+a:active { color: #FE5400; }
+a:hover { color: #FE5400; }
+a:visited { color: black; }
+
+iframe {
+    width:100%;
+    height: 800px;
+    border: 0px;
+}
+
+img {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+}
+
+p {
+    border: 0px;
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 10px;
+}
+
+blockquote {
+    margin-bottom: 10px;
+}
+
+td {
+    font-size: 12px;
+    padding: 2px;
+}
+
+tr.a {
+    background-color:  #e0e0e0;
+}
+tr.b {
+    background-color: #ffffff;
+}
+
+th {
+    font-size: 12px;
+    font-weight: bold;
+    white-space: nowrap;
+    padding: 2px;
+}
+
+th.Row {
+    text-align: left;
+    vertical-align: top;
+}
+
+ul, ol {
+    border: 0px;
+    padding: 0px;
+    margin-top: 0px;
+    margin-bottom: 12px;
+    margin-left: 20px;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  Page banner
+ */
+
+#banner {
+    margin: 0px;
+    border: 0px;
+    border-bottom: 1px solid #008DA8;
+    padding: 0px;
+    background-color: #e0e0e0;
+    color: #008DA8;
+    vertical-align: bottom;
+}
+
+#banner a { text-decoration: none; }
+#banner a:visited { color: #008DA8; }
+#banner a:hover { color: #FE5400; }
+#banner a:active { color: #FE5400; }
+
+#logo {
+    position: absolute;
+    top: 5px;
+    left: 8px;
+}
+
+#versions {
+    position: absolute;
+    width: auto;
+    right: 0px;
+    top: 0px;
+    margin: 8px;
+    font-weight: normal;
+}
+
+/*---------------------------------------------------------------------------
+ *  Page content
+ */
+
+#content {
+    margin: 0px;
+    background-color: white;
+    color: black;
+    height: 100%;
+}
+
+#content h1 {
+    width: 100%;
+    font-size: 18px;
+    background-color: #008DA8;
+    color: white;
+    padding: 2px;
+    padding-left: 6px;
+    margin-top: 24px;
+    margin-bottom: 12px;
+}
+
+#content .FirstChild {  /* IE doesn't understand first-child pseudoelement */
+    margin-top: 0px;
+}
+
+#content a { text-decoration: underline; }
+#content a:link { color: #008DA8; }
+#content a:visited { color: #008DA8; }
+#content a:active { color: #FE5400; }
+#content a:hover { color: #FE5400; }
+
+#content h2 {
+    margin-top: 24px;
+    border-top: 1px solid #008DA8;
+    margin-bottom: 16px;
+    font-size: 15px;
+    font-weight: bold;
+    background-color:  #e0e0e0;;
+    padding: 2px;
+}
+
+#content li {
+    margin-bottom: 6px;
+}
+
+#content th {
+    background-color:  #e0e0e0;
+}
+
+#content td {
+    
+}
+
+.Source pre {
+    padding: 4px;
+    font-family: courier new, monospace;
+    font-size: 11px;
+    border: 1px solid #008DA8;
+    background-color:  #e0e0e0;
+    color: black;
+}
+
+.Source:before {
+    margin: 0px;
+    padding: 0px;
+    border: 0px;
+    font-size: inherit;
+    line-spacing: 100%;
+}
+
+.highlight {
+    background-color:  #e0e0e0;
+    border: 1px dotted #008DA8;
+    padding: 5px;
+}
+
+/* The following are for images, but can also apply to div's containing images. */
+
+#content .Float {
+    float: right;
+    margin-left: 8px;
+    margin-right: 0px;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+#content .Diagram {
+    display: block;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 8px;
+    margin-bottom: 8px;
+}
+
+
+#content .Inline {
+    display: inline;
+}
+
+.RuleOfThumb {
+    font-weight: bold;
+}
+
+/*---------------------------------------------------------------------------
+ *  Side panels
+ */
+
+.SidePanel {
+    background-color: white;
+    padding: 0px;
+    font-size: 11px;
+}
+
+.SidePanel h1 {
+    margin: 0px;
+    border: 0px;
+    padding: 4px;
+
+    color: #008DA8;
+
+    font-size: 12px;
+    font-weight: bold;
+}
+
+
+.SidePanel a { text-decoration: none; }
+.SidePanel a:link { color: #000000; }
+.SidePanel a:visited { color: #000000; }
+.SidePanel a:active { color: #FE5400; }
+.SidePanel a:hover { color: #FE5400; }
+
+/*---------------------------------------------------------------------------
+ *  Menus
+ */
+
+.MenuGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE work-around */
+
+    margin-bottom: 8px;
+    background-color: white;
+    color: #008DA8;
+}
+
+.MenuGroup ul {
+    margin: 0px;
+    padding-left: 4px;
+    list-style-type: none;
+}
+
+.MenuGroup li {
+    padding: 2px;
+}
+
+.MenuGroup .currentLink {
+/*    background-color: #060;*/
+    background-color:  #e0e0e0;
+    color: #008DA8;
+}
+
+
+/*---------------------------------------------------------------------------
+ *  News panel
+ */
+
+.NewsGroup {
+    border-left: 1px solid #A3DAE6;
+    border-top: 1px solid #A3DAE6;
+    border-bottom: 1px solid white; /* IE workaround */
+    margin-bottom: 8px;
+
+    color: #008DA8;
+}
+
+.NewsItem {
+    margin: 4px;
+}
+
+.NewsDate {
+    font-weight: bold;
+    margin: 0px;
+    padding: 0px;
+}
+
+.NewsText {
+    padding: 0px;
+    margin: 0px;
+    margin-bottom: 8px;
+}
+
+.NewsText a { text-decoration: underline; }
+.NewsText a:link { color: #008DA8; }
+.NewsText a:visited { color: #008DA8; }
+.NewsText a:active { color: #FE5400; }
+.NewsText a:hover { color: #FE5400; }
+
+.NewsMore {
+    font-size: smaller;
+    margin: 4px;
+    margin-top: 8px;
+    text-align: left;
+}
+
+.NewsGroup td {
+    font-size: 12px;
+}
+
+/*---------------------------------------------------------------------------
+ *  Document meta-information
+ */
+
+.Meta {
+    margin-top: 64px;
+    font-size: smaller;
+    color: #008DA8;
+    text-align: right;
+}
+
+.Meta a { text-decoration: underline; }
+.Meta a:link { color: #008DA8; }
+.Meta a:visited { color: #008DA8; }
+.Meta a:active { color: #FE5400; }
+.Meta a:hover { color: #FE5400; }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/resources/images/clerezza.png
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/resources/images/clerezza.png b/platform/launcher.mulgara/src/site/resources/images/clerezza.png
new file mode 100644
index 0000000..cb0efb0
Binary files /dev/null and b/platform/launcher.mulgara/src/site/resources/images/clerezza.png differ

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/site.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/site.xml b/platform/launcher.mulgara/src/site/site.xml
new file mode 100644
index 0000000..62c8fd3
--- /dev/null
+++ b/platform/launcher.mulgara/src/site/site.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland).
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<project>
+    <body>
+        <menu name="Documentation">
+            <item name="Information" href="documentation/information.xhtml"/>
+        </menu>
+    </body>
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/xsite/content/information.xhtml
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/xsite/content/information.xhtml b/platform/launcher.mulgara/src/site/xsite/content/information.xhtml
new file mode 100644
index 0000000..5d30fab
--- /dev/null
+++ b/platform/launcher.mulgara/src/site/xsite/content/information.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
+	<head>
+		<title>Clerezza platform launcher with Mulgara storage</title>
+	</head>
+	<body>
+		<h1>Clerezza platform launcher with Jena TDB storage</h1>
+		<p>Author: Manuel Innerhofer - clerezza.org</p>
+		<p>Date: June 24, 2009</p>
+		<h2 id="information">Information</h2>
+		<p>
+			This is a launcher for the clerezza platform. It uses Mulgara as
+			rdf storage. For further information on how to use this launcher read
+			the documentation of the storageless launcher under
+            <br />
+			<a href="http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/" target="_blank">http://clerezza.org/projects/org.apache.clerezza.platform.launcher.storageless/</a>
+		</p>
+    </body>
+</html>
+

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/xsite/content/sitemap.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/xsite/content/sitemap.xml b/platform/launcher.mulgara/src/site/xsite/content/sitemap.xml
new file mode 100644
index 0000000..ecb9016
--- /dev/null
+++ b/platform/launcher.mulgara/src/site/xsite/content/sitemap.xml
@@ -0,0 +1,26 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<sitemap>
+    <section>
+        <name>Documentation</name>
+        <page>information.xhtml</page>
+    </section>
+</sitemap>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.mulgara/src/site/xsite/templates/skin.html
----------------------------------------------------------------------
diff --git a/platform/launcher.mulgara/src/site/xsite/templates/skin.html b/platform/launcher.mulgara/src/site/xsite/templates/skin.html
new file mode 100644
index 0000000..bb1b45d
--- /dev/null
+++ b/platform/launcher.mulgara/src/site/xsite/templates/skin.html
@@ -0,0 +1,71 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>clerezza.org - ${title}</title>
+        <link rel="stylesheet" type="text/css" href="style/style.css"/>
+        ${head}
+    </head>
+    <body>
+
+        <div id="banner">
+            <a href="http://clerezza.org/">
+              <img id="logo" src="../images/clerezza.png" alt="clerezza.org"/>
+            </a><br />
+        </div>
+
+        <div id="center" class="${centerClass}">
+            <div id="content">
+                <!-- <h1 class="FirstChild">${title}</h1> -->
+                ${body}
+                <p>Copyright (c) 2008-2009 trialox.org (trialox AG, Switzerland)</p>
+                <br /><br />
+            </div>
+        </div>
+
+        <div class="SidePanel" id="left">
+            <#list sitemap.sections as section>
+                <div class="MenuGroup">
+                    <h1>${section.name}</h1>
+                    <ul>
+                        <#list section.entries as entry>
+                            <#if entry = page>
+                                <li class="currentLink">${entry.title}</li>
+                            <#else>
+                                <li><a href="${entry.href}">${entry.title}</a></li>
+                            </#if>
+                        </#list>
+                    </ul>
+                </div>
+            </#list>
+            <div class="MenuGroup">
+                  <h1>Project Site</h1>
+                  <ul>
+
+                              <li><a href="../index.html">Back to project site</a></li>
+                  </ul>
+              </div>
+        </div>
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/DISCLAIMER
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/DISCLAIMER b/platform/launcher.sesame/DISCLAIMER
new file mode 100644
index 0000000..ab24be4
--- /dev/null
+++ b/platform/launcher.sesame/DISCLAIMER
@@ -0,0 +1,11 @@
+Apache Clerezza is an effort undergoing incubation at The Apache Software 
+Foundation (ASF), sponsored by the Apache Incubator. 
+
+Incubation is required of all newly accepted projects until a further 
+review indicates that the infrastructure, communications, and decision 
+making process have stabilized in a manner consistent with other 
+successful ASF projects. 
+
+While incubation status is not necessarily a reflection of the 
+completeness or stability of the code, it does indicate that the 
+project has yet to be fully endorsed by the ASF.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/LICENSE
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/LICENSE b/platform/launcher.sesame/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/platform/launcher.sesame/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/README.txt
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/README.txt b/platform/launcher.sesame/README.txt
new file mode 100644
index 0000000..6698c91
--- /dev/null
+++ b/platform/launcher.sesame/README.txt
@@ -0,0 +1,11 @@
+Apache Clerezza TDB Launcher
+
+The provided launcher jar is executable, however on most platform you must
+provide additional arguments to java so that Clerezza has enough memory to run.
+
+Start clerezza with:
+
+java -XX:MaxPermSize=400m -Dfile.encoding=utf-8 -Xss512k -Xmx2g -jar platform.launcher.tdb-*.jar
+
+Add the --help at the end of the line above to see possible argument for
+Clerezza

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/pom.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/pom.xml b/platform/launcher.sesame/pom.xml
new file mode 100644
index 0000000..9ae7e9a
--- /dev/null
+++ b/platform/launcher.sesame/pom.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>0.3-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <groupId>org.apache.clerezza</groupId>
+    <artifactId>platform.launcher.sesame</artifactId>
+    <version>0.5-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Clerezza - Platform Launcher with Sesame Storage</name>
+    <description>Sesame variant of standalone java application for launching the clerezza.org platform. It is also a bundle, but there is no OSGi container known to support this (we are working on it :-) ).</description>
+    <build>
+        <plugins>
+             <plugin>
+                    <groupId>org.codehaus.xsite</groupId>
+                    <artifactId>xsite-maven-plugin</artifactId>
+                    <configuration>
+                            <sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
+                            <sitemapPath>content/sitemap.xml</sitemapPath>
+                            <skinPath>templates/skin.html</skinPath>
+                            <outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
+                    </configuration>
+                    <executions>
+                            <execution>
+                                    <phase>pre-site</phase>
+                                    <goals>
+                                            <goal>run</goal>
+                                    </goals>
+                            </execution>
+                    </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
+                <executions>
+                    <execution>
+                        <id>inline-jars</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>
+                                platform.launcher.storageless
+                            </includeArtifactIds>
+                            <outputDirectory>target/extracted</outputDirectory>
+                            <includes>**</includes>
+                            <excludes>
+                                META-INF/**
+                            </excludes>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <id>copy-platform-bundles</id>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/bundles/startlevel-3</outputDirectory>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <excludeTransitive>true</excludeTransitive>
+                            <includeScope>runtime</includeScope>
+                            <excludeArtifactIds>slf4j-api</excludeArtifactIds>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.apache.clerezza.platform.launcher.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Bundle-Name>Clerezza - Platform Launcher</Bundle-Name>
+                            <Bundle-SymbolicName>org.apache.clerezza.platform.launcher.sesame</Bundle-SymbolicName>
+                            <Bundle-Activator>org.apache.clerezza.platform.launcher.Main</Bundle-Activator>
+                            <Import-Package>org.osgi.framework,org.osgi.service.startlevel</Import-Package>
+                            <Private-Package>*</Private-Package>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2.1</version>
+                <configuration>
+                    <finalName>clerezza-tdb</finalName>
+                    <descriptors>
+                        <descriptor>src/main/assembly/src.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
+                        <phase>package</phase> <!-- bind to the packaging phase -->
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>target/extracted/</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+            </resource>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <filtering>false</filtering>
+                <directory>${basedir}</directory>
+                <includes>
+                    <include>NOTICE.txt</include>
+                    <include>LICENSE.*</include>
+                </includes>
+            </resource>
+            <!-- the exclude rules are here because the maven-dependency-plugin
+            copies both -SNAPSHOT version as well as the one with the timestamp,
+            see http://jira.codehaus.org/browse/MDEP-209 -->
+            <resource>
+                <targetPath>bundles</targetPath>
+                <directory>target/bundles/</directory>
+                <excludes>
+                    <exclude>**/*20*.*-*.jar</exclude>
+                </excludes>
+            </resource>
+        </resources>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.launcher.storageless</artifactId>
+            <scope>provided</scope>
+            <version>0.9-SNAPSHOT</version>
+        </dependency>
+        <!-- what makes this variant special -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>rdf.sesame.storage</artifactId>
+            <scope>runtime</scope>
+            <version>0.13-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.ext</groupId>
+            <artifactId>org.openrdf.sesame</artifactId>
+            <scope>runtime</scope>
+            <version>0.5-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/main/appended-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/main/appended-resources/META-INF/NOTICE b/platform/launcher.sesame/src/main/appended-resources/META-INF/NOTICE
new file mode 100644
index 0000000..27c71d2
--- /dev/null
+++ b/platform/launcher.sesame/src/main/appended-resources/META-INF/NOTICE
@@ -0,0 +1,6 @@
+
+
+- Mort Bay Jetty Project (http://www.mortbay.org/jetty/)
+- Open Participation Software for Java (http://www.ops4j.org/)
+- WYMIWYG (http://wymiwyg.org/)
+- HP Labs Semantic Web Research (http://www.hpl.hp.com/semweb/)

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/main/assembly/src.xml
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/main/assembly/src.xml b/platform/launcher.sesame/src/main/assembly/src.xml
new file mode 100644
index 0000000..5c696d4
--- /dev/null
+++ b/platform/launcher.sesame/src/main/assembly/src.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>distribution</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <files>
+    <file>
+      <source>README.txt</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <!-- <file>
+        <source>target/platform.launcher.tdb-*-SNAPSHOT.jar</source>
+        <outputDirectory>/</outputDirectory>
+    </file> -->
+    <file>
+      <source>LICENSE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>target/classes/META-INF/NOTICE</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+    <file>
+      <source>DISCLAIMER</source>
+      <outputDirectory>/</outputDirectory>
+    </file>
+  </files>
+    <fileSets>
+        <fileSet>
+            <includes>
+                <include>LICENSE*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>target</directory>
+            <includes>
+                <include>platform.launcher.sesame-*.jar</include>
+            </includes>
+            <excludes>
+                <exclude>*sources.jar</exclude>
+            </excludes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/70220239/platform/launcher.sesame/src/site/resources/documentation/images/tut_1_class_diagram.png
----------------------------------------------------------------------
diff --git a/platform/launcher.sesame/src/site/resources/documentation/images/tut_1_class_diagram.png b/platform/launcher.sesame/src/site/resources/documentation/images/tut_1_class_diagram.png
new file mode 100644
index 0000000..0bd04f4
Binary files /dev/null and b/platform/launcher.sesame/src/site/resources/documentation/images/tut_1_class_diagram.png differ


[83/87] [abbrv] clerezza git commit: CLEREZZA-984: introducing content-launcher, porting platform content, some porting related fixes.

Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
index aea5190..19f094d 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/WebDavUtils.java
@@ -41,13 +41,13 @@ import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMResult;
-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.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.core.LiteralFactory;
-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.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.DCTERMS;
 import org.apache.clerezza.rdf.ontologies.HIERARCHY;
 import org.apache.clerezza.rdf.ontologies.RDF;
@@ -203,16 +203,16 @@ class WebDavUtils {
      * Putting the properties in a DOM Document *
      *------------------------------------------*/
 
-    static Document createResponseDoc(Map<UriRef, PropertyMap> resultMap)
+    static Document createResponseDoc(Map<IRI, PropertyMap> resultMap)
             throws ParserConfigurationException {
         Document responseDoc = DocumentBuilderFactory.newInstance().
                 newDocumentBuilder().newDocument();
-        Set<UriRef> nodeNameSet = resultMap.keySet();
+        Set<IRI> nodeNameSet = resultMap.keySet();
 
         Element multistatElement = responseDoc.createElementNS(davUri,"D:" + multistat);
         // add multistat element to response
         responseDoc.appendChild(multistatElement);
-        for (UriRef nodeName : nodeNameSet) {
+        for (IRI nodeName : nodeNameSet) {
             Element responseElement = responseDoc.createElementNS(davUri, "D:" + response);
             // add response element to response Document
             multistatElement.appendChild(responseElement);
@@ -223,7 +223,7 @@ class WebDavUtils {
     }
 
     private static void addElementsToResponse(PropertyMap propertyMap,
-            Element responseElement, Document responseDoc, UriRef nodeName) {
+            Element responseElement, Document responseDoc, IRI nodeName) {
         Element hrefElement = responseDoc.createElementNS(davUri, "D:" + href);
         hrefElement.setTextContent(nodeName.getUnicodeString());
         // add hrefElement element to responseElement
@@ -282,7 +282,7 @@ class WebDavUtils {
      * Get the properties from the CollectionNode and its members *
      *------------------------------------------------------------*/
 
-    static Map<UriRef, PropertyMap> getPropsByName(NodeList children,
+    static Map<IRI, PropertyMap> getPropsByName(NodeList children,
             GraphNode node, String depthHeader, boolean includeValues) {
         List<Property> requestedUserProps = new ArrayList<Property>();
         List<Property> requestedDavProps = new ArrayList<Property>();
@@ -300,7 +300,7 @@ class WebDavUtils {
                 requestedUserProps.add(new Property(nsUri, localName));
             }
         }
-        Map<UriRef, PropertyMap> allprops = new HashMap<UriRef, PropertyMap>();
+        Map<IRI, PropertyMap> allprops = new HashMap<IRI, PropertyMap>();
 
         if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
             return getCollectionProps(allprops, requestedUserProps, requestedDavProps,
@@ -313,11 +313,11 @@ class WebDavUtils {
 
     }
     
-    static Map<UriRef, PropertyMap> getCollectionProps(Map<UriRef, PropertyMap> allprops,
+    static Map<IRI, PropertyMap> getCollectionProps(Map<IRI, PropertyMap> allprops,
             List<Property> requestedUserProps, List<Property> requestedDavProps,
             GraphNode collection, String depthHeader, boolean includeValues) {
         if(allprops == null){
-            allprops = new HashMap<UriRef, PropertyMap>();
+            allprops = new HashMap<IRI, PropertyMap>();
         }
         addNodeProperties(allprops, requestedUserProps, requestedDavProps, collection,
                 includeValues);
@@ -333,7 +333,7 @@ class WebDavUtils {
         return allprops;
     }
 
-    private static void addMemberProps(Map<UriRef, PropertyMap> allprops,
+    private static void addMemberProps(Map<IRI, PropertyMap> allprops,
             List<Property> requestedUserProps, List<Property> requestedDavProps,
             List<GraphNode> members, String depthHeader, boolean includeValues) {
         for (GraphNode member : members) {
@@ -347,7 +347,7 @@ class WebDavUtils {
         }
     }
 
-    static void addNodeProperties(Map<UriRef, PropertyMap> allprops,
+    static void addNodeProperties(Map<IRI, PropertyMap> allprops,
             List<Property> requestedUserProps, List<Property> requestedDavProps,
             GraphNode node,    boolean includeValues) {
 
@@ -365,13 +365,13 @@ class WebDavUtils {
             addDavPropsWithoutValues(propertyMap);
             addUserPropsWithoutValues(node, propertyMap);
         }
-        allprops.put((UriRef) node.getNode(), propertyMap);
+        allprops.put((IRI) node.getNode(), propertyMap);
 
     }
 
     private static void addUserProps(GraphNode node, PropertyMap propertyMap,
             List<Property> requestedProps) {
-        Iterator<UriRef> userPropsIter;
+        Iterator<IRI> userPropsIter;
         Lock readLock = node.readLock();
         readLock.lock(); 
         try {
@@ -379,18 +379,18 @@ class WebDavUtils {
         } finally {
             readLock.unlock();
         }
-        Set<UriRef> userProps = new HashSet<UriRef>();
+        Set<IRI> userProps = new HashSet<IRI>();
         while (userPropsIter.hasNext()) {
             userProps.add(userPropsIter.next());
         }
         userProps.remove(HIERARCHY.members);
         if (requestedProps != null) {
             for (Property requestedProp : requestedProps) {
-                UriRef predicate = new UriRef(requestedProp.value());
+                IRI predicate = new IRI(requestedProp.value());
                 if (userProps.contains(predicate)) {
                     readLock.lock();
                     try {
-                        Iterator<Resource> value = node.getObjects(predicate);
+                        Iterator<RDFTerm> value = node.getObjects(predicate);
                         if (value.hasNext()) {
                             propertyMap.put(requestedProp, getValue(value.next()));
                         } else {
@@ -404,7 +404,7 @@ class WebDavUtils {
                 }
             }
         } else {
-            for (UriRef uri : userProps) {
+            for (IRI uri : userProps) {
                 String userProp = uri.getUnicodeString();
                 int index = userProp.lastIndexOf("#");
                 if (index == -1) {
@@ -413,7 +413,7 @@ class WebDavUtils {
                 Property property = new Property(userProp.substring(0, index + 1),
                         userProp.substring(index + 1));
 
-                Iterator<Resource> value = node.getObjects(uri);
+                Iterator<RDFTerm> value = node.getObjects(uri);
                 readLock.lock();
                 try {
                     if (value.hasNext()) {
@@ -430,7 +430,7 @@ class WebDavUtils {
 
     private static void addUserPropsWithoutValues(GraphNode node,
             PropertyMap propertyMap) {
-        Iterator<UriRef> userPropsIter;
+        Iterator<IRI> userPropsIter;
         Lock readLock = node.readLock();
         readLock.lock();
         try {
@@ -438,12 +438,12 @@ class WebDavUtils {
         } finally {
             readLock.unlock();
         }
-        Set<UriRef> userProps = new HashSet<UriRef>();
+        Set<IRI> userProps = new HashSet<IRI>();
         while (userPropsIter.hasNext()) {
             userProps.add(userPropsIter.next());
         }
         userProps.remove(HIERARCHY.members);
-        for (UriRef uri : userProps) {
+        for (IRI uri : userProps) {
             String userProp = uri.getUnicodeString();
             int index = userProp.lastIndexOf("#");
             if (index == -1) {
@@ -457,12 +457,12 @@ class WebDavUtils {
 
     /**
      * @param resource
-     * @return returns the unicode string of an UriRef or the lexical form of a
-     * Literal or the return value of a toString() on a BNode
+     * @return returns the unicode string of an IRI or the lexical form of a
+     * Literal or the return value of a toString() on a BlankNode
      */
-    private static String getValue(Resource resource){
-        if(resource instanceof UriRef){
-            return ((UriRef)resource).getUnicodeString();
+    private static String getValue(RDFTerm resource){
+        if(resource instanceof IRI){
+            return ((IRI)resource).getUnicodeString();
         }else if(resource instanceof Literal){
             return ((Literal)resource).getLexicalForm();
         }else {
@@ -482,7 +482,7 @@ class WebDavUtils {
         for (Property property : requestedProps) {
             if (davProps.contains(property.prop)) {
                 if (property.prop.equalsIgnoreCase(displayname)) {
-                    propertyMap.put(property, getLastSection(((UriRef)node.getNode()).getUnicodeString()));
+                    propertyMap.put(property, getLastSection(((IRI)node.getNode()).getUnicodeString()));
                 } else if (property.prop.equalsIgnoreCase(resourcetype)) {
                     if (node.hasProperty(RDF.type, HIERARCHY.Collection)) {
                         propertyMap.put(property, "collection");
@@ -493,7 +493,7 @@ class WebDavUtils {
                     Lock readLock = node.readLock();
                     readLock.lock();
                     try {
-                        Iterator<Resource> date = node.getObjects(DCTERMS.dateSubmitted);
+                        Iterator<RDFTerm> date = node.getObjects(DCTERMS.dateSubmitted);
                         if (date.hasNext()) {
                             String st = getValue(date.next());
                             propertyMap.put(property, st);
@@ -507,7 +507,7 @@ class WebDavUtils {
                     Lock readLock = node.readLock();
                     readLock.lock();
                     try {
-                        Iterator<Resource> date = node.getObjects(DCTERMS.modified);
+                        Iterator<RDFTerm> date = node.getObjects(DCTERMS.modified);
                         if (date.hasNext()) {
                             String st = getValue(date.next());
                             propertyMap.put(property, st);
@@ -521,7 +521,7 @@ class WebDavUtils {
                     Lock readLock = node.readLock();
                     readLock.lock();
                     try {
-                        Iterator<Resource> mediaType = node.getObjects(DCTERMS.MediaType);
+                        Iterator<RDFTerm> mediaType = node.getObjects(DCTERMS.MediaType);
                         if (mediaType.hasNext()) {
                             String st = getValue(mediaType.next());
                             propertyMap.put(property, st);
@@ -554,7 +554,7 @@ class WebDavUtils {
             NodeList propsToRemove) throws ParserConfigurationException {
         Document responseDoc = DocumentBuilderFactory.newInstance()
                     .newDocumentBuilder().newDocument();
-        UriRef subject = (UriRef) hierarchyNode.getNode();
+        IRI subject = (IRI) hierarchyNode.getNode();
         Element hrefElement = responseDoc.createElementNS(davUri, href);
         hrefElement.setTextContent(subject.getUnicodeString());
         Element multistatus = responseDoc.createElementNS(davUri, multistat);
@@ -568,7 +568,7 @@ class WebDavUtils {
 
         Map<Property, String> setMap = getNodeListAsMap(propsToSet);
         Map<Property, String> removeMap = getNodeListAsMap(propsToRemove);
-        TripleCollection contentGraph = hierarchyNode.getGraph();
+        Graph contentGraph = hierarchyNode.getGraph();
         for(Map.Entry<Property, String> entry : setMap.entrySet()){
             Property property = entry.getKey();
             if(property.ns.equalsIgnoreCase(davUri)){
@@ -576,11 +576,11 @@ class WebDavUtils {
                     propForbidden.appendChild(responseDoc
                             .createElementNS(davUri, property.prop));
                 } else {
-                    UriRef predicate = new UriRef(property.value());
+                    IRI predicate = new IRI(property.value());
                     Lock writeLock = hierarchyNode.writeLock();
                     writeLock.lock();
                     try {
-                        Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                        Iterator<RDFTerm> valIter = hierarchyNode.getObjects(predicate);
                         replaceProp(subject, predicate, valIter, contentGraph, entry);
                     } finally {
                         writeLock.unlock();
@@ -588,11 +588,11 @@ class WebDavUtils {
                     propOk.appendChild(responseDoc.createElementNS(davUri, property.prop));
                 }
             } else {
-                UriRef predicate = new UriRef(property.value());
+                IRI predicate = new IRI(property.value());
                 Lock writeLock = hierarchyNode.writeLock();
                 writeLock.lock();
                 try {
-                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                    Iterator<RDFTerm> valIter = hierarchyNode.getObjects(predicate);
                     replaceProp(subject, predicate, valIter, contentGraph, entry);
                 } finally {
                     writeLock.unlock();
@@ -607,11 +607,11 @@ class WebDavUtils {
                 propForbidden.appendChild(responseDoc
                             .createElementNS(davUri, property.prop));
             } else {
-                UriRef predicate = new UriRef(property.value());
+                IRI predicate = new IRI(property.value());
                 Lock writeLock = hierarchyNode.writeLock();
                 writeLock.lock();
                 try {
-                    Iterator<Resource> valIter = hierarchyNode.getObjects(predicate);
+                    Iterator<RDFTerm> valIter = hierarchyNode.getObjects(predicate);
                     Set<Triple> triplesToBeRemoved = new HashSet<Triple>();
                     while (valIter.hasNext()) {
                         triplesToBeRemoved.add(new TripleImpl(subject, predicate, valIter.next()));
@@ -661,8 +661,8 @@ class WebDavUtils {
         return result;
     }
 
-    private static void replaceProp(UriRef subject, UriRef predicate,
-            Iterator<Resource> valIter, TripleCollection contentGraph,
+    private static void replaceProp(IRI subject, IRI predicate,
+            Iterator<RDFTerm> valIter, Graph contentGraph,
             Map.Entry<Property, String> entry) {
         LiteralFactory fac = LiteralFactory.getInstance();
         Set<Triple> triplesToBeRemoved = new HashSet<Triple>();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
index 012d917..4a40b04 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/collections/CollectionCreator.java
@@ -21,26 +21,26 @@ package org.apache.clerezza.platform.content.collections;
 
 import java.net.URI;
 import java.net.URISyntaxException;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+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;
 
 /**
- * Creates the collections containing a resource in an underlying MGraph
+ * Creates the collections containing a resource in an underlying Graph
  *
  * @author reto
  */
 public class CollectionCreator {
 
-    private MGraph mGraph;
+    private Graph mGraph;
 
-    public CollectionCreator(MGraph mGraph) {
+    public CollectionCreator(Graph mGraph) {
         this.mGraph = mGraph;
     }
 
-    public void createContainingCollections(UriRef uriRef) {
+    public void createContainingCollections(IRI uriRef) {
         try {
             URI uri = new URI(uriRef.getUnicodeString());
             if (uri.getHost() == null) {
@@ -59,10 +59,10 @@ public class CollectionCreator {
                 }
                 final String unicodeString = uriRef.getUnicodeString();
                 int lastIndexOf = unicodeString.lastIndexOf(section);
-                UriRef parentUriRef = new UriRef(unicodeString.substring(0, lastIndexOf));
-                mGraph.add(new TripleImpl(uriRef, HIERARCHY.parent, parentUriRef));
-                mGraph.add(new TripleImpl(parentUriRef, RDF.type, HIERARCHY.Collection));
-                uriRef = parentUriRef;
+                IRI parentIRI = new IRI(unicodeString.substring(0, lastIndexOf));
+                mGraph.add(new TripleImpl(uriRef, HIERARCHY.parent, parentIRI));
+                mGraph.add(new TripleImpl(parentIRI, RDF.type, HIERARCHY.Collection));
+                uriRef = parentIRI;
 
             }
         } catch (URISyntaxException ex) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
----------------------------------------------------------------------
diff --git a/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java b/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
index 7881a34..97ba890 100644
--- a/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
+++ b/platform/content/src/main/java/org/apache/clerezza/platform/content/genericmetadata/GenericMetaDataGenerator.java
@@ -20,12 +20,12 @@ package org.apache.clerezza.platform.content.genericmetadata;
 
 import java.util.Date;
 import javax.ws.rs.core.MediaType;
+import org.apache.clerezza.commons.rdf.Literal;
+import org.apache.clerezza.rdf.core.LiteralFactory;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.rdf.metadata.MetaDataGenerator;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.TypedLiteral;
 import org.apache.clerezza.rdf.ontologies.DCTERMS;
 
 /**
@@ -39,7 +39,7 @@ public class GenericMetaDataGenerator implements MetaDataGenerator {
 
     @Override
     public void generate(GraphNode node, byte[] data, MediaType mediaType) {
-        TypedLiteral dateLiteral = LiteralFactory.getInstance()
+        Literal dateLiteral = LiteralFactory.getInstance()
                     .createTypedLiteral(new Date());
         if(node.getObjects(DCTERMS.dateSubmitted).hasNext()) {
             if(node.getObjects(DCTERMS.modified).hasNext()) {

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
----------------------------------------------------------------------
diff --git a/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp b/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
index bca6d6f..7734e31 100644
--- a/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
+++ b/platform/content/src/main/resources/org/apache/clerezza/platform/content/collection.ssp
@@ -19,7 +19,7 @@
  *
 */
 
-def hierarchy(s: Any) = new UriRef("http://clerezza.org/2009/09/hierarchy#" + s)
+def hierarchy(s: Any) = new IRI("http://clerezza.org/2009/09/hierarchy#" + s)
 <div id="tx-content">
 	<h3>{res*}</h3>
 	{ifx ((res/hierarchy("parent")).length != 0){

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
----------------------------------------------------------------------
diff --git a/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java b/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
index 7e5b242..fa8c72c 100644
--- a/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
+++ b/platform/content/src/test/java/org/apache/clerezza/platform/content/collections/CollectionsCreatorTest.java
@@ -20,10 +20,10 @@ package org.apache.clerezza.platform.content.collections;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
+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.commons.rdf.impl.utils.TripleImpl;
 import org.apache.clerezza.rdf.ontologies.HIERARCHY;
 import org.apache.clerezza.rdf.ontologies.RDF;
 
@@ -33,15 +33,15 @@ import org.apache.clerezza.rdf.ontologies.RDF;
  */
 public class CollectionsCreatorTest{
 
-    private static UriRef root = new UriRef("http://localhost:8282/");
-    private UriRef foo = new UriRef("http://localhost:8282/foo/");
-    private UriRef fooResource = new UriRef("http://localhost:8282/foo/resource");
-    private UriRef fooTest = new UriRef("http://localhost:8282/foo/test/");
-    private UriRef fooTestResource4 = new UriRef("http://localhost:8282/foo/test/resource4");
+    private static IRI root = new IRI("http://localhost:8282/");
+    private IRI foo = new IRI("http://localhost:8282/foo/");
+    private IRI fooResource = new IRI("http://localhost:8282/foo/resource");
+    private IRI fooTest = new IRI("http://localhost:8282/foo/test/");
+    private IRI fooTestResource4 = new IRI("http://localhost:8282/foo/test/resource4");
         
     @Test
     public void listPositionTest() throws Exception {
-        MGraph mGraph = new SimpleMGraph();
+        Graph mGraph = new SimpleGraph();
         CollectionCreator collectionCreator = new CollectionCreator(mGraph);
         collectionCreator.createContainingCollections(fooTestResource4);
         Assert.assertTrue(mGraph.contains(new TripleImpl(fooTest, RDF.type, HIERARCHY.Collection)));

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/editor/pom.xml
----------------------------------------------------------------------
diff --git a/platform/editor/pom.xml b/platform/editor/pom.xml
index 76cdb57..f3cef60 100644
--- a/platform/editor/pom.xml
+++ b/platform/editor/pom.xml
@@ -18,15 +18,15 @@
  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>
-        <relativePath>../parent</relativePath>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
     </parent>    
     <groupId>org.apache.clerezza</groupId>
     <artifactId>platform.editor</artifactId>
@@ -43,42 +43,42 @@
         <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>platform.typerendering.scala</artifactId>
-            <version>0.2</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>
@@ -103,14 +103,13 @@
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <version>1.9.6</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.config</artifactId>
             <version>0.4</version>
         </dependency>
-    <!--    <dependency>
+        <!--    <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.security</artifactId>
         </dependency> -->
@@ -152,40 +151,39 @@
         </resources>
         <plugins>
             <plugin>
-				<groupId>org.scala-tools</groupId>
-				<artifactId>maven-scala-plugin</artifactId>
-			</plugin>
+                <groupId>org.scala-tools</groupId>
+                <artifactId>maven-scala-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+          
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.osgi.*; version="[1,2)",javax.ws.rs.*; version="[1,3)",
+                            org.apache.stanbol.commons.security.*; version="[0,3)",
+                            !org.apache.felix.scr.annotations.*,*</Import-Package>
+                        <Bundle-SymbolicName>org.apache.clerezza.platform.editor</Bundle-SymbolicName>
+                        <_nodefaultversion />
+                    </instructions>
+                </configuration>
+            </plugin>
             <plugin>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>maven-bundle-plugin</artifactId>
-          <version>2.4.0</version>
-          <extensions>true</extensions>
-          <configuration>
-            <instructions>
-              <Import-Package>org.osgi.*; version="[1,2)",javax.ws.rs.*; version="[1,3)",
-                                            org.apache.stanbol.commons.security.*; version="[0,3)",
-                  !org.apache.felix.scr.annotations.*,*</Import-Package>
-              <Bundle-SymbolicName>org.apache.clerezza.platform.editor</Bundle-SymbolicName>
-              <_nodefaultversion />
-            </instructions>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>maven-scr-plugin</artifactId>
-          <version>1.14.0</version>
-          <executions>
-            <execution>
-              <id>generate-scr-scrdescriptor</id>
-              <goals>
-                <goal>scr</goal>
-              </goals>
-            </execution>
-          </executions>
-          <configuration>
-              <scanClasses>true</scanClasses> 
-          </configuration>
-        </plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-scr-scrdescriptor</id>
+                        <goals>
+                            <goal>scr</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <scanClasses>true</scanClasses> 
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
----------------------------------------------------------------------
diff --git a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
index e8e6665..befcff7 100644
--- a/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
+++ b/platform/editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
@@ -24,7 +24,7 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
-import org.apache.clerezza.rdf.core.Graph
+import org.apache.clerezza.commons.rdf.ImmutableGraph
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
@@ -45,7 +45,7 @@ class Manager {
   def sayHello = "Size of content graph: "+cgp.getContentGraph.size
   
   @PUT
-  def putData(graph: Graph) = {
+  def putData(graph: ImmutableGraph) = {
     //TODO implement
     graph
   }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/content-launcher/nb-configuration.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/content-launcher/nb-configuration.xml b/provisioning/launchers/content-launcher/nb-configuration.xml
new file mode 100644
index 0000000..ec4540c
--- /dev/null
+++ b/provisioning/launchers/content-launcher/nb-configuration.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+    <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
+        <!--
+Properties that influence various parts of the IDE, especially code formatting and the like. 
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->
+        <netbeans.compile.on.save>none</netbeans.compile.on.save>
+    </properties>
+</project-shared-configuration>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/content-launcher/nbactions.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/content-launcher/nbactions.xml b/provisioning/launchers/content-launcher/nbactions.xml
new file mode 100644
index 0000000..101fb77
--- /dev/null
+++ b/provisioning/launchers/content-launcher/nbactions.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+  <action>
+    <actionName>run</actionName>
+    <goals>
+      <goal>clean</goal>
+      <goal>package</goal>
+      <goal>antrun:run</goal>
+      <goal>-o</goal>
+    </goals>
+  </action>
+  <action>
+    <actionName>debug</actionName>
+    <goals>
+      <goal>clean</goal>
+      <goal>package</goal>
+      <goal>antrun:run</goal>
+      <goal>-o</goal>
+    </goals>
+    <properties>
+      <vm.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</vm.args>
+      <jpda.listen>true</jpda.listen>
+    </properties>
+  </action>
+  <action>
+    <actionName>profile</actionName>
+    <goals>
+      <goal>clean</goal>
+      <goal>package</goal>
+      <goal>antrun:run</goal>
+      <goal>-o</goal>
+    </goals>
+    <properties>
+      <vm.args>${profiler.args}</vm.args>
+      <!-- XXX <java jvm="${profiler.java}" ...> -->
+      <profiler.action>profile</profiler.action>
+    </properties>
+  </action>
+  <action>
+        <actionName>CUSTOM-resume-debug</actionName>
+        <displayName>Resume Debug</displayName>
+        <goals>
+            <goal>antrun:run</goal>
+        </goals>
+        <properties>
+            <vm.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</vm.args>
+            <jpda.listen>true</jpda.listen>
+        </properties>
+    </action>
+</actions>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/content-launcher/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/content-launcher/pom.xml b/provisioning/launchers/content-launcher/pom.xml
new file mode 100644
index 0000000..b56cc14
--- /dev/null
+++ b/provisioning/launchers/content-launcher/pom.xml
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Fusepool.eu Project Partners
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
+        <version>7-SNAPSHOT</version>
+        <relativePath />
+    </parent>
+    <groupId>org.apache.clerezza.provisioning</groupId>
+    <artifactId>content-launcher</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <name>Clerezza - Provisioning - Launchers - Content Launcher</name>
+    <description>Runnable jar using the clerezza partial bundlelists for 
+        accessing and editing data in the content graph.</description>
+
+    <prerequisites>
+      <maven>3.0.2</maven>
+    </prerequisites>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <configuration>
+                    <filesets>
+                        <fileset>
+                            <directory>.</directory>
+                            <includes>
+                                <include>stanbol/**</include>
+                                <include>*.log</include>
+                            </includes>
+                        </fileset>
+                    </filesets>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>maven-launchpad-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>prepare-package</id>
+                        <goals>
+                            <goal>prepare-package</goal>
+                        </goals>
+                        <configuration>
+                            <includeDefaultBundles>false</includeDefaultBundles>
+                            <!-- Standalone jar requires an OSGi http service implementation -->
+                            <jarWebSupport>
+                                <groupId>org.apache.felix</groupId>
+                                <artifactId>org.apache.felix.http.jetty</artifactId>
+                                <version>2.2.1</version>
+                            </jarWebSupport>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addClasspath>true</addClasspath>
+                            <mainClass>org.apache.stanbol.launchpad.Main</mainClass>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <!-- Use this to in/exclude only specific dependencies -->
+                                <includes>
+                                    <include>org.apache.stanbol:org.apache.stanbol.commons.launchpad</include>
+                                    <include>org.apache.sling:org.apache.sling.launchpad.base</include>
+                                </includes>
+                            </artifactSet>
+                            <!-- transformers>
+                              <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+                            </transformers -->
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes />
+                </configuration>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.sling</groupId>
+                    <artifactId>maven-launchpad-plugin</artifactId>
+                    <version>2.2.0</version>
+                    <extensions>true</extensions>
+                </plugin>
+                <!-- generates version number of dependencies suitable for introspection
+                in pax-exam based OSGi lightweight-integration tests -->
+                <plugin>
+                    <groupId>org.apache.servicemix.tooling</groupId>
+                    <artifactId>depends-maven-plugin</artifactId>
+                    <version>1.0</version>
+                    <executions>
+                        <execution>
+                            <id>generate-depends-file</id>
+                            <goals>
+                                <goal>generate-depends-file</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>1.7</version>
+                    <configuration>
+                        <target>
+                            <property name="vm.args" value="" />
+                            <java fork="true" jar="${project.build.directory}/${project.build.finalName}.jar" dir="${project.build.directory}">
+                                <jvmarg line="-Xmx1024m -XX:MaxPermSize=256M ${vm.args}" />
+                            </java>
+                        </target>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+
+    <dependencyManagement>
+        <dependencies>
+            <!-- Sling -->
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.launchpad.base</artifactId>
+                <version>2.5.0</version>
+                <classifier>app</classifier>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.launchpad.base</artifactId>
+                <version>2.5.0</version>
+                <classifier>webapp</classifier>
+                <type>war</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.launchpad.installer</artifactId>
+                <version>1.2.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.launchpad.api</artifactId>
+                <version>1.1.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.installer.api</artifactId>
+                <version>1.0.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>org.apache.sling.installer.core</artifactId>
+                <version>3.4.6</version>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+
+    <dependencies>
+        <dependency>
+            <!-- The Apache Stanbol launchpad -->
+            <groupId>org.apache.stanbol</groupId>
+            <artifactId>org.apache.stanbol.commons.launchpad</artifactId>
+            <version>0.12.0</version>
+        </dependency>
+        <dependency>
+            <!-- maven-launchpad-plugin builds on the launchpad.base app -->
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.launchpad.base</artifactId>
+            <classifier>app</classifier>
+        </dependency>
+    
+        <!-- BundeLists -->
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>felixosgi</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>felixweb</artifactId>
+            <version>0.1</version>
+            <type>partialbundlelist</type>
+        </dependency>
+       <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>rdf</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+		
+        <dependency>
+             <groupId>org.apache.clerezza.provisioning</groupId>
+             <artifactId>rdf.tdb</artifactId>
+             <version>1.0.0-SNAPSHOT</version>
+             <type>partialbundlelist</type>
+         </dependency>
+		 
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>platform.graphnodeprovider</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+      <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>jaxrs</artifactId>
+            <version>0.1</version>
+            <type>partialbundlelist</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>typehandlerspace</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>typerendering</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>rdf.web</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza.provisioning</groupId>
+            <artifactId>platform.content</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <type>partialbundlelist</type>
+        </dependency>
+    </dependencies>
+  
+  
+</project>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/content-launcher/src/main/bundles/list.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/content-launcher/src/main/bundles/list.xml b/provisioning/launchers/content-launcher/src/main/bundles/list.xml
new file mode 100644
index 0000000..1098261
--- /dev/null
+++ b/provisioning/launchers/content-launcher/src/main/bundles/list.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bundles>
+    <startLevel level="1">
+    </startLevel>
+</bundles>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/content-launcher/src/main/config/note.txt
----------------------------------------------------------------------
diff --git a/provisioning/launchers/content-launcher/src/main/config/note.txt b/provisioning/launchers/content-launcher/src/main/config/note.txt
new file mode 100644
index 0000000..eb01c8c
--- /dev/null
+++ b/provisioning/launchers/content-launcher/src/main/config/note.txt
@@ -0,0 +1 @@
+Sling launchpad plugin requires this directory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/launchers/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/launchers/pom.xml b/provisioning/launchers/pom.xml
index 9d4c120..ac885f9 100644
--- a/provisioning/launchers/pom.xml
+++ b/provisioning/launchers/pom.xml
@@ -45,8 +45,8 @@
     <modules>
         <module>typerendering-launcher</module>
         <module>linked-data-launcher</module>
+        <module>content-launcher</module>
         <module>shell-launcher</module>
         <module>full-launcher</module>
     </modules>
-
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/platform.content/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/platform.content/pom.xml b/provisioning/platform.content/pom.xml
index 4f416f5..b9c736b 100644
--- a/provisioning/platform.content/pom.xml
+++ b/provisioning/platform.content/pom.xml
@@ -51,7 +51,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.content</artifactId>
-            <version>0.14</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -61,7 +61,13 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.content.fsadaptor</artifactId>
-            <version>0.2</version>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <!-- optional -->
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.editor</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <!-- this doesn't strictly belongs to here -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/provisioning/rdf.web/pom.xml
----------------------------------------------------------------------
diff --git a/provisioning/rdf.web/pom.xml b/provisioning/rdf.web/pom.xml
index 4254294..5a5e819 100644
--- a/provisioning/rdf.web/pom.xml
+++ b/provisioning/rdf.web/pom.xml
@@ -65,9 +65,9 @@
             <version>0.9</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.clerezza.ext</groupId>
-            <artifactId>org.json.simple</artifactId>
-            <version>0.4</version>
+            <groupId>com.googlecode.json-simple</groupId>
+            <artifactId>json-simple</artifactId>
+            <version>1.1.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>web.fileserver</artifactId>
-            <version>0.10</version>
+            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
index 274b7e5..3f3551f 100644
--- a/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
+++ b/rdf/core/src/main/java/org/apache/clerezza/rdf/core/access/security/TcAccessController.java
@@ -50,7 +50,7 @@ import org.apache.clerezza.commons.rdf.Literal;
  *
  * Clients with a ConfigureTcAcessPermission can set the permissions required to
  * access a Graph. These permissions are stored persistently in an
- * Graph named urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph
+ * Graph named urn:x-localinstance:/graph-access.graph
  *
  * Clients should get an instance from TcManager.getTcAccessController()
  * 
@@ -59,7 +59,7 @@ import org.apache.clerezza.commons.rdf.Literal;
 public abstract class TcAccessController {
 
     private final TcManager tcManager;
-    private final IRI permissionGraphName = new IRI("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph");
+    private final IRI permissionGraphName = new IRI("urn:x-localinstance:/graph-access.graph");
     //we can't rely on ontology plugin in rdf core
     private String ontologyNamespace = "http://clerezza.apache.org/2010/07/10/graphpermssions#";
     private final IRI readPermissionListProperty = new IRI(ontologyNamespace + "readPermissionList");
@@ -80,7 +80,7 @@ public abstract class TcAccessController {
 
     /**
      *
-     * @param tcManager the tcManager used to locate urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph
+     * @param tcManager the tcManager used to locate urn:x-localinstance:/graph-access.graph
      */
     public TcAccessController() {
         this.tcManager = getTcManager();

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
----------------------------------------------------------------------
diff --git a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
index bd11974..36d8692 100644
--- a/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
+++ b/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/SecurityTest.java
@@ -77,7 +77,7 @@ public class SecurityTest {
                 result.add(new TcPermission("http://example.org/ImmutableGraph/alreadyexists", "readwrite"));
                 result.add(new TcPermission("http://example.org/read/ImmutableGraph", "read"));
                 result.add(new TcPermission("http://example.org/area/allowed/*", "readwrite"));
-                result.add(new TcPermission("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph", "readwrite"));
+                result.add(new TcPermission("urn:x-localinstance:/graph-access.graph", "readwrite"));
                 //result.add(new AllPermission());
                 result.add(new RuntimePermission("*"));
                 result.add(new ReflectPermission("suppressAccessChecks"));
@@ -136,7 +136,7 @@ public class SecurityTest {
         TcManager.getInstance().getTcAccessController().setRequiredReadPermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph"));
+        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().getMGraph(graphUri);
     }
@@ -147,7 +147,7 @@ public class SecurityTest {
         TcManager.getInstance().getTcAccessController().setRequiredReadPermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph"));
+        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().createGraph(graphUri);
     }
@@ -158,7 +158,7 @@ public class SecurityTest {
         TcManager.getInstance().getTcAccessController().setRequiredReadWritePermissionStrings(graphUri,
                 Collections.singletonList("(java.io.FilePermission \"/etc\" \"write\")"));
         //new FilePermission("/etc", "write").toString()));
-        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/ImmutableGraph-access.ImmutableGraph"));
+        Graph ag = TcManager.getInstance().getGraph(new IRI("urn:x-localinstance:/graph-access.graph"));
         System.out.print(ag.toString());
         TcManager.getInstance().createGraph(graphUri);
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/rdf/file.storage/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/file.storage/pom.xml b/rdf/file.storage/pom.xml
index 4932a7c..e6aebe4 100644
--- a/rdf/file.storage/pom.xml
+++ b/rdf/file.storage/pom.xml
@@ -33,6 +33,14 @@
     <version>1.0.0-SNAPSHOT</version>
     <name>Clerezza - RDF File Storage Provider</name>
     <description>A file base storage provider</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin> 
+        </plugins>
+    </build>
     <dependencies>
         <dependency>
             <groupId>junit</groupId>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
----------------------------------------------------------------------
diff --git a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
index 1382189..ec457c1 100644
--- a/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
+++ b/rdf/file.storage/src/main/java/org/apache/clerezza/rdf/file/storage/FileTcProvider.java
@@ -42,6 +42,9 @@ import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
 import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
 import org.apache.clerezza.rdf.core.serializedform.Parser;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 
 /**
  * The <code>FileTcProvider</code> is a <code>WeightedTcProvider</code> that
@@ -57,12 +60,11 @@ import org.apache.clerezza.rdf.core.serializedform.Serializer;
  * availability of these services.
  * The default weight of the provider is 300.
  *
- * @scr.component
- * @scr.service interface="org.apache.clerezza.rdf.core.access.WeightedTcProvider"
- * @scr.property name="weight" type="Integer" value="300"
- * 
  * @author mir
  */
+@Component
+@Service(WeightedTcProvider.class)
+@Property(name = "weight", intValue = 300)
 public class FileTcProvider implements WeightedTcProvider {
 
     /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/36b8bdf4/web.fileserver/pom.xml
----------------------------------------------------------------------
diff --git a/web.fileserver/pom.xml b/web.fileserver/pom.xml
index ae63ac1..87e4a75 100644
--- a/web.fileserver/pom.xml
+++ b/web.fileserver/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>web.fileserver</artifactId>


[53/87] [abbrv] clerezza git commit: CLEREZZA-979: ported typerendering.scala

Posted by re...@apache.org.
CLEREZZA-979: ported typerendering.scala

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

Branch: refs/heads/master
Commit: f69f4e1840ca491026ca9fa23f09c61fb516a44f
Parents: 0e20979
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Mar 23 19:33:06 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Mar 23 19:33:06 2015 +0000

----------------------------------------------------------------------
 platform/typerendering.scala/pom.xml                           | 6 +++++-
 .../platform/typerendering/scala/AbstractRenderlet.scala       | 2 +-
 .../clerezza/platform/typerendering/scala/PageRenderlet.scala  | 4 ++--
 .../clerezza/platform/typerendering/scala/RenderedPage.scala   | 5 +++--
 .../clerezza/platform/typerendering/scala/SRenderlet.scala     | 2 +-
 .../clerezza/platform/typerendering/scala/XmlResult.scala      | 5 +++--
 6 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/pom.xml
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/pom.xml b/platform/typerendering.scala/pom.xml
index e559ed7..4eb63b5 100644
--- a/platform/typerendering.scala/pom.xml
+++ b/platform/typerendering.scala/pom.xml
@@ -37,7 +37,7 @@
         <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>
@@ -53,6 +53,10 @@
             <groupId>org.scala-lang</groupId>
             <artifactId>scala-library</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.scala-lang.modules</groupId>
+            <artifactId>scala-xml_2.11</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
index 84a4221..6214a86 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.rdf.core.UriRef
+import org.apache.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
index df8335f..ba4c556 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.Renderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.rdf.core.UriRef
+import org.apache.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._
@@ -40,7 +40,7 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
 abstract class PageRenderlet extends AbstractRenderlet {
 
   def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
-  def rdfType: UriRef
+  def rdfType: Iri
   def mode = "naked"
 
   var renderletManager: RenderletManager = null;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
index 76d835e..dc75f76 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
@@ -32,6 +32,7 @@ import org.apache.clerezza.rdf.core._
 import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.security.{PrivilegedAction, AccessController}
+import org.apache.commons.rdf.Iri
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 
@@ -82,7 +83,7 @@ abstract class RenderedPage(arguments: RenderedPage.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: UriRef): Seq[Node] = {
+  def render(resource: Iri): Seq[Node] = {
     modeOption match {
       case Some(m) => render(resource, m)
       case None => render(resource, "naked")
@@ -93,7 +94,7 @@ abstract class RenderedPage(arguments: RenderedPage.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: UriRef, mode: String) = {
+  def render(resource: Iri, mode: String) = {
     def parseNodeSeq(string: String) = {
       _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
     }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
index ad082bb..5ea0819 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
@@ -24,7 +24,7 @@ import java.net.URI
 import javax.ws.rs.core.MediaType
 import org.apache.clerezza.platform.typerendering.TypeRenderlet.RequestProperties
 import org.apache.clerezza.platform.typerendering._
-import org.apache.clerezza.rdf.core.UriRef
+import org.apache.commons.rdf.Iri
 import org.apache.clerezza.rdf.utils.GraphNode
 import org.osgi.service.component.ComponentContext
 import org.apache.clerezza.rdf.ontologies._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/f69f4e18/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
index e920bf0..de29e51 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
@@ -34,6 +34,7 @@ import org.apache.clerezza.rdf.utils._
 import org.apache.clerezza.rdf.scala.utils.Preamble._
 import java.nio.charset.Charset
 import java.security.{PrivilegedAction, AccessController}
+import org.apache.commons.rdf.Iri
 import org.osgi.framework.{BundleContext, ServiceReference}
 import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 
@@ -84,7 +85,7 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: UriRef): Seq[Node] = {
+  def render(resource: Iri): Seq[Node] = {
     modeOption match {
       case Some(m) => render(resource, m)
       case None => render(resource, "naked")
@@ -95,7 +96,7 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
    * renders the specified resource without using the base-graph from resource
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
-  def render(resource: UriRef, mode: String) = {
+  def render(resource: Iri, mode: String) = {
     def parseNodeSeq(string: String) = {
       _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
     }