Continued on from another question here...
I have a(n excerpt from a) construct query below that is successfully pulling records as desired.
CONSTRUCT {
?publication fb:type ?type;
fb:publicationLabel ?publicationLabel;
fb:publicationType ?publicationTypeLabel;
fb:publicationLink ?publicationLink;
}
WHERE {
?publication a bibo:Document .
?publication rdfs:Label ?publicationLabel .
?publication vitro:mostSpecificType ?publicationType .
?publicationType rdfs:Label ?publicationTypeLabel .
?publication obo:ARG_2000028 ?vcard .
?vcard vcard:hasURL ?urllink .
?urllink vcard:url ?publicationLink
}
The above query (trimmed down a bit) currently works fine. I’m now trying to add the following variable: fb:linkInternalExists
To this variable, I want to bind the output of a conditional subquery that looks for a value (we’ll say “internal.url” for this example) within all the possible ?publicationLink
values for a specific ?publication
.
So the RDF output with the desired addition could return something like the following:
<rdf:Description rdf:about="https://abcd.fgh/individual/publication12345">
<fb:publicationLabel>example record 1</fb:publicationLabel>
<fb:publicationType>journal</fb:publicationType>
<fb:publicationLink>http://external.url/bcde</fb:publicationType>
<fb:publicationLink>http://external.url/abcd</fb:publicationType>
<fb:linkInternalExists>No</fb:linkInternalExists>
</rdf:Description>
<rdf:Description rdf:about="https://abcd.fgh/individual/publication23456">
<fb:publicationLabel>example record 2</fb:publicationLabel>
<fb:publicationType>conference paper</fb:publicationType>
<fb:publicationLink>http://external.url/2345</fb:publicationType>
<fb:publicationLink>http://external.url/1234</fb:publicationType>
<fb:publicationLink>http://internal.url/1234</fb:publicationType>
<fb:linkInternalExists>Yes</fb:linkInternalExists>
</rdf:Description>
My attempts at adding the required subquery to the above, and successfully bind its output to fb:linkInternalExists
, have been unsuccessful. So my question is what would the modified query look like.
Regards
– Toolagio Jun 06 '18 at 14:54