Output biblio and works for each excerpt

This commit is contained in:
Georgy Litvinov 2020-11-03 15:06:35 +01:00
parent 41dfe40b4f
commit 07626aec70
2 changed files with 57 additions and 46 deletions

View file

@ -26,12 +26,15 @@ display:getArticleExcerptsContentDataGetter
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
SELECT ?elenphExcerpt ?property ?value
SELECT ?elenphExcerpt ?htmlLabel ?htmlContent (COUNT (distinct ?excerptWorks) as ?worksCounter) (COUNT (distinct ?excerptBibliography) as ?bibliographyCounter)
WHERE {
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ?property ?value .
} ORDER BY ?elenphExcerpt
?elenphExcerpt ts_:htmlExcerpt ?htmlContent .
?elenphExcerpt rdfs:label ?htmlLabel .
OPTIONAL{ ?elenphExcerpt ts_:works ?excerptWorks . }
OPTIONAL{ ?elenphExcerpt ts_:bibliography ?excerptBibliography . }
} GROUP BY ?elenphExcerpt ?htmlLabel ?htmlContent ORDER BY ?elenphExcerpt
""" .
display:getArticleExcerptPathsDataGetter
@ -72,7 +75,7 @@ display:getArticleBibliographyDataGetter
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?bibliography
SELECT DISTINCT ?bibliography ?elenphExcerpt
WHERE {
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
@ -88,7 +91,7 @@ display:getArticleWorksDataGetter
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?works
SELECT DISTINCT ?works ?elenphExcerpt
WHERE {
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .