Skip to content

Instantly share code, notes, and snippets.

@rnsrk
Created January 18, 2022 07:11
Show Gist options
  • Save rnsrk/28ea62fe56d4421e0c94e368441cf8ca to your computer and use it in GitHub Desktop.
Save rnsrk/28ea62fe56d4421e0c94e368441cf8ca to your computer and use it in GitHub Desktop.
Part of case collection for federated queries.
PREFIX ontology_1: <http://ontology_1/>
PREFIX ontology_2: <http://ontology_2/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
select distinct ?aNote ?bNote ?cNote where {
{
service <https://graphdb.nasarek.org/repositories/Adapter_1>
{
?A rdf:type ontology_1:E21_Person .
OPTIONAL {
?A ontology_1:P1_is_identified_by ?a .
?a ontology_1:P3_has_note ?aNote .
}
OPTIONAL {
?A ontology_1:P2_has_type ?b .
?b ontology_1:P3_has_note ?bNote .
}
}
} UNION {
service <https://graphdb.nasarek.org/repositories/Adapter_3>
{
?B rdf:type ontology_1:E20_Biological_Object .
OPTIONAL {
?B ontology_1:P1_is_identified_by ?a .
?a ontology_1:P3_has_note ?aNote .
}
OPTIONAL {
?B ontology_1:P56_bears_feature ?c .
?c ontology_1:P3_has_note ?cNote .
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment