You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by al...@apache.org on 2011/11/03 20:03:13 UTC

svn commit: r1197271 [1/3] - in /incubator/stanbol/trunk: ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ ontologymanag...

Author: alexdma
Date: Thu Nov  3 19:03:11 2011
New Revision: 1197271

URL: http://svn.apache.org/viewvc?rev=1197271&view=rev
Log:
- Removed obsolete storage and factory classes in ontonet.io and reengineer.base.impl packages (STANBOL-332)
- General cleanup and documentation of OntoNet API

Added:
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/NamedResource.java
Removed:
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OWLOntologyManagerFactory.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/io/
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ontology/NoSuchStoreException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/OWLOntologyManagerFactoryImpl.java
    incubator/stanbol/trunk/reengineer/base/src/main/java/org/apache/stanbol/reengineer/base/impl/OntologyStorage.java
Modified:
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ONManager.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OWLDuplicateSafeLoader.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OfflineConfiguration.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/IrremovableOntologyException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/LockableOntologyCollector.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/MissingOntologyException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/NoSuchScopeException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollector.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollectorListener.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyProvider.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScope.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScopeFactory.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpace.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpaceFactory.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ScopeRegistry.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/SpaceType.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/DuplicateSessionIDException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/NonReferenceableSessionException.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/Session.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionEvent.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionManager.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologyCollectorImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/CustomOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/OntologySpaceFactoryImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ontology/OntologyScopeFactoryImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ontology/OntologyScopeImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/AbstractOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/CoreOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/CustomOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/OWLAPIOntologyProvider.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/OntologySpaceFactoryImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/owlapi/SessionOntologySpaceImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/session/SessionImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/session/SessionManagerImpl.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/util/OntologyUtils.java
    incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/io/TestOWLAPIInputSources.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/OntonetFragment.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntologyIndexResource.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntologyNetworkResource.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeOntologyResource.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeResource.java
    incubator/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/StoredGraphsResource.java
    incubator/stanbol/trunk/owl/src/main/java/org/apache/stanbol/owl/PhonyIRIMapper.java
    incubator/stanbol/trunk/reengineer/db/src/main/java/org/apache/stanbol/reengineer/db/DBDataTransformer.java
    incubator/stanbol/trunk/reengineer/web/src/main/java/org/apache/stanbol/reengineer/web/resources/ReengineerResource.java
    incubator/stanbol/trunk/reengineer/xml/src/main/java/org/apache/stanbol/reengineer/xml/XMLExtractor.java
    incubator/stanbol/trunk/reengineer/xml/src/main/java/org/apache/stanbol/reengineer/xml/XSDExtractor.java
    incubator/stanbol/trunk/rules/manager/src/main/java/org/apache/stanbol/rules/manager/changes/RuleStoreImpl.java
    incubator/stanbol/trunk/rules/refactor/src/main/java/org/apache/stanbol/rules/refactor/impl/RefactorerImpl.java

Added: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/NamedResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/NamedResource.java?rev=1197271&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/NamedResource.java (added)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/NamedResource.java Thu Nov  3 19:03:11 2011
@@ -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.stanbol.ontologymanager.ontonet.api;
+
+import org.semanticweb.owlapi.model.IRI;
+
+/**
+ * Denotes any OntoNet object that has an identifier. Both the identifier and the concatenation of the
+ * namespace with the identifier should be unique in the system. Having both a non-null namespace and ID is
+ * optional, but at least one of them should be non-null.
+ * 
+ * @author alexdma
+ * 
+ */
+public interface NamedResource {
+
+    /**
+     * Returns a string (assumed to be unique in the system) that identifies this resource. For instance, a
+     * parent IRI of the base IRIs for the ontologies within an ontology space. Naming schemes are
+     * implementation-dependent.<br>
+     * <br>
+     * Note that in general a named resource is not aware of its uniqueness. It is not even implied that
+     * objects of different types cannot have the same ID. These aspects should be ensured by registries,
+     * indexers etc.<br>
+     * <br>
+     * TODO check if a type other than String (e.g. URI, IRI, UriRef) should be used.
+     * 
+     * @return an identifier for this resource.
+     */
+    String getID();
+
+    /**
+     * Returns the namespace that should prefix the ID of this resource and all the resources managed thereby.
+     * This is also used by ontology collectors to dynamically generate import statements.
+     * 
+     * @return the default namespace for this resources.
+     */
+    IRI getNamespace();
+
+    /**
+     * Sets the namespace that should prefix the ID of this resource and all the resources managed thereby.
+     * This is also used by ontology collectors to dynamically generate import statements.
+     * 
+     * @param namespace
+     *            the new default namespace for this resources.
+     */
+    void setNamespace(IRI namespace);
+
+}

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ONManager.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ONManager.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ONManager.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ONManager.java Thu Nov  3 19:03:11 2011
@@ -19,12 +19,13 @@ package org.apache.stanbol.ontologymanag
 import java.io.File;
 
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologyIndex;
+import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologyProvider;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologyScopeFactory;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologySpaceFactory;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.ScopeRegistry;
 import org.apache.stanbol.ontologymanager.ontonet.api.session.SessionManager;
-import org.apache.stanbol.ontologymanager.ontonet.impl.io.ClerezzaOntologyStorage;
-import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.apache.stanbol.owl.OWLOntologyManagerFactory;
+import org.semanticweb.owlapi.model.IRI;
 import org.semanticweb.owlapi.model.OWLOntologyAlreadyExistsException;
 import org.semanticweb.owlapi.model.OWLOntologyManager;
 
@@ -32,6 +33,9 @@ import org.semanticweb.owlapi.model.OWLO
  * An Ontology Network Manager holds all references and tools for creating, modifying and deleting the logical
  * realms that store Web Ontologies, as well as offer facilities for handling the ontologies contained
  * therein.
+ * 
+ * @author alexdma, anuzzolese
+ * 
  */
 public interface ONManager {
 
@@ -51,13 +55,6 @@ public interface ONManager {
     String ONTOLOGY_NETWORK_NS = "org.apache.stanbol.ontologymanager.ontonet.ns";
 
     /**
-     * Returns the ID of the ontology network manager.
-     * 
-     * @return the ID of the ontology network manager.
-     */
-    String getID();
-
-    /**
      * Returns the offline configuration set for this ontology network manager, if any.
      * 
      * @return the offline configuration, or null if none was set.
@@ -101,30 +98,20 @@ public interface ONManager {
     OntologySpaceFactory getOntologySpaceFactory();
 
     /**
-     * Returns the default ontology storage system for this KReS instance.
-     * 
-     * @return the default ontology store.
-     */
-
-    ClerezzaOntologyStorage getOntologyStore();
-
-    /**
      * Returns an OWL Ontology Manager that is never cleared of its ontologies, so it can be used for caching
      * ontologies without having to reload them using other managers. It is sufficient to catch
      * {@link OWLOntologyAlreadyExistsException}s and obtain the ontology with that same ID from this manager.
      * 
+     * @deprecated the ONManager will soon stop providing a cache manager, as it will gradually be replaced by
+     *             {@link OntologyProvider}. Implementations that need to use an OWLOntologyManager which
+     *             avoids reloading stored ontologies can either call {@link OntologyProvider#getStore()} on
+     *             an {@link OWLOntologyManager}-based implementation, or create a new one by calling
+     *             {@link OWLOntologyManagerFactory#createOWLOntologyManager(IRI[])} or OWL API methods.
      * @return the OWL Ontology Manager used for caching ontologies.
      */
     OWLOntologyManager getOwlCacheManager();
 
     /**
-     * Returns a factory object that can be used for obtaining OWL API objects.
-     * 
-     * @return the default OWL data factory
-     */
-    OWLDataFactory getOwlFactory();
-
-    /**
      * Returns the unique ontology scope registry for this context.
      * 
      * @return the ontology scope registry.
@@ -132,9 +119,9 @@ public interface ONManager {
     ScopeRegistry getScopeRegistry();
 
     /**
-     * Returns the unique KReS session manager for this context.
+     * Returns the unique session manager for this context.
      * 
-     * @return the KreS session manager.
+     * @return the session manager.
      */
     SessionManager getSessionManager();
 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OWLDuplicateSafeLoader.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OWLDuplicateSafeLoader.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OWLDuplicateSafeLoader.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OWLDuplicateSafeLoader.java Thu Nov  3 19:03:11 2011
@@ -44,7 +44,7 @@ import org.semanticweb.owlapi.model.OWLO
  * then the loading of the network will fail if there are duplicate owl:import
  * statements in different places.</p>
  * 
- * @author enrico daga
+ * @author enridaga
  * 
  */
 public class OWLDuplicateSafeLoader {

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OfflineConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OfflineConfiguration.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OfflineConfiguration.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/OfflineConfiguration.java Thu Nov  3 19:03:11 2011
@@ -23,6 +23,9 @@ import org.semanticweb.owlapi.model.IRI;
 /**
  * Provides the configuration needed for the {@link ONManager}. A configuration should only be handled
  * internally by the {@link ONManager} implementation.
+ * 
+ * @author alexdma
+ * 
  */
 public interface OfflineConfiguration {
 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/IrremovableOntologyException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/IrremovableOntologyException.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/IrremovableOntologyException.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/IrremovableOntologyException.java Thu Nov  3 19:03:11 2011
@@ -1,61 +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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.ontology;
 
 import org.semanticweb.owlapi.model.IRI;
 
 /**
- * Thrown whenever an illegal attempt at removing an ontology from an ontology
- * space is detected. This can happen e.g. if the ontology is the space root or
- * not a direct child thereof.
+ * Thrown whenever an illegal attempt at removing an ontology from an ontology space is detected. This can
+ * happen e.g. if the ontology is the space root or not a direct child thereof.
  * 
  * @author alexdma
  * 
  */
-public class IrremovableOntologyException extends
-		OntologyCollectorModificationException {
-
-	protected IRI ontologyId;
+public class IrremovableOntologyException extends OntologyCollectorModificationException {
 
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -3301398666369788964L;
+    protected IRI ontologyId;
 
-	/**
-	 * Constructs a new instance of <code>IrremovableOntologyException</code>.
+    /**
 	 * 
-	 * @param space
-	 *            the space that holds the ontology.
-	 * @param ontologyId
-	 *            the logical IRI of the ontology whose removal was denied.
 	 */
-	public IrremovableOntologyException(OntologySpace space, IRI ontologyId) {
-		super(space);
-		this.ontologyId = ontologyId;
-	}
+    private static final long serialVersionUID = -3301398666369788964L;
 
-	/**
-	 * Returns the unique identifier of the ontology whose removal was denied.
-	 * 
-	 * @return the ID of the ontology that was not removed.
-	 */
-	public IRI getOntologyId() {
-		return ontologyId;
-	}
+    /**
+     * Constructs a new instance of <code>IrremovableOntologyException</code>.
+     * 
+     * @param space
+     *            the space that holds the ontology.
+     * @param ontologyId
+     *            the logical IRI of the ontology whose removal was denied.
+     */
+    public IrremovableOntologyException(OntologySpace space, IRI ontologyId) {
+        super(space);
+        this.ontologyId = ontologyId;
+    }
+
+    /**
+     * Returns the unique identifier of the ontology whose removal was denied.
+     * 
+     * @return the ID of the ontology that was not removed.
+     */
+    public IRI getOntologyId() {
+        return ontologyId;
+    }
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/LockableOntologyCollector.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/LockableOntologyCollector.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/LockableOntologyCollector.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/LockableOntologyCollector.java Thu Nov  3 19:03:11 2011
@@ -16,6 +16,16 @@
  */
 package org.apache.stanbol.ontologymanager.ontonet.api.ontology;
 
+/**
+ * An ontology collector that supports locking mechanisms, thus allowing/preventing modifications of the
+ * ontologies contained therein. Lock management is assumed to occur in methods inherited from
+ * {@link OntologyCollector}.<br>
+ * 
+ * TODO add public lock handling methods as well?
+ * 
+ * @author alexdma
+ * 
+ */
 public interface LockableOntologyCollector extends OntologyCollector {
 
     /**

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/MissingOntologyException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/MissingOntologyException.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/MissingOntologyException.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/MissingOntologyException.java Thu Nov  3 19:03:11 2011
@@ -1,52 +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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.ontology;
 
 import org.semanticweb.owlapi.model.IRI;
 
 /**
- * Thrown whenever an attempt to modify an ontology within an ontology space
- * that does not contain it is detected.
+ * Thrown whenever an attempt to modify an ontology within an ontology space that does not contain it is
+ * detected.
  * 
  * @author alexdma
  * 
  */
-public class MissingOntologyException extends
-		OntologyCollectorModificationException {
-
-	public MissingOntologyException(OntologySpace space, IRI ontologyId) {
-		super(space);
-		this.ontologyId = ontologyId;
-	}
+public class MissingOntologyException extends OntologyCollectorModificationException {
 
-	/**
-	 * Returns the unique identifier of the ontology whose removal was denied.
-	 * 
-	 * @return the ID of the ontology that was not removed.
-	 */
-	public IRI getOntologyId() {
-		return ontologyId;
-	}
+    public MissingOntologyException(OntologySpace space, IRI ontologyId) {
+        super(space);
+        this.ontologyId = ontologyId;
+    }
+
+    /**
+     * Returns the unique identifier of the ontology whose removal was denied.
+     * 
+     * @return the ID of the ontology that was not removed.
+     */
+    public IRI getOntologyId() {
+        return ontologyId;
+    }
 
-	protected IRI ontologyId;
+    protected IRI ontologyId;
 
-	/**
+    /**
 	 * 
 	 */
-	private static final long serialVersionUID = -3449667155191079302L;
+    private static final long serialVersionUID = -3449667155191079302L;
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/NoSuchScopeException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/NoSuchScopeException.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/NoSuchScopeException.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/NoSuchScopeException.java Thu Nov  3 19:03:11 2011
@@ -1,44 +1,42 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.ontology;
 
-
 /**
- * Thrown whenever an operation on a scope that has not been registered is
- * thrown.
+ * Thrown whenever an operation on a scope that has not been registered is thrown.
  * 
  * @author alexdma
  * 
  */
 public class NoSuchScopeException extends RuntimeException {
 
-	/**
+    /**
 	 * 
 	 */
-	private static final long serialVersionUID = 6339531579406287445L;
+    private static final long serialVersionUID = 6339531579406287445L;
 
-	private String scopeID = null;
+    private String scopeID = null;
 
-	public NoSuchScopeException(String scopeID) {
-		this.scopeID = scopeID;
-	}
+    public NoSuchScopeException(String scopeID) {
+        this.scopeID = scopeID;
+    }
 
-	public String getScopeId() {
-		return scopeID;
-	}
+    public String getScopeId() {
+        return scopeID;
+    }
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollector.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollector.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollector.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollector.java Thu Nov  3 19:03:11 2011
@@ -19,6 +19,7 @@ package org.apache.stanbol.ontologymanag
 import java.util.Collection;
 import java.util.Set;
 
+import org.apache.stanbol.ontologymanager.ontonet.api.NamedResource;
 import org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyInputSource;
 import org.semanticweb.owlapi.model.IRI;
 import org.semanticweb.owlapi.model.OWLOntology;
@@ -31,7 +32,7 @@ import org.semanticweb.owlapi.model.OWLO
  * @author alexdma
  * 
  */
-public interface OntologyCollector extends OntologyInputSourceHandler {
+public interface OntologyCollector extends NamedResource, OntologyInputSourceHandler {
 
     /**
      * Registers a new listener for changes in this ontology space. Has no effect if the same listener is
@@ -58,17 +59,6 @@ public interface OntologyCollector exten
     void clearListeners();
 
     /**
-     * Returns a Unique Resource Identifier (URI) that identifies this ontology space. For instance, this URI
-     * could be the parent of (some/most of) the base URIs for the ontologies within this space.<br/>
-     * <br/>
-     * A possible way to construct these IDs is by concatenating <code>/{spacetype}</code> (e.g.
-     * <code>/custom</code>) to the scope IRI. However, this is implementation-dependent.
-     * 
-     * @return the URI that identifies this ontology space
-     */
-    String getID();
-
-    /**
      * Returns all the listeners registered with this ontology space. Whether the collection reflects or not
      * the order in which they were registered depends on the implementation.
      * 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollectorListener.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollectorListener.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollectorListener.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyCollectorListener.java Thu Nov  3 19:03:11 2011
@@ -1,27 +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.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.ontology;
 
 import org.semanticweb.owlapi.model.IRI;
 
+/**
+ * Objects that react to the addition or removal of ontologies to an ontology collector will implement this
+ * interface.
+ * 
+ * @author alexdma
+ * 
+ */
 public interface OntologyCollectorListener {
 
-	void onOntologyAdded(IRI spaceId, IRI addedOntology);
+    /**
+     * Fired after an ontology was successfully added to an ontology collector.
+     * 
+     * @param collectorId
+     *            the ontology collector identifier.
+     * @param addedOntology
+     *            the added ontology identifier.
+     */
+    void onOntologyAdded(String collectorId, IRI addedOntology);
 
-	void onOntologyRemoved(IRI spaceId, IRI removedOntology);
+    /**
+     * Fired after an ontology was successfully removed from an ontology collector.
+     * 
+     * @param collectorId
+     *            the ontology collector identifier.
+     * @param removedOntology
+     *            the removed ontology identifier.
+     */
+    void onOntologyRemoved(String collectorId, IRI removedOntology);
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyProvider.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyProvider.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyProvider.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyProvider.java Thu Nov  3 19:03:11 2011
@@ -20,12 +20,16 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Set;
 
+import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.serializedform.UnsupportedFormatException;
 import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntologyManager;
 
 /**
  * A system responsible for maintaining registry ontologies. Depending on the implementation, it can be
- * volatile or persistent, centralised or distributed.
+ * volatile or persistent, centralised or distributed.<br>
+ * <br>
+ * TODO see if full CRUD operation support is necessary.
  * 
  * @author alexdma
  * 
@@ -47,7 +51,8 @@ public interface OntologyProvider<S> {
     Set<String> getOntologyReferences();
 
     /**
-     * Returns the storage system used by this ontology provider.
+     * Returns the storage system used by this ontology provider (e.g. a {@link TcProvider} or an
+     * {@link OWLOntologyManager}).
      * 
      * @return the ontology store.
      */
@@ -60,7 +65,7 @@ public interface OntologyProvider<S> {
      *            The expected type for the returned ontology object. If null, the provider will arbitrarily
      *            select a supported return type. If the supplied type is not supported (i.e. not assignable
      *            to any type contained in the result of {@link #getSupportedReturnTypes()}) an
-     *            {@link UnsupportedOperationException} will be thrown.
+     *            {@link UnsupportedOperationException} should be thrown.
      * @return
      */
     Object getStoredOntology(String identifier, Class<?> returnType);
@@ -73,9 +78,53 @@ public interface OntologyProvider<S> {
      */
     Class<?>[] getSupportedReturnTypes();
 
+    /**
+     * Retrieves an ontology by reading its content from a data stream and stores it using the storage system
+     * attached to this provider. A key that can be used to identify the ontology in this provider is returned
+     * if successful.
+     * 
+     * @param data
+     *            the ontology content.
+     * @param formatIdentifier
+     *            the MIME type of the expected serialization format of this ontology. If null, all supported
+     *            formats will be tried until all parsers fail or one succeeds.
+     * @param force
+     *            if true, all mappings provided by the offline configuration will be ignored (both for the
+     *            root ontology and its recursive imports) and the provider will forcibly try to resolve the
+     *            location IRI. If some remote import is found, the import policy is aggressive and Stanbol is
+     *            set on offline mode, this method will fail.
+     * @return a key that can be used to retrieve the stored ontology afterwards, or null if loading/storage
+     *         failed.
+     * @throws IOException
+     *             if all attempts to load the ontology failed.
+     * @throws UnsupportedFormatException
+     *             if no parsers are able to parse the supplied format (or the actual file format).
+     */
     String loadInStore(InputStream data, String formatIdentifier, boolean force) throws IOException,
                                                                                 UnsupportedFormatException;
 
+    /**
+     * Retrieves an ontology physically located at <code>location</code> (unless mapped otherwise by the
+     * offline configuration) and stores it using the storage system attached to this provider. A key that can
+     * be used to identify the ontology in this provider is returned if successful.
+     * 
+     * @param location
+     *            the physical IRI where the ontology is located.
+     * @param formatIdentifier
+     *            the MIME type of the expected serialization format of this ontology. If null, all supported
+     *            formats will be tried until all parsers fail or one succeeds.
+     * @param force
+     *            if true, all mappings provided by the offline configuration will be ignored (both for the
+     *            root ontology and its recursive imports) and the provider will forcibly try to resolve the
+     *            location IRI. If the IRI is not local and Stanbol is set on offline mode, this method will
+     *            fail.
+     * @return a key that can be used to retrieve the stored ontology afterwards, or null if loading/storage
+     *         failed.
+     * @throws IOException
+     *             if all attempts to load the ontology failed.
+     * @throws UnsupportedFormatException
+     *             if no parsers are able to parse the supplied format (or the actual file format).
+     */
     String loadInStore(IRI location, String formatIdentifier, boolean force) throws IOException,
                                                                             UnsupportedFormatException;
 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScope.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScope.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScope.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScope.java Thu Nov  3 19:03:11 2011
@@ -18,12 +18,13 @@ package org.apache.stanbol.ontologymanag
 
 import java.util.Set;
 
-import org.semanticweb.owlapi.model.IRI;
+import org.apache.stanbol.ontologymanager.ontonet.api.NamedResource;
+import org.apache.stanbol.ontologymanager.ontonet.api.session.Session;
 import org.semanticweb.owlapi.model.OWLOntology;
 
 /**
- * Represents an ontology network that is used by KReS for modelling a given knowledge component or domain,
- * e.g. workflows, organisations, devices, content or business domain.<br>
+ * Represents an ontology network that is used for modelling a given knowledge component or domain, e.g.
+ * workflows, organisations, devices, content or business domain.<br>
  * <br>
  * Each ontology scope comprises in turn a number of ontology spaces of three kinds.
  * <ul>
@@ -38,7 +39,7 @@ import org.semanticweb.owlapi.model.OWLO
  * @author alexdma
  * 
  */
-public interface OntologyScope extends ScopeOntologyListenable, OWLExportable {
+public interface OntologyScope extends NamedResource, ScopeOntologyListenable, OWLExportable {
 
     /**
      * Adds a new ontology space to the list of user session spaces for this scope.
@@ -74,18 +75,10 @@ public interface OntologyScope extends S
     OntologySpace getCustomSpace();
 
     /**
-     * Returns an object that uniquely identifies this ontology scope.
+     * Returns the ontology space for this scope that is identified by the supplied IRI.
      * 
-     * TODO : check if we'd rather use another class for identifiers.
-     * 
-     * @return the unique identifier for this ontology scope
-     */
-    String getID();
-
-    IRI getNamespace();
-
-    /**
-     * Return the ontology space for this scope that is identified by the supplied IRI.
+     * @deprecated as session ontology spaces are obsolete, so is this method. Please refer directly to the
+     *             session identified by <code>sessionID</code>.
      * 
      * @param sessionID
      *            the unique identifier of the KReS session.
@@ -97,6 +90,9 @@ public interface OntologyScope extends S
     /**
      * Returns all the active ontology spaces for this scope.
      * 
+     * @deprecated as session ontology spaces are obsolete, so is this method. Please reroute all
+     *             session-related queries to {@link Session} objects directly.
+     * 
      * @return a set of active ontology spaces for this scope.
      */
     Set<OntologySpace> getSessionSpaces();
@@ -111,8 +107,6 @@ public interface OntologyScope extends S
      */
     void setCustomSpace(OntologySpace customSpace) throws UnmodifiableOntologyCollectorException;
 
-    void setNamespace(IRI namespace);
-
     /**
      * Performs the operations required for activating the ontology scope. It should be possible to perform
      * them <i>after</i> the constructor has been invoked.<br>
@@ -132,6 +126,8 @@ public interface OntologyScope extends S
      * automatic, it should be invoked by whatever classes are responsible for listening to changes in an
      * ontology scope/space. In the default implementation, it is the scope itself, yet the method is left
      * public in order to allow for external controllers.
+     * 
+     * @deprecated synchronization is managed internally, therefore this method has no effect.
      */
     void synchronizeSpaces();
 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScopeFactory.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScopeFactory.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScopeFactory.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologyScopeFactory.java Thu Nov  3 19:03:11 2011
@@ -17,8 +17,8 @@
 package org.apache.stanbol.ontologymanager.ontonet.api.ontology;
 
 import org.apache.stanbol.ontologymanager.ontonet.api.DuplicateIDException;
+import org.apache.stanbol.ontologymanager.ontonet.api.NamedResource;
 import org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyInputSource;
-import org.semanticweb.owlapi.model.IRI;
 
 /**
  * An ontology scope factory is responsible for the creation of new ontology scopes from supplied ontology
@@ -30,7 +30,7 @@ import org.semanticweb.owlapi.model.IRI;
  * @author alexdma
  * 
  */
-public interface OntologyScopeFactory extends ScopeEventListenable {
+public interface OntologyScopeFactory extends NamedResource, ScopeEventListenable {
 
     /**
      * Creates and returns a new ontology scope with the core space ontologies obtained from
@@ -47,8 +47,4 @@ public interface OntologyScopeFactory ex
      */
     OntologyScope createOntologyScope(String scopeID, OntologyInputSource<?>... coreSources) throws DuplicateIDException;
 
-    IRI getNamespace();
-
-    void setNamespace(IRI namespace);
-
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpace.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpace.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpace.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpace.java Thu Nov  3 19:03:11 2011
@@ -34,8 +34,4 @@ public interface OntologySpace extends L
      */
     OWLOntology asOWLOntology();
 
-    boolean isSilentMissingOntologyHandling();
-
-    void setSilentMissingOntologyHandling(boolean silent);
-
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpaceFactory.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpaceFactory.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpaceFactory.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/OntologySpaceFactory.java Thu Nov  3 19:03:11 2011
@@ -16,8 +16,8 @@
  */
 package org.apache.stanbol.ontologymanager.ontonet.api.ontology;
 
+import org.apache.stanbol.ontologymanager.ontonet.api.NamedResource;
 import org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyInputSource;
-import org.semanticweb.owlapi.model.IRI;
 
 /**
  * An ontology space factory is responsible for the creation of new, readily specialized ontology spaces from
@@ -28,7 +28,7 @@ import org.semanticweb.owlapi.model.IRI;
  * 
  * @author alexdma
  */
-public interface OntologySpaceFactory {
+public interface OntologySpaceFactory extends NamedResource {
 
     /**
      * Creates and sets up a default core ontology space. Equivalent to calling
@@ -87,8 +87,4 @@ public interface OntologySpaceFactory {
      */
     SessionOntologySpace createSessionOntologySpace(String scopeId, OntologyInputSource<?>... sessionSources);
 
-    IRI getNamespace();
-
-    void setNamespace(IRI namespace);
-
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ScopeRegistry.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ScopeRegistry.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ScopeRegistry.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/ScopeRegistry.java Thu Nov  3 19:03:11 2011
@@ -1,124 +1,118 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.ontology;
 
 import java.util.Set;
 
-import org.semanticweb.owlapi.model.IRI;
-
 /**
- * A registry that keeps track of the active ontology scopes in a running KReS
- * instance.
+ * A registry that keeps track of the active ontology scopes in a running KReS instance. <br>
+ * <br>
+ * TODO deprecate scope registration methods and manage registration automcatically.
  * 
  * @author alexdma
  * 
  */
 public interface ScopeRegistry {
 
-	/**
-	 * Adds a scope registration listener to this registry. If the listener was
-	 * already added, this should result in no effect.
-	 * 
-	 * @param listener
-	 *            the listener to be added
-	 */
+    /**
+     * Adds a scope registration listener to this registry. If the listener was already added, this should
+     * result in no effect.
+     * 
+     * @param listener
+     *            the listener to be added
+     */
     void addScopeRegistrationListener(ScopeEventListener listener);
 
-	/**
-	 * Removes all registered scope registration listeners.
-	 */
+    /**
+     * Removes all registered scope registration listeners.
+     */
     void clearScopeRegistrationListeners();
 
-	/**
-	 * 
-	 * @param scopeID
-	 * @return true iff an ontology scope with ID <code>scopeID</code> is
-	 *         registered.
-	 */
+    /**
+     * 
+     * @param scopeID
+     * @return true iff an ontology scope with ID <code>scopeID</code> is registered.
+     */
     boolean containsScope(String scopeID);
 
-	/**
-	 * Removes an ontology scope from this registry, thus deactivating the scope
-	 * and all of its associated spaces. All attached listeners should hear this
-	 * deregistration on their <code>scopeDeregistered()</code> method.
-	 * 
-	 * @param scope
-	 *            the ontology scope to be removed
-	 */
+    /**
+     * Removes an ontology scope from this registry, thus deactivating the scope and all of its associated
+     * spaces. All attached listeners should hear this deregistration on their
+     * <code>scopeDeregistered()</code> method.
+     * 
+     * @param scope
+     *            the ontology scope to be removed
+     */
     void deregisterScope(OntologyScope scope);
 
-	/**
-	 * Returns the set of registered ontology scopes.
-	 * 
-	 * @return the set of ontology scopes
-	 */
+    /**
+     * Returns the set of registered ontology scopes.
+     * 
+     * @return the set of ontology scopes
+     */
     Set<OntologyScope> getRegisteredScopes();
 
-	/**
-	 * Returns the unique ontology scope identified by the given ID.
-	 * 
-	 * @param scopeID
-	 *            the scope identifier
-	 * @return the ontology scope with that ID, or null if no scope with such ID
-	 *         is registered
-	 */
+    /**
+     * Returns the unique ontology scope identified by the given ID.
+     * 
+     * @param scopeID
+     *            the scope identifier
+     * @return the ontology scope with that ID, or null if no scope with such ID is registered
+     */
     OntologyScope getScope(String scopeID);
 
-	void setScopeActive(String scopeID, boolean active);
+    void setScopeActive(String scopeID, boolean active);
 
-	boolean isScopeActive(String scopeID);
+    boolean isScopeActive(String scopeID);
 
-	Set<OntologyScope> getActiveScopes();
+    Set<OntologyScope> getActiveScopes();
 
-	/**
-	 * Returns the set of registered scope registration listeners, in no
-	 * particular order.
-	 * 
-	 * @return the set of scope registration listeners
-	 */
+    /**
+     * Returns the set of registered scope registration listeners, in no particular order.
+     * 
+     * @return the set of scope registration listeners
+     */
     Set<ScopeEventListener> getScopeRegistrationListeners();
 
-	/**
-	 * Equivalent to <code>registerScope(scope, false)</code>.
-	 * 
-	 * @param scope
-	 *            the ontology scope to be added
-	 */
+    /**
+     * Equivalent to <code>registerScope(scope, false)</code>.
+     * 
+     * @param scope
+     *            the ontology scope to be added
+     */
     void registerScope(OntologyScope scope);
 
-	/**
-	 * Adds an ontology scope to this registry, thus activating the scope if
-	 * <code>activate</code> is set and (at a bare minumum) its core space. All
-	 * attached listeners should hear this registration on their
-	 * <code>scopeRegistered()</code> method.
-	 * 
-	 * @param scope
-	 *            the ontology scope to be added
-	 */
+    /**
+     * Adds an ontology scope to this registry, thus activating the scope if <code>activate</code> is set and
+     * (at a bare minumum) its core space. All attached listeners should hear this registration on their
+     * <code>scopeRegistered()</code> method.
+     * 
+     * @param scope
+     *            the ontology scope to be added
+     */
     void registerScope(OntologyScope scope, boolean activate);
 
-	/**
-	 * Removes a scope registration listener from this registry. If the listener
-	 * was not previously added, this should result in no effect.
-	 * 
-	 * @param listener
-	 *            the listener to be removed
-	 */
-    void removeScopeRegistrationListener(
-            ScopeEventListener listener);
+    /**
+     * Removes a scope registration listener from this registry. If the listener was not previously added,
+     * this should result in no effect.
+     * 
+     * @param listener
+     *            the listener to be removed
+     */
+    void removeScopeRegistrationListener(ScopeEventListener listener);
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/SpaceType.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/SpaceType.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/SpaceType.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/ontology/SpaceType.java Thu Nov  3 19:03:11 2011
@@ -33,6 +33,8 @@ public enum SpaceType {
 
     /**
      * Denotes a session space (0..n).
+     * 
+     * @deprecated no session spaces should created anymore.
      */
     SESSION("session");
 

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/DuplicateSessionIDException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/DuplicateSessionIDException.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/DuplicateSessionIDException.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/DuplicateSessionIDException.java Thu Nov  3 19:03:11 2011
@@ -1,50 +1,47 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.session;
 
 import org.apache.stanbol.ontologymanager.ontonet.api.DuplicateIDException;
-import org.semanticweb.owlapi.model.IRI;
-
 
 /**
- * Thrown when attempting to create a KReSSession by forcing a session ID that
- * is already registered, even if it used to be associated to a session that has
- * been destroyed.
+ * Thrown when attempting to create a KReSSession by forcing a session ID that is already registered, even if
+ * it used to be associated to a session that has been destroyed.
  * 
  * @author alexdma
  * 
  */
 public class DuplicateSessionIDException extends DuplicateIDException {
 
-	/**
+    /**
 	 * 
 	 */
-	private static final long serialVersionUID = 3548783975623103351L;
+    private static final long serialVersionUID = 3548783975623103351L;
 
-	public DuplicateSessionIDException(String dupe) {
-		super(dupe);
-	}
-
-	public DuplicateSessionIDException(String dupe, String message) {
-		super(dupe, message);
-	}
-
-	public DuplicateSessionIDException(String dupe, Throwable cause) {
-		super(dupe, cause);
-	}
+    public DuplicateSessionIDException(String dupe) {
+        super(dupe);
+    }
+
+    public DuplicateSessionIDException(String dupe, String message) {
+        super(dupe, message);
+    }
+
+    public DuplicateSessionIDException(String dupe, Throwable cause) {
+        super(dupe, cause);
+    }
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/NonReferenceableSessionException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/NonReferenceableSessionException.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/NonReferenceableSessionException.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/NonReferenceableSessionException.java Thu Nov  3 19:03:11 2011
@@ -1,45 +1,42 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.session;
 
 /**
- * Thrown whenever an attempt to access a KReS session that is bound for removal
- * is detected.
+ * Thrown whenever an attempt to access a KReS session that is bound for removal is detected.
  * 
  * @author alexdma
  * 
  */
 public class NonReferenceableSessionException extends Exception {
 
-	/**
+    /**
 	 * 
 	 */
-	private static final long serialVersionUID = 1642512088759774124L;
-
-	public NonReferenceableSessionException() {
+    private static final long serialVersionUID = 1642512088759774124L;
 
-	}
+    public NonReferenceableSessionException() {}
 
-	public NonReferenceableSessionException(String message) {
-		super(message);
-	}
+    public NonReferenceableSessionException(String message) {
+        super(message);
+    }
 
-	public NonReferenceableSessionException(Throwable cause) {
-		initCause(cause);
-	}
+    public NonReferenceableSessionException(Throwable cause) {
+        initCause(cause);
+    }
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/Session.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/Session.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/Session.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/Session.java Thu Nov  3 19:03:11 2011
@@ -55,17 +55,17 @@ public interface Session extends Lockabl
 
     void attachScope(OntologyScope scope);
 
-    void detachScope(String scopeId);
-
     void clearScopes();
 
-    Set<String> getAttachedScopes();
-
     /**
      * Closes this Session irreversibly. Most likely includes setting the state to ZOMBIE.
      */
     void close() throws NonReferenceableSessionException;
 
+    void detachScope(String scopeId);
+
+    Set<String> getAttachedScopes();
+
     /**
      * Returns the unique Internationalized Resource Identifier (IRI) that identifies this KReS session.<br>
      * <br>

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionEvent.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionEvent.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionEvent.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionEvent.java Thu Nov  3 19:03:11 2011
@@ -1,19 +1,19 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements.  See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License.  You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.stanbol.ontologymanager.ontonet.api.session;
 
 /**
@@ -24,46 +24,46 @@ package org.apache.stanbol.ontologymanag
  */
 public class SessionEvent {
 
-	public enum OperationType {
-		ACTIVATE, CLOSE, CREATE, DEACTIVATE, KILL, STORE
+    public enum OperationType {
+        ACTIVATE,
+        CLOSE,
+        CREATE,
+        DEACTIVATE,
+        KILL,
+        STORE
+    }
+
+    /**
+     * The session affected by this event.
+     */
+    private Session affectedSession;
+
+    private OperationType operationType;
+
+    /**
+     * Creates a new instance of SessionEvent.
+     * 
+     * @param session
+     *            the KReS session affected by this event
+     */
+    public SessionEvent(Session session, OperationType operationType) throws Exception {
+        if (operationType == null) throw new Exception("No operation type specified for this session event.");
+        if (session == null) throw new Exception("No KReS session specified for this session event.");
+        this.operationType = operationType;
+        this.affectedSession = session;
+    }
+
+    public OperationType getOperationType() {
+        return operationType;
     }
 
     /**
-	 * The KReS session affected by this event.
-	 */
-	private Session affectedSession;
-
-	private OperationType operationType;
-
-	public OperationType getOperationType() {
-		return operationType;
-	}
-
-	/**
-	 * Creates a new instance of SessionEvent.
-	 * 
-	 * @param session
-	 *            the KReS session affected by this event
-	 */
-	public SessionEvent(Session session, OperationType operationType)
-			throws Exception {
-		if (operationType == null)
-			throw new Exception(
-					"No operation type specified for this session event.");
-		if (session == null)
-			throw new Exception(
-					"No KReS session specified for this session event.");
-		this.operationType = operationType;
-		this.affectedSession = session;
-	}
-
-	/**
-	 * Returns the KReS session affected by this event.
-	 * 
-	 * @return the affected KReS session
-	 */
-	public Session getSession() {
-		return affectedSession;
-	}
+     * Returns the KReS session affected by this event.
+     * 
+     * @return the affected KReS session
+     */
+    public Session getSession() {
+        return affectedSession;
+    }
 
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionManager.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionManager.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionManager.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/api/session/SessionManager.java Thu Nov  3 19:03:11 2011
@@ -76,6 +76,8 @@ public interface SessionManager extends 
     /**
      * Returns the ontology space associated with this session.
      * 
+     * @deprecated as session spaces are obsolete, so is this method.
+     * 
      * @return the session space
      */
     Set<SessionOntologySpace> getSessionSpaces(String sessionID) throws NonReferenceableSessionException;

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/ONManagerImpl.java Thu Nov  3 19:03:11 2011
@@ -42,8 +42,6 @@ import org.apache.stanbol.ontologymanage
 import org.apache.stanbol.ontologymanager.ontonet.api.io.BlankOntologySource;
 import org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyInputSource;
 import org.apache.stanbol.ontologymanager.ontonet.api.io.RootOntologyIRISource;
-import org.apache.stanbol.ontologymanager.ontonet.api.ontology.CoreOntologySpace;
-import org.apache.stanbol.ontologymanager.ontonet.api.ontology.CustomOntologySpace;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.NoSuchScopeException;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologyIndex;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.OntologyProvider;
@@ -57,8 +55,6 @@ import org.apache.stanbol.ontologymanage
 import org.apache.stanbol.ontologymanager.ontonet.conf.OntologyNetworkConfigurationUtils;
 import org.apache.stanbol.ontologymanager.ontonet.impl.clerezza.ClerezzaOntologyProvider;
 import org.apache.stanbol.ontologymanager.ontonet.impl.clerezza.OntologySpaceFactoryImpl;
-import org.apache.stanbol.ontologymanager.ontonet.impl.io.ClerezzaOntologyStorage;
-import org.apache.stanbol.ontologymanager.ontonet.impl.io.InMemoryOntologyStorage;
 import org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologyIndexImpl;
 import org.apache.stanbol.ontologymanager.ontonet.impl.ontology.OntologyScopeFactoryImpl;
 import org.apache.stanbol.ontologymanager.ontonet.impl.ontology.ScopeRegistryImpl;
@@ -66,13 +62,11 @@ import org.apache.stanbol.ontologymanage
 import org.apache.stanbol.ontologymanager.ontonet.impl.session.SessionManagerImpl;
 import org.apache.stanbol.owl.OWLOntologyManagerFactory;
 import org.osgi.service.component.ComponentContext;
-import org.semanticweb.owlapi.apibinding.OWLManager;
 import org.semanticweb.owlapi.io.FileDocumentSource;
 import org.semanticweb.owlapi.io.IRIDocumentSource;
 import org.semanticweb.owlapi.io.OWLOntologyDocumentSource;
 import org.semanticweb.owlapi.io.StreamDocumentSource;
 import org.semanticweb.owlapi.model.IRI;
-import org.semanticweb.owlapi.model.OWLDataFactory;
 import org.semanticweb.owlapi.model.OWLOntology;
 import org.semanticweb.owlapi.model.OWLOntologyCreationException;
 import org.semanticweb.owlapi.model.OWLOntologyManager;
@@ -179,13 +173,11 @@ public class ONManagerImpl implements ON
 
     private OWLOntologyManager owlCacheManager;
 
-    private OWLDataFactory owlFactory;
-
     private ScopeRegistry scopeRegistry;
 
     private SessionManager sessionManager;
 
-    private ClerezzaOntologyStorage storage;
+    // private ClerezzaOntologyStorage storage;
 
     @Reference
     private TcManager tcm;
@@ -310,7 +302,6 @@ public class ONManagerImpl implements ON
             // Ok, go empty
         }
 
-        owlFactory = OWLManager.getOWLDataFactory();
         owlCacheManager = OWLOntologyManagerFactory.createOWLOntologyManager(offline
                 .getOntologySourceLocations().toArray(new IRI[0]));
 
@@ -318,7 +309,7 @@ public class ONManagerImpl implements ON
         scopeRegistry = new ScopeRegistryImpl();
         oIndex = new OntologyIndexImpl(this);
 
-        bindResources(this.tcm, this.wtcp);
+        bindResources();
 
         // String tfile = (String) configuration.get(CONFIG_FILE_PATH);
         // if (tfile != null) this.configPath = tfile;
@@ -382,43 +373,19 @@ public class ONManagerImpl implements ON
 
     }
 
-    protected void bindResources(TcManager tcm, WeightedTcProvider wtcp) {
-        // At this stage we know if tcm and wtcp have been provided or not.
-
-        /*
-         * With the current implementation of OntologyStorage, we cannot live with either component being
-         * null. So create the object only if both are not null.
-         */
-
-        if (tcm != null && wtcp != null) storage = new ClerezzaOntologyStorage(tcm, wtcp);
-        // Manage this in-memory, so it won't have to be null.
-        else {
-            storage = new InMemoryOntologyStorage();
-        }
-
-        // Now create everything that depends on the Storage object.
-
-        // These may require the OWL cache manager
+    protected void bindResources() {
 
         if (ontologyProvider.getStore() instanceof TcManager) ontologySpaceFactory = new OntologySpaceFactoryImpl(
                 scopeRegistry, (OntologyProvider<TcProvider>) ontologyProvider, offline,
                 IRI.create(getOntologyNetworkNamespace()));
         else ontologySpaceFactory = new org.apache.stanbol.ontologymanager.ontonet.impl.owlapi.OntologySpaceFactoryImpl(
-                scopeRegistry, storage, offline, IRI.create(getOntologyNetworkNamespace()));
+                scopeRegistry, offline, IRI.create(getOntologyNetworkNamespace()));
 
         ontologyScopeFactory = new OntologyScopeFactoryImpl(scopeRegistry,
                 IRI.create(getOntologyNetworkNamespace()), ontologySpaceFactory);
         ontologyScopeFactory.addScopeEventListener(oIndex);
 
-        // // This requires the OWL cache manager
-        // registryLoader = new RegistryLoaderImpl(this);
-
-        // TODO : assign dynamically in case the FISE persistence store is not
-        // available.
-        // storage = new FISEPersistenceStorage();
-
-        sessionManager = new SessionManagerImpl(IRI.create("http://kres.iks-project.eu/"),
-                getScopeRegistry(), storage);
+        sessionManager = new SessionManagerImpl(IRI.create("http://kres.iks-project.eu/"), getScopeRegistry());
         sessionManager.addSessionListener(new ScopeSessionSynchronizer(this));
     }
 
@@ -460,12 +427,11 @@ public class ONManagerImpl implements ON
                         try {
                             corespc.addOntology(new RootOntologyIRISource(IRI.create(cores[i])));
                         } catch (Exception ex) {
-                            log.warn("KReS :: failed to import ontology " + cores[i], ex);
+                            log.warn("Failed to import ontology " + cores[i], ex);
                             continue;
                         }
-                    // TODO: this call should be automatic
-                    ((CustomOntologySpace) sc.getCustomSpace()).attachCoreSpace((CoreOntologySpace) corespc,
-                        false);
+                    // ((CustomOntologySpace) sc.getCustomSpace()).attachCoreSpace((CoreOntologySpace)
+                    // corespc, false);
                 }
 
                 sc.setUp();
@@ -529,12 +495,6 @@ public class ONManagerImpl implements ON
         this.offlineMode = mode;
     }
 
-    @Override
-    public String getID() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
     public OntologyIndex getOntologyIndex() {
         return oIndex;
     }
@@ -567,24 +527,16 @@ public class ONManagerImpl implements ON
         return ontologySpaceFactory;
     }
 
-    public ClerezzaOntologyStorage getOntologyStore() {
-        return storage;
-    }
+    // public ClerezzaOntologyStorage getOntologyStore() {
+    // // return storage;
+    // return null;
+    // }
 
     public OWLOntologyManager getOwlCacheManager() {
         // return OWLManager.createOWLOntologyManager();
         return owlCacheManager;
     }
 
-    /**
-     * Returns a factory object that can be used for obtaining OWL API objects.
-     * 
-     * @return the default OWL data factory
-     */
-    public OWLDataFactory getOwlFactory() {
-        return owlFactory;
-    }
-
     public Helper getScopeHelper() {
         if (helper == null) {
             helper = new Helper();

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologyCollectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologyCollectorImpl.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologyCollectorImpl.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologyCollectorImpl.java Thu Nov  3 19:03:11 2011
@@ -138,7 +138,7 @@ public abstract class AbstractOntologyCo
      */
     protected void fireOntologyAdded(IRI ontologyIri) {
         for (OntologyCollectorListener listener : listeners)
-            listener.onOntologyAdded(IRI.create(namespace + _id), ontologyIri);
+            listener.onOntologyAdded(this.getID(), ontologyIri);
     }
 
     /**
@@ -159,7 +159,7 @@ public abstract class AbstractOntologyCo
      */
     protected void fireOntologyRemoved(IRI ontologyIri) {
         for (OntologyCollectorListener listener : listeners)
-            listener.onOntologyRemoved(IRI.create(namespace + _id), ontologyIri);
+            listener.onOntologyRemoved(this.getID(), ontologyIri);
     }
 
     protected void fireOntologyRemoved(UriRef ontologyIri) {

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologySpaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologySpaceImpl.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologySpaceImpl.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/AbstractOntologySpaceImpl.java Thu Nov  3 19:03:11 2011
@@ -47,8 +47,6 @@ public abstract class AbstractOntologySp
 
     protected Logger log = LoggerFactory.getLogger(getClass());
 
-    protected boolean silent = false;
-
     protected SpaceType type;
 
     public AbstractOntologySpaceImpl(String spaceID, IRI namespace, SpaceType type, TcProvider tcProvider) {
@@ -68,6 +66,8 @@ public abstract class AbstractOntologySp
      */
     @Override
     public OWLOntology asOWLOntology(boolean merge) {
+        if (merge) throw new UnsupportedOperationException(
+                "Ontology merging not implemented yet. Please set merge parameter to false.");
         OWLOntology root;
         OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
         IRI iri = IRI.create(namespace + _id);
@@ -117,11 +117,6 @@ public abstract class AbstractOntologySp
         return root;
     }
 
-    @Override
-    public boolean isSilentMissingOntologyHandling() {
-        return silent;
-    }
-
     /**
      * 
      * @param id
@@ -144,9 +139,4 @@ public abstract class AbstractOntologySp
         this._id = id;
     }
 
-    @Override
-    public void setSilentMissingOntologyHandling(boolean silent) {
-        this.silent = silent;
-    }
-
 }

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/CustomOntologySpaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/CustomOntologySpaceImpl.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/CustomOntologySpaceImpl.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/CustomOntologySpaceImpl.java Thu Nov  3 19:03:11 2011
@@ -43,8 +43,7 @@ public class CustomOntologySpaceImpl ext
 
     @Override
     public void attachCoreSpace(CoreOntologySpace coreSpace, boolean skipRoot) throws UnmodifiableOntologyCollectorException {
-        // TODO Auto-generated method stub
-
+        // TODO deprecated, remove asap.
     }
 
     /**

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/OntologySpaceFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/OntologySpaceFactoryImpl.java?rev=1197271&r1=1197270&r2=1197271&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/OntologySpaceFactoryImpl.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/main/java/org/apache/stanbol/ontologymanager/ontonet/impl/clerezza/OntologySpaceFactoryImpl.java Thu Nov  3 19:03:11 2011
@@ -136,4 +136,9 @@ public class OntologySpaceFactoryImpl im
         this.namespace = namespace;
     }
 
+    @Override
+    public String getID() {
+        return this.toString();
+    }
+
 }