Elie Roux created JENA-1380:
-------------------------------
Summary: Exception when reasoner introduces
owl:bottomObjectProperty
Key: JENA-1380
URL: https://issues.apache.org/jira/browse/JENA-1380
Project: Apache Jena
Issue Type: Bug
Components: Ontology API
Affects Versions: Jena 3.3.0
Environment: Linux, Maven, project settings:
https://github.com/BuddhistDigitalResourceCenter/xmltoldmigration/blob/master/pom.xml
Reporter: Elie Roux
The Openllet reasoner introduces some owl:bottomObjectProperty triples that
seem to confuse Jena. I've opened an [openllet
ticket](https://github.com/Galigator/openllet/issues/17) about that. Here is
the code that makes Jena fail:
{noformat}
String ontostring = "@prefix : <http://purl.bdrc.io/ontology/> .\n" +
"@prefix bdo: <http://purl.bdrc.io/ontology/> .\n" +
"@prefix owl: <http://www.w3.org/2002/07/owl#> .\n" +
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n" +
"@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n" +
"@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n" +
"@base <http://purl.bdrc.io/ontology/> .\n" +
"\n" +
"<http://purl.bdrc.io/ontology/> rdf:type owl:Ontology ;\n" +
" rdfs:label \"BDRC
Ontology\"^^xsd:string ;\n" +
" owl:versionInfo \"0.1\"^^xsd:string
.\n" +
"\n" +
"bdo:personKinWho rdf:type owl:ObjectProperty ,\n" +
" owl:FunctionalProperty ;\n" +
" rdfs:domain bdo:Kin ;\n" +
" rdfs:range bdo:Person .\n" +
"\n" +
"\n" +
"bdo:Kin rdf:type owl:Class .\n" +
"\n" +
"bdo:Person rdf:type owl:Class .";
OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
InputStream stream = new ByteArrayInputStream(ontostring.getBytes());
m.read(stream, null, "TURTLE");
ExtendedIterator<OntProperty> ppi = m.listAllOntProperties();
while (ppi.hasNext()) {
OntProperty p = ppi.next();
}
OntModel ontoModelInferred =
ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC, m);
ppi = ontoModelInferred.listAllOntProperties();
while (ppi.hasNext()) { // ERROR
OntProperty p = ppi.next();
}
{/noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)