Skip to content
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

imports in OWL Manchester Notation fail #347

Closed
cmaeder opened this issue Feb 16, 2015 · 13 comments
Closed

imports in OWL Manchester Notation fail #347

cmaeder opened this issue Feb 16, 2015 · 13 comments
Labels

Comments

@cmaeder
Copy link

cmaeder commented Feb 16, 2015

The example (in a test.omn file)

Prefix: : <http://ontohub.org/monster-blend/animals/prefixTest#>
Ontology: <http://ontohub.org/monster-blend/animals/prefixTest>

Import: <https://ontohub.org/monster-blend/animals/habitats.owl>

also given in spechub/Hets#1261 fails with a NullPointerException.

For the newer versions, owl-api 3.5.1 and 4.0.1, our compilation (OBO) or build (ant) failed.

@ignazio1977
Copy link
Contributor

The code is getting confused by the fact that the import IRI is different from the ontology IRI. The ontology IRI is http://ontohub.org/monster-blend/animals/habitats, while the import IRI is https://ontohub.org/monster-blend/animals/habitats.owl
This is expected to work, so this is likely a bug.

@ignazio1977 ignazio1977 added the bug label Mar 3, 2015
@ignazio1977
Copy link
Contributor

I'm not sure what you mean when you say your compilation failed. What errors do you get in the newest OWLAPI?

@ignazio1977 ignazio1977 changed the title imports in OWL Manchester Notation (.omn) do not work in version owlapi-3.4.8 imports in OWL Manchester Notation fail Mar 3, 2015
@ignazio1977
Copy link
Contributor

Test case to replicate:

@Test
public void shouldParseImport() throws OWLOntologyCreationException {
    String s = "Prefix: : <http://ontohub.org/monster-blend/animals/prefixTest#>\n"
            + "Ontology: <http://ontohub.org/monster-blend/animals/prefixTest>\n"
            + "\n"
            + "Import: <https://ontohub.org/monster-blend/animals/habitats.owl>";
    OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(
            new StringDocumentSource(s));
}

ignazio1977 added a commit that referenced this issue Mar 5, 2015
The Manchester syntax parser was trying to retrieve an imported ontology
by its import declaration IRI - this does not always work. It should
have used the import declaration instead.
ignazio1977 added a commit that referenced this issue Mar 5, 2015
The Manchester syntax parser was trying to retrieve an imported ontology
by its import declaration IRI - this does not always work. It should
have used the import declaration instead.
ignazio1977 added a commit that referenced this issue Mar 5, 2015
The Manchester syntax parser was trying to retrieve an imported ontology
by its import declaration IRI - this does not always work. It should
have used the import declaration instead.
ignazio1977 added a commit that referenced this issue Mar 5, 2015
The Manchester syntax parser was trying to retrieve an imported ontology
by its import declaration IRI - this does not always work. It should
have used the import declaration instead.
ignazio1977 added a commit that referenced this issue Mar 5, 2015
The Manchester syntax parser was trying to retrieve an imported ontology
by its import declaration IRI - this does not always work. It should
have used the import declaration instead.
@ignazio1977
Copy link
Contributor

Bug in the parser - it was trying to access the ontology by the import IRI, but that's not a match to the actual IRI in many cases. Should have accessed by import declaration, since that's a more reliable index.

@cmaeder
Copy link
Author

cmaeder commented Mar 5, 2015

Thanks for looking into this. We cannot easily update from owlapi-3.4.8 , because we use some classes/interfaces that changed in newer versions.

@ignazio1977
Copy link
Contributor

If you can point out which ones and how you use them, I can try to help with the update.

@cmaeder
Copy link
Author

cmaeder commented Mar 5, 2015

We checkout the sources https://github.com/spechub/Hets.git and call "make initialize_java" (see Makefile). This checks out https://github.com/owlcs/owlapi/tags/owlapi-parent-3.4.8 and calls "ant" (also on a couple of other files). The actual java source we compile is https://github.com/spechub/Hets/blob/master/OWL2/java/de/unibremen/informatik/OWL2Parser.java

Unfortunately, we have not much resources to look into this ourselves.

@ignazio1977
Copy link
Contributor

Cheers, I'll have a look at what's feasible. There isn't a Pellet version for OWLAPI 4 yet, but FaCT++ is available. Updating to OWLAPI 3.5.1 should be doable, I'll issue a pull request if I can.

@ignazio1977
Copy link
Contributor

The issue seems to be with the extra libraries required by more recent versions of OWLAPI - their source is not included and cannot be built from scratch. I'm going to try and replace the compilation with downloading the 3.5.1 osgi binary instead, which includes all dependencies as well. It should be a drop in replacement and speed up your build as well.

@sesuncedu
Copy link
Contributor

sesuncedu commented Mar 5, 2015 via email

@ignazio1977
Copy link
Contributor

spechub/Hets#1463

@sesuncedu suggestion could be implemented as well, but I'd be more inclined to refactor that portion of the project as a Maven build. There's a FaCT++ Maven artifact in the works as well, which would make this the least painful solution, in the long term. See https://bitbucket.org/ignazio1977/factplusplus

@matthewhorridge
Copy link
Contributor

There's a FaCT++ Maven artifact in the works as well, which would make this the least painful solution, in the long term

Oooooh! That's brightened my day :)

@ignazio1977
Copy link
Contributor

There's a FaCT++ Maven artifact in the works as well, which would make this the least painful solution, in the long term

Oooooh! That's brightened my day :)

Eh it's a bit of a kludge, as the binaries need to be updated manually before the build (they're treated as resources). Haven't found a Maven plugin to do C++ compilations before the Java compilation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants