Added articles info to excerpt

This commit is contained in:
Georgy Litvinov 2020-08-05 16:26:26 +02:00
parent b7b9f23509
commit d7e36b6f6b
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,28 @@
@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 vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ts_: <https://iph.ras.ru/text_structures#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
<https://iph.ras.ru/text_structures#elenphExcerpt> display:hasDataGetter display:getExcerptAssignedArticlesDataGetter .
display:getExcerptAssignedArticlesDataGetter
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
display:saveToVar "articles";
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?articleName ?articleUri
WHERE {
?articleUri rdf:type ts_:elenphArticle .
?articleUri (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText <https://iph.ras.ru/text_structures#elenphExcerpt/w2phtml_vdovina_riker0_0_1> .
?articleUri rdfs:label ?articleName .
} ORDER BY ?articleName
""" .