incubator-stanbol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex...@apache.org
Subject svn commit: r1181016 [2/3] - in /incubator/stanbol/trunk: ./ explanation/ explanation/core/ explanation/core/src/ explanation/core/src/main/ explanation/core/src/main/java/ explanation/core/src/main/java/org/ explanation/core/src/main/java/org/apache/ ...
Date Mon, 10 Oct 2011 15:17:46 GMT
Added: incubator/stanbol/trunk/explanation/core/src/main/resources/model/context.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/model/context.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/model/context.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/model/context.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,225 @@
+<?xml version="1.0"?>
+
+
+<!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#" >
+    <!ENTITY agentrole "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#" >
+    <!ENTITY objectrole "http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#" >
+    <!ENTITY description "http://www.ontologydesignpatterns.org/cp/owl/description.owl#" >
+    <!ENTITY explbase "http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#" >
+    <!ENTITY classification "http://www.ontologydesignpatterns.org/cp/owl/classification.owl#" >
+    <!ENTITY typesofentities "http://www.ontologydesignpatterns.org/cp/owl/typesofentities.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/cpont/expl/context.owl"
+     xmlns:agentrole="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:description="http://www.ontologydesignpatterns.org/cp/owl/description.owl#"
+     xmlns:typesofentities="http://www.ontologydesignpatterns.org/cp/owl/typesofentities.owl#"
+     xmlns:classification="http://www.ontologydesignpatterns.org/cp/owl/classification.owl#"
+     xmlns:explbase="http://www.ontologydesignpatterns.org/cpont/expl/explbase.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:objectrole="http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl">
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/persons.owl"/>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#focusesOn -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#focusesOn">
+        <rdfs:range rdf:resource="&agentrole;Agent"/>
+        <rdfs:domain rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#involves"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#involves -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#involves">
+        <rdfs:domain rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#isFocusOf -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#isFocusOf">
+        <owl:inverseOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#focusesOn"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#isInvolvedIn"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#isInvolvedIn -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#isInvolvedIn">
+        <owl:inverseOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#involves"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/classification.owl#Concept -->
+
+    <rdf:Description rdf:about="&classification;Concept">
+        <owl:equivalentClass rdf:resource="&description;Concept"/>
+    </rdf:Description>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/description.owl#Concept -->
+
+    <rdf:Description rdf:about="&description;Concept"/>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#Object -->
+
+    <rdf:Description rdf:about="&objectrole;Object">
+        <owl:equivalentClass rdf:resource="&typesofentities;Object"/>
+    </rdf:Description>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/typesofentities.owl#Object -->
+
+    <rdf:Description rdf:about="&typesofentities;Object"/>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#DiscourseContext -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#DiscourseContext">
+        <rdfs:label xml:lang="en">Discourse context</rdfs:label>
+        <rdfs:subClassOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#InteractionContext"/>
+        <rdfs:comment xml:lang="en">The history of user actions in the interaction with a system within a given interval.</rdfs:comment>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#InteractionContext -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#InteractionContext">
+        <rdfs:subClassOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#SocialContext -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#SocialContext">
+        <rdfs:subClassOf rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext">
+        <rdfs:subClassOf rdf:resource="&classification;Concept"/>
+        <rdfs:subClassOf>
+            <owl:Restriction>
+                <owl:onProperty rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#focusesOn"/>
+                <owl:someValuesFrom rdf:resource="&explbase;User"/>
+            </owl:Restriction>
+        </rdfs:subClassOf>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#User -->
+
+    <rdf:Description rdf:about="&explbase;User">
+        <rdfs:subClassOf rdf:resource="&agentrole;Agent"/>
+        <rdfs:subClassOf>
+            <owl:Restriction>
+                <owl:onProperty rdf:resource="&objectrole;hasRole"/>
+                <owl:someValuesFrom>
+                    <owl:Class>
+                        <owl:oneOf rdf:parseType="Collection">
+                            <rdf:Description rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#user_role"/>
+                        </owl:oneOf>
+                    </owl:Class>
+                </owl:someValuesFrom>
+            </owl:Restriction>
+        </rdfs:subClassOf>
+    </rdf:Description>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/context.owl#user_role -->
+
+    <owl:NamedIndividual rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#user_role">
+        <rdf:type rdf:resource="&objectrole;Role"/>
+    </owl:NamedIndividual>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/model/explbase.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/model/explbase.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/model/explbase.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/model/explbase.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+
+
+<!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#" >
+    <!ENTITY typesofentities "http://www.ontologydesignpatterns.org/cp/owl/typesofentities.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:typesofentities="http://www.ontologydesignpatterns.org/cp/owl/typesofentities.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#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl">
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/typesofentities.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Attribute -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Attribute">
+        <rdfs:label xml:lang="en">Attribute</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&typesofentities;Quality"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#ContextItem -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#ContextItem">
+        <rdfs:label xml:lang="en">ContextItem</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&typesofentities;Object"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Explanation -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Explanation">
+        <rdfs:label xml:lang="en">Explanation</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&typesofentities;Abstract"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Rule -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#Rule">
+        <rdfs:label xml:lang="en">Rule</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&typesofentities;Abstract"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#User -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl#User">
+        <rdfs:subClassOf rdf:resource="&typesofentities;Object"/>
+    </owl:Class>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/model/ipc.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/model/ipc.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/model/ipc.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/model/ipc.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+
+
+<!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://www.ontologydesignpatterns.org/cpont/expl/ipc.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/cpont/expl/ipc.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://www.ontologydesignpatterns.org/cpont/expl/ipc.owl">
+        <rdfs:label xml:lang="en">Intelligent Project Controlling</rdfs:label>
+        <rdfs:comment xml:lang="en">Provides specific entities for modelling explanation generation within an Intelligent project Controlling use case.</rdfs:comment>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/context.owl"/>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cpont/expl/explbase.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotations
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <rdf:Description rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#InteractionContext">
+        <rdfs:label xml:lang="en">Interaction context</rdfs:label>
+    </rdf:Description>
+    <rdf:Description rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#SocialContext">
+        <rdfs:label xml:lang="en">Social context</rdfs:label>
+    </rdf:Description>
+    <rdf:Description rdf:about="http://www.ontologydesignpatterns.org/cpont/expl/context.owl#UsageContext">
+        <rdfs:label xml:lang="en">Usage context</rdfs:label>
+    </rdf:Description>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/explanationschema.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/explanationschema.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/explanationschema.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/explanationschema.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+
+
+<!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://www.ontologydesignpatterns.org/schemas/explanationschema.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/schemas/explanationschema.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://www.ontologydesignpatterns.org/schemas/explanationschema.owl"/>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    <owl:AnnotationProperty rdf:about="http://www.ontologydesignpatterns.org/schemas/explanationschema.owl#keySchemaFactor">
+        <rdfs:label xml:lang="en">key schema factor</rdfs:label>
+        <rdfs:comment xml:lang="en">Determines whether the given class or property is required to be instantiated (either asserted or inferred) in order for a knowledge pattern to be satisfied by an ABox. This is used in order to provide some flexibility in the selection of candidate patterns for explanation, so that we do not rule out completely every knowledge pattern just because it is not filled in every part.</rdfs:comment>
+        <rdfs:range rdf:resource="&xsd;boolean"/>
+    </owl:AnnotationProperty>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+
+
+<!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#" >
+    <!ENTITY sequence "http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#" >
+    <!ENTITY agentrole "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#" >
+    <!ENTITY objectrole "http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#" >
+    <!ENTITY communities "http://www.ontologydesignpatterns.org/cp/owl/communities.owl#" >
+    <!ENTITY explanationschema "http://www.ontologydesignpatterns.org/schemas/explanationschema.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl"
+     xmlns:agentrole="http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:communities="http://www.ontologydesignpatterns.org/cp/owl/communities.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:objectrole="http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#"
+     xmlns:explanationschema="http://www.ontologydesignpatterns.org/schemas/explanationschema.owl#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl">
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/communities.owl"/>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl"/>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/schemas/explanationschema.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasDirectSuperior -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasDirectSuperior">
+        <rdfs:label xml:lang="en">hasDirectSuperior</rdfs:label>
+        <rdfs:domain rdf:resource="&agentrole;Agent"/>
+        <rdfs:range rdf:resource="&agentrole;Agent"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasLowerRank"/>
+        <owl:propertyChainAxiom rdf:parseType="Collection">
+            <rdf:Description rdf:about="&objectrole;hasRole"/>
+            <rdf:Description rdf:about="&sequence;directlyFollows"/>
+            <rdf:Description rdf:about="&objectrole;isRoleOf"/>
+        </owl:propertyChainAxiom>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasHigherRank -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasHigherRank">
+        <rdf:type rdf:resource="&owl;TransitiveProperty"/>
+        <rdfs:label xml:lang="en">isSuperior</rdfs:label>
+        <explanationschema:keySchemaElement rdf:datatype="&xsd;boolean">true</explanationschema:keySchemaElement>
+        <rdfs:domain rdf:resource="&agentrole;Agent"/>
+        <rdfs:range rdf:resource="&agentrole;Agent"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasLowerRank -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasLowerRank">
+        <rdf:type rdf:resource="&owl;TransitiveProperty"/>
+        <rdfs:label xml:lang="en">hasLowerRank</rdfs:label>
+        <explanationschema:keySchemaElement rdf:datatype="&xsd;boolean"></explanationschema:keySchemaElement>
+        <rdfs:domain rdf:resource="&agentrole;Agent"/>
+        <rdfs:range rdf:resource="&agentrole;Agent"/>
+        <owl:inverseOf rdf:resource="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasHigherRank"/>
+        <owl:propertyChainAxiom rdf:parseType="Collection">
+            <rdf:Description rdf:about="&objectrole;hasRole"/>
+            <rdf:Description rdf:about="&sequence;follows"/>
+            <rdf:Description rdf:about="&objectrole;isRoleOf"/>
+        </owl:propertyChainAxiom>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#isDirectSuperiorOf -->
+
+    <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#isDirectSuperiorOf">
+        <rdfs:label xml:lang="en">is direct superior of</rdfs:label>
+        <rdfs:domain rdf:resource="&agentrole;Agent"/>
+        <rdfs:range rdf:resource="&agentrole;Agent"/>
+        <rdfs:subPropertyOf rdf:resource="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasHigherRank"/>
+    </owl:ObjectProperty>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#Organization -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#Organization">
+        <rdfs:label xml:lang="en">OWLClass_01308824784545248000</rdfs:label>
+        <rdfs:subClassOf rdf:resource="&communities;Community"/>
+    </owl:Class>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#RoleInOrganization -->
+
+    <owl:Class rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#RoleInOrganization">
+        <rdfs:subClassOf rdf:resource="&objectrole;Role"/>
+    </owl:Class>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy_mappings.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy_mappings.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy_mappings.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/organizationalhierarchy_mappings.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+
+
+<!DOCTYPE rdf:RDF [
+    <!ENTITY org "http://www.w3.org/ns/org#" >
+    <!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#" >
+    <!ENTITY objectrole "http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#" >
+    <!ENTITY organizationalhierarchy "http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy_mappings.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy_mappings.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#"
+     xmlns:organizationalhierarchy="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#"
+     xmlns:objectrole="http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#"
+     xmlns:org="http://www.w3.org/ns/org#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy_mappings.owl">
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Object Properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#hasRole -->
+
+    <rdf:Description rdf:about="&objectrole;hasRole">
+        <owl:propertyChainAxiom rdf:parseType="Collection">
+            <rdf:Description rdf:about="&org;hasMembership"/>
+            <rdf:Description rdf:about="&org;role"/>
+        </owl:propertyChainAxiom>
+    </rdf:Description>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl#hasDirectSuperior -->
+
+    <rdf:Description rdf:about="&organizationalhierarchy;hasDirectSuperior">
+        <rdfs:subPropertyOf rdf:resource="&org;reportsTo"/>
+    </rdf:Description>
+    
+
+
+    <!-- http://www.w3.org/ns/org#hasMembership -->
+
+    <owl:ObjectProperty rdf:about="&org;hasMembership"/>
+    
+
+
+    <!-- http://www.w3.org/ns/org#reportsTo -->
+
+    <owl:ObjectProperty rdf:about="&org;reportsTo"/>
+    
+
+
+    <!-- http://www.w3.org/ns/org#role -->
+
+    <owl:ObjectProperty rdf:about="&org;role"/>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation-mappings.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation-mappings.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation-mappings.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation-mappings.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+
+<!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#" >
+    <!ENTITY demo "http://www.ontologydesignpatterns.org/cp/demo/" >
+    <!ENTITY meta "http://www.ontologydesignpatterns.org/schemas/meta.owl#" >
+    <!ENTITY coddata "http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#" >
+    <!ENTITY codkernel "http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl"
+     xmlns:demo="http://www.ontologydesignpatterns.org/cp/demo/"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:codkernel="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.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:coddata="http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#"
+     xmlns:meta="http://www.ontologydesignpatterns.org/schemas/meta.owl#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl">
+        <owl:versionInfo rdf:datatype="&xsd;string">0.1</owl:versionInfo>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/schemas/meta.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy_mappings.owl -->
+
+    <owl:NamedIndividual rdf:about="&demo;organizationalhierarchy_mappings.owl">
+        <rdf:type rdf:resource="&codkernel;Ontology"/>
+        <rdfs:label rdf:datatype="&xsd;string">Organizational Hierarchy</rdfs:label>
+        <meta:isOntologyOf rdf:resource="http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl#ExplanationSchemaMappingCatalog"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl#ExplanationSchemaMappingCatalog -->
+
+    <owl:NamedIndividual rdf:about="http://www.ontologydesignpatterns.org/registry/explanation-mappings.owl#ExplanationSchemaMappingCatalog">
+        <rdf:type rdf:resource="&coddata;OntologyLibrary"/>
+        <rdfs:label rdf:datatype="&xsd;string">Apache Stanbol Explanation schema mapping catalog</rdfs:label>
+        <owl:versionInfo rdf:datatype="&xsd;string">0.1</owl:versionInfo>
+    </owl:NamedIndividual>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/main/resources/schemas/registry/explanation.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+
+
+<!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#" >
+    <!ENTITY demo "http://www.ontologydesignpatterns.org/cp/demo/" >
+    <!ENTITY meta "http://www.ontologydesignpatterns.org/schemas/meta.owl#" >
+    <!ENTITY coddata "http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#" >
+    <!ENTITY codkernel "http://www.ontologydesignpatterns.org/cpont/codo/codkernel.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.ontologydesignpatterns.org/registry/explanation.owl#"
+     xml:base="http://www.ontologydesignpatterns.org/registry/explanation.owl"
+     xmlns:demo="http://www.ontologydesignpatterns.org/cp/demo/"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:codkernel="http://www.ontologydesignpatterns.org/cpont/codo/codkernel.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:coddata="http://www.ontologydesignpatterns.org/cpont/codo/coddata.owl#"
+     xmlns:meta="http://www.ontologydesignpatterns.org/schemas/meta.owl#">
+    <owl:Ontology rdf:about="http://www.ontologydesignpatterns.org/registry/explanation.owl">
+        <owl:versionInfo rdf:datatype="&xsd;string">0.1</owl:versionInfo>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/schemas/meta.owl"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy.owl -->
+
+    <owl:NamedIndividual rdf:about="&demo;organizationalhierarchy.owl">
+        <rdf:type rdf:resource="&codkernel;Ontology"/>
+        <rdfs:label rdf:datatype="&xsd;string">Organizational Hierarchy</rdfs:label>
+        <meta:isOntologyOf rdf:resource="http://www.ontologydesignpatterns.org/registry/explanation.owl#ExplanationSchemaCatalog"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://www.ontologydesignpatterns.org/registry/explanation.owl#ExplanationSchemaCatalog -->
+
+    <owl:NamedIndividual rdf:about="http://www.ontologydesignpatterns.org/registry/explanation.owl#ExplanationSchemaCatalog">
+        <rdf:type rdf:resource="&coddata;OntologyLibrary"/>
+        <rdfs:label rdf:datatype="&xsd;string">Apache Stanbol Explanation schema catalog</rdfs:label>
+        <owl:versionInfo rdf:datatype="&xsd;string">0.1</owl:versionInfo>
+    </owl:NamedIndividual>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+

Added: incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/Data.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/Data.java?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/Data.java (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/Data.java Mon Oct 10 15:17:44 2011
@@ -0,0 +1,29 @@
+package org.apache.stanbol.explanation;
+
+import org.apache.stanbol.explanation.heuristics.Entity;
+
+public class Data {
+
+    public static String _NS_ODP_REGISTRY = "http://www.ontologydesignpatterns.org/registry/";
+
+    public static String _NS_TESTDATA = "http://www.iks-project.eu/ontologies/explanation_testdata.owl#";
+
+    public static Entity dilbert, pointyHairedBoss, wally;
+
+    public static String URI_BALABAM = _NS_TESTDATA + "Ducaconte_Balabam";
+
+    public static String URI_FANTOZZI = _NS_TESTDATA + "Ugo_Fantozzi";
+
+    public static String URI_FILINI = _NS_TESTDATA + "Renzo_Silvio_Filini";
+
+    public static String URI_LIB_EXPLANATION_SCHEMA_MAPPINGS = _NS_ODP_REGISTRY
+                                                               + "explanation-mappings.owl#ExplanationSchemaMappingCatalog";
+
+    public static String URI_LIB_EXPLANATION_SCHEMAS = _NS_ODP_REGISTRY
+                                                       + "explanation.owl#ExplanationSchemaCatalog";
+
+    public static String URI_POINTYHAIRED = _NS_TESTDATA + "Pointy-haired_Boss";
+
+    public static String URI_RICCARDELLI = _NS_TESTDATA + "Guidobaldo_Maria_Riccardelli";
+
+}

Added: incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/MockOsgiContext.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/MockOsgiContext.java?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/MockOsgiContext.java (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/MockOsgiContext.java Mon Oct 10 15:17:44 2011
@@ -0,0 +1,53 @@
+package org.apache.stanbol.explanation;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
+import org.apache.clerezza.rdf.simple.storage.SimpleTcProvider;
+import org.apache.stanbol.explanation.impl.TestSchemaMatchers;
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.api.OfflineConfiguration;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.ontologymanager.ontonet.impl.OfflineConfigurationImpl;
+import org.apache.stanbol.ontologymanager.registry.api.RegistryManager;
+
+public class MockOsgiContext {
+
+    public static Parser parser;
+
+    public static TcManager tcManager;
+
+    public static ONManager onManager;
+
+    static {
+        reset();
+    }
+
+    public static void reset() {
+
+        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
+        // We need this to make sure the local meta.owl (which does not import codolight) is loaded.
+        configuration.put(OfflineConfiguration.ONTOLOGY_PATHS, new String[] {"/ontologies", "/schemas",
+                                                                             "/schemas/registry"});
+        configuration.put(
+            RegistryManager.REGISTRY_LOCATIONS,
+            new String[] {
+                          TestSchemaMatchers.class.getResource("/schemas/registry/explanation.owl")
+                                  .toString(),
+                          TestSchemaMatchers.class.getResource("/schemas/registry/explanation-mappings.owl")
+                                  .toString()});
+        OfflineConfiguration offline = new OfflineConfigurationImpl(configuration);
+
+        tcManager = TcManager.getInstance();
+        WeightedTcProvider wtcp = new SimpleTcProvider();
+        tcManager.addWeightedTcProvider(wtcp);
+        onManager = new ONManagerImpl(tcManager, wtcp, offline, configuration);
+        parser = Parser.getInstance();
+        parser.bindParsingProvider(new JenaParserProvider());
+    }
+
+}

Added: incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/TestPersonMatching.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/TestPersonMatching.java?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/TestPersonMatching.java (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/TestPersonMatching.java Mon Oct 10 15:17:44 2011
@@ -0,0 +1,36 @@
+package org.apache.stanbol.explanation;
+
+import static org.junit.Assert.*;
+
+import org.apache.stanbol.explanation.heuristics.CurrentUser;
+import org.apache.stanbol.explanation.heuristics.Entity;
+import org.apache.stanbol.explanation.heuristics.IDTypes;
+import org.apache.stanbol.explanation.heuristics.Identifier;
+import org.apache.stanbol.explanation.heuristics.PersonMatcher;
+import org.apache.stanbol.explanation.impl.AbstractIdentifier;
+import org.apache.stanbol.explanation.impl.BasicEntity;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestPersonMatching {
+
+    private static Entity someGuy;
+
+    private static Identifier ssn = new AbstractIdentifier(IDTypes.SSN, "ABC123DEF456GHI789");
+
+    private static Identifier ssn2 = new AbstractIdentifier(IDTypes.SSN, "ABC123DEF456GHI789");
+
+    @BeforeClass
+    public static void setup() {
+        someGuy = new BasicEntity(null);
+        someGuy.addID(ssn);
+    }
+
+    @Test
+    public void testIsYou() {
+        Entity you = new CurrentUser(null);
+        you.addID(ssn2);
+        assertTrue(new PersonMatcher().matches(you, someGuy));
+    }
+
+}

Added: incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestGenerator.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestGenerator.java?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestGenerator.java (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestGenerator.java Mon Oct 10 15:17:44 2011
@@ -0,0 +1,34 @@
+package org.apache.stanbol.explanation.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.Hashtable;
+
+import org.apache.stanbol.explanation.MockOsgiContext;
+import org.apache.stanbol.explanation.api.ExplanationGenerator;
+import org.apache.stanbol.ontologymanager.ontonet.api.OfflineConfiguration;
+import org.apache.stanbol.ontologymanager.ontonet.impl.OfflineConfigurationImpl;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Unit tests for {@link ExplanationGenerator} implementations.
+ */
+public class TestGenerator {
+
+    private static OfflineConfiguration config;
+
+    @BeforeClass
+    public static void setup() {
+        config = new OfflineConfigurationImpl(new Hashtable<String,Object>());
+    }
+
+    @Test
+    public void testInit() throws Exception {
+        // ONManager onm = new ONManagerImpl(null, null, config, new Hashtable<String,Object>());
+        ExplanationGenerator gen = new ExplanationGeneratorImpl(new ExplanationEnvironmentConfiguration(
+                MockOsgiContext.onManager, new Hashtable<String,Object>()), null,
+                new Hashtable<String,Object>());
+        assertNotNull(gen);
+    }
+}

Added: incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestSchemaMatchers.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestSchemaMatchers.java?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestSchemaMatchers.java (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/java/org/apache/stanbol/explanation/impl/TestSchemaMatchers.java Mon Oct 10 15:17:44 2011
@@ -0,0 +1,106 @@
+package org.apache.stanbol.explanation.impl;
+
+import java.io.InputStream;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.clerezza.rdf.core.Graph;
+import org.apache.clerezza.rdf.core.MGraph;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
+import org.apache.stanbol.explanation.Data;
+import org.apache.stanbol.explanation.MockOsgiContext;
+import org.apache.stanbol.ontologymanager.ontonet.api.OfflineConfiguration;
+import org.apache.stanbol.ontologymanager.ontonet.impl.OfflineConfigurationImpl;
+import org.apache.stanbol.ontologymanager.registry.api.RegistryManager;
+import org.apache.stanbol.ontologymanager.registry.api.model.Library;
+import org.apache.stanbol.ontologymanager.registry.impl.RegistryManagerImpl;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestSchemaMatchers {
+
+    private String kbId = "http://stanbol.apache.org/ontologies/explanation_testdata";
+
+    private Logger log = LoggerFactory.getLogger(getClass());
+
+    private static Library kps, kpmappings;
+
+    private static RegistryManager regman;
+
+    @BeforeClass
+    public static void setupLibrary() {
+
+        Dictionary<String,Object> configuration = new Hashtable<String,Object>();
+        // We need this to make sure the local meta.owl (which does not import codolight) is loaded.
+        configuration.put(OfflineConfiguration.ONTOLOGY_PATHS, new String[] {"/ontologies", "/schemas",
+                                                                             "/schemas/registry"});
+        configuration.put(
+            RegistryManager.REGISTRY_LOCATIONS,
+            new String[] {
+                          TestSchemaMatchers.class.getResource("/schemas/registry/explanation.owl")
+                                  .toString(),
+                          TestSchemaMatchers.class.getResource("/schemas/registry/explanation-mappings.owl")
+                                  .toString()});
+        OfflineConfiguration offline = new OfflineConfigurationImpl(configuration);
+        regman = new RegistryManagerImpl(offline, configuration);
+
+        // The model should be created by now.
+
+        for (Library lib : regman.getLibraries()) {
+            System.out.println(lib.getIRI() + " : " + lib.getName());
+        }
+
+        // IRI id =
+        // IRI.create("http://www.ontologydesignpatterns.org/registry/explanation.owl#ExplanationSchemaCatalog");
+        // IRI[] locations = new IRI[] {};
+        // kps = new LibraryImpl(id, "Knowledge Pattern additions",
+        // OWLOntologyManagerFactory.createOWLOntologyManager(locations));
+        // kps.addChild(child)
+    }
+
+    @After
+    public void reset() {
+        MockOsgiContext.reset();
+    }
+
+    @Test
+    public void testClerezzaMatcher() throws Exception {
+        TcManager tcm = MockOsgiContext.tcManager;
+        MGraph kb = tcm.createMGraph(new UriRef(kbId));
+
+        InputStream inputStream = getClass().getResourceAsStream("/ontologies/explanation_testdata.owl");
+
+        // get the singleton instance of Parser
+        final Parser parser = MockOsgiContext.parser;
+
+        Graph deserializedGraph = parser.parse(inputStream, "application/rdf+xml");
+
+        kb.addAll(deserializedGraph);
+
+        /* DEBUG code */
+        // UriRef fp = new UriRef("http://xmlns.com/foaf/0.1/Person");
+        // Iterator<Triple> triples = kb.filter(null, null, fp);
+        // while (triples.hasNext())
+        // log.debug("{}", triples.next());
+        // triples = kb.filter(fp, null, null);
+        // while (triples.hasNext())
+        // log.debug("{}", triples.next());
+
+        String uf = Data.URI_FANTOZZI;
+
+        ClerezzaSchemaMatcher matcher = new ClerezzaSchemaMatcherImpl(MockOsgiContext.onManager,
+                new Hashtable<String,Object>());
+        matcher.setKnowledgeBase(kb.getGraph());
+        matcher.getSatisfiableSchemas(regman.getLibraries(), new UriRef(uf));
+
+        uf = Data.URI_RICCARDELLI;
+        matcher.getSatisfiableSchemas(regman.getLibraries(), new UriRef(uf));
+
+    }
+
+}

Added: incubator/stanbol/trunk/explanation/core/src/test/resources/ontologies/explanation_testdata.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/explanation/core/src/test/resources/ontologies/explanation_testdata.owl?rev=1181016&view=auto
==============================================================================
--- incubator/stanbol/trunk/explanation/core/src/test/resources/ontologies/explanation_testdata.owl (added)
+++ incubator/stanbol/trunk/explanation/core/src/test/resources/ontologies/explanation_testdata.owl Mon Oct 10 15:17:44 2011
@@ -0,0 +1,217 @@
+<?xml version="1.0"?>
+
+
+<!DOCTYPE rdf:RDF [
+    <!ENTITY org "http://www.w3.org/ns/org#" >
+    <!ENTITY foaf "http://xmlns.com/foaf/0.1/" >
+    <!ENTITY dbpedia "http://dbpedia.org/resource/" >
+    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+    <!ENTITY m "http://rdf.freebase.com/ns/m/0" >
+    <!ENTITY v1 "http://purl.org/goodrelations/v1#" >
+    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+    <!ENTITY movie "http://data.linkedmdb.org/resource/movie/" >
+    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+    <!ENTITY sequence "http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#" >
+]>
+
+
+<rdf:RDF xmlns="http://www.iks-project.eu/ontologies/explanation_testdata.owl#"
+     xml:base="http://www.iks-project.eu/ontologies/explanation_testdata.owl"
+     xmlns:v1="http://purl.org/goodrelations/v1#"
+     xmlns:foaf="http://xmlns.com/foaf/0.1/"
+     xmlns:movie="http://data.linkedmdb.org/resource/movie/"
+     xmlns:m="http://rdf.freebase.com/ns/m/0"
+     xmlns:org="http://www.w3.org/ns/org#"
+     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+     xmlns:sequence="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#"
+     xmlns:owl="http://www.w3.org/2002/07/owl#"
+     xmlns:dbpedia="http://dbpedia.org/resource/"
+     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://www.iks-project.eu/ontologies/explanation_testdata.owl">
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/demo/organizationalhierarchy_mappings.owl"/>
+        <owl:imports rdf:resource="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl"/>
+        <owl:imports rdf:resource="http://www.w3.org/ns/org#"/>
+        <owl:imports rdf:resource="http://xmlns.com/foaf/0.1/"/>
+    </owl:Ontology>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Annotation properties
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Datatypes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Classes
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://data.linkedmdb.org/resource/movie/film -->
+
+    <owl:Class rdf:about="&movie;film"/>
+    
+
+
+    <!-- http://rdf.freebase.com/ns/m/0f5d2 -->
+
+    <owl:Class rdf:about="&m;f5d2">
+        <rdfs:label xml:lang="en">Creator deity</rdfs:label>
+    </owl:Class>
+    
+
+
+    <!-- 
+    ///////////////////////////////////////////////////////////////////////////////////////
+    //
+    // Individuals
+    //
+    ///////////////////////////////////////////////////////////////////////////////////////
+     -->
+
+    
+
+
+    <!-- http://dbpedia.org/resource/The_Battleship_Potemkin -->
+
+    <owl:NamedIndividual rdf:about="&dbpedia;The_Battleship_Potemkin">
+        <rdf:type rdf:resource="&movie;film"/>
+        <rdfs:label xml:lang="en">The Battleship Potemkin</rdfs:label>
+        <rdfs:label xml:lang="it">La corazzata Potëmkin</rdfs:label>
+        <rdfs:label xml:lang="ru">Броненосец «Потёмкин»</rdfs:label>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Ducaconte_Balabam -->
+
+    <owl:NamedIndividual rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Ducaconte_Balabam">
+        <rdf:type rdf:resource="&m;f5d2"/>
+        <rdfs:label xml:lang="it">Dott. Ing. Gran Farabutt. Lup. Mann. Ducaconte Balabam</rdfs:label>
+        <org:headOf rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Megaditta"/>
+    </owl:NamedIndividual>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Fantozzi_in_Megaditta -->
+
+    <org:Membership rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Fantozzi_in_Megaditta">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Fantozzi_in_Megaditta</rdfs:label>
+        <org:organization rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Megaditta"/>
+        <org:role rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#stamp_licker"/>
+    </org:Membership>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Guidobaldo_Maria_Riccardelli -->
+
+    <foaf:Person rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Guidobaldo_Maria_Riccardelli">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="it">Prof. Guidobaldo Maria Riccardelli</rdfs:label>
+        <foaf:topic_interest rdf:resource="&dbpedia;The_Battleship_Potemkin"/>
+        <org:reportsTo rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Ducaconte_Balabam"/>
+        <org:hasMembership rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Riccardelli_in_Megaditta"/>
+    </foaf:Person>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Megaditta -->
+
+    <org:FormalOrganization rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Megaditta">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="it">Megaditta</rdfs:label>
+    </org:FormalOrganization>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Riccardelli_in_Megaditta -->
+
+    <org:Membership rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Riccardelli_in_Megaditta">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">Riccardelli_in_Megaditta</rdfs:label>
+        <org:organization rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Megaditta"/>
+        <org:role rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#film_forum_manager"/>
+    </org:Membership>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#Ugo_Fantozzi -->
+
+    <foaf:Person rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Ugo_Fantozzi">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="it">Ugo Fantozzi</rdfs:label>
+        <foaf:skypeID rdf:datatype="&xsd;string">ugo.fantocci1934</foaf:skypeID>
+        <foaf:name>Ugo Fantozzi</foaf:name>
+        <org:hasMembership rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Fantozzi_in_Megaditta"/>
+        <org:reportsTo rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#Guidobaldo_Maria_Riccardelli"/>
+    </foaf:Person>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#film_forum_manager -->
+
+    <org:Role rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#film_forum_manager">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">film_forum_manager</rdfs:label>
+        <sequence:precedes rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#stamp_licker"/>
+    </org:Role>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#lightning_rod -->
+
+    <org:Role rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#lightning_rod">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">lightning_rod</rdfs:label>
+        <rdfs:label xml:lang="it">parafulmine</rdfs:label>
+        <sequence:directlyFollows rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#stamp_licker"/>
+    </org:Role>
+    
+
+
+    <!-- http://www.iks-project.eu/ontologies/explanation_testdata.owl#stamp_licker -->
+
+    <org:Role rdf:about="http://www.iks-project.eu/ontologies/explanation_testdata.owl#stamp_licker">
+        <rdf:type rdf:resource="&owl;NamedIndividual"/>
+        <rdfs:label xml:lang="en">stamp licker</rdfs:label>
+        <rdfs:label xml:lang="it">leccafrancobolli</rdfs:label>
+    </org:Role>
+    
+
+
+    <!-- http://www.w3.org/ns/org#Head -->
+
+    <rdf:Description rdf:about="&org;Head">
+        <sequence:precedes rdf:resource="http://www.iks-project.eu/ontologies/explanation_testdata.owl#film_forum_manager"/>
+    </rdf:Description>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version 3.2.3.22702) http://owlapi.sourceforge.net -->
+



Mime
View raw message