gtadigital / transurbicide-app

0 stars 0 forks source link

Archival Collections | Display of Actor and Actor Role in Details View #34

Closed thomashaensli closed 3 years ago

thomashaensli commented 3 years ago

In the Details View of Archival Collections, the actor and the Actors Role should be displayed on th esame line

e.g. https://transurbicide.gta.arch.ethz.ch/resource/?uri=https%3A%2F%2Fresource.swissartresearch.net%2Farchivalobject%2F656188

Otherwise we cannot distinguish different actors with different roles

For comparison: https://collections.gta.arch.ethz.ch/detail/653654 has 3 actors, each with a dedicated role (2 different roles over all)

This is displayed as https://transurbicide.gta.arch.ethz.ch/resource/?uri=https%3A%2F%2Fresource.swissartresearch.net%2Farchivalobject%2F653654

matteoLorenzini commented 3 years ago

Updated the Sparql query for actor creator

PREFIX  org:  <http://example.com/org/>
PREFIX  rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX  wdt:  <http://www.wikidata.org/prop/direct/>
PREFIX  skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX  wd:   <http://www.wikidata.org/entity/>
PREFIX  crm:  <http://www.cidoc-crm.org/cidoc-crm/>

SELECT DISTINCT  ?value
WHERE
  { ?subject  rdf:type              crm:E78_Collection ;
              crm:P108i_was_produced_by  ?production .
    ?production  rdf:type           crm:E12_Production ;
              crm:P14_carried_out_by  ?actor_role ;
              crm:P14_carried_out_by  ?actor .
    ?actor    rdf:type              crm:E39_Actor ;
              crm:P1_is_identified_by  ?name_identifier .
    ?name_identifier
              rdf:type              crm:E41_Appellation ;
              crm:P2_has_type       <https://resource.swissartresearch.net/types/Preferred%20Name> ;
              rdfs:label            ?actor_creator_label .
    ?actor_role  rdf:type           crm:E39_Actor ;
              rdfs:label            ?role_label
    FILTER EXISTS { ?actor  crm:P2_has_type  <https://resource.swissartresearch.net/actor%20creator/actor%20creator> }
    FILTER EXISTS { ?actor_role  crm:P2_has_type  <https://resource.swissartresearch.net/actor%20role/actor%20role> }
    BIND(concat(str(?actor_creator_label )," in the role of ",str(?role_label)) as ?value)
  }