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/07/21 16:58:54 UTC

svn commit: r1149208 [2/2] - 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/registry/ ontologymanag...

Copied: incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestOntologyRegistry.java (from r1149065, incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestRegistry.java)
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestOntologyRegistry.java?p2=incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestOntologyRegistry.java&p1=incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestRegistry.java&r1=1149065&r2=1149208&rev=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestRegistry.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/registry/TestOntologyRegistry.java Thu Jul 21 14:58:45 2011
@@ -16,10 +16,14 @@
  */
 package org.apache.stanbol.ontologymanager.ontonet.registry;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.net.URL;
+import java.util.Dictionary;
 import java.util.Hashtable;
 
 import org.apache.stanbol.ontologymanager.ontonet.Locations;
@@ -31,12 +35,13 @@ import org.apache.stanbol.ontologymanage
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.SessionOntologySpace;
 import org.apache.stanbol.ontologymanager.ontonet.api.ontology.UnmodifiableOntologySpaceException;
 import org.apache.stanbol.ontologymanager.ontonet.api.registry.RegistryLoader;
+import org.apache.stanbol.ontologymanager.ontonet.api.registry.RegistryManager;
 import org.apache.stanbol.ontologymanager.ontonet.api.registry.io.OntologyRegistryIRISource;
 import org.apache.stanbol.ontologymanager.ontonet.api.registry.models.Registry;
 import org.apache.stanbol.ontologymanager.ontonet.api.registry.models.RegistryItem;
 import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerConfigurationImpl;
 import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
-import org.apache.stanbol.ontologymanager.ontonet.impl.registry.cache.RegistryUtils;
+import org.apache.stanbol.ontologymanager.ontonet.impl.registry.RegistryManagerImpl;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.semanticweb.owlapi.apibinding.OWLManager;
@@ -45,34 +50,34 @@ import org.semanticweb.owlapi.model.OWLO
 import org.semanticweb.owlapi.model.OWLOntologyManager;
 import org.semanticweb.owlapi.util.AutoIRIMapper;
 
-public class TestRegistry {
+public class TestOntologyRegistry {
+
     private static OWLOntologyManager ontologyManager;
     private static RegistryLoader loader;
     private static OntologyRegistryIRISource ontologySource;
     private static ONManagerConfiguration configuration;
     private static ONManager onm;
 
-    private static IRI testRegistryIri = IRI
-            .create("http://www.ontologydesignpatterns.org/registry/krestest.owl");
-
     @BeforeClass
     public static void setup() {
+        final Dictionary<String,Object> emptyConfig = new Hashtable<String,Object>();
+        configuration = new ONManagerConfigurationImpl(emptyConfig);
+        RegistryManager regman = new RegistryManagerImpl(emptyConfig);
         // An ONManagerImpl with no store and default settings
-        configuration = new ONManagerConfigurationImpl(new Hashtable<String,Object>());
-        onm = new ONManagerImpl(null, null, configuration, new Hashtable<String,Object>());
+        onm = new ONManagerImpl(null, null, configuration, regman, emptyConfig);
         ontologyManager = onm.getOwlCacheManager();
         loader = onm.getRegistryLoader();
 
     }
 
-//    private static boolean mapperIsSet = false;
-//
-//    public void setupOfflineMapper() {
-//        if (mapperIsSet) {} else {
-//            ontologySource = new OntologyRegistryIRISource(testRegistryIri, ontologyManager, loader);
-//            mapperIsSet = true;
-//        }
-//    }
+    // private static boolean mapperIsSet = false;
+    //
+    // public void setupOfflineMapper() {
+    // if (mapperIsSet) {} else {
+    // ontologySource = new OntologyRegistryIRISource(testRegistryIri, ontologyManager, loader);
+    // mapperIsSet = true;
+    // }
+    // }
 
     @Test
     public void testPopulateRegistry() throws Exception {
@@ -82,22 +87,50 @@ public class TestRegistry {
         virginOntologyManager.addIRIMapper(new AutoIRIMapper(new File(url.toURI()), true));
         // Population is lazy; no need to add other mappers.
         OWLOntology oReg = virginOntologyManager.loadOntology(Locations._REGISTRY_TEST);
-        Registry r = RegistryUtils.populateRegistry(oReg);
+        Registry r = onm.getRegistryManager().populateRegistry(oReg);
         assertNotNull(r);
-        assertEquals(2,r.getChildren().length);
         int count = 2;
-//        System.err.println(r);
-//        for (RegistryItem c1 : r.getChildren()) {
-//            System.err.println("\t" + c1);
-//            for (RegistryItem c2 : c1.getChildren())
-//                System.err.println("\t\t" + c2);
-//
+        assertEquals(count, r.getChildren().length);
+    }
+
+    /**
+     * Verify that, when loading multiple registries that add library information to each other, the overall
+     * model reflects the union of these registries.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testRegistryUnion() throws Exception {
+        OWLOntologyManager virginOntologyManager = OWLManager.createOWLOntologyManager();
+        URL url = getClass().getResource("/ontologies/registry");
+        assertNotNull(url);
+        virginOntologyManager.addIRIMapper(new AutoIRIMapper(new File(url.toURI()), true));
+        // Population is lazy; no need to add other mappers.
+        OWLOntology oReg = virginOntologyManager.loadOntology(Locations._REGISTRY_TEST);
+        Registry r1 = onm.getRegistryManager().populateRegistry(oReg);
+        // Now the second registry.
+        oReg = virginOntologyManager.loadOntology(Locations._REGISTRY_TEST_ADDITIONS);
+        Registry r2 = onm.getRegistryManager().populateRegistry(oReg);
+        assertNotNull(r2);
+        int count = 2;
+        assertEquals(count, r1.getChildren().length);
+//        for (RegistryItem lib : r1.getChildren()) {
+//            System.out.println("\t"+lib);
+//            for (RegistryItem ont : lib.getChildren()) {
+//                System.out.println("\t\t"+ont);      
+//            }
+//        }
+//        for (RegistryItem lib : r2.getChildren()) {
+//            System.out.println("\t"+lib);
+//            for (RegistryItem ont : lib.getChildren()) {
+//                System.out.println("\t\t"+ont);      
+//            }
 //        }
     }
 
     @Test
     public void testAddRegistryToSessionSpace() throws Exception {
-//        setupOfflineMapper();
+        // setupOfflineMapper();
         IRI scopeIri = IRI.create("http://fise.iks-project.eu/scopone");
         SessionOntologySpace space = null;
         space = onm.getOntologySpaceFactory().createSessionOntologySpace(scopeIri);
@@ -117,7 +150,7 @@ public class TestRegistry {
 
     @Test
     public void testScopeCreationWithRegistry() {
-//        setupOfflineMapper();
+        // setupOfflineMapper();
         IRI scopeIri = IRI.create("http://fise.iks-project.eu/scopone");
         OntologyScope scope = null;
         // The factory call also invokes loadRegistriesEager() and
@@ -129,13 +162,11 @@ public class TestRegistry {
         }
 
         assertTrue(scope != null && scope.getCoreSpace().getTopOntology() != null);
-        // OntologyUtils.printOntology(scope.getCoreSpace().getTopOntology(),
-        // System.err);
     }
 
     @Test
     public void testSpaceCreationWithRegistry() {
-//        setupOfflineMapper();
+        // setupOfflineMapper();
         IRI scopeIri = IRI.create("http://fise.iks-project.eu/scopone");
         CoreOntologySpace space = null;
         // The factory call also invokes loadRegistriesEager() and

Modified: incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/session/TestSessions.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/session/TestSessions.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/session/TestSessions.java (original)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/test/java/org/apache/stanbol/ontologymanager/ontonet/session/TestSessions.java Thu Jul 21 14:58:45 2011
@@ -65,7 +65,7 @@ public class TestSessions {
 	@BeforeClass
 	public static void setup() {
 		// An ONManagerImpl with no store and default settings
-		ONManager onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+		ONManager onm = new ONManagerImpl(null,null, null, new Hashtable<String, Object>());
 		sesmgr = onm.getSessionManager();
 		scopeFactory = onm.getOntologyScopeFactory();
 		spaceFactory = onm.getOntologySpaceFactory();

Added: incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/registry/onmtest_additions.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/registry/onmtest_additions.owl?rev=1149208&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/registry/onmtest_additions.owl (added)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/registry/onmtest_additions.owl Thu Jul 21 14:58:45 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<rdf:RDF
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+    xmlns:owl="http://www.w3.org/2002/07/owl#"
+    xmlns:meta="http://www.ontologydesignpatterns.org/schemas/meta.owl#"
+    xmlns="http://stanbol.apache.org/ontologies/registries/onmtest_additions.owl#"
+    xml:base="http://stanbol.apache.org/ontologies/registries/onmtest_additions.owl">
+    <owl:Ontology rdf:about="">
+        <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.1.0</owl:versionInfo>
+        <owl:versionInfo xml:lang="en">Created by Alessandro Adamou</owl:versionInfo>
+        <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>
+        <rdfs:comment>A registry that adds ontologies to libraries already defined in http://stanbol.apache.org/ontologies/registries/onmtest.owl (which is NOT imported by this ontology). Used for unit testing.</rdfs:comment>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/schemas/meta.owl"/>
+    </owl:Ontology>
+  
+    <!-- For testing additions to other libraries -->
+    <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl">
+        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Test Model 1</rdfs:label>
+        <meta:isOntologyOf rdf:resource="http://stanbol.apache.org/ontologies/registries/onmtest.owl#Library1"/>
+        <rdf:type rdf:resource="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#Ontology"/>
+    </rdf:Description>
+    
+</rdf:RDF>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/test1.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/test1.owl?rev=1149208&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/test1.owl (added)
+++ incubator/stanbol/trunk/ontologymanager/ontonet/src/test/resources/ontologies/test1.owl Thu Jul 21 14:58:45 2011
@@ -0,0 +1,356 @@
+<?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/ontologies/test1.owl#"
+     xml:base="http://stanbol.apache.org/ontologies/test1.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/test1.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>
+		<rdfs:comment>A dummy model whose only purpose if to test the presence of its members.</rdfs:comment>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <owl:AnnotationProperty rdf:about="&rdfs;label"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#aboutFiction -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#aboutFiction">
+        <rdfs:label xml:lang="en">aboutFiction</rdfs:label>
+        <rdfs:range rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#ComicWhale"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#friend -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#friend">
+        <rdf:type rdf:resource="&owl;SymmetricProperty"/>
+        <rdfs:label xml:lang="en">friend</rdfs:label>
+        <rdfs:subPropertyOf rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#knows"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#knows -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#knows">
+        <rdf:type rdf:resource="&owl;TransitiveProperty"/>
+        <rdfs:label xml:lang="en">knows</rdfs:label>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#livesIn -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#livesIn">
+        <rdfs:label xml:lang="en">livesIn</rdfs:label>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#sellsTo -->
+
+    <owl:ObjectProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#sellsTo">
+        <rdfs:label xml:lang="en">sells to</rdfs:label>
+        <rdfs:label xml:lang="it">vende a</rdfs:label>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.w3.org/2002/07/owl#topObjectProperty -->
+
+    <owl:ObjectProperty rdf:about="&owl;topObjectProperty"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Data properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#longInMeters -->
+
+    <owl:DatatypeProperty rdf:about="http://stanbol.apache.org/ontologies/test1.owl#longInMeters">
+        <rdf:type rdf:resource="&owl;FunctionalProperty"/>
+        <rdfs:label xml:lang="en">longInMeters</rdfs:label>
+        <rdfs:range rdf:resource="&xsd;int"/>
+    </owl:DatatypeProperty>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#AquaticMammal -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#AquaticMammal">
+        <rdfs:label>AquaticMammal</rdfs:label>
+        <owl:equivalentClass>
+            <owl:Class>
+                <owl:intersectionOf rdf:parseType="Collection">
+                    <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism"/>
+                    <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Mammal"/>
+                </owl:intersectionOf>
+            </owl:Class>
+        </owl:equivalentClass>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism">
+        <rdfs:label>AquaticOrganism</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&owl;Thing"/>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#ComicWhale -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#ComicWhale">
+        <rdfs:label xml:lang="en">Comic whale</rdfs:label>
+        <owl:equivalentClass>
+            <owl:Class>
+                <owl:oneOf rdf:parseType="Collection">
+                    <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Porpy"/>
+                    <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#MobyDick"/>
+                </owl:oneOf>
+            </owl:Class>
+        </owl:equivalentClass>
+        <rdfs:subClassOf rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Whale"/>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Crustacean -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Crustacean">
+        <rdfs:label>Crustacean</rdfs:label>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Fish -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Fish">
+        <rdfs:label>Fish</rdfs:label>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Institution -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Institution"/>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Mammal -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Mammal">
+        <rdfs:label>Mammal</rdfs:label>
+    </owl:Class>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Whale -->
+
+    <owl:Class rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Whale">
+        <rdfs:label>Whale</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#AquaticMammal"/>
+    </owl:Class>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#ACME -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#ACME">
+        <sellsTo rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Wile"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#BalenaBianca -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#BalenaBianca">
+        <rdf:type rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#AquaticMammal"/>
+        <rdfs:label xml:lang="en">BalenaBianca</rdfs:label>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#MobyDick -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#MobyDick">
+        <rdf:type rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism"/>
+        <rdf:type rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Mammal"/>
+        <rdfs:label>MobyDick</rdfs:label>
+        <longInMeters rdf:datatype="&xsd;nonNegativeInteger">23</longInMeters>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#MobyDickTheNovel -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#MobyDickTheNovel">
+        <rdfs:label xml:lang="en">MelvilleNovel</rdfs:label>
+        <aboutFiction rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#BalenaBianca"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Porpy -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Porpy">
+        <rdf:type rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism"/>
+        <rdfs:label>Porpy</rdfs:label>
+        <knows rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#MobyDick"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Snorky -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Snorky">
+        <rdf:type rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Crustacean"/>
+        <rdfs:label xml:lang="en">Snorky</rdfs:label>
+        <friend rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#BalenaBianca"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://stanbol.apache.org/ontologies/test1.owl#Wile -->
+
+    <owl:NamedIndividual rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Wile">
+        <knows rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Porpy"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // General axioms
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <owl:Class>
+        <rdfs:subClassOf rdf:resource="&owl;Thing"/>
+        <owl:intersectionOf rdf:parseType="Collection">
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism"/>
+            <owl:Class>
+                <owl:complementOf rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#Fish"/>
+            </owl:Class>
+        </owl:intersectionOf>
+    </owl:Class>
+    <rdf:Description>
+        <rdf:type rdf:resource="&owl;AllDifferent"/>
+        <owl:distinctMembers rdf:parseType="Collection">
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#BalenaBianca"/>
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Porpy"/>
+        </owl:distinctMembers>
+    </rdf:Description>
+    <owl:Class>
+        <rdfs:subClassOf rdf:resource="http://stanbol.apache.org/ontologies/test1.owl#AquaticOrganism"/>
+        <owl:unionOf rdf:parseType="Collection">
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#AquaticMammal"/>
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Crustacean"/>
+            <rdf:Description rdf:about="http://stanbol.apache.org/ontologies/test1.owl#Fish"/>
+        </owl:unionOf>
+    </owl:Class>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.2.1785) http://owlapi.sourceforge.net -->
+

Modified: incubator/stanbol/trunk/reengineer/db/src/test/java/org/apache/stanbol/reengineer/db/DBExtractorTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/reengineer/db/src/test/java/org/apache/stanbol/reengineer/db/DBExtractorTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/reengineer/db/src/test/java/org/apache/stanbol/reengineer/db/DBExtractorTest.java (original)
+++ incubator/stanbol/trunk/reengineer/db/src/test/java/org/apache/stanbol/reengineer/db/DBExtractorTest.java Thu Jul 21 14:58:45 2011
@@ -39,9 +39,8 @@ public class DBExtractorTest {
         TcManager tcm = new SpecialTcManager(qe, wtcp);
 
         // Two different ontology storagez, the same sparql engine and tcprovider
-		
-		
-		onManager = new ONManagerImpl(tcm, wtcp,emptyConf);
+        
+		onManager = new ONManagerImpl(tcm, wtcp,null,emptyConf);
 		dbExtractor = new DBExtractor(new ReengineerManagerImpl(new Hashtable<String,Object>()),
 				onManager, tcm, wtcp, emptyConf);
 		graphNS = "http://kres.iks-project.eu/reengineering/test";

Modified: incubator/stanbol/trunk/reengineer/xml/src/test/java/org/apache/stanbol/reengineer/xml/XMLReengineerTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/reengineer/xml/src/test/java/org/apache/stanbol/reengineer/xml/XMLReengineerTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/reengineer/xml/src/test/java/org/apache/stanbol/reengineer/xml/XMLReengineerTest.java (original)
+++ incubator/stanbol/trunk/reengineer/xml/src/test/java/org/apache/stanbol/reengineer/xml/XMLReengineerTest.java Thu Jul 21 14:58:45 2011
@@ -89,7 +89,7 @@ public class XMLReengineerTest {
 	        TcManager tcm = new SpecialTcManager(qe, wtcp);
 
 	        // Two different ontology storagez, the same sparql engine and tcprovider
-		ONManager onManager = new ONManagerImpl(tcm, wtcp ,emptyConf);
+		ONManager onManager = new ONManagerImpl(tcm, wtcp ,null,emptyConf);
 		xmlExtractor = new XMLExtractor(new ReengineerManagerImpl(new Hashtable<String,Object>()),
 				onManager, emptyConf);
 	}

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java Thu Jul 21 14:58:45 2011
@@ -66,7 +66,7 @@ public class AddRecipeTest {
     @Before
     public void setUp() {
     	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java Thu Jul 21 14:58:45 2011
@@ -62,8 +62,8 @@ public class AddRuleTest {
 
     @Before
     public void setUp() {
-    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+        Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+        onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java Thu Jul 21 14:58:45 2011
@@ -61,8 +61,8 @@ public class GetRecipeTest {
 
     @Before
     public void setUp() {
-    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+        Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+        onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java Thu Jul 21 14:58:45 2011
@@ -64,7 +64,7 @@ public class GetRuleTest {
     @Before
     public void setUp() {
     	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+        onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java Thu Jul 21 14:58:45 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.
+ */
 /*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
@@ -55,266 +55,290 @@ import org.semanticweb.owlapi.model.OWLO
 import org.semanticweb.owlapi.model.OWLOntologyStorageException;
 
 /**
- *
+ * 
  * @author elvio
  */
 public class LoadRuleFileTest {
 
-    public LoadRuleFileTest() {
-    }
+    public LoadRuleFileTest() {}
 
     @BeforeClass
-    public static void setUpClass() throws Exception {
-    }
+    public static void setUpClass() throws Exception {}
 
     @AfterClass
-    public static void tearDownClass() throws Exception {
-    }
+    public static void tearDownClass() throws Exception {}
 
     @Before
-    public void setUp() {
-    }
+    public void setUp() {}
 
     @After
-    public void tearDown() {
-    }
+    public void tearDown() {}
 
     /**
      * Test of LoadRuleFile method, of class LoadRuleFile.
      */
     @Test
     public void testKReSLoadRuleFile() throws OWLOntologyStorageException {
-    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	ONManager onm = new ONManagerImpl(null,null,configuration);
-    	Dictionary<String, Object> configuration2 = new Hashtable<String, Object>();
-//    	configuration2.put(RuleStoreImpl.RULE_ONTOLOGY, "");
-    	configuration2.put(RuleStore.RULE_NAMESPACE, "http://kres.iks-project.eu/ontology/meta/rmi.owl#");
-        RuleStore store  = new RuleStoreImpl(onm,configuration2,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
-        RuleStore newstore = new RuleStoreImpl(new ONManagerImpl(null,null,configuration),configuration2,store.getOntology());
-        //Load the example file
-        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
+        ONManager onm = new ONManagerImpl(null, null, null, configuration);
+        Dictionary<String,Object> configuration2 = new Hashtable<String,Object>();
+        // configuration2.put(RuleStoreImpl.RULE_ONTOLOGY, "");
+        configuration2.put(RuleStore.RULE_NAMESPACE, "http://kres.iks-project.eu/ontology/meta/rmi.owl#");
+        RuleStore store = new RuleStoreImpl(onm, configuration2,
+                "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        RuleStore newstore = new RuleStoreImpl(new ONManagerImpl(null, null, null, configuration),
+                configuration2, store.getOntology());
+        // Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",
+                store);
         OWLOntology result = load.getStore().getOntology();
 
-
-        ////////////////////////////////////////////////////////////////////
-        //Create ontology
+        // //////////////////////////////////////////////////////////////////
+        // Create ontology
         OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
         OWLOntology owlmodel = newstore.getOntology();
         OWLDataFactory factory = owlmanager.getOWLDataFactory();
-        String ID = owlmodel.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        String ID = owlmodel.getOntologyID().toString().replace("<", "").replace(">", "") + "#";
         System.out.println(ID);
-        //KReSRule
+        // KReSRule
         OWLClass ontocls = factory.getOWLClass(IRI.create(ID + "KReSRule"));
 
-        //MyRuleX
-        String rule = "PREFIX var http://kres.iksproject.eu/rules# ." +
-		  "PREFIX dbs http://andriry.altervista.org/tesiSpecialistica/dbs_l1.owl# ." +
-		  "PREFIX lmm http://www.ontologydesignpatterns.org/ont/lmm/LMM_L1.owl# ." +
-		  "rule1[dbs:Table(?x) -> lmm:Meaning(?x)]";
+        // MyRuleX
+        String rule = "PREFIX var http://kres.iksproject.eu/rules# ."
+                      + "PREFIX dbs http://andriry.altervista.org/tesiSpecialistica/dbs_l1.owl# ."
+                      + "PREFIX lmm http://www.ontologydesignpatterns.org/ont/lmm/LMM_L1.owl# ."
+                      + "rule1[dbs:Table(?x) -> lmm:Meaning(?x)]";
         OWLNamedIndividual ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleX"));
         OWLClassAssertionAxiom classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        OWLDataProperty dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        OWLDataPropertyAssertionAxiom dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule X");
+        OWLDataProperty dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        OWLDataPropertyAssertionAxiom dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop,
+            ontoind, "My comment to the rule X");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, rule);
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,rule);
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleA
+        // MyRuleA
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleA"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule A");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule A");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleABody -> MyRuleAHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleABody -> MyRuleAHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleB
+        // MyRuleB
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleB"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule B");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule B");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleBBody -> MyRuleBHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleBBody -> MyRuleBHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleC
+        // MyRuleC
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleC"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule C");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule C");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleCBody -> MyRuleCHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleCBody -> MyRuleCHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleD
+        // MyRuleD
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleD"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule D");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule D");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleDBody -> MyRuleDHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleDBody -> MyRuleDHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleE
+        // MyRuleE
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleE"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule E");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule E");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleEBody -> MyRuleEHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleEBody -> MyRuleEHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //MyRuleF
+        // MyRuleF
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleF"));
         classAssertion = factory.getOWLClassAssertionAxiom(ontocls, ontoind);
         owlmanager.addAxiom(owlmodel, classAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the rule F");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the rule F");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "MyRuleFBody -> MyRuleFHead");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleFBody -> MyRuleFHead");
-        owlmanager.addAxiom(owlmodel,dataPropAssertion);
 
-        //Recipe
+        // Recipe
         ontocls = factory.getOWLClass(IRI.create(ID + "Recipe"));
 
-        //Add sequence
+        // Add sequence
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the recipe");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the recipe");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
 
-        OWLObjectProperty objprop = factory.getOWLObjectProperty(IRI.create(ID+"hasRule"));
+        OWLObjectProperty objprop = factory.getOWLObjectProperty(IRI.create(ID + "hasRule"));
 
-        OWLNamedIndividual ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleC"));
-        OWLObjectPropertyAssertionAxiom objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        OWLNamedIndividual ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleC"));
+        OWLObjectPropertyAssertionAxiom objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(
+            objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleB"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleB"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleA"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleA"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"startWith"));
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleC"));
-        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
-
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"endWith"));
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleA"));
-        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
-
-        objprop = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
-        OWLNamedIndividual ruleindp = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleC"));
-        OWLNamedIndividual ruleindf = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleB"));
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "startWith"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleC"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
+
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "endWith"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleA"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
+
+        objprop = factory.getOWLObjectProperty(IRI
+                .create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
+        OWLNamedIndividual ruleindp = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleC"));
+        OWLNamedIndividual ruleindf = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleB"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        ruleindp = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleB"));
-        ruleindf = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleA"));
+        ruleindp = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleB"));
+        ruleindf = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleA"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasSequence"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleC, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleB, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleA");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasSequence"));
+        dataPropAssertion = factory
+                .getOWLDataPropertyAssertionAxiom(
+                    dataprop,
+                    ontoind,
+                    "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleC, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleB, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleA");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
 
-        //Add sequence
+        // Add sequence
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe2"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the recipe 2");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the recipe 2");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
 
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"hasRule"));
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "hasRule"));
+
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleD"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
+
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleE"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleD"));
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "startWith"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleE"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleE"));
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "endWith"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleD"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"startWith"));
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleE"));
-        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
-
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"endWith"));
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleD"));
-        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
-
-        objprop = factory.getOWLObjectProperty(IRI.create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
-        ruleindp = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleE"));
-        ruleindf = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleD"));
+        objprop = factory.getOWLObjectProperty(IRI
+                .create("http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"));
+        ruleindp = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleE"));
+        ruleindf = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleD"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe2"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasSequence"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleE, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleD");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasSequence"));
+        dataPropAssertion = factory
+                .getOWLDataPropertyAssertionAxiom(
+                    dataprop,
+                    ontoind,
+                    "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleE, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleD");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
 
-        //Add sequence
+        // Add sequence
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe3"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasDescription"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind, "My comment to the recipe 3");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasDescription"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "My comment to the recipe 3");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
 
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"hasRule"));
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "hasRule"));
 
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleF"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleF"));
         objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
-        objprop = factory.getOWLObjectProperty(IRI.create(ID+"startWith"));
-        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleF"));
-        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop,ontoind, ruleind);
-        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+        objprop = factory.getOWLObjectProperty(IRI.create(ID + "startWith"));
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRuleF"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel, objectPropAssertion);
 
         ontoind = factory.getOWLNamedIndividual(IRI.create(ID + "MyRecipe3"));
-        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasSequence"));
-        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleF");
+        dataprop = factory.getOWLDataProperty(IRI.create(ID + "hasSequence"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,
+            "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleF");
         owlmanager.addAxiom(owlmodel, dataPropAssertion);
-        ////////////////////////////////////////////////////////////////////
+        // //////////////////////////////////////////////////////////////////
 
-        //Get axiom
+        // Get axiom
         int numexp = owlmodel.getAxiomCount();
         Set<OWLAxiom> expaxiom = owlmodel.getAxioms();
         int numres = result.getAxiomCount();
-       if(result!=null){
+        if (result != null) {
             int num = 0;
             Iterator<OWLAxiom> axiom = result.getAxioms().iterator();
 
-            while(axiom.hasNext()){
+            while (axiom.hasNext()) {
 
                 OWLAxiom ax = axiom.next();
-                if(expaxiom.contains(ax))
-                    num++;
+                if (expaxiom.contains(ax)) num++;
             }
-        System.out.println(numexp+" "+numres+" "+num+" "+numres);
-        assertEquals(numexp-numres, num-numres);
-        //assertEquals(numexp,(numres+12));
-        // TODO review the generated test code and remove the default call to fail.
-        }else{
+            System.out.println(numexp + " " + numres + " " + num + " " + numres);
+            assertEquals(numexp - numres, num - numres);
+            // assertEquals(numexp,(numres+12));
+            // TODO review the generated test code and remove the default call to fail.
+        } else {
             fail("Some problem accours");
         }
     }

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java Thu Jul 21 14:58:45 2011
@@ -62,7 +62,7 @@ public class RemoveRecipeTest {
     @Before
     public void setUp() {
     	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+        onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java Thu Jul 21 14:58:45 2011
@@ -62,7 +62,7 @@ public class RemoveRuleTest {
     @Before
     public void setUp() {
     	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+        onm = new ONManagerImpl(null,null, null,configuration);
     	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
     }
 

Modified: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java (original)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java Thu Jul 21 14:58:45 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.
+ */
 /*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
@@ -47,74 +47,64 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- *
+ * 
  * @author elvio
  */
 public class RuleStoreTest {
 
-	private Logger log = LoggerFactory.getLogger(getClass());
+    private Logger log = LoggerFactory.getLogger(getClass());
 
-    public RuleStoreTest() {
-    }
+    public RuleStoreTest() {}
 
     @BeforeClass
-    public static void setUpClass() throws Exception {
-    }
+    public static void setUpClass() throws Exception {}
 
     @AfterClass
-    public static void tearDownClass() throws Exception {
-    }
+    public static void tearDownClass() throws Exception {}
 
     @Before
     public void setUp() {
-		Dictionary<String, Object> configuration = new Hashtable<String, Object>();
-		store = new RuleStoreImpl(new ONManagerImpl(null,null, configuration),
-				configuration,
-				"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
-		blankStore = new RuleStoreImpl(new ONManagerImpl(null,null, configuration),
-				configuration, "");
+        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
+        store = new RuleStoreImpl(new ONManagerImpl(null, null, null, configuration), configuration,
+                "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        blankStore = new RuleStoreImpl(new ONManagerImpl(null, null, null, configuration), configuration, "");
     }
 
     @After
     public void tearDown() {
-		store = null;
-		blankStore = null;
+        store = null;
+        blankStore = null;
     }
 
-	public RuleStore store = null, blankStore = null;
+    public RuleStore store = null, blankStore = null;
 
     @Test
     public void testKReSRuleStore() throws Exception {
         OWLOntology owlmodel = store.getOntology();
-		log.debug("Path for default store config is "
-				+ blankStore.getFilePath());
-		assertNotNull(owlmodel);
-            OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
-            owlmanager.addIRIMapper(new AutoIRIMapper(new File("./src/main/resources/RuleOntology/"), false));
-		String src = "";
-            try{
-			src = "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl";
-			assertEquals(owlmodel, owlmanager
-					.loadOntologyFromOntologyDocument(new File(src)));
-                }catch (Exception e){
-			try {
-				src = "./src/main/resources/RuleOntology/OffLineKReSOntologyRules.owl";
-				assertEquals(owlmodel, owlmanager
-						.loadOntologyFromOntologyDocument(new File(src)));
-			} catch (OWLOntologyCreationException ex) {
-				fail("OWLOntologyCreationException caught when loading from "
-						+ src);
-                }
+        log.debug("Path for default store config is " + blankStore.getFilePath());
+        assertNotNull(owlmodel);
+        OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
+        owlmanager.addIRIMapper(new AutoIRIMapper(new File("./src/main/resources/RuleOntology/"), false));
+        String src = "";
+        try {
+            src = "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl";
+            assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
+        } catch (Exception e) {
+            try {
+                src = "./src/main/resources/RuleOntology/OffLineKReSOntologyRules.owl";
+                assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
+            } catch (OWLOntologyCreationException ex) {
+                fail("OWLOntologyCreationException caught when loading from " + src);
+            }
         }
     }
 
     @Test
-    public void testKReSRuleStore_2()  throws Exception {
-		OWLOntology owlmodel = blankStore.getOntology();
-		System.out.println("Path for default store config is "
-				+ blankStore.getFilePath());
-		assertNotNull(owlmodel);
-            assertTrue(!owlmodel.isEmpty());
-        }
+    public void testKReSRuleStore_2() throws Exception {
+        OWLOntology owlmodel = blankStore.getOntology();
+        System.out.println("Path for default store config is " + blankStore.getFilePath());
+        assertNotNull(owlmodel);
+        assertTrue(!owlmodel.isEmpty());
+    }
 
 }
\ No newline at end of file

Modified: incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java?rev=1149208&r1=1149207&r2=1149208&view=diff
==============================================================================
--- incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java (original)
+++ incubator/stanbol/trunk/rules/refactor/src/test/java/org/apache/stanbol/rules/refactor/RefactoringTest.java Thu Jul 21 14:58:45 2011
@@ -257,7 +257,7 @@ public class RefactoringTest {
         WeightedTcProvider wtcp = new SimpleTcProvider();
         TcManager tcm = new SpecialTcManager(qe, wtcp);
 
-        ONManager onm = new ONManagerImpl(tcm, wtcp, emptyConfig);
+        ONManager onm = new ONManagerImpl(tcm, wtcp, null,emptyConfig);
         Refactorer refactorer = new RefactorerImpl(null, new Serializer(), tcm, onm, ruleStore, emptyConfig);
         try {
             refactorer.ontologyRefactoring(ontology, recipeIRI);
@@ -292,7 +292,7 @@ public class RefactoringTest {
         RuleList ruleList = kb.getkReSRuleList();
         Recipe actualRecipe = new RecipeImpl(null, null, ruleList);
         	
-        ONManager onm = new ONManagerImpl(tcm, wtcp, emptyConfig);
+        ONManager onm = new ONManagerImpl(tcm, wtcp, null,emptyConfig);
         Refactorer refactorer = new RefactorerImpl(null, new Serializer(), tcm, onm, ruleStore, emptyConfig);
         try {
             refactorer.ontologyRefactoring(ontology, actualRecipe);