SourceForge has been redesigned. Learn more.
Close

#312 Manchester syntax imports

closed
None
5
2012-10-13
2012-03-05
No

Hi,

It seems that, when using the Manchester syntax, it is not possible to reference imported classes (for example by subclassing). This result in a parse error, even though the imported ontology parses just fine. The problem also goes away when I swith syntax.

Discussion

  • Ignazio Palmisano

    Thanks for the report. Can you provide a small example that reproduces the error?

     
  • Kent Inge Simonsen

    When I run the attached test case I get the following errormessage in the testImports test. http://t.k1s.org/thesuperont.owl contains the content of the string mch1 in the testcase, and the test testRemoteIsParseable runs fine indicating that the owlapi is able to read and parse it.

    --------------------------------------------------------------------------------
    Parser: ManchesterOWLSyntaxOntologyParser
    Encountered su:Thesuperclass at line 13 column 14. Expected one of:
    Class name
    Object property name
    Data property name
    not
    inverse
    (
    {
    (Line 13)

    at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology\(ParsableOWLOntologyFactory.java:197\)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology\(OWLOntologyManagerImpl.java:619\)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument\(OWLOntologyManagerImpl.java:585\)
    
     
  • Ignazio Palmisano

    Adding

    Class: su:Thesuperclass

    to the second ontology stops the exception from appearing; looks like the Manchester parser is too sensitive about where entities are declared, i.e., the imported ones are not seen at parsing time. I'm adding an updated Java test case.

     
  • Ignazio Palmisano

    The parser was not adding imported ontology entities to its name caches.

    Note that the namespaces defined in these ontologies do not have a # or / at their end, therefore names won't split as expected for the abbreviations to work.

     
  • Ignazio Palmisano

    • status: open --> closed
     
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977
     

Log in to post a comment.