0

我有一个 RDF 数据库,我想获取整个标签文本我的意思是标签内的整个文本 - <rdf:Description rdf:about="tag:stardog:api:0.44585392708185767">

<rdf:Description rdf:about="tag:stardog:api:0.44585392708185767">
    <rdf:type rdf:resource="http://www.wdaqua.eu/qa#AnnotationOfAnswerSPARQL"/>
    <hasTarget xmlns="http://www.w3.org/ns/openannotation/core/" rdf:resource="http://localhost:8080/question/stored-question__text_573b4a57-cc42-4001-9961-fdde2005f841"/>
    <hasBody xmlns="http://www.w3.org/ns/openannotation/core/" rdf:datatype="http://www.w3.org/2001/XMLSchema#string">PREFIX dbr: &lt;http://dbpedia.org/resource/&gt; PREFIX dct: &lt;http://purl.org/dc/terms/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;SELECT * WHERE {?resource foaf:name ?answer . ?resource rdfs:label ?label . FILTER(LANG(?label) = "en") . resource dct:subject dbr:Category:Superhero_film_characters . FILTER(! strStarts(LCASE(?label), LCASE(?answer))). VALUES ?resource { &lt;http://dbpedia.org/resource/Captain_America&gt; } . } ORDER BY ?resource</hasBody> <annotatedAt xmlns="http://www.w3.org/ns/openannotation/core/" rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-06-17T22:35:52.067+05:30</annotatedAt>
    <annotatedBy xmlns="http://www.w3.org/ns/openannotation/core/" rdf:resource="urn:qanary:QueryBuilderSimpleRealNameOfSuperHero"/>
    <score xmlns="http://www.wdaqua.eu/qa#" rdf:datatype="http://www.w3.org/2001/XMLSchema#float">1.0</score>
</rdf:Description>

如何编写 sparql 查询来获取标签的信息?

4

0 回答 0