Modifications for fixed ontology

This commit is contained in:
Georgy Litvinov 2020-08-13 18:21:03 +02:00
parent 4bd5b3df21
commit 48636ef3ce
9 changed files with 58 additions and 49 deletions

View file

@ -8,12 +8,13 @@
:hasTargetField "ALLTEXT" ;
:hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?elenphExcerpt ?property ?value
WHERE {
?uri rdf:type ts_:elenphArticle .
?uri (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?uri ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ?property ?value .
}
""" .
@ -25,7 +26,7 @@
:hasTargetField "semantic_marks" ;
:hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?rubric
@ -58,13 +59,14 @@
:hasTargetField "keywords" ;
:hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?keywords
WHERE {
{
?uri rdf:type ts_:elenphArticle .
?uri (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?uri ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ts_:keywords ?keywords .
}
UNION
@ -82,13 +84,14 @@
:hasTargetField "bibliography" ;
:hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?bibliography
WHERE {
{
?uri rdf:type ts_:elenphArticle .
?uri (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?uri ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ts_:bibliography ?bibliography .
}
UNION

View file

@ -3,19 +3,19 @@
@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 ts_: <https://litvinovg.pro/text_structures#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptsContentDataGetter .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptsContentDataGetter .
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptPathsDataGetter .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDataGetter display:getArticleExcerptPathsDataGetter .
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleWorksDataGetter .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDataGetter display:getArticleWorksDataGetter .
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleBibliographyDataGetter .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDataGetter display:getArticleBibliographyDataGetter .
<https://iph.ras.ru/text_structures#elenphArticle> display:hasDataGetter display:getArticleAuthorsDataGetter .
<https://litvinovg.pro/text_structures#elenphArticle> display:hasDataGetter display:getArticleAuthorsDataGetter .
display:getArticleExcerptsContentDataGetter
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
@ -23,10 +23,11 @@ display:getArticleExcerptsContentDataGetter
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
SELECT ?elenphExcerpt ?property ?value
WHERE {
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ?property ?value .
} ORDER BY ?elenphExcerpt
""" .
@ -38,10 +39,11 @@ display:getArticleExcerptPathsDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) ?tocElement ?elenphExcerpt
WHERE {
?individualURI ts_:hasTOCItem/(ts_:pointsTo/ts_:hasTOCItem)* ?tmpTOCItem .
?individualURI ts_:hasTOC ?toc .
?toc ts_:hasTOCItem/(ts_:pointsTo/ts_:hasTOCItem)* ?tmpTOCItem .
?tmpTOCItem rdf:type ts_:TOCItem .
?tmpTOCItem ts_:pointsTo/(ts_:hasTOCItem/ts_:pointsTo)* ?tocElement .
?tmpTOCItem ts_:itemNumber ?outline .
@ -51,8 +53,9 @@ display:getArticleExcerptPathsDataGetter
{
SELECT ?elenphArticle ?tocElement
WHERE {
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
?tocElement rdf:type ts_:TOCElement .
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
?tocElement rdf:type ts_:TOCLevel .
?individualURI rdf:type ts_:elenphArticle .
}
}
@ -65,11 +68,12 @@ display:getArticleBibliographyDataGetter
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?bibliography
WHERE {
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ts_:bibliography ?bibliography .
} ORDER BY ?bibliography
""" .
@ -80,11 +84,12 @@ display:getArticleWorksDataGetter
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?works
WHERE {
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ts_:works ?works .
} ORDER BY ?works
""" .
@ -95,11 +100,12 @@ display:getArticleAuthorsDataGetter
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?author
WHERE {
?individualURI (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?individualURI ts_:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
?elenphExcerpt ts_:author ?author .
} ORDER BY ?author
""" .

View file

@ -3,11 +3,11 @@
@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 ts_: <https://litvinovg.pro/text_structures#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
<https://iph.ras.ru/text_structures#elenphExcerpt> display:hasDataGetter display:getExcerptAssignedArticlesDataGetter .
<https://litvinovg.pro/text_structures#elenphExcerpt> display:hasDataGetter display:getExcerptAssignedArticlesDataGetter .
display:getExcerptAssignedArticlesDataGetter
@ -16,7 +16,7 @@ display:getExcerptAssignedArticlesDataGetter
display:query
"""
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?articleName ?articleUri
WHERE {

View file

@ -3,7 +3,7 @@
@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 ts_: <https://litvinovg.pro/text_structures#> .
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
@ -24,7 +24,7 @@ display:getArticlesWithChildRubricDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?childArticleID ?childArticleName
WHERE {
@ -45,7 +45,7 @@ display:getArticlesWithRubricDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?articleID ?articleName
WHERE {
@ -64,7 +64,7 @@ display:getChildRubricsDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?rubricID ?rubricName
WHERE {
@ -82,7 +82,7 @@ display:getExcerptsWithRubricsChildsDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?childExcerptID ?childExcerptName
WHERE {
@ -100,7 +100,7 @@ display:getExcerptsWithRubricDataGetter
"""
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://iph.ras.ru/text_structures#>
PREFIX ts_: <https://litvinovg.pro/text_structures#>
PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?excerptID ?excerptName
WHERE {

View file

@ -1,5 +1,5 @@
@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 ts_: <https://litvinovg.pro/text_structures#> .
ts_:elenphArticle vitro:customDisplayViewAnnot "elenphAritcle.ftl"^^xsd:string .

View file

@ -1,5 +1,5 @@
@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 ts_: <https://litvinovg.pro/text_structures#> .
ts_:elenphExcerpt vitro:customDisplayViewAnnot "elenphExcerpt.ftl"^^xsd:string .

View file

@ -29,7 +29,7 @@ ${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-pop
</h1>
<#--
<#assign issue = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#issue")!>
<#assign issue = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#issue")!>
<#if issue.statements?has_content && issue.type == "data">
<div class="issue" style="list-style:none;">
<div class="label">Выпуск</div>
@ -37,7 +37,7 @@ ${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-pop
</div>
</#if>
<#assign year = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#year")!>
<#assign year = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#year")!>
<#if year.statements?has_content && year.type == "data">
<div class="year" style="list-style:none;">
<div class="label">Год</div>
@ -52,7 +52,7 @@ ${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-pop
<#list excerpts as excerptProperties>
<#if order.elenphExcerpt?has_content && excerptProperties.elenphExcerpt == order.elenphExcerpt>
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#htmlExcerpt">
<#if excerptProperties.property == "https://litvinovg.pro/text_structures#htmlExcerpt">
<#assign excerptText = excerptProperties.value >
</#if>
<#if excerptProperties.property == "http://www.w3.org/2000/01/rdf-schema#label">

View file

@ -104,7 +104,7 @@
</div>
</#if>
<#assign author = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#author")!>
<#assign author = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#author")!>
<#if author?has_content >
<div class="label">Авторы: <@p.addLink author editable /> <@p.verboseDisplay author /> </div>
<#if author.statements?has_content && author.type == "data">
@ -112,7 +112,7 @@
<@p.dataPropertyList author editable />
</#if>
</#if>
<#assign affiliation = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#affiliation")!>
<#assign affiliation = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#affiliation")!>
<#if affiliation.statements?has_content && affiliation.type == "data">
<div class="affiliation" style="list-style:none;">
<div class="label">Аффилиация</div>
@ -129,7 +129,7 @@
</div>
</#if>
</#if>
<#assign keywords = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#keywords")!>
<#assign keywords = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#keywords")!>
<#if keywords?has_content >
<div class="label">Ключевые слова: <@p.addLink keywords editable /> <@p.verboseDisplay keywords /> </div>
<#if keywords.statements?has_content && keywords.type == "data">
@ -138,7 +138,7 @@
</div>
</#if>
</#if>
<#assign htmlExcerpt = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#htmlExcerpt")!>
<#assign htmlExcerpt = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#htmlExcerpt")!>
<#if htmlExcerpt?has_content >
<#if htmlExcerpt.statements?has_content && htmlExcerpt.type == "data">
<div class="htmlExcerpt" style="list-style:none;">
@ -150,7 +150,7 @@
</#if>
</#if>
<#assign works = propertyGroups.pullProperty("https://iph.ras.ru/text_structures#works")!>
<#assign works = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#works")!>
<#if works.statements?has_content && works.type == "data">
<br/>
<div class="works" style="list-style:none;">
@ -159,7 +159,7 @@
</div>
</#if>
<#assign biblio= propertyGroups.pullProperty("https://iph.ras.ru/text_structures#bibliography")!>
<#assign biblio= propertyGroups.pullProperty("https://litvinovg.pro/text_structures#bibliography")!>
<#if biblio.statements?has_content && biblio.type == "data">
<br/>
<div class="biblio" style="list-style:none;">

View file

@ -6,13 +6,13 @@
<#-- <@dumpAll /> -->
<div class="virtualArticlePart" style="display:none;">
<#list excerptInfo as excerptProperties>
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#htmlExcerpt">
<#if excerptProperties.property == "https://litvinovg.pro/text_structures#htmlExcerpt">
<#assign excerptText = excerptProperties.value >
</#if>
<#if excerptProperties.property == "http://www.w3.org/2000/01/rdf-schema#label">
<#assign excerptTextName = excerptProperties.value >
</#if>
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#author">
<#if excerptProperties.property == "https://litvinovg.pro/text_structures#author">
<#assign excerptAuthor = excerptProperties.value >
</#if>
</#list>
@ -26,12 +26,12 @@
</div>
</#if>
<#list excerptInfo as excerptProperties>
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#works">
<#if excerptProperties.property == "https://litvinovg.pro/text_structures#works">
<div class="virtualArticleWork" style="display:none;">${excerptProperties.value}</div>
</#if>
</#list>
<#list excerptInfo as excerptProperties>
<#if excerptProperties.property == "https://iph.ras.ru/text_structures#bibliography">
<#if excerptProperties.property == "https://litvinovg.pro/text_structures#bibliography">
<div class="virtualArticleBibliography" style="display:none;">${excerptProperties.value}</div>
</#if>
</#list>