edmcouncil / idmp

This repository stores the OWL ontology built on the basis of the ISO standards for identification of medicinal products.
https://spec.edmcouncil.org/idmp/
MIT License
30 stars 10 forks source link

Easy way to load 1.0.0 into Protege? #551

Closed janelomax closed 3 months ago

janelomax commented 10 months ago

Hi - is there a straightforward way I can load the latest v 1.0.0 into Protege? I'm baffled by this page:

https://spec.edmcouncil.org/idmp/page/owl

I don't know which one to choose or which version it is.

Can I just load directly from github somehow? Is there an OWL file that I can load that just imports everything else?

thanks!

tw-osthus commented 10 months ago

You can checkout the code from github and then load AboutIDMPDev.rdf resp. AboutIDMPProd.rdf into Protege. If you want the examples included then load AboutIDMPDev-ReferenceIndividuals.rdf

mereolog commented 10 months ago

You can also use:

janelomax commented 10 months ago

Thanks both.

And if I wanted to add to my pipeline, I can use https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd.ttl but is there an endpoint where I can get its version?

janelomax commented 10 months ago

I can see a terms:issued tag in both https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPDev.ttl and https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd.ttl

but it's showing August 2023 in both:

terms:issued "2023-08-18T18:00:00"^^xsd:dateTime ;

is there a better way to get the version?

mereolog commented 10 months ago

I can see a terms:issued tag in both https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPDev.ttl and https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd.ttl

but it's showing August 2023 in both:

terms:issued "2023-08-18T18:00:00"^^xsd:dateTime ;

is there a better way to get the version?

My bad - you should use:

And ignore the value of terms:issued - it is a copy of the current content of the about files, which should have been updated.

mereolog commented 10 months ago

Thanks both.

And if I wanted to add to my pipeline, I can use https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd.ttl but is there an endpoint where I can get its version?

We do not host a SPARQL endpoint for the ontology, but we use data.world infrastructure for this purpose. Currently, only the latest version of the master branch is hosted there (https://api.data.world/v0/sparql/edm-council/idmp-ontology-development-dataset), but if you require 1.0.0, we can set it up as well. Note that data.world endpoints are not public, so you would need an API access token. To get it you need to set up a free account in data.world.

janelomax commented 10 months ago

Ideally we'd like a universal URL where we can always pick up the latest prod (i.e. no version info in the URL), but with a version tag in the file somewhere e.g. as owl:versionInfo

I suspect we're not the only ones with this sort of requirement - is that something you'd consider?

mereolog commented 9 months ago

Ideally we'd like a universal URL where we can always pick up the latest prod (i.e. no version info in the URL), but with a version tag in the file somewhere e.g. as owl:versionInfo

I suspect we're not the only ones with this sort of requirement - is that something you'd consider?

I am afraid I don't follow.

The latest prod is always here https://spec.pistoiaalliance.org/idmp/ontology/QuickIDMPProd.ttl. And it has this version info: owl:versionIRI https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd/

What would you expect instead?

janelomax commented 4 months ago

Hi - can we revisit this please?

What I'd like to do is take https://spec.pistoiaalliance.org/idmp/ontology/QuickIDMPProd.ttl into my pipeline but I'd like to check if it's still on the same version as last time. So it's on 0.5.0 now, the last version I picked up was 0.4.0 - how can I figure that our programatically? Thanks for your help.

mereolog commented 4 months ago

Ok, I think I get this now.

So, if you want to get a specific version of the ontology, you need to use a specific IRI, e.g., in order to get 0.5.0, you need to use https://spec.pistoiaalliance.org/idmp/ontology/master/v0.5.0/QuickIDMPProd.ttl. When you use https://spec.pistoiaalliance.org/idmp/ontology/QuickIDMPProd.ttl, you will get the latest version of the ontology, where the versionIRI is equal to https://spec.pistoiaalliance.org/idmp/ontology/master/latest/QuickIDMPProd/ - even if it happens to be identical to https://spec.pistoiaalliance.org/idmp/ontology/master/0.5.0/QuickIDMPProd/.

Note that we cannot use the release versions, i.e., v0.4.0, v0.5.0, etc., to manage all versioning because there are usually several versions between one release and another, so, at some point, there was a (master/latest) version that was neither 0.4.0 nor 0.5.0. We could use the commit identifier to serve this purpose, i.e., for all ontologies their versionIRI would contain the respective commit id, but I am not sure how useful this could be.

Also, as of now, we do not serve the idea of the latest release, where, for example, https://spec.pistoiaalliance.org/idmp/ontology/release/latest/QuickIDMPProd.ttl would resolve to the ontology whose versionIRI be, say, https://spec.pistoiaalliance.org/idmp/ontology/release/0.5.0/QuickIDMPProd/. If such an extension serves your needs, let us know, and we can then discuss how and when to implement such a change.

Btw., we had in the past a discussion that may be relevant for this - see https://github.com/edmcouncil/ontology-publisher/discussions/106.

janelomax commented 4 months ago

Yes this is the same request that Dean was making in that FIBO ticket.

Having the generic URL redirect to a specific version URL wouldn't really work for us. We'd just like either the versionIRI to be e.g. https://spec.pistoiaalliance.org/idmp/ontology/master/0.5.0/QuickIDMPProd/ or ideally have the text version in the file e.g. dct:hasVersion:0.5.0

mereolog commented 4 months ago

Yes this is the same request that Dean was making in that FIBO ticket.

Having the generic URL redirect to a specific version URL wouldn't really work for us. We'd just like either the versionIRI to be e.g. https://spec.pistoiaalliance.org/idmp/ontology/master/0.5.0/QuickIDMPProd/ or ideally have the text version in the file e.g. dct:hasVersion:0.5.0

Fair enough, but are you thinking about the version info being present in all versions or just in releases?

janelomax commented 4 months ago

Just releases would work for us.

mereolog commented 3 months ago

See: https://github.com/edmcouncil/ontology-publisher/issues/171