Added: incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/ProvaParent.owl URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/ProvaParent.owl?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/ProvaParent.owl (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/ProvaParent.owl Sun Mar 20 16:13:06 2011 @@ -0,0 +1,159 @@ +<?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://www.semanticweb.org/ontologies/2010/6/ProvaParent.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://www.semanticweb.org/ontologies/2010/6/ProvaParent.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#"/> + <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> + <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> + <Declaration> + <Class IRI="#Adult"/> + </Declaration> + <Declaration> + <Class IRI="#Person"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasBrother"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasParent"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasUncle"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#isParentOf"/> + </Declaration> + <Declaration> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </Declaration> + <Declaration> + <DataProperty IRI="#hasAge"/> + </Declaration> + <Declaration> + <DataProperty abbreviatedIRI="owl:topDataProperty"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#Fred"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#John"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#Tom"/> + </Declaration> + <SubClassOf> + <Class IRI="#Adult"/> + <Class IRI="#Person"/> + </SubClassOf> + <ClassAssertion> + <Class IRI="#Adult"/> + <NamedIndividual IRI="#Fred"/> + </ClassAssertion> + <ClassAssertion> + <Class IRI="#Adult"/> + <NamedIndividual IRI="#John"/> + </ClassAssertion> + <ClassAssertion> + <Class IRI="#Person"/> + <NamedIndividual IRI="#Tom"/> + </ClassAssertion> + <ObjectPropertyAssertion> + <ObjectProperty IRI="#hasBrother"/> + <NamedIndividual IRI="#Fred"/> + <NamedIndividual IRI="#John"/> + </ObjectPropertyAssertion> + <ObjectPropertyAssertion> + <ObjectProperty IRI="#hasParent"/> + <NamedIndividual IRI="#Tom"/> + <NamedIndividual IRI="#Fred"/> + </ObjectPropertyAssertion> + <DataPropertyAssertion> + <DataProperty IRI="#hasAge"/> + <NamedIndividual IRI="#Tom"/> + <Literal datatypeIRI="&xsd;int">19</Literal> + </DataPropertyAssertion> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasBrother"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasParent"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasUncle"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#isParentOf"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <InverseObjectProperties> + <ObjectProperty IRI="#isParentOf"/> + <ObjectProperty IRI="#hasParent"/> + </InverseObjectProperties> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasBrother"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasParent"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasUncle"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#isParentOf"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasBrother"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasParent"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasUncle"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#isParentOf"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <SubDataPropertyOf> + <DataProperty IRI="#hasAge"/> + <DataProperty abbreviatedIRI="owl:topDataProperty"/> + </SubDataPropertyOf> + <DataPropertyDomain> + <DataProperty IRI="#hasAge"/> + <Class IRI="#Person"/> + </DataPropertyDomain> + <DataPropertyRange> + <DataProperty IRI="#hasAge"/> + <Datatype abbreviatedIRI="xsd:int"/> + </DataPropertyRange> +</Ontology> + + + +<!-- Generated by the OWL API (version 3.0.0.1451) http://owlapi.sourceforge.net --> +
Added: incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParent.owl URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParent.owl?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParent.owl (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParent.owl Sun Mar 20 16:13:06 2011 @@ -0,0 +1,187 @@ +<?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://www.semanticweb.org/ontologies/2010/6/ProvaParent.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://www.semanticweb.org/ontologies/2010/6/ProvaParent.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#"/> + <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> + <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> + <Declaration> + <Class IRI="#Adult"/> + </Declaration> + <Declaration> + <Class IRI="#Person"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasBrother"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasParent"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#hasUncle"/> + </Declaration> + <Declaration> + <ObjectProperty IRI="#isParentOf"/> + </Declaration> + <Declaration> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </Declaration> + <Declaration> + <DataProperty IRI="#hasAge"/> + </Declaration> + <Declaration> + <DataProperty abbreviatedIRI="owl:topDataProperty"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#Fred"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#John"/> + </Declaration> + <Declaration> + <NamedIndividual IRI="#Tom"/> + </Declaration> + <Declaration> + <AnnotationProperty IRI="http://www.semanticweb.org/owlapi#iri"/> + </Declaration> + <SubClassOf> + <Class IRI="#Adult"/> + <Class IRI="#Person"/> + </SubClassOf> + <ClassAssertion> + <Class IRI="#Adult"/> + <NamedIndividual IRI="#Fred"/> + </ClassAssertion> + <ClassAssertion> + <Class IRI="#Adult"/> + <NamedIndividual IRI="#John"/> + </ClassAssertion> + <ClassAssertion> + <Class IRI="#Person"/> + <NamedIndividual IRI="#Tom"/> + </ClassAssertion> + <ObjectPropertyAssertion> + <ObjectProperty IRI="#hasBrother"/> + <NamedIndividual IRI="#Fred"/> + <NamedIndividual IRI="#John"/> + </ObjectPropertyAssertion> + <ObjectPropertyAssertion> + <ObjectProperty IRI="#hasParent"/> + <NamedIndividual IRI="#Tom"/> + <NamedIndividual IRI="#Fred"/> + </ObjectPropertyAssertion> + <DataPropertyAssertion> + <DataProperty IRI="#hasAge"/> + <NamedIndividual IRI="#Tom"/> + <Literal datatypeIRI="&xsd;int">19</Literal> + </DataPropertyAssertion> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasBrother"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasParent"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#hasUncle"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <SubObjectPropertyOf> + <ObjectProperty IRI="#isParentOf"/> + <ObjectProperty abbreviatedIRI="owl:topObjectProperty"/> + </SubObjectPropertyOf> + <InverseObjectProperties> + <ObjectProperty IRI="#isParentOf"/> + <ObjectProperty IRI="#hasParent"/> + </InverseObjectProperties> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasBrother"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasParent"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#hasUncle"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyDomain> + <ObjectProperty IRI="#isParentOf"/> + <Class IRI="#Person"/> + </ObjectPropertyDomain> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasBrother"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasParent"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#hasUncle"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <ObjectPropertyRange> + <ObjectProperty IRI="#isParentOf"/> + <Class IRI="#Person"/> + </ObjectPropertyRange> + <SubDataPropertyOf> + <DataProperty IRI="#hasAge"/> + <DataProperty abbreviatedIRI="owl:topDataProperty"/> + </SubDataPropertyOf> + <DataPropertyDomain> + <DataProperty IRI="#hasAge"/> + <Class IRI="#Person"/> + </DataPropertyDomain> + <DataPropertyRange> + <DataProperty IRI="#hasAge"/> + <Datatype abbreviatedIRI="xsd:int"/> + </DataPropertyRange> + <DLSafeRule> + <Annotation> + <AnnotationProperty IRI="http://www.semanticweb.org/owlapi#nodeID"/> + <Literal>_:http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#genid1</Literal> + </Annotation> + <Body> + <ObjectPropertyAtom> + <ObjectProperty IRI="#hasBrother"/> + <Variable IRI="#y"/> + <Variable IRI="#z"/> + </ObjectPropertyAtom> + <ObjectPropertyAtom> + <ObjectProperty IRI="#hasParent"/> + <Variable IRI="#x"/> + <Variable IRI="#y"/> + </ObjectPropertyAtom> + </Body> + <Head> + <ObjectPropertyAtom> + <ObjectProperty IRI="#hasUncle"/> + <Variable IRI="#x"/> + <Variable IRI="#z"/> + </ObjectPropertyAtom> + </Head> + </DLSafeRule> +</Ontology> + + + +<!-- Generated by the OWL API (version 3.0.0.1451) http://owlapi.sourceforge.net --> + Added: incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParentRDFXML.owl URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParentRDFXML.owl?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParentRDFXML.owl (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/main/resources/TestFile/RuledProvaParentRDFXML.owl Sun Mar 20 16:13:06 2011 @@ -0,0 +1,110 @@ +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:j.0="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:j.1="http://www.w3.org/2003/11/swrl#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#y"> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#Variable"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Fred"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/> + <rdf:type rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Adult"/> + <j.0:hasBrother rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#John"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A0"> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#IndividualPropertyAtom"/> + <j.1:propertyPredicate rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasParent"/> + <j.1:argument2 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#y"/> + <j.1:argument1 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#x"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#z"> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#Variable"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Uncle-Rule"> + <j.1:body rdf:nodeID="A1"/> + <j.1:head rdf:nodeID="A2"/> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#Imp"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A1"> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/> + <rdf:rest rdf:nodeID="A3"/> + <rdf:first rdf:nodeID="A0"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasAge"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/> + <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#John"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/> + <rdf:type rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Adult"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A3"> + <rdf:first rdf:nodeID="A4"/> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/> + <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A4"> + <j.1:propertyPredicate rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasBrother"/> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#IndividualPropertyAtom"/> + <j.1:argument2 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#z"/> + <j.1:argument1 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#y"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Adult"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/> + <rdfs:subClassOf rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.w3.org/2002/07/owl#topDataProperty"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.w3.org/2002/07/owl#topObjectProperty"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A2"> + <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> + <rdf:first rdf:nodeID="A5"/> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#AtomList"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#x"> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#Variable"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasBrother"> + <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/> + <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:range rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasUncle"> + <rdfs:range rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/> + <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + </rdf:Description> + <rdf:Description rdf:nodeID="A5"> + <j.1:argument1 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#x"/> + <rdf:type rdf:resource="http://www.w3.org/2003/11/swrl#IndividualPropertyAtom"/> + <j.1:argument2 rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#z"/> + <j.1:propertyPredicate rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasUncle"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Tom"> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/> + <rdf:type rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <j.0:hasAge rdf:datatype="http://www.w3.org/2001/XMLSchema#int">19</j.0:hasAge> + <j.0:hasParent rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Fred"/> + </rdf:Description> + <rdf:Description rdf:about="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#hasParent"> + <rdfs:range rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdfs:domain rdf:resource="http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#Person"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/> + </rdf:Description> +</rdf:RDF> Added: incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ClassifyTest.java URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ClassifyTest.java?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ClassifyTest.java (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ClassifyTest.java Sun Mar 20 16:13:06 2011 @@ -0,0 +1,128 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.apache.stanbol.reasoners.web; + +import java.util.Iterator; +import org.semanticweb.owlapi.model.OWLAxiom; +import org.semanticweb.owlapi.model.OWLOntology; +import org.semanticweb.owlapi.apibinding.OWLManager; +import com.sun.jersey.api.client.ClientResponse; +import javax.ws.rs.core.MediaType; +import com.sun.jersey.api.representation.Form; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.Client; +import org.apache.stanbol.kres.jersey.JettyServer; +import java.io.File; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; +import org.semanticweb.owlapi.model.OWLOntologyCreationException; + +/** + * + * @author elvio + */ +public class ClassifyTest { + + public ClassifyTest() { + } + + public static final int __PORT = 9999; + public static final String __TEST_URI = "http://localhost:" + __PORT + "/"; + public static final String __ROOT_URI = __TEST_URI + "classify"; + private static JettyServer server; + private Client client; + private WebResource webres; + + @BeforeClass + public static void setUpClass() throws Exception { + server = new JettyServer(); + server.start(__TEST_URI); + } + + @AfterClass + public static void tearDownClass() throws Exception { + server.stop(); + } + + @Before + public void setUp() { + //RuleStore store = new KReSRuleStore(); + //server.setAttribute("kresRuleStore", store); + + client = Client.create(); + webres = client.resource(__ROOT_URI); + + } + + @After + public void tearDown() { + } + + /** + * Test of getClassify method, of class Classify. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testOntologyClassify() throws OWLOntologyCreationException { +// Form form = new Form(); +// File inputfile = new File("./src/main/resources/TestFile/ProvaParent.owl"); +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe", recipeiri); +// form.add("file", inputfile); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// +// System.out.println(response); +// if(response.getStatus()==200){ +// OWLOntology model = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(response.getEntityInputStream()); +// Iterator<OWLAxiom> ax = model.getAxioms().iterator(); +// System.out.println("AXIOM COUNT:"+model.getAxiomCount()); +// while(ax.hasNext()) +// System.out.println(ax.next()); +// +// assertEquals(200,response.getStatus()); +// }else +// fail("Some errors occurred"); + } + + /** + * Test of getConsistencyCheckViaURL method, of class Classify. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testOntologyClassifyViaURL() throws OWLOntologyCreationException { +// Form form = new Form(); +// String inputiri = "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl"; +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("input-graph", inputiri); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// +// System.out.println(response); +// if(response.getStatus()==200){ +// OWLOntology model = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(response.getEntityInputStream()); +// Iterator<OWLAxiom> ax = model.getAxioms().iterator(); +// System.out.println("AXIOM COUNT:"+model.getAxiomCount()); +// while(ax.hasNext()) +// System.out.println(ax.next()); +// +// assertEquals(200,response.getStatus()); +// }else +// fail("Some errors occurred"); + } + +} \ No newline at end of file Added: incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ConsistencyCheckTest.java URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ConsistencyCheckTest.java?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ConsistencyCheckTest.java (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/ConsistencyCheckTest.java Sun Mar 20 16:13:06 2011 @@ -0,0 +1,172 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.apache.stanbol.reasoners.web; + +import com.sun.jersey.api.client.ClientResponse; +import javax.ws.rs.core.MediaType; +import com.sun.jersey.api.representation.Form; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.Client; +import org.apache.stanbol.kres.jersey.JettyServer; +import java.io.File; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author elvio + */ +public class ConsistencyCheckTest { + + public ConsistencyCheckTest() { + } + + public static final int __PORT = 9999; + public static final String __TEST_URI = "http://localhost:" + __PORT + "/"; + public static final String __ROOT_URI = __TEST_URI + "check-consistency"; + private static JettyServer server; + private Client client; + private WebResource webres; + + @BeforeClass + public static void setUpClass() throws Exception { + server = new JettyServer(); + server.start(__TEST_URI); + } + + @AfterClass + public static void tearDownClass() throws Exception { + server.stop(); + } + + @Before + public void setUp() { + //RuleStore store = new KReSRuleStore(); + //server.setAttribute("kresRuleStore", store); + + client = Client.create(); + webres = client.resource(__ROOT_URI); + + } + + @After + public void tearDown() { + } + + + /** + * Test of GetSimpleConsistencyCheck method, of class ConsistencyCheck. + * + */ + @Test + public void testGetSimpleConsistencyCheck() { +// WebResource webresget = webres.path("http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl");//"http://www.loa-cnr.it/ontologies/DUL.owl");//"http://150.146.88.63:9090/kres/ontology/User"); +// +// System.out.println(webresget.get(String.class)); +// ClientResponse head = webresget.head(); +// System.out.println(head); +// if(head.getStatus()==200) +// assertEquals(200,head.getStatus()); +// else +// fail("Some errors occurred"); + } + + /** + * Test of getConsistencyCheck method, of class ConsistencyCheck. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testGetConsistencyCheck() { +// Form form = new Form(); +// File inputfile = new File("./src/main/resources/TestFile/ProvaParent.owl"); +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("file", inputfile); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// System.out.println(response); +// if(response.getStatus()==200) +// assertEquals(200,response.getStatus()); +// else +// fail("Some errors occurred"); + } + + /** + * Test of getConsistencyCheckViaURL method, of class ConsistencyCheck. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testGetConsistencyCheckViaURL() { +// Form form = new Form(); +// String inputiri = "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl"; +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("input-graph", inputiri); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// System.out.println(response); +// if(response.getStatus()==200) +// assertEquals(200,response.getStatus()); +// else +// fail("Some errors occurred"); + } + + @Test + public void testCONFLICT(){ + +// Form form = new Form(); +// File inputfile = new File("./src/main/resources/TestFile/ProvaParent.owl"); +// String inputiri = "http://www.loa-cnr.it/ontologies/DUL.owl"; +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("input-graph", inputiri); +// form.add("file", inputfile); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// System.out.println(response); +// if(response.getStatus()==409) +// assertEquals(409,response.getStatus()); +// else +// fail("Some errors occurred"); + + } + +// @Test +// public void testCONECTION_OWL_LINK(){ +// +// Form form = new Form(); +// File inputfile = new File("./src/main/resources/TestFile/ProvaParent.owl"); +// String reasonerurl = "http://150.146.88.63:9090/kres/ontology/User"; +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("owllink-endpoint", reasonerurl); +// form.add("file", inputfile); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// System.out.println(response); +// if(response.getStatus()==200) +// assertEquals(200,response.getStatus()); +// else +// fail("Some errors occurred"); +// +// } +} \ No newline at end of file Added: incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/EnrichmentTest.java URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/EnrichmentTest.java?rev=1083484&view=auto ============================================================================== --- incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/EnrichmentTest.java (added) +++ incubator/stanbol/trunk/kres/reasoners/web/src/test/java/org/apache/stanbol/reasoners/web/EnrichmentTest.java Sun Mar 20 16:13:06 2011 @@ -0,0 +1,127 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.apache.stanbol.reasoners.web; + +import org.semanticweb.owlapi.model.OWLOntology; +import org.semanticweb.owlapi.apibinding.OWLManager; +import com.sun.jersey.api.client.ClientResponse; +import javax.ws.rs.core.MediaType; +import com.sun.jersey.api.representation.Form; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.Client; +import org.apache.stanbol.kres.jersey.JettyServer; +import java.io.File; +import java.util.Iterator; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; +import org.semanticweb.owlapi.model.OWLAxiom; +import org.semanticweb.owlapi.model.OWLOntologyCreationException; + +/** + * + * @author elvio + */ +public class EnrichmentTest { + + public EnrichmentTest() { + } + + public static final int __PORT = 9999; + public static final String __TEST_URI = "http://localhost:" + __PORT + "/"; + public static final String __ROOT_URI = __TEST_URI + "enrichment"; + private static JettyServer server; + private Client client; + private WebResource webres; + + @BeforeClass + public static void setUpClass() throws Exception { + server = new JettyServer(); + server.start(__TEST_URI); + } + + @AfterClass + public static void tearDownClass() throws Exception { + server.stop(); + } + + @Before + public void setUp() { + //RuleStore store = new KReSRuleStore(); + //server.setAttribute("kresRuleStore", store); + + client = Client.create(); + webres = client.resource(__ROOT_URI); + + } + + @After + public void tearDown() { + } + + /** + * Test of ontologyEnrichmentViaIRI method, of class Enrichment. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testOntologyEnrichmentViaIRI() throws OWLOntologyCreationException { +// Form form = new Form(); +// String inputiri = "http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl"; +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe",recipeiri); +// form.add("input-graph", inputiri); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// System.out.println(response); +// if(response.getStatus()==200){ +// OWLOntology model = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(response.getEntityInputStream()); +// Iterator<OWLAxiom> ax = model.getAxioms().iterator(); +// System.out.println("AXIOM COUNT:"+model.getAxiomCount()); +// while(ax.hasNext()) +// System.out.println(ax.next()); +// +// assertEquals(200,response.getStatus()); +// }else +// fail("Some errors occurred"); + } + + /** + * Test of ontologyEnrichment method, of class Enrichment. + * FIXME - This test is commented bracuse it needs another service to be run. So it is classifyed as integration test. + */ + @Test + public void testOntologyEnrichment() throws OWLOntologyCreationException { +// Form form = new Form(); +// File inputfile = new File("./src/main/resources/TestFile/ProvaParent.owl"); +// String scopeiri = "http://150.146.88.63:9090/kres/ontology/User"; +// String recipeiri ="http://localhost:9999/recipe/http://kres.iks-project.eu/ontology/meta/rmi_config.owl%23ProvaParentRecipe"; +// +// //form.add("scope", scopeiri); +// form.add("recipe", recipeiri); +// form.add("file", inputfile); +// +// ClientResponse response = webres.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class,form); +// +// System.out.println(response); +// if(response.getStatus()==200){ +// OWLOntology model = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(response.getEntityInputStream()); +// Iterator<OWLAxiom> ax = model.getAxioms().iterator(); +// System.out.println("AXIOM COUNT:"+model.getAxiomCount()); +// while(ax.hasNext()) +// System.out.println(ax.next()); +// +// assertEquals(200,response.getStatus()); +// }else +// fail("Some errors occurred"); + } + +} \ No newline at end of file
