designforcontext / aac_review_tool

MIT License
5 stars 7 forks source link

Some of museum like say WAM may not have timespan for Actor, though just birth location exists #24

Closed raviraju closed 7 years ago

raviraju commented 7 years ago

I expected to see:

Optional { crm:P4_has_time-span ?birth_timespan. ?birth_timespan a crm:E52_Time-Span; crm:P82a_begin_of_the_begin ?earliest_birthdate; crm:P82b_end_of_the_end ?latest_birthdate; }

but instead I saw:

Its not optional

The current query was:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX schema: <http://schema.org/>

SELECT ?display_birthdate ?earliest_birthdate ?latest_birthdate ?birth_location_class ?birth_location
WHERE {
<http://collection.britishmuseum.org/id/person-institution/70240> a crm:E39_Actor ;
    crm:P92i_was_brought_into_existence_by ?birth_event.
?birth_event a crm:E63_Beginning_of_Existence;
    crm:P4_has_time-span ?birth_timespan.
?birth_timespan a crm:E52_Time-Span;
      crm:P82a_begin_of_the_begin ?earliest_birthdate;
      crm:P82b_end_of_the_end ?latest_birthdate;
OPTIONAL { ?birth_timespan rdfs:label ?display_birthdate.}
OPTIONAL {
  ?birth_event crm:P7_took_place_at ?birth_location_class .
  OPTIONAL {
    ?birth_location_class a crm:E53_Place;
              rdfs:label ?birth_location.
  }
}

}
mit2nil commented 7 years ago

Hi David,

I also have similar issue. For IMA actor data, we have only one of the value from P82a and P82b. In te query on review site, we are checking for both the properties which is resulting in null values for actual birth/death date which is available as rdfs:label under E52 timespan object.

Nilay

workergnome commented 7 years ago

Got it. I think I fixed this—let me know if it works?

azaroth42 commented 7 years ago

(And to clarify ... the reason for E63 Beginning of Existence not E67 Birth, is that we don't know that the actor is a person ... it could be an organization or even a software agent, that are not "born")

mit2nil commented 7 years ago

Hi David,

There is still one issue. In updated query also you have put p82a and p82b in the same scope. As mentioned, ima actor data just has p82a and not p82b but it does have birth, death place and rdfs: label for birth/death date.

I think we need both of them in separate optional block.

azaroth42 commented 7 years ago

A TimeSpan has to have both. If there's only one date, then use it for both 82a and 82b.

mit2nil commented 7 years ago

OK then I will update the model