forked from andrawaag/omero-ontop-mappings
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding mapping and ontology geared towards mpieb.
- Loading branch information
Carsten
committed
Dec 6, 2024
1 parent
9f58e6e
commit 2385015
Showing
3 changed files
with
247 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
[PrefixDeclaration] | ||
: https://www.openmicroscopy.org/omemap/ | ||
dc: http://purl.org/dc/elements/1.1/ | ||
owl: http://www.w3.org/2002/07/owl# | ||
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# | ||
xml: http://www.w3.org/XML/1998/namespace | ||
xsd: http://www.w3.org/2001/XMLSchema# | ||
foaf: http://xmlns.com/foaf/0.1/ | ||
obda: https://w3id.org/obda/vocabulary# | ||
rdfs: http://www.w3.org/2000/01/rdf-schema# | ||
vcard: http://www.w3.org/2006/vcard/ns# | ||
omemap: https://www.openmicroscopy.org/omemap# | ||
ome_core: http://www.openmicroscopy.org/rdf/2016-06/ome_core/ | ||
ome_instance: https://ome.evolbio.mpg.de/ | ||
|
||
[MappingDeclaration] @collection [[ | ||
mappingId MAPID-project | ||
target ome_instance:Project/{project_id} a ome_core:Project ; rdfs:label {project_name} ; rdfs:comment {project_description} . | ||
source select | ||
_project.id as project_id, | ||
_project.name as project_name, | ||
_project.description as project_description | ||
from project as _project | ||
|
||
mappingId MAPID-dataset-0 | ||
target ome_instance:Dataset/{dataset_id} a ome_core:Dataset ; rdfs:label {dataset_name} ; rdfs:comment {dataset_description}. | ||
source select | ||
_dataset.id as dataset_id, | ||
_dataset.name as dataset_name, | ||
_dataset.description as dataset_description | ||
from dataset as _dataset | ||
|
||
mappingId MAPID-dataset-1 | ||
target ome_instance:Dataset/{dataset_id} ome_core:image ome_instance:Image/{image_id}. | ||
source select | ||
_dataset.id as dataset_id, | ||
_datasetimagelink.child as image_id | ||
from dataset as _dataset | ||
left join datasetimagelink as _datasetimagelink on _dataset.id = _datasetimagelink.parent | ||
|
||
mappingId MAPID-dataset-2 | ||
target ome_instance:Dataset/{dataset_id} <{map_key}> {map_value} . | ||
source select | ||
_dataset.id as dataset_id, | ||
_datasetannotationlink.child as annotation_id, | ||
concat('http://',_annotation.ns,'#', _annotation_mapvalue.name) as map_key, | ||
_annotation_mapvalue.value as map_value | ||
from dataset as _dataset | ||
join datasetannotationlink as _datasetannotationlink on _datasetannotationlink.parent = _dataset.id | ||
join annotation as _annotation on _datasetannotationlink.child = _annotation.id | ||
join annotation_mapvalue as _annotation_mapvalue on _annotation.id = _annotation_mapvalue.annotation_id | ||
|
||
|
||
mappingId MAPID-Image-0 | ||
target ome_instance:Image/{image_id} a ome_core:Image ; rdfs:label {image_name} ; rdfs:comment {image_description} ; ome_core:acquisitionDate {image_acquisitiondate}^^xsd:dateTime ; dc:identifier {image_id}^^xsd:string . | ||
source select | ||
_image.id as image_id, | ||
_image.acquisitiondate as image_acquisitiondate, | ||
_image.name as image_name, | ||
_image.description as image_description | ||
from image as _image | ||
|
||
mappingId MAPID-Image-1 | ||
target ome_instance:Image/{image_id} a ome_core:Image; <{map_key}> {map_value} . | ||
source select | ||
_image.id as image_id, | ||
concat('http://',_annotation.ns,'#', _annotation_mapvalue.name) as map_key, | ||
_annotation_mapvalue.value as map_value | ||
from image as _image | ||
join imageannotationlink as _imageannotationlink on _imageannotationlink.parent = _image.id | ||
join annotation as _annotation on _imageannotationlink.child = _annotation.id | ||
join annotation_mapvalue as _annotation_mapvalue on _annotation.id = _annotation_mapvalue.annotation_id | ||
|
||
|
||
mappingId MAPID-experimentergroup | ||
target ome_instance:ExperimenterGroup/{experimentergroup_id} a ome_core:ExperimenterGroup . | ||
source select | ||
experimentergroup.id as experimentergroup_id | ||
from experimentergroup | ||
|
||
mappingId MAPID-experiment | ||
target ome_instance:Experiment/{experiment_id} a ome_core:Experiment . | ||
source select | ||
experiment.id as experiment_id | ||
from experiment | ||
|
||
mappingId MAPID-well | ||
target ome_instance:Well/{well_id} a ome_core:Well . | ||
source select | ||
well.id as well_id | ||
from well | ||
|
||
mappingId MAPID-wellsample | ||
target ome_instance:WellSample/{wellsample_id} a ome_core:WellSample . | ||
source select | ||
wellsample.id as wellsample_id | ||
from wellsample | ||
|
||
mappingId MAPID-reagentset | ||
target ome_instance:ReagentSet/{reagentset_id} a ome_core:ReagentSet . | ||
source select | ||
reagent.id as reagentset_id | ||
from reagent | ||
|
||
mappingId MAPID-dataset_tag | ||
target ome_instance:Dataset/{dataset_id} ome_core:tagAnnotationValue {tag_text}^^xsd:string . | ||
source select | ||
_dataset.id as dataset_id, | ||
_annotation.textvalue as tag_text | ||
from dataset as _dataset | ||
left join datasetannotationlink as _datasetannotationlink on _datasetannotationlink.parent = _dataset.id | ||
join annotation as _annotation on _datasetannotationlink.child = _annotation.id where _annotation.textvalue is not NULL | ||
|
||
mappingId MAPID-image_tag | ||
target ome_instance:Image/{image_id} ome_core:tagAnnotationValue {tag_text}^^xsd:string . | ||
source select | ||
_image.id as image_id, | ||
_annotation.textvalue as tag_text | ||
from image as _image | ||
left join imageannotationlink as _imageannotationlink on _imageannotationlink.parent = _image.id | ||
left join annotation as _annotation on _imageannotationlink.child = _annotation.id where _annotation.textvalue is not NULL | ||
|
||
mappingId MAPID-project_tag | ||
target ome_instance:Project/{project_id} ome_core:tagAnnotationValue {tag_text}^^xsd:string . | ||
source select | ||
_project.id as project_id, | ||
_annotation.textvalue as tag_text | ||
from project as _project | ||
left join projectannotationlink as _projectannotationlink on _projectannotationlink.parent = _project.id | ||
left join annotation as _annotation on _projectannotationlink.child = _annotation.id where _annotation.textvalue is not NULL | ||
|
||
mappingId MAPID-a5bdd29d4c994a6bbb3acdc666403abd | ||
target ome_instance:RegionOfInterest/{roi_id} a ome_core:RegionOfInterest ; dc:identifier {roi_id}^^xsd:string . | ||
source select id as roi_id from roi | ||
|
||
mappingId MAPID-roi | ||
target ome_instance:RegionOfInterest/{roi_id} a ome_core:RegionOfInterest ; ome_core:image ome_instance:Image/{roi_image_id} ; dc:identifier {roi_id}^^xsd:string . | ||
source select id as roi_id, image as roi_image_id from roi | ||
|
||
mappingId MAPID-project(0) | ||
target ome_instance:Project/{project_id} a ome_core:Project ; ome_core:dataset ome_instance:Dataset/{dataset_id} . | ||
source select | ||
_project.id as project_id, | ||
_projectdatasetlink.child as dataset_id | ||
from project as _project | ||
left join projectdatasetlink as _projectdatasetlink on _project.id = _projectdatasetlink.parent | ||
|
||
mappingId MAPID-project(1) | ||
target ome_instance:Project/{project_id} a ome_core:Project ; <{map_key}> {map_value} . | ||
source select | ||
_project.id as project_id, | ||
concat('http://',_annotation.ns,'#', _annotation_mapvalue.name) as map_key, | ||
_annotation_mapvalue.value as map_value | ||
from project as _project | ||
join projectannotationlink as _projectannotationlink on _projectannotationlink.parent = _project.id | ||
join annotation as _annotation on _projectannotationlink.child = _annotation.id | ||
join annotation_mapvalue as _annotation_mapvalue on _annotation.id = _annotation_mapvalue.annotation_id | ||
]] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@prefix : <https://www.openmicroscopy.org/omemap/> . | ||
@prefix dc: <http://purl.org/dc/elements/1.1/> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix xml: <http://www.w3.org/XML/1998/namespace> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
@prefix obda: <https://w3id.org/obda/vocabulary#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> . | ||
@prefix omemap: <https://www.openmicroscopy.org/omemap#> . | ||
@prefix ome_core: <http://www.openmicroscopy.org/rdf/2016-06/ome_core/> . | ||
@prefix ome_instance: <https://ome.evolbio.mpg.de/> . | ||
@base <https://www.openmicroscopy.org/omemap/> . | ||
|
||
<https://www.openmicroscopy.org/omemap> rdf:type owl:Ontology ; | ||
owl:imports ome_core: . | ||
|
||
################################################################# | ||
# Annotation properties | ||
################################################################# | ||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/annotation | ||
ome_core:annotation rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/mapAnnotationValue | ||
ome_core:mapAnnotationValue rdf:type owl:AnnotationProperty . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/nameSpace | ||
ome_core:nameSpace rdf:type owl:AnnotationProperty . | ||
|
||
|
||
################################################################# | ||
# Object Properties | ||
################################################################# | ||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/mapAnnotationValue | ||
ome_core:mapAnnotationValue rdfs:domain ome_core:Annotation , | ||
ome_core:LongAnnotation , | ||
ome_core:StructuredAnnotation . | ||
|
||
|
||
################################################################# | ||
# Data properties | ||
################################################################# | ||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/nameSpace | ||
ome_core:nameSpace rdfs:domain ome_core:Annotation , | ||
ome_core:MapAnnotation . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/tagAnnotationValue | ||
ome_core:tagAnnotationValue rdf:type owl:DatatypeProperty . | ||
|
||
|
||
################################################################# | ||
# Classes | ||
################################################################# | ||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/Dataset | ||
ome_core:Dataset owl:disjointWith ome_core:Image . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/Folder | ||
ome_core:Folder rdfs:subClassOf owl:Thing . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/Image | ||
ome_core:Image owl:disjointWith ome_core:Project . | ||
|
||
|
||
### http://www.openmicroscopy.org/rdf/2016-06/ome_core/StructuredAnnotation | ||
ome_core:StructuredAnnotation rdfs:subClassOf ome_core:Annotation . | ||
|
||
|
||
### Generated by the OWL API (version 4.5.29.2024-05-13T12:11:03Z) https://github.com/owlcs/owlapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /bin/bash | ||
|
||
# Spin up ontop | ||
ontop endpoint \ | ||
-t omemap.ttl \ | ||
-m omemap.obda \ | ||
-p omemap.properties \ | ||
-x catalog-v001.xml \ | ||
--dev | ||
|