German-BioImaging / omero-rdf

A plugin for exporting RDF from OMERO
GNU General Public License v2.0
5 stars 5 forks source link

Class definitions in output #3

Closed CFGrote closed 8 months ago

CFGrote commented 1 year ago

Running the example mentioned in #1, I was wondering why there are hardly any type defining statements, such as

<http://ome..../Image/12345> a <http://www.openmicroscopy.org/rdf/2016-06/ome_core/ImageFile>
...
<https://ome.evolbio.mpg.de/MapAnnotation/1985015> a <http://www.openmicroscopy.org/rdf/2016-06/ome_core/Map>
...

This would enable queries like


select * where {
    ?img a ome_core:ImageFile;
}

Implicitely, the ome_core ontology induces these type definitions, so would be enough to append ome_core.owl.ttl to the output (maybe make it optional via command line flag).

joshmoore commented 1 year ago

:+1: for adding more type definitions but primarily it was unclear to me (and still is, to be honest) if we were going down the ome_core ontology root, or starting from new LinkML-generated base classes. seealso: https://github.com/ome/ome-model/pull/180

joshmoore commented 9 months ago

6 has an implementation of this, e.g.,

omero -s idr.openmicroscopy.org rdf Image:14239639  --pretty
@prefix ome: <http://www.openmicroscopy.org/rdf/2016-06/ome_core/> .
@prefix ome-xml: <http://www.openmicroscopy.org/Schemas/OME/2016-06#> .
@prefix omero: <http://www.openmicroscopy.org/TBD/omero/> .
@prefix wd: <http://www.wikidata.org/prop/direct/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://idr.openmicroscopy.org/Image/14239639> a ome-xml:Image ;
    omero:series 0 ;
    ome:Description "" ;
    ome:Name "Sokol_08" .

<https://idr.openmicroscopy.org/MapAnnotation/4594824> a ome-xml:MapAnnotation,
        <http://www.wikidata.org/entity/Q35120> ;
    ome:Map [ ome:Key "Organism" ;
            ome:Value "Homo sapiens" ] ;
    ome:Namespace "openmicroscopy.org/mapr/organism" ;
    wd:P703 <http://www.wikidata.org/entity/Q15978631> .
...

The discrepancy between the ome: and ome-xml: namespaces will need some refactoring.