-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adapts SPARQL queries to combine proxies in one entity
until now we delivered every proxy as a single entity. given that there is now a flow that creates provided entities where no exist, we can start to deliver combined entities.
- Loading branch information
Showing
4 changed files
with
30 additions
and
28 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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{%- if kind -%} | ||
{%- for k1 in kind -%} | ||
{?entity a {{k1.get_rdf_uri()}} | ||
{?entity_proxy a {{k1.get_rdf_uri()}} | ||
BIND("{{k1}}" AS ?entityTypeLabel)} | ||
{% if not loop.last %}UNION{% endif %} | ||
{%- endfor -%} | ||
{%- else -%} | ||
{?entity a idmcore:Person_Proxy | ||
{?entity_proxy a idmcore:Person_Proxy | ||
BIND("person" AS ?entityTypeLabel) | ||
} UNION { | ||
?entity a crm:E74_Group | ||
?entity_proxy a crm:E74_Group | ||
BIND("group" AS ?entityTypeLabel) | ||
} UNION { | ||
?entity a crm:E53_Place | ||
?entity_proxy a crm:E53_Place | ||
BIND("place" AS ?entityTypeLabel) | ||
} UNION { | ||
?entity a idm:CHO_Proxy | ||
?entity_proxy a idm:CHO_Proxy | ||
BIND("cultural-heritage-object" AS ?entityTypeLabel) | ||
} | ||
{%- endif -%} |
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
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
BIND("no label provided" AS ?defaultEntityLabel) | ||
OPTIONAL {?entity crm:P1_is_identified_by ?appellation . | ||
OPTIONAL {?entity_proxy crm:P1_is_identified_by ?appellation . | ||
{?appellation a crm:E33_E41_Linguistic_Appellation .} UNION {?appellation a crm:E35_Title} | ||
?appellation rdfs:label ?entityLabelPre .} | ||
OPTIONAL {?entity bioc:has_occupation ?occupation . ?occupation rdfs:label ?occupationLabel .} | ||
OPTIONAL {?entity owl:sameAs ?linkedIds} | ||
OPTIONAL {?entity bioc:has_gender ?gender | ||
OPTIONAL {?entity_proxy bioc:has_occupation ?occupation . ?occupation rdfs:label ?occupationLabel .} | ||
OPTIONAL {?entity_proxy owl:sameAs ?linkedIds} | ||
OPTIONAL {?entity_proxy bioc:has_gender ?gender | ||
OPTIONAL {?gender rdfs:label ?genderLabel }} | ||
OPTIONAL {?entity bioc:has_nationality ?nationality . ?nationality rdfs:label ?nationalityLabel .} | ||
OPTIONAL {?entity bioc:bearer_of ?role . | ||
OPTIONAL {?entity_proxy bioc:has_nationality ?nationality . ?nationality rdfs:label ?nationalityLabel .} | ||
OPTIONAL {?entity_proxy bioc:bearer_of ?role . | ||
?role ^bioc:had_participant_in_role|^bioc:occured_in_the_presence_of_in_role ?event . | ||
?role a ?role_type | ||
} | ||
OPTIONAL {?entity crm:P168_place_is_defined_by/crm:P168_place_is_defined_by ?geometry} | ||
OPTIONAL {?entity ^crm:P70_documents ?mediaObject } | ||
OPTIONAL {?entity idmcore:bio_link ?biographyObject } | ||
OPTIONAL {?entity_proxy crm:P168_place_is_defined_by/crm:P168_place_is_defined_by ?geometry} | ||
OPTIONAL {?entity_proxy ^crm:P70_documents ?mediaObject } | ||
OPTIONAL {?entity_proxy idmcore:bio_link ?biographyObject } | ||
BIND(COALESCE(?entityLabelPre, ?defaultEntityLabel) AS ?entityLabel) |
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