-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circular property ( like rdfs:isDefinedBy or dcterms:isVersionOf ) in .ttl causes owl:imports to overwrite OntologyIRI #1080
Comments
same issue with for
|
I encountered this error as well. After debugging the owl api it seems this happens because the owlapi/parsers/src/main/java/org/semanticweb/owlapi/rdf/rdfxml/parser/OWLRDFConsumer.java Lines 1467 to 1473 in b683b03
|
I think this could be solved if the IRI used as subject for the predicate owlapi/parsers/src/main/java/org/semanticweb/owlapi/rdf/rdfxml/parser/TripleHandlers.java Lines 1545 to 1550 in b683b03
The in the code I mentioned above in TripleHandler public void handleTriple(IRI s, IRI p, IRI o) {
consume(s, p, o);
// add a second parameter to indicate the IRI is a possible ontology IRI
// since its the subject
consumer.addOntology(s,true);
consumer.addOntology(o,false);
} OWLRDFConsumer protected void addOntology(IRI iri,bool subjectIRI) {
if (ontologyIRIs.isEmpty()) {
firstOntologyIRI = iri;
}
ontologyIRIs.add(iri);
if (subjectIRI) {
importsubjectIRI.add(iri)
}
} ontology.annotations().forEach(a -> a.getValue().asIRI().ifPresent(iri -> {
if (ontologyIRIs.contains(iri) && importSubjectIRI != iri) {
candidateIRIs.remove(iri);
}
})); Disclaimer: I am not familiar with java syntax. Take this suggestion just as an idea but feel free to improve it :) |
This fix adds a condition to check wether the parsed IRIs are used as subject for the owl#imports. This fixes owlcs#1080 for owl api version 4. Signed-off-by: Victor Chavez <[email protected]>
This fix adds a condition to check wether the parsed IRIs are used as subject for the owl#imports. This fixes #1080 for owl api version 4. Signed-off-by: Victor Chavez <[email protected]>
expected: https://www.example.org/onto1
result: https://www.example.org/onto2
The text was updated successfully, but these errors were encountered: