Added template to display compilation
This commit is contained in:
parent
df2dd1205b
commit
5442327c71
2 changed files with 145 additions and 0 deletions
|
@ -0,0 +1,144 @@
|
|||
@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://litvinovg.pro/text_structures#> .
|
||||
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationExcerptsContentDataGetter .
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationExcerptPathsDataGetter .
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationWorksDataGetter .
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationBibliographyDataGetter .
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationAuthorsDataGetter .
|
||||
|
||||
<https://litvinovg.pro/text_structures#compilation> display:hasDataGetter display:getCompilationRubricsDataGetter .
|
||||
|
||||
display:getCompilationExcerptsContentDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "excerpts";
|
||||
display:query
|
||||
"""
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX ts_: <https://litvinovg.pro/text_structures#>
|
||||
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 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:getCompilationExcerptPathsDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
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 {
|
||||
?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 .
|
||||
OPTIONAL {
|
||||
?tocElement ts_:hasText ?elenphExcerpt .
|
||||
}
|
||||
{
|
||||
SELECT ?tocElement
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+ ?tocElement .
|
||||
?tocElement rdf:type ts_:TOCLevel .
|
||||
}
|
||||
}
|
||||
} GROUP BY ?tocElement ?elenphExcerpt ORDER BY ?path
|
||||
""" .
|
||||
|
||||
display:getCompilationBibliographyDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "bibliography";
|
||||
display:query
|
||||
"""
|
||||
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 ?elenphExcerpt
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||
?elenphExcerpt ts_:bibliography ?bibliography .
|
||||
} ORDER BY ?bibliography
|
||||
""" .
|
||||
|
||||
display:getCompilationWorksDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "works";
|
||||
display:query
|
||||
"""
|
||||
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 ?elenphExcerpt
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||
?elenphExcerpt ts_:works ?works .
|
||||
} ORDER BY ?works
|
||||
""" .
|
||||
|
||||
display:getCompilationAuthorsDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "authors";
|
||||
display:query
|
||||
"""
|
||||
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 ?authorInitials ?authorFamily ?authorGivenName ?orgName ?orgPostalCode ?orgAddress
|
||||
WHERE {
|
||||
?individualURI ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt .
|
||||
?elenphExcerpt ts_:hasAuthor ?participant .
|
||||
?participant ts_:participantFamily ?authorFamily .
|
||||
?participant ts_:participantInitials ?authorInitials .
|
||||
?participant ts_:participantGivenName ?authorGivenName .
|
||||
OPTIONAL { ?participant ts_:affiliatedWith ?organization .
|
||||
OPTIONAL { ?organization ts_:officialOrganizationName ?orgName } .
|
||||
OPTIONAL { ?organization ts_:organizationPostalCode ?orgPostalCode } .
|
||||
OPTIONAL { ?organization ts_:organizationAddress ?orgAddress } .
|
||||
}
|
||||
|
||||
} ORDER BY ?authorFamily
|
||||
""" .
|
||||
|
||||
display:getCompilationRubricsDataGetter
|
||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||
display:saveToVar "rubrics";
|
||||
display:query
|
||||
"""
|
||||
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#>
|
||||
PREFIX pr: <https://iph.ras.ru/relationships#>
|
||||
SELECT DISTINCT ?rubricID ?rubricName
|
||||
WHERE {
|
||||
?uri ts_:hasTOC ?toc .
|
||||
?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt .
|
||||
?artExcerpt pr:belongsTo ?rubricID .
|
||||
?rubricID rdfs:label ?rubricName .
|
||||
} ORDER BY ?rubricID
|
||||
""" .
|
||||
|
||||
|
|
@ -128,6 +128,7 @@
|
|||
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
|
||||
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
|
||||
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
|
||||
<vitro:customDisplayViewAnnot>elenphAritcle.ftl</vitro:customDisplayViewAnnot>
|
||||
<rdfs:label xml:lang="en-US">Compilation</rdfs:label>
|
||||
<vitro:customEntryFormAnnot>edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.CompilationGenerator</vitro:customEntryFormAnnot>
|
||||
</owl:Class>
|
||||
|
|
Loading…
Add table
Reference in a new issue