Get level of excerpts in document
This commit is contained in:
parent
c8496ffe2f
commit
5f6cff9824
2 changed files with 16 additions and 17 deletions
|
@ -42,11 +42,11 @@ display:getCompilationExcerptPathsDataGetter
|
|||
display:saveToVar "paths";
|
||||
display:query
|
||||
"""
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX ts_: <https://litvinovg.pro/text_structures#>
|
||||
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) ?tocElement ?elenphExcerpt
|
||||
WHERE {
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX ts_: <https://litvinovg.pro/text_structures#>
|
||||
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) (COUNT(?outline) AS ?level) ?tocElement ?elenphExcerpt
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc ts_:hasTOCItem/(ts_:pointsTo/ts_:hasTOCItem)* ?tmpTOCItem .
|
||||
?tmpTOCItem rdf:type ts_:TOCItem .
|
||||
|
@ -56,10 +56,10 @@ display:getCompilationExcerptPathsDataGetter
|
|||
?tocElement ts_:hasText ?elenphExcerpt .
|
||||
}
|
||||
{
|
||||
SELECT ?tocElement
|
||||
SELECT ?tocElement
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||
?tocElement rdf:type ts_:TOCLevel .
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,11 +42,11 @@ display:getArticleExcerptPathsDataGetter
|
|||
display:saveToVar "paths";
|
||||
display:query
|
||||
"""
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX ts_: <https://litvinovg.pro/text_structures#>
|
||||
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) ?tocElement ?elenphExcerpt
|
||||
WHERE {
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX ts_: <https://litvinovg.pro/text_structures#>
|
||||
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) (COUNT(?outline) AS ?level) ?tocElement ?elenphExcerpt
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc ts_:hasTOCItem/(ts_:pointsTo/ts_:hasTOCItem)* ?tmpTOCItem .
|
||||
?tmpTOCItem rdf:type ts_:TOCItem .
|
||||
|
@ -56,12 +56,11 @@ display:getArticleExcerptPathsDataGetter
|
|||
?tocElement ts_:hasText ?elenphExcerpt .
|
||||
}
|
||||
{
|
||||
SELECT ?elenphArticle ?tocElement
|
||||
SELECT ?elenphArticle ?tocElement
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||
?tocElement rdf:type ts_:TOCLevel .
|
||||
?individualURI rdf:type ts_:elenphArticle .
|
||||
}
|
||||
}
|
||||
} GROUP BY ?tocElement ?elenphExcerpt ORDER BY ?path
|
||||
|
|
Loading…
Add table
Reference in a new issue