incubator-stanbol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enrid...@apache.org
Subject svn commit: r1087688 [8/19] - in /incubator/stanbol/trunk/rules: ./ base/ base/.settings/ base/src/ base/src/main/ base/src/main/java/ base/src/main/java/org/ base/src/main/java/org/apache/ base/src/main/java/org/apache/stanbol/ base/src/main/java/org/...
Date Fri, 01 Apr 2011 12:47:56 GMT
Added: incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestKReSOntologyRules.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestKReSOntologyRules.owl?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestKReSOntologyRules.owl (added)
+++ incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestKReSOntologyRules.owl Fri Apr  1 12:47:48 2011
@@ -0,0 +1,316 @@
+<?xml version="1.0"?>
+
+
+<!DOCTYPE Ontology [
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY xml "http://www.w3.org/XML/1998/namespace" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+]>
+
+
+<Ontology xmlns="http://www.w3.org/2002/07/owl#"
+     xml:base="http://kres.iks-project.eu/ontology/meta/rmi.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:xml="http://www.w3.org/XML/1998/namespace"
+     ontologyIRI="http://kres.iks-project.eu/ontology/meta/rmi.owl">
+    <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
+    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
+    <Prefix name="" IRI="http://www.w3.org/2002/07/owl#"/>
+    <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
+    <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
+    <Import>http://www.ontologydesignpatterns.org/cp/owl/sequence.owl</Import>
+    <Declaration>
+        <Class IRI="#KReSRule"/>
+    </Declaration>
+    <Declaration>
+        <Class IRI="#Recipe"/>
+    </Declaration>
+    <Declaration>
+        <ObjectProperty IRI="#endWith"/>
+    </Declaration>
+    <Declaration>
+        <ObjectProperty IRI="#hasRule"/>
+    </Declaration>
+    <Declaration>
+        <ObjectProperty IRI="#isRuleOf"/>
+    </Declaration>
+    <Declaration>
+        <ObjectProperty IRI="#startWith"/>
+    </Declaration>
+    <Declaration>
+        <DataProperty IRI="#hasBodyAndHead"/>
+    </Declaration>
+    <Declaration>
+        <DataProperty IRI="#hasDescription"/>
+    </Declaration>
+    <Declaration>
+        <DataProperty IRI="#hasSequence"/>
+    </Declaration>
+    <SubClassOf>
+        <Class IRI="#KReSRule"/>
+        <Class abbreviatedIRI=":Thing"/>
+    </SubClassOf>
+    <SubClassOf>
+        <Class IRI="#KReSRule"/>
+        <ObjectSomeValuesFrom>
+            <ObjectProperty IRI="#isRuleOf"/>
+            <Class IRI="#Recipe"/>
+        </ObjectSomeValuesFrom>
+    </SubClassOf>
+    <SubClassOf>
+        <Class IRI="#Recipe"/>
+        <Class abbreviatedIRI=":Thing"/>
+    </SubClassOf>
+    <SubClassOf>
+        <Class IRI="#Recipe"/>
+        <ObjectMinCardinality cardinality="1">
+            <ObjectProperty IRI="#hasRule"/>
+            <Class IRI="#KReSRule"/>
+        </ObjectMinCardinality>
+    </SubClassOf>
+    <DisjointClasses>
+        <Class IRI="#KReSRule"/>
+        <Class IRI="#Recipe"/>
+    </DisjointClasses>
+    <SubObjectPropertyOf>
+        <ObjectProperty IRI="#endWith"/>
+        <ObjectProperty abbreviatedIRI=":topObjectProperty"/>
+    </SubObjectPropertyOf>
+    <SubObjectPropertyOf>
+        <ObjectProperty IRI="#hasRule"/>
+        <ObjectProperty abbreviatedIRI=":topObjectProperty"/>
+    </SubObjectPropertyOf>
+    <SubObjectPropertyOf>
+        <ObjectProperty IRI="#isRuleOf"/>
+        <ObjectProperty abbreviatedIRI=":topObjectProperty"/>
+    </SubObjectPropertyOf>
+    <SubObjectPropertyOf>
+        <ObjectProperty IRI="#startWith"/>
+        <ObjectProperty abbreviatedIRI=":topObjectProperty"/>
+    </SubObjectPropertyOf>
+    <InverseObjectProperties>
+        <ObjectProperty IRI="#hasRule"/>
+        <ObjectProperty IRI="#isRuleOf"/>
+    </InverseObjectProperties>
+    <ObjectPropertyDomain>
+        <ObjectProperty IRI="#endWith"/>
+        <Class IRI="#Recipe"/>
+    </ObjectPropertyDomain>
+    <ObjectPropertyDomain>
+        <ObjectProperty IRI="#hasRule"/>
+        <Class IRI="#Recipe"/>
+    </ObjectPropertyDomain>
+    <ObjectPropertyDomain>
+        <ObjectProperty IRI="#isRuleOf"/>
+        <Class IRI="#KReSRule"/>
+    </ObjectPropertyDomain>
+    <ObjectPropertyDomain>
+        <ObjectProperty IRI="#startWith"/>
+        <Class IRI="#Recipe"/>
+    </ObjectPropertyDomain>
+    <ObjectPropertyRange>
+        <ObjectProperty IRI="#endWith"/>
+        <Class IRI="#KReSRule"/>
+    </ObjectPropertyRange>
+    <ObjectPropertyRange>
+        <ObjectProperty IRI="#hasRule"/>
+        <Class IRI="#KReSRule"/>
+    </ObjectPropertyRange>
+    <ObjectPropertyRange>
+        <ObjectProperty IRI="#isRuleOf"/>
+        <Class IRI="#Recipe"/>
+    </ObjectPropertyRange>
+    <ObjectPropertyRange>
+        <ObjectProperty IRI="#startWith"/>
+        <Class IRI="#KReSRule"/>
+    </ObjectPropertyRange>
+    <SubDataPropertyOf>
+        <DataProperty IRI="#hasBodyAndHead"/>
+        <DataProperty abbreviatedIRI=":topDataProperty"/>
+    </SubDataPropertyOf>
+    <SubDataPropertyOf>
+        <DataProperty IRI="#hasDescription"/>
+        <DataProperty abbreviatedIRI=":topDataProperty"/>
+    </SubDataPropertyOf>
+    <SubDataPropertyOf>
+        <DataProperty IRI="#hasSequence"/>
+        <DataProperty abbreviatedIRI=":topDataProperty"/>
+    </SubDataPropertyOf>
+    <DataPropertyDomain>
+        <DataProperty IRI="#hasBodyAndHead"/>
+        <Class IRI="#KReSRule"/>
+    </DataPropertyDomain>
+    <DataPropertyDomain>
+        <DataProperty IRI="#hasDescription"/>
+        <Class abbreviatedIRI=":Thing"/>
+    </DataPropertyDomain>
+    <DataPropertyDomain>
+        <DataProperty IRI="#hasSequence"/>
+        <Class IRI="#Recipe"/>
+    </DataPropertyDomain>
+    <DataPropertyRange>
+        <DataProperty IRI="#hasBodyAndHead"/>
+        <Datatype abbreviatedIRI="xsd:string"/>
+    </DataPropertyRange>
+    <DataPropertyRange>
+        <DataProperty IRI="#hasDescription"/>
+        <Datatype abbreviatedIRI="xsd:string"/>
+    </DataPropertyRange>
+    <DataPropertyRange>
+        <DataProperty IRI="#hasSequence"/>
+        <Datatype abbreviatedIRI="xsd:string"/>
+    </DataPropertyRange>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#KReSRule</IRI>
+        <Literal xml:lang="it">Questa classe contiene gli IRI che identificano le regole (i nomi) su una o pi&#249; ontologie. </Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#KReSRule</IRI>
+        <Literal xml:lang="en">This class contains the IRI (the name) that identifies the rule. </Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#KReSRule</IRI>
+        <Literal xml:lang="en">SWRL rules</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#KReSRule</IRI>
+        <Literal xml:lang="it">regole SWRL</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#Recipe</IRI>
+        <Literal xml:lang="it">Questa classe contiene l&#39;IRI che identifica una sequenza di regole che eseguirano una particolare azione sul dataset. L&#39;istanza di questa classe deve contenere almeno una regola KReS</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#Recipe</IRI>
+        <Literal xml:lang="en">This class contains the IRI that identifies a sequence of rules to perform particular action on the dataset. It must have at least one KReS rule</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#Recipe</IRI>
+        <Literal xml:lang="en">Receipt</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#Recipe</IRI>
+        <Literal xml:lang="it">Ricevere</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#endWith</IRI>
+        <Literal xml:lang="en">This property indentifies the last rule of the recipe.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#endWith</IRI>
+        <Literal xml:lang="en">end with</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#endWith</IRI>
+        <Literal xml:lang="it">finisce con</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasBodyAndHead</IRI>
+        <Literal xml:lang="en">Physical Storage of a rule. Here there is the kres rule string.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasBodyAndHead</IRI>
+        <Literal xml:lang="it">ha corpo e testa</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasBodyAndHead</IRI>
+        <Literal xml:lang="en">has body and head</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasDescription</IRI>
+        <Literal xml:lang="en">Any kind of description about rules or recipes.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasDescription</IRI>
+        <Literal xml:lang="it">ha descrizione</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasDescription</IRI>
+        <Literal xml:lang="en">has description</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasRule</IRI>
+        <Literal xml:lang="en">This property links a Recipe istance to a KReS rule.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasRule</IRI>
+        <Literal xml:lang="it">ha regola</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasRule</IRI>
+        <Literal xml:lang="en">has rule</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasSequence</IRI>
+        <Literal xml:lang="en">Define the rule sequence of a recipe.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasSequence</IRI>
+        <Literal xml:lang="it">ha sequenza</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#hasSequence</IRI>
+        <Literal xml:lang="en">has sequence</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#isRuleOf</IRI>
+        <Literal xml:lang="en">This property links a KReS rule to a Recipe</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#isRuleOf</IRI>
+        <Literal xml:lang="en">is rule of</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#isRuleOf</IRI>
+        <Literal xml:lang="it">&#232; regola di</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#startWith</IRI>
+        <Literal xml:lang="en">This property identifies the starting rule of the recipe.</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#startWith</IRI>
+        <Literal xml:lang="it">inizia con</Literal>
+    </AnnotationAssertion>
+    <AnnotationAssertion>
+        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
+        <IRI>http://www.semanticweb.org/ontologies/ontologyrules.owl#startWith</IRI>
+        <Literal xml:lang="en">start with</Literal>
+    </AnnotationAssertion>
+</Ontology>
+
+
+
+<!-- Generated by the OWL API (version 3.0.0.1451) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestRuleFileExample.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestRuleFileExample.txt?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestRuleFileExample.txt (added)
+++ incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/TestRuleFileExample.txt Fri Apr  1 12:47:48 2011
@@ -0,0 +1,60 @@
+#This is a comment to the file
+
+#These are the rules that I want to insert in the system.
+$KReSRule
+@MyRuleA
+*My comment to the rule A
+MyRuleABody -> MyRuleAHead
+@MyRuleB
+*My comment to the rule B
+MyRuleBBody -> MyRuleBHead
+@MyRuleC
+*My comment to the rule C
+MyRuleCBody -> MyRuleCHead
+
+#This is a recipe
+
+$Recipe
+@MyRecipe
+*My comment to the recipe
+MyRuleC
+MyRuleB
+MyRuleA
+
+#These are the rules that I want to insert in the system.
+$KReSRule
+@MyRuleD
+*My comment to the rule D
+MyRuleDBody -> MyRuleDHead
+@MyRuleE
+*My comment to the rule E
+MyRuleEBody -> MyRuleEHead
+@MyRuleF
+*My comment to the rule F
+MyRuleFBody -> MyRuleFHead
+
+#This is a recipe
+
+$Recipe
+@MyRecipe2
+*My comment to the recipe 2
+MyRuleE
+MyRuleD
+
+$Recipe
+@MyRecipe3
+*My comment to the recipe 3
+MyRuleF
+
+$Recipe
+@MyRecipe4
+*My comment to the recipe 4
+MyRuleC
+MyRuleF
+MyRuleB
+MyRuleD
+
+$KReSRule
+@MyRuleX
+*My comment to the rule X
+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)]

Added: incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/rmi_config.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/rmi_config.owl?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/rmi_config.owl (added)
+++ incubator/stanbol/trunk/rules/manager/src/main/resources/RuleOntology/rmi_config.owl Fri Apr  1 12:47:48 2011
@@ -0,0 +1,175 @@
+<?xml version="1.0"?>
+<rdf:RDF xmlns="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#"
+     xml:base="http://kres.iks-project.eu/ontology/meta/rmi_config.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:rmi_config="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#"
+     xmlns:sequence="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#"
+     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#"
+     xmlns:rmi="http://kres.iks-project.eu/ontology/meta/rmi.owl#">
+    <owl:Ontology rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl">
+        <owl:imports rdf:resource="http://ontologydesignpatterns.org/ont/iks/kres/rmi.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#endWith -->
+
+    <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#endWith"/>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasRule -->
+
+    <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasRule"/>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#startWith -->
+
+    <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#startWith"/>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Data properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasBodyAndHead -->
+
+    <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasBodyAndHead"/>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasDescription -->
+
+    <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasDescription"/>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasSequence -->
+
+    <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasSequence"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule -->
+
+    <owl:Class rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe -->
+
+    <owl:Class rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRecipeA -->
+
+    <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRecipeA">
+        <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+        <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Some description here</rmi:hasDescription>
+        <rmi:hasSequence rdf:datatype="http://www.w3.org/2001/XMLSchema#string">kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB,kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA</rmi:hasSequence>
+        <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+        <rmi:endWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+        <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB"/>
+        <rmi:startWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA -->
+
+    <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA">
+        <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+        <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">An example of description for my rule A</rmi:hasDescription>
+        <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BodyA -&gt; BodyB</rmi:hasBodyAndHead>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB -->
+
+    <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB">
+        <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+        <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">An example of description..for my rule B</rmi:hasDescription>
+        <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BodyB -&gt; HeadB</rmi:hasBodyAndHead>
+        <sequence:directlyPrecedes rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRecipe -->
+
+    <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRecipe">
+        <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+        <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A single rule recipe.</rmi:hasDescription>
+        <rmi:hasSequence rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://kres.iks-project.eu/ontology/meta/rmi.owl#ProvaParentRule</rmi:hasSequence>
+        <rmi:endWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+        <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+        <rmi:startWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule -->
+
+    <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule">
+        <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+        <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A rule to inference if a person has an uncle.</rmi:hasDescription>
+        <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ProvaParent = &lt;http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#&gt; . rule1[ has(ProvaParent:hasParent, ?x, ?y) . has(ProvaParent:hasBrother, ?y, ?z) -&gt; has(ProvaParent:hasUncle, ?x, ?z) ]</rmi:hasBodyAndHead>
+    </owl:NamedIndividual>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.0.0.1413) http://owlapi.sourceforge.net -->
+

Propchange: incubator/stanbol/trunk/rules/manager/src/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRecipeTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,250 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.AddRecipe;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLNamedIndividual;
+import org.semanticweb.owlapi.model.OWLOntology;
+
+
+/**
+ *
+ * @author elvio
+ */
+public class AddRecipeTest {
+
+    public AddRecipeTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of addRecipe method, of class AddRecipe.
+     */
+    @Test
+    public void testAddRecipe_3args_1() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        
+        String recipeName = "MyRecipeNew";
+        Vector<IRI> rules = new Vector();
+        rules.add(IRI.create(ID+"MyRuleC"));
+        rules.add(IRI.create(ID+"MyRuleB"));
+        rules.add(IRI.create(ID+"MyRuleA"));
+        String recipeDescription = "My comment to the recipe";
+        AddRecipe instance = new AddRecipe(load.getStore());
+        boolean result = instance.addRecipe(recipeName, rules, recipeDescription);
+        OWLOntology newonto = instance.getStore().getOntology();
+        if(result){
+            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID + "MyRecipeNew"));
+            int axiom = newonto.getAxioms(ruleind).size();
+            assertEquals(8,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRecipe of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRecipe method, of class AddRecipe.
+     */
+    @Test
+    public void testAddRecipe_4args_1() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+
+
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+
+        String recipeName = "MyRecipeNew";
+        String recipeDescription = "My comment to the recipe";
+        AddRecipe instance = new AddRecipe(store);
+        boolean result = instance.addSimpleRecipe(recipeName,recipeDescription);
+        OWLOntology newonto = instance.getStore().getOntology();
+        if(result){
+            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID + "MyRecipeNew"));
+           
+            int axiom = newonto.getAxioms(ruleind).size();
+            assertEquals(2,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRecipe of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRecipe method, of class AddRecipe.
+     */
+    @Test
+    public void testAddRecipe_3args_2() {
+//     RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+
+        IRI recipeName = IRI.create(ID+"MyRecipeNew");
+        Vector<IRI> rules = new Vector();
+        rules.add(IRI.create(ID+"MyRuleC"));
+        rules.add(IRI.create(ID+"MyRuleB"));
+        rules.add(IRI.create(ID+"MyRuleA"));
+        String recipeDescription = "My comment to the recipe";
+        AddRecipe instance = new AddRecipe(load.getStore());
+        boolean result = instance.addRecipe(recipeName, rules, recipeDescription);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+        if(result){
+            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID + "MyRecipeNew"));
+            int axiom = newonto.getAxioms(ruleind).size();
+            assertEquals(8,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRecipe of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRecipeMap method, of class AddRecipe.
+     */
+    @Test
+    public void testAddRecipeMap() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        HashMap<String, Vector<IRI>> recipeMap = new HashMap();
+        HashMap<String, String> recipeDescriptionMap = new HashMap();
+        AddRecipe instance = new AddRecipe(load.getStore());
+
+        Vector<IRI> rules = new Vector();
+        rules.add(IRI.create(ID+"MyRuleC"));
+        rules.add(IRI.create(ID+"MyRuleB"));
+        rules.add(IRI.create(ID+"MyRuleA"));
+
+        Vector<IRI> rules2 = new Vector();
+        rules2.add(IRI.create(ID+"MyRuleE"));
+        rules2.add(IRI.create(ID+"MyRuleF"));
+        rules2.add(IRI.create(ID+"MyRuleD"));
+
+        recipeMap.put("MyRecipeNEW1",rules);
+        recipeMap.put("MyRecipeNEW2",rules2);
+        recipeDescriptionMap.put("MyRecipeNEW1","My comment to the recipe new 1");
+        recipeDescriptionMap.put("MyRecipeNEW2","My comment to the recipe new 2");
+
+        boolean result = instance.addRecipeMap(recipeMap, recipeDescriptionMap);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+       if(result){
+            Iterator<String> keys = recipeMap.keySet().iterator();
+            int axiom = 0;
+            while(keys.hasNext()){
+                OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID+keys.next()));
+                axiom = axiom + newonto.getAxioms(ruleind).size();
+            }
+            assertEquals(16,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRecipeMap of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRecipeMapIRI method, of class AddRecipe.
+     */
+    @Test
+    public void testAddRecipeMapIRI() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        HashMap<IRI, Vector<IRI>> recipeMap = new HashMap();
+        HashMap<IRI, String> recipeDescriptionMap = new HashMap();
+        AddRecipe instance = new AddRecipe(load.getStore());
+
+        Vector<IRI> rules = new Vector();
+        rules.add(IRI.create(ID+"MyRuleC"));
+        rules.add(IRI.create(ID+"MyRuleB"));
+        rules.add(IRI.create(ID+"MyRuleA"));
+
+        Vector<IRI> rules2 = new Vector();
+        rules2.add(IRI.create(ID+"MyRuleE"));
+        rules2.add(IRI.create(ID+"MyRuleF"));
+        rules2.add(IRI.create(ID+"MyRuleD"));
+
+        recipeMap.put(IRI.create(ID+"MyRecipeNEW1"),rules);
+        recipeMap.put(IRI.create(ID+"MyRecipeNEW2"),rules2);
+        recipeDescriptionMap.put(IRI.create(ID+"MyRecipeNEW1"),"My comment to the recipe new 1");
+        recipeDescriptionMap.put(IRI.create(ID+"MyRecipeNEW2"),"My comment to the recipe new 2");
+
+        boolean result = instance.addRecipeMapIRI(recipeMap, recipeDescriptionMap);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+       if(result){
+            Iterator<IRI> keys = recipeMap.keySet().iterator();
+            int axiom = 0;
+            while(keys.hasNext()){
+                OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(keys.next());
+                
+                axiom = axiom + newonto.getAxioms(ruleind).size();
+            }
+            assertEquals(16,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRecipeMapIRI of KReSAddRule");
+        }
+    }
+
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/AddRuleTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,185 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.AddRule;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLNamedIndividual;
+import org.semanticweb.owlapi.model.OWLOntology;
+
+/**
+ *
+ * @author elvio
+ */
+public class AddRuleTest {
+
+    public AddRuleTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of addRule method, of class AddRule.
+     */
+    @Test
+    public void testAddRule_3args_1() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+
+        String ruleName = "MyRuleA";
+        String ruleBodyHead = "MyRuleABody -> MyRuleAHead";
+        String ruleDescription = "My comment to the rule A";
+        AddRule instance = new AddRule(store);
+        
+        boolean result = instance.addRule(ruleName, ruleBodyHead, ruleDescription);
+        OWLOntology newonto = instance.getStore().getOntology();
+        String ID = newonto.getOntologyID().toString().replace("<","").replace(">","")+"#";
+
+       if(result){
+            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID + "MyRuleA"));
+            int axiom = newonto.getAxioms(ruleind).size();
+            assertEquals(3,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRule of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRule method, of class AddRule.
+     */
+    @Test
+    public void testAddRule_3args_2() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        IRI ruleName = IRI.create(ID+"MyRuleA");
+        String ruleBodyHead = "MyRuleABody -> MyRuleAHead";
+        String ruleDescription = "My comment to the rule A";
+        AddRule instance = new AddRule(store);
+
+        boolean result = instance.addRule(ruleName, ruleBodyHead, ruleDescription);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+       if(result){
+            OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(ruleName);
+            int axiom = newonto.getAxioms(ruleind).size();
+            assertEquals(3,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRule of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRuleMap method, of class AddRule.
+     */
+    @Test
+    public void testAddRuleMap() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        HashMap<String, String> ruleBodyHeadMap = new HashMap();
+        HashMap<String, String> ruleDescriptionMap = new HashMap();
+
+        ruleBodyHeadMap.put("MyRuleA","MyRuleABody -> MyRuleAHead");
+        ruleBodyHeadMap.put("MyRuleB","MyRuleBBody -> MyRuleBHead");
+        ruleDescriptionMap.put("MyRuleA","My comment to the rule A");
+        ruleDescriptionMap.put("MyRuleB","My comment to the rule B");
+
+        AddRule instance = new AddRule(store);
+       
+        boolean result = instance.addRuleMap(ruleBodyHeadMap, ruleDescriptionMap);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+       if(result){
+            Iterator<String> keys = ruleBodyHeadMap.keySet().iterator();
+            int axiom = 0;
+            while(keys.hasNext()){
+                OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(IRI.create(ID+keys.next()));
+                axiom = axiom + newonto.getAxioms(ruleind).size();
+            }
+            assertEquals(6,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRuleMap of KReSAddRule");
+        }
+    }
+
+    /**
+     * Test of addRuleMapIRI method, of class AddRule.
+     */
+    @Test
+    public void testAddRuleMapIRI() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        HashMap<IRI, String> ruleBodyHeadMap = new HashMap();
+        HashMap<IRI, String> ruleDescriptionMap = new HashMap();
+
+        ruleBodyHeadMap.put(IRI.create(ID+"MyRuleA"),"MyRuleABody -> MyRuleAHead");
+        ruleBodyHeadMap.put(IRI.create(ID+"MyRuleB"),"MyRuleBBody -> MyRuleBHead");
+        ruleDescriptionMap.put(IRI.create(ID+"MyRuleA"),"My comment to the rule A");
+        ruleDescriptionMap.put(IRI.create(ID+"MyRuleB"),"My comment to the rule B");
+
+        AddRule instance = new AddRule(store);
+
+        boolean result = instance.addRuleMapIRI(ruleBodyHeadMap, ruleDescriptionMap);
+        OWLOntology newonto = instance.getStore().getOntology();
+
+       if(result){
+            Iterator<IRI> keys = ruleBodyHeadMap.keySet().iterator();
+            int axiom = 0;
+            while(keys.hasNext()){
+                OWLNamedIndividual ruleind = newonto.getOWLOntologyManager().getOWLDataFactory().getOWLNamedIndividual(keys.next());
+                axiom = axiom + newonto.getAxioms(ruleind).size();
+            }
+            assertEquals(6,axiom);
+            // TODO review the generated test code and remove the default call to fail.
+        }else{
+            fail("Some problem occurs with addRuleMap of KReSAddRule");
+        }
+    }
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRecipeTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,115 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.GetRecipe;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntology;
+
+/**
+ *
+ * @author elvio
+ */
+public class GetRecipeTest {
+
+    public GetRecipeTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of getRule method, of class GetRecipe.
+     */
+    @Test
+    public void testGetRecipe() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+        GetRecipe rule = new GetRecipe(store);
+        HashMap<IRI, String> map = rule.getRecipe(IRI.create("http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRecipe"));
+        HashMap<IRI, String> expmap = new HashMap();
+        expmap.put(IRI.create(ID+"MyRecipe"), "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");
+        if(map!=null){
+         assertEquals(expmap, map);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method GetRecipe of KReSGetRecipe");
+        }
+    }
+
+    /**
+     * Test of getAllRecipes method, of class GetRecipe.
+     */
+    @Test
+    public void testGetAllRecipes() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+
+        GetRecipe rule = new GetRecipe(store);
+
+        HashMap<IRI, String> map = rule.getAllRecipes();
+        HashMap<IRI, String> expmap = new HashMap();
+        expmap.put(IRI.create(ID+"MyRecipe"), "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");
+        expmap.put(IRI.create(ID+"MyRecipe2"), "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleE, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleD");
+        expmap.put(IRI.create(ID+"MyRecipe3"), "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleF");
+        expmap.put(IRI.create(ID+"MyRecipe4"), "http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleC, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleF, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleB, http://kres.iks-project.eu/ontology/meta/rmi.owl#MyRuleD");
+
+        if(map!=null){
+         assertEquals(expmap, map);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method GetAllRecipe of KReSGetRecipe");
+        }
+    }
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/GetRuleTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,179 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.GetRule;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntology;
+
+/**
+ *
+ * @author elvio
+ */
+public class GetRuleTest {
+
+    public GetRuleTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of getRule method, of class GetRule.
+     */
+    @Test
+    public void testGetRule() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+        
+        GetRule rule = new GetRule(store);
+        HashMap<IRI, String> map = rule.getRule("MyRuleC");
+        HashMap<IRI, String> expmap = new HashMap();
+        expmap.put(IRI.create(ID+"MyRuleC"), "MyRuleCBody -> MyRuleCHead");
+        if(map!=null){
+         assertEquals(expmap, map);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method GetRule of KReSGetRule");
+        }
+    }
+
+    /**
+     * Test of getAllRule method, of class GetRule.
+     */
+    @Test
+    public void testGetAllRule() {
+//        RuleStoreImpl store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+
+        GetRule rule = new GetRule(store);
+    
+        HashMap<IRI, String> map = rule.getAllRules();
+        HashMap<IRI, String> expmap = new HashMap();
+        //MyRuleX
+        String rulex = "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)]";
+        
+        expmap.put(IRI.create(ID+"MyRuleA"), "MyRuleABody -> MyRuleAHead");
+        expmap.put(IRI.create(ID+"MyRuleB"), "MyRuleBBody -> MyRuleBHead");
+        expmap.put(IRI.create(ID+"MyRuleC"), "MyRuleCBody -> MyRuleCHead");
+        expmap.put(IRI.create(ID+"MyRuleD"), "MyRuleDBody -> MyRuleDHead");
+        expmap.put(IRI.create(ID+"MyRuleE"), "MyRuleEBody -> MyRuleEHead");
+        expmap.put(IRI.create(ID+"MyRuleF"), "MyRuleFBody -> MyRuleFHead");
+        expmap.put(IRI.create(ID+"MyRuleX"),rulex);
+
+        if(map!=null){
+            Iterator<IRI> key = map.keySet().iterator();
+            int m = 0;
+            while(key.hasNext()){
+                IRI k = key.next();
+                if(expmap.keySet().contains(k))
+                    if(expmap.get(k).equals(map.get(k)))
+                        m++;
+            }
+
+         assertEquals(expmap.size(),m);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method GetAllRule of KReSGetRule");
+        }
+    }
+
+    /**
+     * Test of getRule method, of class GetRule.
+     */
+    @Test
+    public void testGetRuleUsage() {
+//        RuleStoreImpl store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+
+        GetRule rule = new GetRule(store);
+        Vector<IRI> vector = rule.getRuleUsage(IRI.create(ID + "MyRuleC"));
+ 
+        if(vector!=null){
+         assertEquals(2, vector.size());
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method getRuleUsage of KReSGetRule");
+        }
+    }
+    
+    @Test
+    public void testGetRulesOfRecipe() {
+//        RuleStoreImpl store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        OWLOntology owl = store.getOntology();
+        String ID = owl.getOntologyID().toString().replace("<", "").replace(">", "")+"#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        owl = load.getStore().getOntology();
+
+        GetRule rule = new GetRule(store);
+        Vector<IRI> vector = rule.getRuleUsage(IRI.create(ID + "MyRuleC"));
+ 
+        if(vector!=null){
+         assertEquals(2, vector.size());
+        // TODO review the generated test code and remove the default call to fail.
+        }else{
+          fail("Some error occurs for method getRuleUsage of KReSGetRule");
+        }
+    }
+
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/LoadRuleFileTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,306 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+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.OWLClassAssertionAxiom;
+import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.semanticweb.owlapi.model.OWLDataProperty;
+import org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom;
+import org.semanticweb.owlapi.model.OWLNamedIndividual;
+import org.semanticweb.owlapi.model.OWLObjectProperty;
+import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyManager;
+import org.semanticweb.owlapi.model.OWLOntologyStorageException;
+
+/**
+ *
+ * @author elvio
+ */
+public class LoadRuleFileTest {
+
+    public LoadRuleFileTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    }
+
+    @After
+    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(RuleStoreImpl.RULE_ONTOLOGY_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);
+        OWLOntology result = load.getStore().getOntology();
+
+
+        ////////////////////////////////////////////////////////////////////
+        //Create ontology
+        OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
+        OWLOntology owlmodel = newstore.getOntology();
+        OWLDataFactory factory = owlmanager.getOWLDataFactory();
+        String ID = owlmodel.getOntologyID().toString().replace("<","").replace(">","")+"#";
+        System.out.println(ID);
+        //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)]";
+        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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,rule);
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleABody -> MyRuleAHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleBBody -> MyRuleBHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleCBody -> MyRuleCHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleDBody -> MyRuleDHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleEBody -> MyRuleEHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        dataprop = factory.getOWLDataProperty(IRI.create(ID+"hasBodyAndHead"));
+        dataPropAssertion = factory.getOWLDataPropertyAssertionAxiom(dataprop, ontoind,"MyRuleFBody -> MyRuleFHead");
+        owlmanager.addAxiom(owlmodel,dataPropAssertion);
+
+        //Recipe
+        ontocls = factory.getOWLClass(IRI.create(ID + "Recipe"));
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+
+        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);
+
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleB"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+
+        ruleind = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleA"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ontoind, ruleind);
+        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"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
+        owlmanager.addAxiom(owlmodel,objectPropAssertion);
+
+        ruleindp = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleB"));
+        ruleindf = factory.getOWLNamedIndividual(IRI.create(ID+"MyRuleA"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
+        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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+
+        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);
+
+        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"));
+        objectPropAssertion = factory.getOWLObjectPropertyAssertionAxiom(objprop, ruleindp, ruleindf);
+        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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+
+        //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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+
+        objprop = factory.getOWLObjectProperty(IRI.create(ID+"hasRule"));
+
+        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");
+        owlmanager.addAxiom(owlmodel, dataPropAssertion);
+        ////////////////////////////////////////////////////////////////////
+
+        //Get axiom
+        int numexp = owlmodel.getAxiomCount();
+        Set<OWLAxiom> expaxiom = owlmodel.getAxioms();
+        int numres = result.getAxiomCount();
+       if(result!=null){
+            int num = 0;
+            Iterator<OWLAxiom> axiom = result.getAxioms().iterator();
+
+            while(axiom.hasNext()){
+
+                OWLAxiom ax = axiom.next();
+                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{
+            fail("Some problem accours");
+        }
+    }
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRecipeTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,109 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RemoveRecipe;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyCreationException;
+
+/**
+ *
+ * @author elvio
+ */
+public class RemoveRecipeTest {
+
+    public RemoveRecipeTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of removeRule method, of class RemoveRecipe.
+     */
+    @Test
+    public void testRemoveRule_String() throws OWLOntologyCreationException {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        String owlID = store.getOntology().getOntologyID().toString().replace("<", "").replace(">", "") + "#";
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        OWLOntology owlstart = load.getStore().getOntology();
+        String recipeName = owlID+"MyRecipe";
+        RemoveRecipe instance = new RemoveRecipe(load.getStore());
+
+        boolean expResult = true;
+        boolean result = instance.removeRecipe(IRI.create(recipeName));
+        OWLOntology owlend = instance.getStore().getOntology();
+
+        if(result){
+        assertEquals(expResult,(owlstart.getAxiomCount()>owlend.getAxiomCount()));
+        // TODO review the generated test code and remove the default call to fail.
+        }else{fail("Some errors occur with removeRule of KReSRemoveRule.");}
+    }
+
+    /**
+     * Test of removeRule method, of class RemoveRecipe.
+     */
+    @Test
+    public void testRemoveRuleName_String() throws OWLOntologyCreationException {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        OWLOntology owlstart = load.getStore().getOntology();
+        String recipeName ="MyRecipe";
+        RemoveRecipe instance = new RemoveRecipe(load.getStore());
+
+        boolean expResult = true;
+        boolean result = instance.removeRecipe(recipeName);
+        OWLOntology owlend = instance.getStore().getOntology();
+
+        if(result){
+        assertEquals(expResult,(owlstart.getAxiomCount()>owlend.getAxiomCount()));
+        // TODO review the generated test code and remove the default call to fail.
+        }else{fail("Some errors occur with removeRule of KReSRemoveRule.");}
+    }
+
+   
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RemoveRuleTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,105 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.AddRule;
+import org.apache.stanbol.rules.manager.changes.LoadRuleFile;
+import org.apache.stanbol.rules.manager.changes.RemoveRule;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntologyStorageException;
+
+/**
+ *
+ * @author elvio
+ */
+public class RemoveRuleTest {
+
+    public RemoveRuleTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    	Dictionary<String, Object> configuration = new Hashtable<String, Object>();
+    	onm = new ONManagerImpl(null,null, new Hashtable<String, Object>());
+    	store = new RuleStoreImpl(onm, configuration,"./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+    }
+
+    @After
+    public void tearDown() {
+    	store = null;
+    	onm = null;
+    }
+
+    public RuleStore store = null;
+    public ONManager onm = null;
+
+    /**
+     * Test of removeRule method, of class RemoveRule.
+     */
+    @Test
+    public void testRemoveRule() {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        AddRule rule = new AddRule(load.getStore());
+        rule.addRule("MyRuleProva","Body -> Head",null);
+        String ruleName = "MyRuleProva";
+        RemoveRule instance = new RemoveRule(rule.getStore());
+        boolean expResult = true;
+        boolean result = instance.removeRule(ruleName);
+        if(result){
+        assertEquals(expResult, result);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{fail("Some errors occur with removeRule of KReSRemoveRule.");}
+    }
+
+    /**
+     * Test of removeRule method, of class RemoveRule.
+     */
+    @Test
+    public void testRemoveSingleRule() throws OWLOntologyStorageException {
+//        RuleStore store  = new RuleStoreImpl("./src/main/resources/RuleOntology/TestKReSOntologyRules.owl");
+        String owlID = store.getOntology().getOntologyID().toString().replace("<", "").replace(">", "") + "#";
+
+        //Load the example file
+        LoadRuleFile load = new LoadRuleFile("./src/main/resources/RuleOntology/TestRuleFileExample.txt",store);
+        IRI rule = IRI.create(owlID+"MyRuleB");
+        IRI recipe = IRI.create(owlID+"MyRecipe");
+        RemoveRule instance = new RemoveRule(load.getStore());
+        boolean expResult = true;
+        boolean result = instance.removeRuleFromRecipe(rule, recipe);
+       
+        if(result){
+            assertEquals(expResult, result);
+        // TODO review the generated test code and remove the default call to fail.
+        }else{fail("Some errors occur with removeRule of KReSRemoveRule.");}
+    }
+
+}
\ No newline at end of file

Added: 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=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java (added)
+++ incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/RuleStoreTest.java Fri Apr  1 12:47:48 2011
@@ -0,0 +1,102 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.manager;
+
+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.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.semanticweb.owlapi.apibinding.OWLManager;
+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;
+
+/**
+ *
+ * @author elvio
+ */
+public class RuleStoreTest {
+
+	private Logger log = LoggerFactory.getLogger(getClass());
+
+    public RuleStoreTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    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, "");
+    }
+
+    @After
+    public void tearDown() {
+		store = null;
+		blankStore = null;
+    }
+
+	public RuleStore store = null, blankStore = null;
+
+    @Test
+    public void testKReSRuleStore(){
+        OWLOntology owlmodel = store.getOntology();
+		log.debug("Path for default store config is "
+				+ blankStore.getFilePath());
+		assertNotNull(owlmodel);
+            OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
+		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(){
+		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

Propchange: incubator/stanbol/trunk/rules/manager/src/test/java/org/apache/stanbol/rules/manager/parse/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  1 12:47:48 2011
@@ -0,0 +1 @@
+target



Mime
View raw message