select ?x ?Name ?Bio ?Birthplace ?labGVP ?Deathplace ?Gender ?Start ?End ?Nationality ?Term ?Parents ?ScopeNote {
?x a skos:Concept; dc:identifier "500015257";
gvp:prefLabelGVP [xl:literalForm ?Term].
?x gvp:prefLabelGVP/xl:literalForm ?Name;
foaf:focus/gvp:biographyPreferred ?biography.
?biography gvp:estStart ?Start;
gvp:estEnd ?End;
schema:gender [gvp:prefLabelGVP [xl:literalForm ?Gender]]
optional {?biography schema:birthPlace ?Birthplace}
optional {?biography schema:deathPlace ?Deathplace}
optional {?x foaf:focus [gvp:nationalityPreferred [gvp:prefLabelGVP [xl:literalForm ?Nationality]]];}
optional {?x foaf:focus/gvp:biographyPreferred/schema:description ?Bio}
optional {?x gvp:parentStringAbbrev ?Parents}
optional {?x skos:scopeNote [dct:language gvp_lang:en; rdf:value ?ScopeNote]}
}
select * {
bind(ulan:500015257 as ?x)
?x ?rel ?related.
?rel sesame:directSubPropertyOf skos:related; dc:title ?relName.
?related gvp:prefLabelGVP/xl:literalForm ?relatedName.
?related foaf:focus/gvp:biographyPreferred/schema:description ?relatedBio.
optional {[
rdf:subject ?x;
rdf:predicate ?rel;
rdf:object ?related;
rdfs:comment ?comment]}}
select ?x ?xName ?rel ?relName ?y ?yName {
?x ?rel ?y.
?x a gvp:PersonConcept.
?y a gvp:GroupConcept.
?rel sesame:directSubPropertyOf skos:related; dc:title ?relName.
?x gvp:prefLabelGVP [xl:literalForm ?xName].
?y gvp:prefLabelGVP [xl:literalForm ?yName].
} limit 10
select * {
bind (ulan:500015257 as ?x).
?x foaf:focus [bio:event ?event].
?event dct:type [gvp:prefLabelGVP [xl:literalForm ?type]].
bind(exists {?x foaf:focus [gvp:eventPreferred ?event]} as ?pref)
optional {?event rdfs:comment ?comment}
optional {?event gvp:displayOrder ?order}
optional {?event gvp:estStart ?start}
optional {?event gvp:estEnd ?end}
optional {?event schema:location [gvp:prefLabelGVP [xl:literalForm ?place]]}
} order by ?order desc(?pref)
optional {?event schema:location [gvp:prefLabelGVP [xl:literalForm ?place]]}
...
1. schema:location http://vocab.getty.edu/tgn/7014406-place
optional {?event schema:location [gvp:prefLabelGVP [xl:literalForm ?place]]}
returns "-" instead of "Philadelphia"
Sorry, the label is attached to http://vocab.getty.edu/tgn/7014406 not http://vocab.getty.edu/tgn/7014406-place.
To get to it, try to use foaf:focus in is inverse direction:
optional {?event schema:location [^foaf:focus/gvp:prefLabelGVP [xl:literalForm ?place]]}
2. What would be the best way to filter the relations query provided in your response (2) to a ULAN (ulan:500015257) so the query is more efficient.
Given that ?x is bound, I don’t think the query can be optimized much. Is it slow?