Menu

#279 round trip problem with owl functional or rdf/xml syntax

closed
None
5
2012-10-17
2011-06-28
No

I don't exactly know where things went wrong here - is it the rdf parser or a problem in the OWL functional syntax. Because I am not sure who is wrong I have written an unusual test for me - there are two round trips.

We start with an ontology with a single anonymous individual that is declared to be a member of a certain class. When it is written out as rdf-xml it looks like the attached rdf-version.owl file. In particular the class assertion axiom ends up simply looking like this:

<A/>

A little terse but it makes sense and seems right. When this ontology is read in, the parser creates the anonymous individual with the OWLDataFactory.getOWLAnonymousIndividual(String id) method where the string is

http://protege.org/AnonymousIndividual.owl#genid1

Now when this is written out to the OWL functional syntax it produces the following representation of the class assertion axiom:

ClassAssertion(<http://protege.org/AnonymousIndividual.owl#A> _:http://protege.org/AnonymousIndividual.owl#genid1)

This version can't be parsed by the OWL functional syntax parser and it produces the error:

Parser: OWLFunctionalSyntaxOWLParser
Encountered " <PNAME_NS> ": "" at line 11, column 69.
Was expecting:
")" ...
(Line 11)

Discussion

  • Timothy Redmond

    Timothy Redmond - 2011-06-28

    the rdf version of the file looks ok

     
  • Timothy Redmond

    Timothy Redmond - 2011-06-28

    a functional syntax version. Is this ok?

     
  • Timothy Redmond

    Timothy Redmond - 2011-06-28

    Program demonstrating the issue. Generates ontology, saves to rdf, reads it in, saves to owl functional syntax, fails to read it back.

     
  • Ignazio Palmisano

    Looks like the trick of using special IRI-like forms for bnode ids has gone past its prime; a related bug was reported a few days ago on the mailing list, referring the specs which say bnode ids are not allowed to have characters like ':' in them. However, I've tried simply changing the id generation strategy to drop the namespace from the id, and that's breaking the API in all sorts of places - so definitely thought needed.

     
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977
     
  • Ignazio Palmisano

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB