Giter VIP home page Giter VIP logo

Comments (17)

ansell avatar ansell commented on July 22, 2024

That patch is a little out of date. I will rebase it against the current
master and open a pull request for it.

On 27 May 2013 22:12, ignazio1977 [email protected] wrote:

The Namespaces enum can be extended to include a common prefix for each of
the namespaces, along with a marker to indicate if the namespace is known
to be deprecated and not in use currently.

p_ansell: Patch can be found at:
https://github.com/ansell/owlapi/compare/master...SF-3577999


Reply to this email directly or view it on GitHubhttps://github.com//issues/10
.

from owlapi.

ansell avatar ansell commented on July 22, 2024

Would you like me to remove the dependency on OpenRDF Sesame when I rebase
it or should I target it at release4 instead?

I have been using it to automatically generate org.openrdf.model.Namespace
objects for each of the namespaces but I can do that in another place if
you want it on master without the new dependency.

On 28 May 2013 06:50, Peter Ansell [email protected] wrote:

That patch is a little out of date. I will rebase it against the current
master and open a pull request for it.

On 27 May 2013 22:12, ignazio1977 [email protected] wrote:

The Namespaces enum can be extended to include a common prefix for each
of the namespaces, along with a marker to indicate if the namespace is
known to be deprecated and not in use currently.

p_ansell: Patch can be found at:
https://github.com/ansell/owlapi/compare/master...SF-3577999


Reply to this email directly or view it on GitHubhttps://github.com//issues/10
.

from owlapi.

ignazio1977 avatar ignazio1977 commented on July 22, 2024

I'm not sure about the dependency - I haven't wrapped my head around the RIO patch yet and I'm trying to determine whether it should create dependencies in the API module. I suppose the purpose of previous patches on unifying RDF classes is to enable swapping of parsers in and out, so wouldn't this dependency work in the opposite direction?

Minus the dependency, I'm happy with the patch as it is, I can do the small rework involved.

from owlapi.

ansell avatar ansell commented on July 22, 2024

While you are patching the Namespaces class you may want to expand it to include some of the other RDFa Common Prefixes that have recently attracted attention as a source of default prefix mappings for semantic web applications:

http://www.w3.org/2011/rdfa-context/rdfa-1.1

The owlapi-api module only relies on the sesame-rio-api module (and its dependencies, sesame-model and sesame-util). The actual parsers in Sesame Rio (sesame-rio-turtle, sesame-rio-nquads,... etc.) are all linked in at runtime using META-INF/services entries, so they only need to be included in the classpath at runtime to be activated.

The Rio entries in owlapi-api only link to the constants in RDFFormat, which are shared and universally used in Rio to identify specific RDF formats. I couldn't just use RDFFormat, as the are OWLOntologyFormats that are not RDFFormats, so I added another layer to allow references to RDFFormats from the RDF subset of OWLOntologyFormats.

The addition of OWLOntologyFormatFactory (which could have its name changed if necessary), was necessary to allow loading of OWLOntologyFormatFactorys at runtime. That would allow most of the formats to move to the owlapi-rio module (except for RioRDFOntologyFormat that provides the link between RDFFormat and OWLOntologyFormat). Alternatively, they could be in a new sesame-rio-owlapi module if we add this to sesame through SES-17 [1]. However, I do not want to link to the owlapi-rio module at compile time, as it includes dependencies on owlapi-parsers which defeats the purpose of abstracting those details using an API.

[1] https://openrdf.atlassian.net/browse/SES-17

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

It doesn't look like this has made it into a release yet - correct? Just wondering because I like the changes over all, but how about renaming prefix and getPrefix to prefixName and getPrefixName? I'm suggesting this because I'm under the impression that the the prefix is what is now called the "base IRI" e.g. "http://www.w3.org/2002/07/owl#" and the prefix name is the short name used to name the prefix e.g. "owl". I think this is the convention used elsewhere in the OWL API and some of the OWL specs.

from owlapi.

ansell avatar ansell commented on July 22, 2024

No, it hasn't made it into a release yet. Were you thinking of including it in both 3.4.6 and 4?

If you don't mind making the changes yourself you can cherry-pick this commit or I can make the necessary changes and open a pull request for it:

https://github.com/ansell/owlapi/commit/36c81c19f1197b9e5e5ebb1eb21bac37377b1103

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

Hi Peter,

I think we're going to have a 3.5 release that will introduce large bits of new functionality (without being backwards incompatible). It seems like this (and some other things) would be a good candidates to include. I'd like to include it. If you want to suggest any other namespaces that would be great too. We might also want to introduce a flag to indicate wether a namespace forms part of the namespaces used in the OWL spec (rdf: rdfs: owl: xsd:).

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

What do you prefer with regards to a cherry pick or pull request? I haven't followed the discussion above about the dependencies so I'm not sure what's best.

from owlapi.

ansell avatar ansell commented on July 22, 2024

I opened a pull request for this (including removing the dependency on OpenRDF Sesame).

i included a new flag called "isBuiltIn" for linking to the native/built-in namespaces, in addition to the inUse flag that indicates whether the namespace should be considered obsolete.

There are some private helper boolean variables to make the namespace enum declarations easier to read.

Overall I am fairly sure that these changes are backwards compatible at the source level, and I don't think they have been reordered so they may even be backwards compatible at the binary level, although I am not an expert on the exact effects of adding new fields to enumerations.

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

The changes look good to me. Thanks a lot for this.

I just had a quick look at the OWL 2 spec.... if it's o.k. with you we'll change getBaseIRI to getPrefixIRI (see Table 2 in the spec).

from owlapi.

ansell avatar ansell commented on July 22, 2024

Thats fine. I am also adding the namespace definitions from the RDFa Core Initial Context and will open another Pull Request for that and to change the getPrefixIRI

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

Great. I've merged it into Master and changed the method name to getPrefixIRI().

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

There's a load of other prefix names like foaf, dc, dcterms, geo etc. that we use on a project here. It would be useful to add these but I wonder where to stop. prefix.cc has a good list. Any suggestions welcomed.

from owlapi.

ansell avatar ansell commented on July 22, 2024

The RDFa Core Initial Context has the top ten vocabularies from prefix.cc, along with other common names. It is the only authoritative short-list that I know of, as all of the prefixes there do not need to be defined to be used in RDFa, so they keep the list fairly short, comparatively.

from owlapi.

matthewhorridge avatar matthewhorridge commented on July 22, 2024

o.k. sounds good to me. I'll wait for the pull request.

from owlapi.

ignazio1977 avatar ignazio1977 commented on July 22, 2024

I'll try to keep up and add these to version 4 too :-)

from owlapi.

ignazio1977 avatar ignazio1977 commented on July 22, 2024

This is in master and version 4, I think we can close the ticket

from owlapi.

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.