designforcontext / aac_review_tool

MIT License
5 stars 7 forks source link

Problem with mapping of Event Name #26

Open raviraju opened 7 years ago

raviraju commented 7 years ago

?event_type to be used in place of http://vocab.getty.edu/aat/300404670

I expected to see:

SELECT ?event_name ?event_class ?type_label WHERE { http://data.thewalters.org/exhibition/id/2851 a crm:E5_Event ; crm:P1_is_identified_by ?event_class . ?event_class a crm:E41_Appellation ; rdf:value ?event_name ; crm:P2_has_type ?event_type. ?event_type a crm:E55_Type . OPTIONAL { OPTIONAL {?event_type skos:broadMatch http://vocab.getty.edu/aat/300404670 .} OPTIONAL {?event_type skos:prefLabel ?type_label. } } }

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 ?event_name ?event_class ?type_label
WHERE {
<http://data.thewalters.org/exhibition/id/2851> a crm:E5_Event ;
  crm:P1_is_identified_by ?event_class .
?event_class a crm:E41_Appellation ;
  rdf:value ?event_name ;
  crm:P2_has_type <http://vocab.getty.edu/aat/300404670> .
<http://vocab.getty.edu/aat/300404670> a crm:E55_Type .

OPTIONAL {
  OPTIONAL {<http://vocab.getty.edu/aat/300404670> skos:broadMatch <http://vocab.getty.edu/aat/300404670> .}
  OPTIONAL {<http://vocab.getty.edu/aat/300404670> skos:prefLabel ?type_label. }
}

}
azaroth42 commented 7 years ago

I don't think there's sufficient vocabulary to properly map exhibitions at the moment. I think we can just leave these out for now and focus on getting the rest finished?

raviraju commented 7 years ago

@azaroth42 Rob, I believe its just a malformed sparql query, just minor update to the query yields desired results

workergnome commented 7 years ago

Yeah—I agree with both of you. Because we're not doing events yet, I didn't update this to match the way we're doing things in the rest of the model. I can fix the SPARQL and change the format to match, but I wouldn't worry too much about it.