Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1380

Exception when reasoner introduces owl:bottomObjectProperty

    XMLWordPrintableJSON

Details

    Description

      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:

      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();
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            eroux Elie Roux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: