#152 Support for Anonymous Individuals

Thomas Hoge

I appologize for the shotgun submittal with multiple items including some which might be considered enhancement requests.
I am new to OwlApi, but with a couple of years of Jena experience.
I have been working on an OWL2 editor and have run up against several issues regarding anonymous individuals:
- StackOverflow on listing rdf/xml or turtle, added patch locally to in RDFRendererBase which "fixes" this, but unsure what other issues it may cause.
- Finding All Anonymous, and especially, anonymous with assigned IDs which can easily be added, is very bulky.
- Removing Anonymous Individuals is "irregular" (List<OWLOntologyChange> ocl = manager.removeAxioms(ontology, ontology.getAxioms(oi));) vs. using a remover. Seems to work.
- rendering of anonymous can fail in RDF/xml or Turtle (did my "fix" cause this?) , but works in functional syntax, e.g. : ClassAssertion(owl:Thing _:deadline)
- Turtle syntax, "[]" for anonymous as subject, kills parse; ontology won't load.

Details on "fix" follows:

StackOverflow on listing rdf/xml or turtle, patch in RDFRendererBase, around line 219:

for(OWLAnonymousIndividual anonInd : ontology.getReferencedAnonymousIndividuals()) {
boolean anonRoot = true;
Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();
for(OWLAxiom ax : ontology.getReferencingAxioms(anonInd)) {
if (!(ax instanceof OWLDifferentIndividualsAxiom)) {
AxiomSubjectProvider subjectProvider = new AxiomSubjectProvider();
OWLObject obj = subjectProvider.getSubject(ax);
if(!obj.equals(anonInd)) {
anonRoot = false;
else {
if(anonRoot) {
//TEH SEMARULE createGraph(axioms);


  • Thomas Hoge

    Thomas Hoge - 2010-05-08

    This is a duplicate of 2998616.

  • Thomas Hoge

    Thomas Hoge - 2010-05-08
    • priority: 5 --> 1
  • Ignazio Palmisano

    • status: open --> closed-duplicate
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977

Log in to post a comment.