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 2012/10/05 17:35:30 UTC

svn commit: r1394594 [6/9] - in /stanbol/trunk: commons/authentication.basic/ commons/security/ contrib/reengineer/base/ contrib/reengineer/db/ contrib/reengineer/db/src/main/java/org/apache/stanbol/reengineer/db/ contrib/reengineer/db/src/test/java/or...

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestAxiomInterpretation.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestAxiomInterpretation.java?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestAxiomInterpretation.java (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestAxiomInterpretation.java Fri Oct  5 15:35:22 2012
@@ -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.stanbol.ontologymanager.multiplexer.clerezza.scope;
+
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.onManager;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.reset;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.InputStream;
+
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSource;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.Scope;
+import org.apache.stanbol.ontologymanager.sources.clerezza.GraphContentInputSource;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestAxiomInterpretation {
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        reset();
+    }
+
+    @Test
+    public void testCustomAboxCoreTbox() throws Exception {
+        String path = "/ontologies/imports-disconnected";
+
+        InputStream content = getClass().getResourceAsStream(path + "/abox.owl");
+        OntologyInputSource<?> coreSrc = new GraphContentInputSource(content, SupportedFormat.TURTLE);
+        Scope scope = onManager.createOntologyScope("imports-disconnected", coreSrc);
+        assertNotNull(scope);
+
+        content = getClass().getResourceAsStream(path + "/tbox.owl");
+        OntologyInputSource<?> custSrc = new GraphContentInputSource(content, SupportedFormat.TURTLE);
+        scope.getCustomSpace().addOntology(custSrc);
+
+        Graph g = scope.export(Graph.class, true);
+
+        // for (Triple t : g)
+        // System.out.println(t);
+        //
+        // OWLOntology o = scope.export(OWLOntology.class, true);
+        // for (OWLAxiom ax : o.getAxioms())
+        // System.out.println(ax);
+
+    }
+
+    @After
+    public void cleanup() throws Exception {
+        reset();
+    }
+
+}

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestClerezzaSpaces.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestClerezzaSpaces.java?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestClerezzaSpaces.java (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestClerezzaSpaces.java Fri Oct  5 15:35:22 2012
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.multiplexer.clerezza.scope;
+
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.parser;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.reset;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.tcManager;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Hashtable;
+
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.serializedform.SupportedFormat;
+import org.apache.stanbol.commons.owl.util.OWLUtils;
+import org.apache.stanbol.ontologymanager.core.OfflineConfigurationImpl;
+import org.apache.stanbol.ontologymanager.core.scope.ScopeRegistryImpl;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.Constants;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.collector.ClerezzaCollectorFactory;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.ontology.ClerezzaOWLUtils;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.ontology.ClerezzaOntologyProvider;
+import org.apache.stanbol.ontologymanager.servicesapi.OfflineConfiguration;
+import org.apache.stanbol.ontologymanager.servicesapi.collector.UnmodifiableOntologyCollectorException;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSource;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace.SpaceType;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.PersistentCollectorFactory;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.ScopeRegistry;
+import org.apache.stanbol.ontologymanager.sources.clerezza.GraphSource;
+import org.apache.stanbol.ontologymanager.sources.owlapi.ParentPathInputSource;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.apibinding.OWLManager;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLAxiom;
+import org.semanticweb.owlapi.model.OWLClass;
+import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.semanticweb.owlapi.model.OWLIndividual;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyID;
+
+public class TestClerezzaSpaces {
+
+    public static IRI baseIri = IRI.create(Constants.PEANUTS_MAIN_BASE), baseIri2 = IRI
+            .create(Constants.PEANUTS_MINOR_BASE);
+
+    private static OWLAxiom linusIsHuman = null;
+
+    private static PersistentCollectorFactory factory;
+
+    private static OntologyInputSource<TripleCollection> minorSrc, dropSrc, nonexSrc;
+
+    private static OntologyInputSource<OWLOntology> inMemorySrc;
+
+    private static OfflineConfiguration offline;
+
+    private static OntologyInputSource<TripleCollection> getLocalSource(String resourcePath) {
+        InputStream is = TestOntologySpaces.class.getResourceAsStream(resourcePath);
+        return new GraphSource(parser.parse(is, SupportedFormat.RDF_XML));
+    }
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        offline = new OfflineConfigurationImpl(new Hashtable<String,Object>());
+        ScopeRegistry reg = new ScopeRegistryImpl();
+
+        // This one is created from scratch
+        MGraph ont2 = ClerezzaOWLUtils.createOntology(baseIri2.toString());
+        minorSrc = new GraphSource(ont2.getGraph());
+        dropSrc = getLocalSource("/ontologies/droppedcharacters.owl");
+        nonexSrc = getLocalSource("/ontologies/nonexistentcharacters.owl");
+        inMemorySrc = new ParentPathInputSource(new File(TestClerezzaSpaces.class.getResource(
+            "/ontologies/maincharacters.owl").toURI()));
+
+        OWLDataFactory df = OWLManager.getOWLDataFactory();
+        OWLClass cHuman = df.getOWLClass(IRI.create(baseIri + "/" + Constants.humanBeing));
+        OWLIndividual iLinus = df.getOWLNamedIndividual(IRI.create(baseIri + "/" + Constants.linus));
+        linusIsHuman = df.getOWLClassAssertionAxiom(cHuman, iLinus);
+
+        factory = new ClerezzaCollectorFactory(new ClerezzaOntologyProvider(tcManager, offline, parser),
+                new Hashtable<String,Object>());
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/"));
+    }
+
+    String scopeId = "Comics";
+
+    @AfterClass
+    public static void cleanup() {
+        reset();
+    }
+
+    @Test
+    public void testAddOntology() throws Exception {
+        OntologySpace space = null;
+
+        OWLOntologyID logicalId = OWLUtils.extractOntologyID(nonexSrc.getRootOntology());
+        assertNotNull(logicalId);
+
+        space = factory.createCustomOntologySpace(scopeId, dropSrc, minorSrc);
+        space.addOntology(minorSrc);
+        space.addOntology(nonexSrc);
+        assertTrue(space.hasOntology(logicalId));
+
+        logicalId = OWLUtils.extractOntologyID(dropSrc.getRootOntology());
+        assertNotNull(logicalId);
+        assertTrue(space.hasOntology(logicalId));
+    }
+
+    @Test
+    public void testCoreLock() throws Exception {
+        OntologySpace space = factory.createCoreOntologySpace(scopeId, inMemorySrc);
+        space.setUp();
+        try {
+            space.addOntology(minorSrc);
+            fail("Modification was permitted on locked ontology space.");
+        } catch (UnmodifiableOntologyCollectorException e) {
+            assertSame(space, e.getOntologyCollector());
+        }
+    }
+
+    @Test
+    public void testCreateSpace() throws Exception {
+        OntologySpace space = factory.createCustomOntologySpace(scopeId, dropSrc);
+        OWLOntologyID logicalId = null;
+        Object o = dropSrc.getRootOntology();
+        if (o instanceof TripleCollection) logicalId = OWLUtils.extractOntologyID((TripleCollection) o);
+        else if (o instanceof OWLOntology) logicalId = OWLUtils.extractOntologyID((OWLOntology) o);
+        assertNotNull(logicalId);
+        assertTrue(space.hasOntology(logicalId));
+    }
+
+    @Test
+    public void testCustomLock() throws Exception {
+        OntologySpace space = factory.createCustomOntologySpace(scopeId, inMemorySrc);
+        space.setUp();
+        try {
+            space.addOntology(minorSrc);
+            fail("Modification was permitted on locked ontology space.");
+        } catch (UnmodifiableOntologyCollectorException e) {
+            assertSame(space, e.getOntologyCollector());
+        }
+    }
+
+    /**
+     * Checks whether attempting to create ontology spaces with invalid identifiers or namespaces results in
+     * the appropriate exceptions being thrown.
+     * 
+     * @throws Exception
+     *             if an unexpected error occurs.
+     */
+    @Test
+    public void testIdentifiers() throws Exception {
+        OntologySpace shouldBeNull = null, shouldBeNotNull = null;
+
+        /* First test space identifiers. */
+
+        // Null identifier (invalid).
+        try {
+            shouldBeNull = factory.createOntologySpace(null, SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite null scope identifier.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // More than one slash in identifier (invalid).
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0/p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite null scope identifier.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        /* Now test namespaces. */
+
+        // Null namespace (invalid).
+        factory.setDefaultNamespace(null);
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite null OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace with query (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/?query=true"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite query in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace with fragment (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology#fragment"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite fragment in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace ending with hash (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology#"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite fragment in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace ending with neither (valid, should automatically add slash).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology"));
+        shouldBeNotNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+        assertNotNull(shouldBeNotNull);
+        assertTrue(shouldBeNotNull.getDefaultNamespace().toString().endsWith("/"));
+
+        shouldBeNotNull = null;
+
+        // Namespace ending with slash (valid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/"));
+        shouldBeNotNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+        assertNotNull(shouldBeNotNull);
+    }
+
+    @Test
+    public void testRemoveCustomOntology() throws Exception {
+        OntologySpace space = null;
+        space = factory.createCustomOntologySpace(scopeId, dropSrc);
+        OWLOntologyID dropId = OWLUtils.extractOntologyID(dropSrc.getRootOntology());
+        OWLOntologyID nonexId = OWLUtils.extractOntologyID(nonexSrc.getRootOntology());
+
+        space.addOntology(inMemorySrc);
+        space.addOntology(nonexSrc);
+        // The other remote ontologies may change base IRI...
+        // baseIri is maincharacters
+        assertTrue(space.hasOntology(baseIri));
+        assertTrue(space.hasOntology(dropId));
+        assertTrue(space.hasOntology(nonexId));
+        space.removeOntology(dropId);
+        assertFalse(space.hasOntology(dropId));
+        space.removeOntology(nonexId);
+        assertFalse(space.hasOntology(nonexId));
+        // OntologyUtils.printOntology(space.getTopOntology(), System.err);
+
+    }
+
+}

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestOntologySpaces.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestOntologySpaces.java?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestOntologySpaces.java (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/scope/TestOntologySpaces.java Fri Oct  5 15:35:22 2012
@@ -0,0 +1,262 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.multiplexer.clerezza.scope;
+
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.onManager;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.reset;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.apache.stanbol.commons.owl.OWLOntologyManagerFactory;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.Constants;
+import org.apache.stanbol.ontologymanager.servicesapi.collector.MissingOntologyException;
+import org.apache.stanbol.ontologymanager.servicesapi.collector.UnmodifiableOntologyCollectorException;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSource;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.OntologySpace.SpaceType;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.PersistentCollectorFactory;
+import org.apache.stanbol.ontologymanager.sources.owlapi.BlankOntologySource;
+import org.apache.stanbol.ontologymanager.sources.owlapi.ParentPathInputSource;
+import org.apache.stanbol.ontologymanager.sources.owlapi.RootOntologySource;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.AddAxiom;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLAxiom;
+import org.semanticweb.owlapi.model.OWLClass;
+import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.semanticweb.owlapi.model.OWLIndividual;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyCreationException;
+import org.semanticweb.owlapi.model.OWLOntologyManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestOntologySpaces {
+
+    public static IRI baseIri = IRI.create(Constants.PEANUTS_MAIN_BASE), baseIri2 = IRI
+            .create(Constants.PEANUTS_MINOR_BASE);
+
+    private static PersistentCollectorFactory factory;
+    private static OntologyInputSource<OWLOntology> inMemorySrc, minorSrc, dropSrc, nonexSrc;
+    private static OWLAxiom linusIsHuman = null;
+
+    private Logger log = LoggerFactory.getLogger(getClass());
+
+    private static OWLOntology ont = null, ont2 = null;
+
+    private static OntologyInputSource<OWLOntology> getLocalSource(String resourcePath, OWLOntologyManager mgr) throws OWLOntologyCreationException,
+                                                                                                               URISyntaxException {
+        URL url = TestOntologySpaces.class.getResource(resourcePath);
+        File f = new File(url.toURI());
+        return new ParentPathInputSource(f, mgr != null ? mgr
+                : OWLOntologyManagerFactory.createOWLOntologyManager(onManager.getOfflineConfiguration()
+                        .getOntologySourceLocations().toArray(new IRI[0])));
+    }
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        factory = onManager.getPersistentCollectorFactory();
+        if (factory == null) fail("Could not instantiate ontology space factory");
+
+        OWLOntologyManager mgr = OWLOntologyManagerFactory.createOWLOntologyManager(onManager
+                .getOfflineConfiguration().getOntologySourceLocations().toArray(new IRI[0]));
+        OWLDataFactory df = mgr.getOWLDataFactory();
+
+        ont = mgr.createOntology(baseIri);
+        inMemorySrc = new RootOntologySource(ont, null);
+        // Let's state that Linus is a human being
+        OWLClass cHuman = df.getOWLClass(IRI.create(baseIri + "/" + Constants.humanBeing));
+        OWLIndividual iLinus = df.getOWLNamedIndividual(IRI.create(baseIri + "/" + Constants.linus));
+        linusIsHuman = df.getOWLClassAssertionAxiom(cHuman, iLinus);
+        mgr.applyChange(new AddAxiom(ont, linusIsHuman));
+
+        ont2 = mgr.createOntology(baseIri2);
+        minorSrc = new RootOntologySource(ont2);
+
+        dropSrc = getLocalSource("/ontologies/droppedcharacters.owl", mgr);
+        nonexSrc = getLocalSource("/ontologies/nonexistentcharacters.owl", mgr);
+        minorSrc = new RootOntologySource(ont2, null);
+
+    }
+
+    @After
+    public void cleanup() {
+        reset();
+    }
+
+    @Test
+    public void testAddOntology() throws Exception {
+        OntologySpace space = null;
+        IRI logicalId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();
+
+        space = factory.createCustomOntologySpace("testAddOntology", dropSrc);
+        space.addOntology(minorSrc);
+        space.addOntology(nonexSrc);
+
+        assertTrue(space.hasOntology(logicalId));
+        logicalId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
+        assertTrue(space.hasOntology(logicalId));
+    }
+
+    @Test
+    public void testCoreLock() throws Exception {
+        OntologySpace space = factory.createCoreOntologySpace("testCoreLock", inMemorySrc);
+        space.setUp();
+        try {
+            space.addOntology(minorSrc);
+            fail("Modification was permitted on locked ontology space.");
+        } catch (UnmodifiableOntologyCollectorException e) {
+            assertSame(space, e.getOntologyCollector());
+        }
+    }
+
+    @Test
+    public void testCreateSpace() throws Exception {
+        OntologySpace space = factory.createCustomOntologySpace("testCreateSpace", dropSrc);
+        IRI logicalId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
+        assertTrue(space.hasOntology(logicalId));
+    }
+
+    @Test
+    public void testCustomLock() throws Exception {
+        OntologySpace space = factory.createCustomOntologySpace("testCustomLock", inMemorySrc);
+        space.setUp();
+        try {
+            space.addOntology(minorSrc);
+            fail("Modification was permitted on locked ontology space.");
+        } catch (UnmodifiableOntologyCollectorException e) {
+            assertSame(space, e.getOntologyCollector());
+        }
+    }
+
+    /**
+     * Checks whether attempting to create ontology spaces with invalid identifiers or namespaces results in
+     * the appropriate exceptions being thrown.
+     * 
+     * @throws Exception
+     *             if an unexpected error occurs.
+     */
+    @Test
+    public void testIdentifiers() throws Exception {
+        OntologySpace shouldBeNull = null, shouldBeNotNull = null;
+
+        /* First test space identifiers. */
+
+        // Null identifier (invalid).
+        try {
+            shouldBeNull = factory.createOntologySpace(null, SpaceType.CORE, new BlankOntologySource());
+            fail("Expected IllegalArgumentException not thrown despite null scope identifier.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // More than one slash in identifier (invalid).
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0/p3", SpaceType.CORE, new BlankOntologySource());
+            fail("Expected IllegalArgumentException not thrown despite null scope identifier.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        /* Now test namespaces. */
+
+        // Null namespace (invalid).
+        factory.setDefaultNamespace(null);
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE, new BlankOntologySource());
+            fail("Expected IllegalArgumentException not thrown despite null OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace with query (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/?query=true"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE, new BlankOntologySource());
+            fail("Expected IllegalArgumentException not thrown despite query in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace with fragment (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology#fragment"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE, new BlankOntologySource());
+            fail("Expected IllegalArgumentException not thrown despite fragment in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace ending with hash (invalid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology#"));
+        try {
+            shouldBeNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+            fail("Expected IllegalArgumentException not thrown despite fragment in OntoNet namespace.");
+        } catch (IllegalArgumentException ex) {}
+        assertNull(shouldBeNull);
+
+        // Namespace ending with neither (valid, should automatically add slash).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology"));
+        shouldBeNotNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+        assertNotNull(shouldBeNotNull);
+        assertTrue(shouldBeNotNull.getDefaultNamespace().toString().endsWith("/"));
+
+        shouldBeNotNull = null;
+
+        // Namespace ending with slash (valid).
+        factory.setDefaultNamespace(IRI.create("http://stanbol.apache.org/ontology/"));
+        shouldBeNotNull = factory.createOntologySpace("Sc0p3", SpaceType.CORE);
+        assertNotNull(shouldBeNotNull);
+    }
+
+    @Test
+    public void testRemoveCustomOntology() throws Exception {
+        OntologySpace space = null;
+        space = factory.createCustomOntologySpace("testRemoveCustomOntology", dropSrc);
+
+        IRI dropId = dropSrc.getRootOntology().getOntologyID().getOntologyIRI();
+        IRI nonexId = nonexSrc.getRootOntology().getOntologyID().getOntologyIRI();
+
+        space.addOntology(inMemorySrc);
+        space.addOntology(nonexSrc);
+        // The other remote ontologies may change base IRI...
+        assertTrue(space.hasOntology(ont.getOntologyID().getOntologyIRI()));
+        assertTrue(space.hasOntology(dropId));
+        assertTrue(space.hasOntology(nonexId));
+
+        IRI bogus = IRI.create("http://www.example.org/ontology/bogus");
+        try {
+            space.removeOntology(bogus);
+            fail("Removing nonexisting ontology succeeded without an exception. This should not happen.");
+        } catch (MissingOntologyException mex) {
+            log.info("Expected exception caught when removing missing ontology {}", bogus);
+        }
+
+        space.removeOntology(dropId);
+        assertFalse(space.hasOntology(dropId));
+        space.removeOntology(nonexId);
+        assertFalse(space.hasOntology(nonexId));
+        // OntologyUtils.printOntology(space.getTopOntology(), System.err);
+
+    }
+
+}

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/session/TestSessions.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/session/TestSessions.java?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/session/TestSessions.java (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/java/org/apache/stanbol/ontologymanager/multiplexer/clerezza/session/TestSessions.java Fri Oct  5 15:35:22 2012
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.multiplexer.clerezza.session;
+
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.collectorfactory;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.onManager;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.ontologyProvider;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.reset;
+import static org.apache.stanbol.ontologymanager.multiplexer.clerezza.MockOsgiContext.sessionManager;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.stanbol.commons.owl.OWLOntologyManagerFactory;
+import org.apache.stanbol.ontologymanager.multiplexer.clerezza.Constants;
+import org.apache.stanbol.ontologymanager.servicesapi.io.OntologyInputSource;
+import org.apache.stanbol.ontologymanager.servicesapi.scope.Scope;
+import org.apache.stanbol.ontologymanager.servicesapi.session.NonReferenceableSessionException;
+import org.apache.stanbol.ontologymanager.servicesapi.session.Session;
+import org.apache.stanbol.ontologymanager.servicesapi.session.Session.State;
+import org.apache.stanbol.ontologymanager.sources.owlapi.RootOntologyIRISource;
+import org.apache.stanbol.ontologymanager.sources.owlapi.RootOntologySource;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntologyID;
+import org.semanticweb.owlapi.model.OWLOntologyManager;
+
+public class TestSessions {
+
+    public static IRI baseIri = IRI.create(Constants.PEANUTS_MAIN_BASE), baseIri2 = IRI
+            .create(Constants.PEANUTS_MINOR_BASE);
+
+    public static String scopeId1 = "Ranma12", scopeId2 = "HokutoNoKen", scopeId3 = "Doraemon";
+
+    private static OntologyInputSource<?> src1 = null, src2 = null;
+
+    @BeforeClass
+    public static void setup() throws Exception {
+        OWLOntologyManager mgr = OWLOntologyManagerFactory.createOWLOntologyManager(null);
+        src1 = new RootOntologySource(mgr.createOntology(baseIri), null);
+        src2 = new RootOntologySource(mgr.createOntology(baseIri2), null);
+        reset();
+    }
+
+    @After
+    public void cleanup() throws Exception {
+        reset();
+    }
+
+    @Test
+    public void testCreateSessionSpaceAutomatic() throws Exception {
+        Scope scope1 = null, scope2 = null, scope3 = null;
+
+        scope1 = collectorfactory.createOntologyScope(scopeId1, src1, src2);
+        onManager.registerScope(scope1);
+        scope2 = collectorfactory.createOntologyScope(scopeId2, src2, src1);
+        onManager.registerScope(scope2);
+        scope3 = collectorfactory.createOntologyScope(scopeId3, src2, src2);
+        onManager.registerScope(scope3);
+        // We do all activations after registering, otherwise the component
+        // property value will override these activations.
+        onManager.setScopeActive(scopeId1, true);
+        onManager.setScopeActive(scopeId2, false);
+        onManager.setScopeActive(scopeId3, true);
+
+        // Session ses = sesmgr.createSession();
+        // String sesid = ses.getID();
+        // TODO replace with proper tests
+        // assertFalse(scope1.getSessionSpaces().isEmpty());
+        // assertNotNull(scope1.getSessionSpace(sesid));
+        // assertFalse(scope3.getSessionSpaces().isEmpty());
+        // assertNull(scope2.getSessionSpace(sesid));
+        // assertNotNull(scope3.getSessionSpace(sesid));
+    }
+
+    @Test
+    public void testRegisterSession() throws Exception {
+        int before = sessionManager.getRegisteredSessionIDs().size();
+        Session ses = sessionManager.createSession();
+        assertNotNull(ses);
+        assertEquals(before + 1, sessionManager.getRegisteredSessionIDs().size());
+    }
+
+    @Test
+    public void testSessionCreationDestruction() throws Exception {
+        int size = 100;
+        int initialSize = sessionManager.getRegisteredSessionIDs().size();
+        Set<Session> sessions = new HashSet<Session>();
+        // Create and open many sessions.
+        synchronized (sessionManager) {
+            for (int i = 0; i < size; i++) {
+                Session ses = sessionManager.createSession();
+                ses.open();
+                sessions.add(ses);
+            }
+            // Check that 500 sessions have been created
+            assertEquals(initialSize + size, sessionManager.getRegisteredSessionIDs().size());
+        }
+        boolean open = true;
+        for (Session ses : sessions)
+            open &= ses.getSessionState() == State.ACTIVE;
+        // Check that all created sessions have been opened
+        assertTrue(open);
+        // Kill 'em all, to quote Metallica
+        synchronized (sessionManager) {
+            for (Session ses : sessions)
+                sessionManager.destroySession(ses.getID());
+            assertEquals(initialSize, sessionManager.getRegisteredSessionIDs().size());
+        }
+        // Check that they are all zombies
+        boolean zombi = true;
+        for (Session ses : sessions)
+            zombi &= ses.getSessionState() == State.ZOMBIE;
+        assertTrue(zombi);
+        // Try to resurrect them (hopefully failing)
+        boolean resurrect = false;
+        for (Session ses : sessions)
+            try {
+                ses.open();
+                resurrect |= true;
+            } catch (NonReferenceableSessionException e) {
+                resurrect |= false;
+                continue;
+            }
+        assertFalse(resurrect);
+    }
+
+    // @Test
+    public void zombieSessionClearsContents() throws Exception {
+        Session ses = sessionManager.createSession();
+        ses.addOntology(new RootOntologyIRISource((IRI.create(getClass().getResource(
+            "/ontologies/mockfoaf.rdf")))));
+        OWLOntologyID expectedKey = new OWLOntologyID(IRI.create("http://xmlns.com/foaf/0.1/"));
+        assertTrue(ontologyProvider.hasOntology(expectedKey));
+        sessionManager.destroySession(ses.getID());
+    }
+
+}

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/log4j.properties?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/log4j.properties (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/log4j.properties Fri Oct  5 15:35:22 2012
@@ -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.
+
+
+log4j.rootLogger=WARN, CONSOLE
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+#log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%C{1}] %m%n
+log4j.appender.CONSOLE.layout.ConversionPattern=[%-5p] [%C{1}] %m%n
+
+log4j.category.org.apache.stanbol.ontologymanager=INFO
\ No newline at end of file

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/characters_all.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/characters_all.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/characters_all.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/characters_all.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,50 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/pcomics/characters_all.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/pcomics/characters_all.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/pcomics/characters_all.owl">
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+            <owl:imports rdf:resource="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl"/>
+            <owl:imports rdf:resource="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl"/>
+    </owl:Ontology>  
+
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/droppedcharacters.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/droppedcharacters.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/droppedcharacters.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/droppedcharacters.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,89 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/pcomics/droppedcharacters.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/pcomics/droppedcharacters.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/pcomics/droppedcharacters.owl">
+        <rdfs:comment>Should import: http://xmlns.com/foaf/0.1/</rdfs:comment>
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    //////////////////////////////////////////////droppedcharacters.owl/////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/droppedcharacters.owl#Shermy -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/pcomics/droppedcharacters.owl#Shermy">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Shermy</rdfs:label>
+    </foaf:Person>    
+
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/abox.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/abox.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/abox.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/abox.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,14 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix : <http://www.ontologydesignpatterns.org/ont/test/ontonet#> .
+@prefix xml: <http://www.w3.org/XML/1998/namespace> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://www.ontologydesignpatterns.org/ont/test/ontonet/imports-disconnected/abox.owl> .
+
+<http://www.ontologydesignpatterns.org/ont/test/ontonet/imports-disconnected/abox.owl> rdf:type owl:Ontology .
+
+:Alex a :Person ; 
+      :knows :Begona .
+      
+:Begona a :Person .

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/tbox.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/tbox.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/tbox.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/imports-disconnected/tbox.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,11 @@
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix : <http://www.ontologydesignpatterns.org/ont/test/ontonet#> .
+@prefix xml: <http://www.w3.org/XML/1998/namespace> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@base <http://www.ontologydesignpatterns.org/ont/test/ontonet/imports-disconnected/tbox.owl> .
+
+<http://www.ontologydesignpatterns.org/ont/test/ontonet/imports-disconnected/tbox.owl> rdf:type owl:Ontology .
+
+:knows a owl:ObjectProperty .

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/maincharacters.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/maincharacters.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/maincharacters.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/maincharacters.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,102 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl">
+        <rdfs:comment>Should import: http://xmlns.com/foaf/0.1/</rdfs:comment>
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+        <owl:imports rdf:resource="http://xmlns.com/foaf/0.1/"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl#Linus -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl#Linus">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Linus</rdfs:label>
+    </foaf:Person>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl#Lucy -->
+
+    <foaf:Perzon rdf:about="http://stanbol.apache.org/ontologies/pcomics/maincharacters.owl#Lucy">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Lucy</rdfs:label>
+        <rdfs:comment xml:lang="en">The typing of this individual as foaf:Perzon is wilful, DO NOT REMOVE.</rdfs:comment>
+    </foaf:Perzon>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/minorcharacters.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/minorcharacters.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/minorcharacters.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/minorcharacters.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,98 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl">
+        <rdfs:comment>Should import: http://xmlns.com/foaf/0.1/</rdfs:comment>
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+        <owl:imports rdf:resource="http://xmlns.com/foaf/0.1/"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl#Truffles -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl#Truffles">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Truffles</rdfs:label>
+    </foaf:Person>    
+
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl#Thibault -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/pcomics/minorcharacters.owl#Thibault">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Thibault</rdfs:label>
+    </foaf:Person>
+
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/mockfoaf.rdf
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/mockfoaf.rdf?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/mockfoaf.rdf (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/mockfoaf.rdf Fri Oct  5 15:35:22 2012
@@ -0,0 +1,41 @@
+<?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
+	xml:base="http://xmlns.com/foaf/0.1/"
+	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:foaf="http://xmlns.com/foaf/0.1/" 
+	xmlns:dc="http://purl.org/dc/elements/1.1/">
+	
+	<owl:Ontology rdf:about="http://xmlns.com/foaf/0.1/" dc:description="A mock of the FOAF vocabulary that introduces mistakes in the vocabulary definition. Used to test offline overrides." >
+		<owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+		</owl:versionInfo>
+	</owl:Ontology>
+
+	<rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Perzon" rdfs:label="Person" rdfs:comment="A bogus definition of person.">
+		<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+		<rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
+	</rdfs:Class>
+	
+</rdf:RDF>
\ No newline at end of file

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nameless_ontology.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nameless_ontology.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nameless_ontology.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nameless_ontology.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,80 @@
+<?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 rdf:RDF [
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontology/nameless_ontology.owl#"
+     xml:base="http://stanbol.apache.org/ontology/nameless_ontology.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontology/nameless_ontology.owl#dummyProperty -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontology/nameless_ontology.owl#dummyProperty">
+        <rdfs:subPropertyOf rdf:resource="&owl;topObjectProperty"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.w3.org/2002/07/owl#topObjectProperty -->
+
+    <owl:ObjectProperty rdf:about="&owl;topObjectProperty"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontology/nameless_ontology.owl#DummyClass -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontology/nameless_ontology.owl#DummyClass"/>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.0.0.1451) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-1.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-1.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-1.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-1.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,99 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/test/naming/named-1#"
+     xml:base="http://stanbol.apache.org/ontologies/test/naming/named-1"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-1">
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/named-1#SomeGuy -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-1#SomeGuy">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Guy</rdfs:label>
+    </foaf:Person>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/named-1#SomeGal -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-1#SomeGal">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Gal</rdfs:label>
+    </foaf:Person>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-2.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-2.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-2.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/named-2.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,99 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/test/naming/named-2#"
+     xml:base="http://stanbol.apache.org/ontologies/test/naming/named-2"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-2">
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/named-2#SomeGuy -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-2#SomeGuy">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Guy</rdfs:label>
+    </foaf:Person>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/named-2#SomeGal -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/named-2#SomeGal">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Gal</rdfs:label>
+    </foaf:Person>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/versionedonly.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/versionedonly.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/versionedonly.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/naming/versionedonly.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,101 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF 
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology>
+        <rdfs:comment xml:lang="en">An ontology whose ID contains a version IRI but no ontology IRI. This is not allowed in OWL 2, therefore this ontology shoudl be used for negative testing.
+        </rdfs:comment>
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+        <owl:versionIRI rdf:resource="http://stanbol.apache.org/ontologies/version/bad/1"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/versioned-bad#SomeGuy -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/versioned-bad#SomeGuy">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Guy</rdfs:label>
+    </foaf:Person>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test/naming/versioned-bad#SomeGal -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/test/naming/versioned-bad#SomeGal">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Some Gal</rdfs:label>
+    </foaf:Person>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+

Added: stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nonexistentcharacters.owl
URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nonexistentcharacters.owl?rev=1394594&view=auto
==============================================================================
--- stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nonexistentcharacters.owl (added)
+++ stanbol/trunk/ontologymanager/multiplexer/clerezza/src/test/resources/ontologies/nonexistentcharacters.owl Fri Oct  5 15:35:22 2012
@@ -0,0 +1,89 @@
+<?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 rdf:RDF [
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<rdf:RDF xmlns="http://stanbol.apache.org/ontologies/pcomics/nonexistentcharacters.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/pcomics/nonexistentcharacters.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+    <owl:Ontology rdf:about="http://stanbol.apache.org/ontologies/pcomics/nonexistentcharacters.owl">
+        <rdfs:comment>Should import: http://xmlns.com/foaf/0.1/</rdfs:comment>
+        <owl:versionInfo xml:lang="en">Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+        </owl:versionInfo>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    //////////////////////////////////////////////nonexistentcharacters.owl/////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <!-- http://stanbol.apache.org/ontologies/pcomics/nonexistentcharacters.owl#Brukurutrukk -->
+
+    <foaf:Person rdf:about="http://stanbol.apache.org/ontologies/pcomics/nonexistentcharacters.owl#Brukurutrukk">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Brukurutrukk</rdfs:label>
+    </foaf:Person>    
+
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1789) http://owlapi.sourceforge.net -->
+