Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plaatsnaam - Kwalificering meegeven #66

Open
verwinv opened this issue Oct 3, 2024 · 2 comments
Open

Plaatsnaam - Kwalificering meegeven #66

verwinv opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels

Comments

@verwinv
Copy link

verwinv commented Oct 3, 2024

The currently implemented properties can be found here.

Describe the bug and/or desired behavior

  1. Brussel is opgesplitst in (Stad) en (Gewest) -- dit staat fout in AdLib
  2. Utrecht aartsbisdom / stad / provincie
  3. Nederland is dorp & land

Voorstel is om een subquery te maken waarbij bij dubbel voorkomende waarden, we de kwalificering meegeven in de nodenaam.

Relevant examples

Rijksstudio links:

Collectie Online links:


Screenshots

@verwinv
Copy link
Author

verwinv commented Oct 3, 2024

Available in Access model: https://github.com/Rijksmuseum/pattern_book/issues/567

@jorisbr
Copy link
Collaborator

jorisbr commented Oct 8, 2024

Naar mij idee is er een extra aggregatie nodig om dit te bepalen. Deze query kan als subquery gelden voor het verzamelen van namen die dubbel voorkomt. Indien dit het geval is kan de desbetreffende naam in de normale query in de bind clause toegepast worden

PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX la: <https://linked.art/ns/terms/>

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

#    SELECT DISTINCT ?depictsPlaceUri ?language ?nameWithType
select *
    WHERE {
      ?depictsPlaceUri rdf:type crm:E53_Place.
      ?depictsPlaceUri crm:P1_is_identified_by ?appellation.
      ?appellation rdf:type crm:E33_E41_Linguistic_Appellation.
      ?appellation crm:P72_has_language ?language.
      ?appellation crm:P190_has_symbolic_content ?name.
      
      OPTIONAL {
        ?depictsPlaceUri crm:P2_has_type ?placeType.
        ?placeType crm:P1_is_identified_by ?placeTypeIdentifier.
        ?placeTypeIdentifier crm:P72_has_language ?language.
        ?placeTypeIdentifier crm:P190_has_symbolic_content ?placeTypeContent.
      }
      
      {
        SELECT ?name ?language (COUNT(*) as ?count)
        WHERE {
          ?depictsPlaceUri rdf:type crm:E53_Place.
          ?depictsPlaceUri crm:P1_is_identified_by ?appellation.
          ?appellation rdf:type crm:E33_E41_Linguistic_Appellation.
          ?appellation crm:P72_has_language ?language.
          ?appellation crm:P190_has_symbolic_content ?name.
          FILTER(?language IN (<http://vocab.getty.edu/aat/300388256>, <http://vocab.getty.edu/aat/300388277>))
        }
        GROUP BY ?name ?language
        HAVING (COUNT(*) > 1)
      }
      
      BIND(IF(BOUND(?placeTypeContent), 
              CONCAT(?name, " (", ?placeTypeContent, ")"), 
              ?name) AS ?nameWithType)
    } limit 100
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants