package bugs; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.HashSet; import javax.annotation.Nonnull; import org.junit.Ignore; import org.junit.Test; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.io.StringDocumentSource; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataProperty; import org.semanticweb.owlapi.model.OWLNamedIndividual; import org.semanticweb.owlapi.model.OWLObjectProperty; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.reasoner.OWLReasoner; @SuppressWarnings("javadoc") public class VerifyComplianceOWLSNewFeaturesTestCase extends VerifyComplianceBase { @Nonnull String in = "Prefix(:=)\n" + "Prefix(owl:=)\n" + "Prefix(rdf:=)\n" + "Prefix(xml:=)\n" + "Prefix(xsd:=)\n" + "Prefix(rdfs:=)\n" + "\n" + "\n" + "Ontology(\n" + "Declaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(Class())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(ObjectProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(DataProperty())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\nDeclaration(NamedIndividual())\n" + "EquivalentClasses( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectHasValue( ))\n" + "SubClassOf( ObjectHasValue( ))\n" + "DisjointClasses( )\n" + "DisjointClasses( )\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( DataMaxCardinality(1 ))\n" + "SubClassOf( DataMaxCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "EquivalentClasses( ObjectIntersectionOf(ObjectExactCardinality(1 ) ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( DataMaxCardinality(1 ))\n" + "DisjointClasses( )\n" + "EquivalentClasses( )\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( )\n" + "DisjointClasses( )\n" + "DisjointClasses( )\n" + "DisjointClasses( )\n" + "EquivalentClasses( ObjectIntersectionOf(ObjectAllValuesFrom( ) ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "DisjointClasses( )\n" + "DisjointClasses( )\n" + "SubClassOf( )\n" + "DisjointClasses( )\n" + "EquivalentClasses( ObjectIntersectionOf(ObjectAllValuesFrom( ) ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( DataMinCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "EquivalentClasses( ObjectUnionOf( ))\n" + "SubClassOf( )\n" + "SubClassOf( DataMaxCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( ObjectAllValuesFrom( ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( ObjectMaxCardinality(1 ))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectHasValue( ))\n" + "SubClassOf( DataAllValuesFrom( rdf:XMLLiteral))\n" + "SubClassOf( ObjectExactCardinality(1 ))\n" + "SubClassOf( DataExactCardinality(1 ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectHasValue( ))\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( )\n" + "SubClassOf( ObjectHasValue( ))\n" + "SubClassOf( DataAllValuesFrom( rdf:XMLLiteral))\n" + "EquivalentObjectProperties( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( ObjectUnionOf( ))\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( owl:Thing)\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( owl:Thing)\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( owl:Thing)\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( owl:Thing)\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "EquivalentObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyRange( )\n" + "SubObjectPropertyOf( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "FunctionalObjectProperty()\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( owl:Thing)\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "EquivalentObjectProperties( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "EquivalentObjectProperties( )\n" + "EquivalentObjectProperties( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "InverseObjectProperties( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyRange( )\n" + "ObjectPropertyDomain( )\n" + "ObjectPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:boolean)\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:anyURI)\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( rdf:XMLLiteral)\n" + "DataPropertyDomain( )\n" + "SubDataPropertyOf( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( rdf:XMLLiteral)\n" + "SubDataPropertyOf( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( rdf:XMLLiteral)\n" + "DataPropertyDomain( )\n" + "SubDataPropertyOf( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:anyURI)\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:anyURI)\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:anyURI)\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain(<√.owl#value> )\n" + "DataPropertyDomain( )\n" + "DataPropertyDomain( )\n" + "DataPropertyRange( xsd:anyURI)\n" + "ClassAssertion( )\n" + "ClassAssertion( )\n" + "ClassAssertion( )\n" + "ClassAssertion( )\n" + "ClassAssertion( )\n" + "ObjectPropertyAssertion( )\n" + "ClassAssertion( )\n" + "DataPropertyAssertion( \"urn:generic/drs.owl\"^^xsd:anyURI)\n" + "ClassAssertion( )\n" + "DataPropertyAssertion( \"http://logic.stanford.edu/kif/kif.html\"^^xsd:anyURI)\n" + "ClassAssertion( )\n" + "DataPropertyAssertion( \"http://www.w3.org/2003/11/swrl\"^^xsd:anyURI)\n" + "ClassAssertion( )\n" + ")"; @Override protected OWLOntology load(String input) throws OWLOntologyCreationException { OWLOntology onto = OWLManager.createOWLOntologyManager() .loadOntologyFromOntologyDocument(new StringDocumentSource(in)); return onto; } @Override protected String input() { return ""; } @Test public void shouldPassgetObjectPropertyRangesisPresentedByfalse() { OWLClass Thing = C("http://www.w3.org/2002/07/owl#Thing"); OWLClass Service = C("urn:Service.owl#Service"); OWLObjectProperty isPresentedBy = OP("urn:Service.owl#isPresentedBy"); // expected Thing, Service // actual__ isPresentedBy, false equal(reasoner.getObjectPropertyRanges(isPresentedBy, false), Thing, Service); } @Test public void shouldPassgetObjectPropertyRangesisPresentedByfalseBasicOntology() throws OWLOntologyCreationException { String inputString = "Prefix(:=)\n" + "Prefix(owl:=)\n" + "Prefix(rdf:=)\n" + "Prefix(xml:=)\n" + "Prefix(xsd:=)\n" + "Prefix(rdfs:=)\n" + "Ontology(\n" + "Declaration(Class())\n" + "Declaration(ObjectProperty())\n" + "Declaration(ObjectProperty())\n\n" + "EquivalentObjectProperties( )\n" + "ObjectPropertyRange( )\n" + ")"; OWLOntology onto = OWLManager.createOWLOntologyManager() .loadOntologyFromOntologyDocument( new StringDocumentSource(inputString)); OWLReasoner r = factory().createReasoner(onto); OWLClass Thing = C("http://www.w3.org/2002/07/owl#Thing"); OWLClass Service = C("urn:Service.owl#Service"); OWLObjectProperty isPresentedBy = OP("urn:Service.owl#isPresentedBy"); // expected Thing, Service // actual__ isPresentedBy, false equal(r.getObjectPropertyRanges(isPresentedBy, false), Thing, Service); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasOutput1() { OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); OWLObjectProperty hasInput = OP("urn:process#hasInput"); OWLObjectProperty hasInput1 = OP("urn:profile#hasInput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); OWLObjectProperty hasOutput = OP("urn:profile#hasOutput"); // expected hasLocal, hasInput, hasInput, hasResultVar, // bottomObjectProperty // actual__ hasOutput equal(reasoner.getDisjointObjectProperties(hasOutput), hasLocal, hasInput, hasInput1, hasResultVar, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasInput2() { OWLObjectProperty hasOutput = OP("urn:profile#hasOutput"); OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); OWLObjectProperty hasOutput1 = OP("urn:process#hasOutput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); OWLObjectProperty hasInput = OP("urn:process#hasInput"); // expected hasOutput, hasLocal, hasOutput, hasResultVar, // bottomObjectProperty // actual__ hasInput equal(reasoner.getDisjointObjectProperties(hasInput), hasOutput, hasLocal, hasOutput1, hasResultVar, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasResultVar() { OWLObjectProperty hasOutput = OP("urn:profile#hasOutput"); OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); OWLObjectProperty hasInput = OP("urn:process#hasInput"); OWLObjectProperty hasOutput1 = OP("urn:process#hasOutput"); OWLObjectProperty hasInput1 = OP("urn:profile#hasInput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); // expected hasOutput, hasLocal, hasInput, hasOutput, hasInput, // bottomObjectProperty // actual__ hasResultVar equal(reasoner.getDisjointObjectProperties(hasResultVar), hasOutput, hasLocal, hasInput, hasOutput1, hasInput1, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasLocal() { OWLObjectProperty hasOutput = OP("urn:profile#hasOutput"); OWLObjectProperty hasInput = OP("urn:process#hasInput"); OWLObjectProperty hasOutput1 = OP("urn:process#hasOutput"); OWLObjectProperty hasInput1 = OP("urn:profile#hasInput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); // expected hasOutput, hasInput, hasOutput, hasInput, hasResultVar, // bottomObjectProperty // actual__ hasLocal equal(reasoner.getDisjointObjectProperties(hasLocal), hasOutput, hasInput, hasOutput1, hasInput1, hasResultVar, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasInput() { OWLObjectProperty hasOutput = OP("urn:profile#hasOutput"); OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); OWLObjectProperty hasOutput1 = OP("urn:process#hasOutput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); OWLObjectProperty hasInput = OP("urn:profile#hasInput"); // expected hasOutput, hasLocal, hasOutput, hasResultVar, // bottomObjectProperty // actual__ hasInput equal(reasoner.getDisjointObjectProperties(hasInput), hasOutput, hasLocal, hasOutput1, hasResultVar, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointObjectPropertieshasOutput() { OWLObjectProperty hasLocal = OP("urn:process#hasLocal"); OWLObjectProperty hasInput = OP("urn:process#hasInput"); OWLObjectProperty hasInput1 = OP("urn:profile#hasInput"); OWLObjectProperty hasResultVar = OP("urn:process#hasResultVar"); OWLObjectProperty hasOutput = OP("urn:process#hasOutput"); // expected hasLocal, hasInput, hasInput, hasResultVar, // bottomObjectProperty // actual__ hasOutput equal(reasoner.getDisjointObjectProperties(hasOutput), hasLocal, hasInput, hasInput1, hasResultVar, bottomObjectProperty); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesserviceProduct() { OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty serviceProduct = DP("urn:profile#serviceProduct"); // expected valueForm, parameterValue, bottomDataProperty, // valueFunction, invocable // actual__ serviceProduct equal(reasoner.getDisjointDataProperties(serviceProduct), valueForm, parameterValue, bottomDataProperty, valueFunction, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesserviceClassification() { OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty serviceClassification = DP("urn:profile#serviceClassification"); // expected valueForm, parameterValue, bottomDataProperty, // valueFunction, invocable // actual__ serviceClassification equal(reasoner.getDisjointDataProperties(serviceClassification), valueForm, parameterValue, bottomDataProperty, valueFunction, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesrefURI() { OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty refURI = DP("urn:expr#refURI"); // expected valueForm, parameterValue, bottomDataProperty, // valueFunction, invocable // actual__ refURI equal(reasoner.getDisjointDataProperties(refURI), valueForm, parameterValue, bottomDataProperty, valueFunction, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesvalueFunction() { OWLDataProperty serviceProduct = DP("urn:profile#serviceProduct"); OWLDataProperty serviceClassification = DP("urn:profile#serviceClassification"); OWLDataProperty refURI = DP("urn:expr#refURI"); OWLDataProperty valueType = DP("urn:process#valueType"); OWLDataProperty parameterType = DP("urn:process#parameterType"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); // expected serviceProduct, serviceClassification, refURI, // bottomDataProperty, valueType, parameterType, invocable // actual__ valueFunction equal(reasoner.getDisjointDataProperties(valueFunction), serviceProduct, serviceClassification, refURI, bottomDataProperty, valueType, parameterType, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesvalueType() { OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty valueType = DP("urn:process#valueType"); // expected valueForm, parameterValue, bottomDataProperty, // valueFunction, invocable // actual__ valueType equal(reasoner.getDisjointDataProperties(valueType), valueForm, parameterValue, bottomDataProperty, valueFunction, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesinvocable() { OWLDataProperty serviceProduct = DP("urn:profile#serviceProduct"); OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty serviceClassification = DP("urn:profile#serviceClassification"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty refURI = DP("urn:expr#refURI"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty valueType = DP("urn:process#valueType"); OWLDataProperty parameterType = DP("urn:process#parameterType"); OWLDataProperty invocable = DP("urn:process#invocable"); // expected serviceProduct, valueForm, serviceClassification, // parameterValue, refURI, bottomDataProperty, valueFunction, valueType, // parameterType // actual__ invocable equal(reasoner.getDisjointDataProperties(invocable), serviceProduct, valueForm, serviceClassification, parameterValue, refURI, bottomDataProperty, valueFunction, valueType, parameterType); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesvalueForm() { OWLDataProperty serviceProduct = DP("urn:profile#serviceProduct"); OWLDataProperty serviceClassification = DP("urn:profile#serviceClassification"); OWLDataProperty refURI = DP("urn:expr#refURI"); OWLDataProperty valueType = DP("urn:process#valueType"); OWLDataProperty parameterType = DP("urn:process#parameterType"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty valueForm = DP("urn:process#valueForm"); // expected serviceProduct, serviceClassification, refURI, // bottomDataProperty, valueType, parameterType, invocable // actual__ valueForm equal(reasoner.getDisjointDataProperties(valueForm), serviceProduct, serviceClassification, refURI, bottomDataProperty, valueType, parameterType, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesparameterValue() { OWLDataProperty serviceProduct = DP("urn:profile#serviceProduct"); OWLDataProperty serviceClassification = DP("urn:profile#serviceClassification"); OWLDataProperty refURI = DP("urn:expr#refURI"); OWLDataProperty valueType = DP("urn:process#valueType"); OWLDataProperty parameterType = DP("urn:process#parameterType"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); // expected serviceProduct, serviceClassification, refURI, // bottomDataProperty, valueType, parameterType, invocable // actual__ parameterValue equal(reasoner.getDisjointDataProperties(parameterValue), serviceProduct, serviceClassification, refURI, bottomDataProperty, valueType, parameterType, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDisjointDataPropertiesparameterType() { OWLDataProperty valueForm = DP("urn:process#valueForm"); OWLDataProperty parameterValue = DP("urn:process#parameterValue"); OWLDataProperty valueFunction = DP("urn:process#valueFunction"); OWLDataProperty invocable = DP("urn:process#invocable"); OWLDataProperty parameterType = DP("urn:process#parameterType"); // expected valueForm, parameterValue, bottomDataProperty, // valueFunction, invocable // actual__ parameterType equal(reasoner.getDisjointDataProperties(parameterType), valueForm, parameterValue, bottomDataProperty, valueFunction, invocable); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDataPropertyValuesKIFrefURI() { OWLNamedIndividual KIF = df.getOWLNamedIndividual(IRI .create("urn:expr#KIF")); OWLDataProperty refURI = DP("urn:expr#refURI"); // expected ["http://logic.stanford.edu/kif/kif.html"^^xsd:anyURI] // actual__ KIF, refURI assertEquals( reasoner.getDataPropertyValues(KIF, refURI), new HashSet<>( Arrays.asList(df .getOWLLiteral("http://logic.stanford.edu/kif/kif.html")))); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDataPropertyValuesDRSrefURI() { OWLNamedIndividual DRS = df.getOWLNamedIndividual(IRI .create("urn:expr#DRS")); OWLDataProperty refURI = DP("urn:expr#refURI"); // expected // ["http://www.daml.org/services/owl-s/1.1/generic/drs.owl"^^xsd:anyURI] // actual__ DRS, refURI assertEquals( reasoner.getDataPropertyValues(DRS, refURI), new HashSet<>( Arrays.asList(df .getOWLLiteral("http://www.daml.org/services/owl-s/1.1/generic/drs.owl")))); } @Test @Ignore("disjoint properties not supported") public void shouldPassgetDataPropertyValuesSWRLrefURI() { OWLNamedIndividual SWRL = df.getOWLNamedIndividual(IRI .create("urn:expr#SWRL")); OWLDataProperty refURI = DP("urn:expr#refURI"); // expected ["http://www.w3.org/2003/11/swrl"^^xsd:anyURI] // actual__ SWRL, refURI assertEquals( reasoner.getDataPropertyValues(SWRL, refURI), new HashSet<>(Arrays.asList(df .getOWLLiteral("http://www.w3.org/2003/11/swrl")))); } @Test public void shouldPassgetObjectPropertyRangesisPresentedBytrue() { OWLClass Service = C("http://www.daml.org/services/owl-s/1.1/Service.owl#Service"); OWLObjectProperty isPresentedBy = OP("urn:Service.owl#isPresentedBy"); // expected Service // actual__ isPresentedBy, true equal(reasoner.getObjectPropertyRanges(isPresentedBy, true), Service); } }