Merge branch 'texts' of dev.litvinovg.pro:litvinovg/vivo into texts

This commit is contained in:
Svetlana Rastegina 2021-02-28 21:39:00 +01:00
commit a54c66fecf

View file

@ -1,46 +1,73 @@
@prefix : <http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#> . @prefix : <http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#> .
@prefix searchIndex: <java:edu.cornell.mannlib.vitro.webapp.searchindex#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:vivodocumentModifier_excerptsInArticles :vivodocumentModifier_excerptsInComplexPublications
a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> , a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> ,
<java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ; <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ;
rdfs:label "Elenph article excerpts" ; rdfs:label "Populate complex publications with excerpts" ;
:hasTargetField "ALLTEXT" ; :hasTargetField "ALLTEXT" ;
:hasSelectQuery """ :hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#> PREFIX ts: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?value SELECT DISTINCT ?value
WHERE { WHERE {
?uri rdf:type ts_:elenphArticle . ?uri ts:hasTOC ?toc .
?uri ts_:hasTOC ?toc . ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . VALUES ?property { ts:works ts:bibliography ts:htmlExcerpt ts:keywords }
VALUES ?property { ts_:works ts_:bibliography ts_:htmlExcerpt ts_:keywords } ?excerpt ?property ?value .
?elenphExcerpt ?property ?value .
} }
""" . """ .
:vivodocumentModifier_PopulateText :vivoUriFinder_excerptsInComplexPublications
a searchIndex:indexing.IndexingUriFinder ,
searchIndex:indexing.SelectQueryUriFinder ;
rdfs:label "When excerpts change" ;
:hasSelectQuery """
PREFIX ts: <https://litvinovg.pro/text_structures#>
SELECT ?uri
WHERE {
?uri ts:hasTOC ?toc .
?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?subject .
}
""" .
:vivoUriFinder_onRubricsAssign
a searchIndex:indexing.IndexingUriFinder ,
searchIndex:indexing.SelectQueryUriFinder ;
rdfs:label "When rubric was assigned" ;
:hasSelectQuery """
PREFIX ts: <https://litvinovg.pro/text_structures#>
SELECT ?uri
WHERE {
?subject a ts:textExcerpt .
VALUES ?uri { ?subject }
}
""" .
:vivodocumentModifier_PopulateTextWithHTMLContentsOfExcerpts
a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> , a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> ,
<java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ; <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.DocumentModifier> ;
rdfs:label "Html text to text field" ; rdfs:label "Html text to text field" ;
:hasTargetField "text" ; :hasTargetField "text" ;
:hasSelectQuery """ :hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#> PREFIX ts: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?htmlExcerpt SELECT DISTINCT ?htmlExcerpt
WHERE { WHERE {
{ {
?uri rdf:type ts_:textExcerpt . ?uri rdf:type ts:textExcerpt .
?uri ts_:htmlExcerpt ?htmlExcerpt . ?uri ts:htmlExcerpt ?htmlExcerpt .
} }
UNION UNION
{ {
?uri rdf:type ts_:publication . ?uri rdf:type ts:complexPublication .
?uri ts_:hasTOC ?toc . ?uri ts:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt . ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt .
?artExcerpt ts_:htmlExcerpt ?htmlExcerpt . ?excerpt ts:htmlExcerpt ?htmlExcerpt .
} }
} }
""" . """ .
@ -52,22 +79,22 @@
:hasTargetField "rubrics" ; :hasTargetField "rubrics" ;
:hasSelectQuery """ :hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#> PREFIX ts: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX pr: <https://iph.ras.ru/relationships#> PREFIX pr: <https://iph.ras.ru/relationships#>
SELECT DISTINCT ?rubric SELECT DISTINCT ?rubric
WHERE { WHERE {
{ {
?uri rdf:type ts_:elenphExcerpt . ?uri rdf:type ts:textExcerpt .
?uri pr:belongsTo ?assignedRubric . ?uri pr:belongsTo ?assignedRubric .
?assignedRubric (pr:hasParent)* ?rubric . ?assignedRubric (pr:hasParent)* ?rubric .
} }
UNION UNION
{ {
?uri rdf:type ts_:elenphArticle . ?uri rdf:type ts:complexPublication .
?uri ts_:hasTOC ?toc . ?uri ts:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt . ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt .
?artExcerpt pr:belongsTo ?assignedRubric . ?excerpt pr:belongsTo ?assignedRubric .
?assignedRubric (pr:hasParent)* ?rubric . ?assignedRubric (pr:hasParent)* ?rubric .
} }
} }
@ -95,20 +122,20 @@
:hasTargetField "keywords" ; :hasTargetField "keywords" ;
:hasSelectQuery """ :hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#> PREFIX ts: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?keywords SELECT DISTINCT ?keywords
WHERE { WHERE {
{ {
?uri rdf:type ts_:elenphArticle . ?uri rdf:type ts:elenphArticle .
?uri ts_:hasTOC ?toc . ?uri ts:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?elenphExcerpt .
?elenphExcerpt ts_:keywords ?keywords . ?elenphExcerpt ts:keywords ?keywords .
} }
UNION UNION
{ {
?uri rdf:type ts_:elenphExcerpt . ?uri rdf:type ts:elenphExcerpt .
?uri ts_:keywords ?keywords . ?uri ts:keywords ?keywords .
} }
} }
""" . """ .
@ -120,20 +147,20 @@
:hasTargetField "bibliography" ; :hasTargetField "bibliography" ;
:hasSelectQuery """ :hasSelectQuery """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ts_: <https://litvinovg.pro/text_structures#> PREFIX ts: <https://litvinovg.pro/text_structures#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?bibliography SELECT DISTINCT ?bibliography
WHERE { WHERE {
{ {
?uri rdf:type ts_:elenphArticle . ?uri rdf:type ts:elenphArticle .
?uri ts_:hasTOC ?toc . ?uri ts:hasTOC ?toc .
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?elenphExcerpt .
?elenphExcerpt ts_:bibliography ?bibliography . ?elenphExcerpt ts:bibliography ?bibliography .
} }
UNION UNION
{ {
?uri rdf:type ts_:elenphExcerpt . ?uri rdf:type ts:elenphExcerpt .
?uri ts_:bibliography ?bibliography . ?uri ts:bibliography ?bibliography .
} }
} }
""" . """ .