GithubHelp home page GithubHelp logo

Comments (3)

matthewhorridge avatar matthewhorridge commented on June 24, 2024

Reproduced this. The problem seems to be specific to saving and reloading an ontology in Turtle format. I'm not sure whether this is a Protege bug or an OWL API bug. A work around is to use a different format, for example RDF/XML for saving the ontology.

from protege.

matthewhorridge avatar matthewhorridge commented on June 24, 2024

Another workaround is to make sure the ontology IRI is not a prefix for entity IRIs. So, if the ontology is named http://foo.com make sure entity IRIs do not have the http://foo.com prefix, e.g. http://bar.com won't exhibit this problem. Less than ideal but it's a work around.

from protege.

matthewhorridge avatar matthewhorridge commented on June 24, 2024

Pasting in this from a user called Hyacinth,

This is one of the many bugs and malfunctions of OWLAPI pertaining to the default : prefix.

The reason why the problem emerges in your file is that the default : prefix is not defined by the # but by the / character:

Once you set the IRI of the new entities to be followed by the # character, every new entity will have a full IRI containing the # character. In this case, if there exists any prefix that abbreviates the ontology IRI followed by a # character, then the new entities will be saved by prefixed name using that specific prefix. But in the case of your file, there is no such prefix (The default : prefix is the ontology IRI followed by / and not #). The logical behaviour in this case is for OWLAPI to save the new entities by full IRI and not by prefixed name. However, OWLAPI incorrectly saves the new entities by prefixed name using the default : prefix which in fact defines the IRI by / character and not the # character. This is the reason why all of the entities will contain / instead of # in their IRIs when you open the ontology next time.

A quick fix is to change the default : prefix to end with # instead of the / character:

from protege.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.