From da8fa22987b65bab6ddfac205346d8c10d3576ea Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 25 Nov 2020 18:09:03 +0100 Subject: [PATCH] Modifications for correct affiliation display --- .../everytime/elenphArticleDataGetters.n3 | 21 +- .../everytime/elenphExcerptDataGetters.n3 | 23 ++ .../rdf/tbox/filegraph/text_structures.owl | 296 +++++++++++------- .../templates/freemarker/elenphAritcle.ftl | 29 +- .../freemarker/elenphExcerpt-internal.ftl | 42 ++- webapp/src/main/webapp/themes/iph/css/iph.css | 4 + 6 files changed, 269 insertions(+), 146 deletions(-) diff --git a/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 b/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 index 20fc78aab..8a801c4ef 100644 --- a/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 +++ b/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 @@ -107,12 +107,21 @@ display:getArticleAuthorsDataGetter PREFIX rdfs: PREFIX ts_: PREFIX rdf: - SELECT DISTINCT ?author - WHERE { - ?individualURI ts_:hasTOC ?toc . - ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . - ?elenphExcerpt ts_:author ?author . - } ORDER BY ?author + 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:getArticleRubricsDataGetter diff --git a/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 b/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 index bf9c94e78..8cbf13e71 100644 --- a/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 +++ b/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 @@ -8,6 +8,7 @@ display:hasDataGetter display:getExcerptAssignedArticlesDataGetter . + display:hasDataGetter display:getExcerptAuthorsDataGetter . display:getExcerptAssignedArticlesDataGetter @@ -27,3 +28,25 @@ display:getExcerptAssignedArticlesDataGetter } ORDER BY ?articleName """ . +display:getExcerptAuthorsDataGetter + a ; + display:saveToVar "authors"; + display:query + """ + PREFIX rdfs: + PREFIX ts_: + PREFIX rdf: + SELECT DISTINCT ?authorInitials ?authorFamily ?authorGivenName ?orgName ?orgPostalCode ?orgAddress + WHERE { + ?individualURI 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 + """ . diff --git a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl index 9406a4088..4431e15bc 100644 --- a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl +++ b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl @@ -37,25 +37,6 @@ >Text structures Ontology ts - - - Book - Book - - - -1 - -1 - -1 - -1 - - - - @@ -95,15 +76,97 @@ >-1 + Publication Publication - Publication -1 -1 + + Publication Participant + -1 + -1 + + + + + + TOC Item + TOC Item + + + + + + + + + Organization + + + + + + + elenphAritcle.ftl + Electronic philosophical encyclopedia article + + + + + + + + + + + + + + + Text excerpt + + + + Book + Book + + + -1 + -1 + -1 + -1 + + + + -1 + -1 + + -1 + -1 + + Journal Article + + + Encyclopedia article @@ -116,14 +179,6 @@ >-1 - - TOC Item - TOC Item - - - - @@ -131,53 +186,11 @@ elenphExcerpt.ftl - - - + Elenph Excerpt - - - - elenphAritcle.ftl - Electronic philosophical encyclopedia article - - - - - - - - Text excerpt - - - - - - - - - - - - - -1 - -1 - -1 - -1 - - Journal - Journal - @@ -190,6 +203,26 @@ + + has author + + + + + + true + + + affiliated with + + + + + + true + @@ -235,29 +268,13 @@ true - - - author - - - - - + - - - - - - - - - - Works - + + + Publication Participant Initials + @@ -272,6 +289,14 @@ + + Publication Participant Given Name + + + + + + @@ -309,6 +334,46 @@ html Excerpt + + Publication Participant Family + + + + + + + + + + Issue + + + + + + + + + Publication Participant email + + + + + + + + + + + + + + + Works + + Year and month @@ -322,18 +387,6 @@ - - - - - - - - - - Affiliation - @@ -359,18 +412,31 @@ - - - - Issue - - - - - + + Organization Address - + + + + + + + Organization Postal Code + + + + + + + + + Official Organization Name + + + + + + diff --git a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl index 27e8665d1..44e746b57 100644 --- a/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl @@ -123,6 +123,23 @@ ${scripts.add('