diff --git a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java b/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java deleted file mode 100644 index d11c7213..00000000 --- a/api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/CompilationGenerator.java +++ /dev/null @@ -1,306 +0,0 @@ -/* $This file is distributed under the terms of the license in LICENSE$ */ - -package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collection; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.TimeZone; - -import javax.servlet.http.HttpSession; - -import org.apache.jena.rdf.model.Literal; -import org.apache.jena.vocabulary.RDFS; -import org.apache.jena.vocabulary.XSD; - -import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; -import edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers; -import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasAssociatedIndividual; -import edu.cornell.mannlib.vitro.webapp.beans.VClass; -import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; -import edu.cornell.mannlib.vitro.webapp.controller.admin.ShowAuthController.AssociatedIndividual; -import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationUtils; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; -import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.AntiXssValidation; - -/** - * Generates the edit configuration for a default property form. - * ModelChangePreprocessor creates the rdfs:label statement. - */ -public class CompilationGenerator extends BaseEditConfigurationGenerator implements EditConfigurationGenerator { - - private String associatedProfile; - private int excerptsCounter; - - @Override - public EditConfigurationVTwo getEditConfiguration(VitroRequest vreq, HttpSession session) { - - EditConfigurationVTwo config = new EditConfigurationVTwo(); - - associatedProfile = getAssociatedProfile(vreq); - excerptsCounter = parseCounter(vreq); - - config.setTemplate( "compilationForm.ftl" ); - - config.setN3Required( generateN3Required(vreq)); - - //Optional because user may have selected either person or individual of another kind - //Person uses first name and last name whereas individual of other class would use label - //middle name is also optional - //config.setN3Optional(generateN3Optional()); - - config.addNewResource("newCompilation", vreq.getWebappDaoFactory().getDefaultNamespace()); - config.addNewResource("newCompilationTOC", vreq.getWebappDaoFactory().getDefaultNamespace()); - config.addField(new FieldVTwo(). - setName("rawQueryString"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - config.addField(new FieldVTwo(). - setName("queryBuilderRules"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - - for (int itemN = 1; itemN <= excerptsCounter; itemN++) { - String tocItem = "tocItem" + itemN; - config.addNewResource(tocItem, vreq.getWebappDaoFactory().getDefaultNamespace()); - String tocLevel = "tocLevel" + itemN; - config.addNewResource(tocLevel, vreq.getWebappDaoFactory().getDefaultNamespace()); - - String tocItemName = tocItem + "Name"; - config.addField(new FieldVTwo(). - setName(tocItemName). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - - String tocLevelName = tocLevel + "Name"; - config.addField(new FieldVTwo(). - setName(tocLevelName). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - - String excerpt = "excerpt" + itemN; - config.addField(new FieldVTwo(). - setName(excerpt). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - - } - config.setUrisOnform(getUrisOnForm()); - config.setLiteralsOnForm( getLiteralsOnForm()); - setUrisAndLiteralsInScope(config); - //No SPARQL queries for existing since this is only used to create new, never for edit - - config.addField(new FieldVTwo(). - setName("newCompilationLabel"). - setRangeDatatypeUri(XSD.xstring.getURI()). - setValidators(getCompilationNameValidators(vreq))); - - - addFormSpecificData(config, vreq); - - config.addValidator(new AntiXssValidation()); - - //This combines the first and last name into the rdfs:label - // currently being done via javascript in the template. May use this again - // when/if updated to ISF ontology. tlw72 -// config.addModelChangePreprocessor(new FoafNameToRdfsLabelPreprocessor()); - - String formUrl = EditConfigurationUtils.getFormUrlWithoutContext(vreq); - config.setFormUrl(formUrl); - - //Note, the spaces are important - they were added by ProcessRdfFormController earlier - //as a means of ensuring the substitution worked correctly - as the regex expects spaces - config.setEntityToReturnTo(" ?newCompilation "); - prepare(vreq, config); - return config; - } - - private List getUrisOnForm() { - List uris = list(); - for (int itemN = 1; itemN <= excerptsCounter; itemN++) { - String excerpt = "excerpt" + itemN; - uris.add(excerpt); - } - return uris; - } - - private List getLiteralsOnForm() { - List literals = list( "newCompilationLabel"); - for (int itemN = 1; itemN <= excerptsCounter; itemN++) { - String tocItemName = "tocItem" + itemN + "Name"; - String tocLevelName = "tocLevel" + itemN + "Name"; - literals.add(tocItemName); - literals.add(tocLevelName); - literals.add("rawQueryString"); - literals.add("queryBuilderRules"); - } - return literals; - } - - private String getAssociatedProfile(VitroRequest vreq) { - String associatedProfile; - IdentifierBundle ids = RequestIdentifiers.getIdBundleForRequest(vreq); - Collection individualURIs = HasAssociatedIndividual.getIndividualUris(ids); - Iterator uriIterator = individualURIs.iterator(); - if (uriIterator.hasNext()) { - associatedProfile = uriIterator.next(); - } else { - associatedProfile = ""; - } - return associatedProfile; - } - - private List generateN3Required(VitroRequest vreq) { - StringBuilder n3Req = new StringBuilder(); - n3Req.append("@prefix ts: .\n"); - n3Req.append("?newCompilation <" + VitroVocabulary.RDF_TYPE + "> <" + getTypeOfNew(vreq) + "> .\n"); - n3Req.append("?newCompilation " + getModificationTime() + " .\n"); - n3Req.append("?newCompilation ts:rawQueryString ?rawQueryString .\n"); - n3Req.append("?newCompilation ts:queryBuilderRules ?queryBuilderRules .\n"); - n3Req.append("?newCompilation <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); - n3Req.append("?newCompilation ts:hasTOC ?newCompilationTOC .\n"); - n3Req.append("?newCompilationTOC <" + VitroVocabulary.RDF_TYPE + "> ts:TOC .\n"); - n3Req.append("?newCompilationTOC <" + RDFS.label.getURI() + "> ?newCompilationLabel .\n"); - - if (!associatedProfile.isEmpty()) { - n3Req.append("<" + associatedProfile + "> ts:compilatorOf ?newCompilation .\n"); - - } - //n3Req.append(); - - for (int itemN = 1; itemN <= excerptsCounter; itemN++) { - String tocItemVar = "?tocItem" + itemN ; - String tocItemNameVar = tocItemVar + "Name" ; - String tocLevelVar = "?tocLevel" + itemN ; - String tocLevelVarName = tocLevelVar + "Name" ; - String excerptVar = "?excerpt" + itemN ; - n3Req.append("?newCompilationTOC ts:hasTOCItem " + tocItemVar + " .\n"); - n3Req.append(tocItemVar + " <" + VitroVocabulary.RDF_TYPE + "> ts:TOCItem .\n"); - n3Req.append(tocItemVar + " <" + RDFS.label.getURI() + "> " + tocItemNameVar + " .\n"); - n3Req.append(tocItemVar + " ts:itemNumber " + itemN + " .\n"); - n3Req.append(tocItemVar + " ts:pointsTo " + tocLevelVar + " .\n"); - n3Req.append(tocLevelVar + " <" + VitroVocabulary.RDF_TYPE + "> ts:TOCLevel .\n"); - n3Req.append(tocLevelVar + " <" + RDFS.label.getURI() + "> " + tocLevelVarName + " .\n"); - n3Req.append(tocLevelVar + " ts:hasText " + excerptVar + ".\n"); - } - return list(n3Req.toString()); - } - - private List generateN3Optional() { - List n3OptList = list(); - StringBuilder n3Opt = new StringBuilder(); - n3Opt.append("@prefix ts: .\n"); - n3Opt.append("?newCompilation ts:rawQueryString ?rawQueryString .\n"); - n3Opt.append("?newCompilation ts:queryBuilderRules ?queryBuilderRules .\n"); - n3OptList.add(n3Opt.toString()); - return n3OptList; - } - - private String getModificationTime() { - SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); - sd.setTimeZone(TimeZone.getTimeZone("GMT")); - Date currentTime = Calendar.getInstance().getTime(); - String todayAsString = "\"" + sd.format(currentTime) + "\"^^"; - return todayAsString; - } - - private static Integer parseCounter(VitroRequest vreq) { - String text = vreq.getParameter("excerptsCount"); - if (text == null ) { - return 0; - } - try { - return Integer.parseInt(text); - } catch (NumberFormatException e) { - return 0; - } - } - - - private List getCompilationNameValidators(VitroRequest vreq) { - List validators = new ArrayList(); - if (isCompilationType(vreq)) { - validators.add("nonempty"); - } - return validators; - } - - //Get parameter from HTTP request for type of new individual - private String getTypeOfNew(VitroRequest vreq) { - String typeUri = vreq.getParameter("typeOfNew"); - if( typeUri == null || typeUri.trim().isEmpty() ) - return getCompilationClassURI(); - else - return typeUri; - } - - //Form specific data - public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) { - HashMap formSpecificData = new HashMap(); - formSpecificData.put("typeName", getTypeName(vreq)); - //Put in whether or not person type - if(isCompilationType(vreq)) { - //Doing this b/c unsure how freemarker will handle boolean value from JAVA - formSpecificData.put("isCompilationType", "true"); - } else { - formSpecificData.put("isCompilationType", "false"); - - } - formSpecificData.put("excerptsCounter", excerptsCounter); - - editConfiguration.setFormSpecificData(formSpecificData); - } - - private String getTypeName(VitroRequest vreq) { - String typeOfNew = getTypeOfNew(vreq); - VClass type = vreq.getWebappDaoFactory().getVClassDao().getVClassByURI(typeOfNew); - return type.getName(); - } - - public String getCompilationClassURI() { - return "https://litvinovg.pro/text_structures#compilation"; - } - - public boolean isCompilationType(VitroRequest vreq) { - WebappDaoFactory wdf = vreq.getWebappDaoFactory(); - Boolean isCompilationType = Boolean.FALSE; - String foafPersonType = getCompilationClassURI(); - String typeOfNew = getTypeOfNew(vreq); - List superTypes = wdf.getVClassDao().getAllSuperClassURIs(typeOfNew); - //add the actual type as well so we can add that for the list to be checked - superTypes.add(typeOfNew); - if( superTypes != null ){ - for( String typeUri : superTypes){ - if( foafPersonType.equals(typeUri)) { - isCompilationType = Boolean.TRUE; - break; - } - } - } - return isCompilationType; - } - private void setUrisAndLiteralsInScope(EditConfigurationVTwo editConfiguration) { - HashMap> urisInScope = new HashMap>(); - //note that at this point the subject, predicate, and object var parameters have already been processed - urisInScope.put(editConfiguration.getVarNameForSubject(), - Arrays.asList(new String[]{editConfiguration.getSubjectUri()})); - urisInScope.put(editConfiguration.getVarNameForPredicate(), - Arrays.asList(new String[]{editConfiguration.getPredicateUri()})); - editConfiguration.setUrisInScope(urisInScope); - //Uris in scope include subject, predicate, and object var - - editConfiguration.setLiteralsInScope(new HashMap>()); - } - - private String N3_PREFIX = "@prefix foaf: .\n"; -} diff --git a/home/src/main/resources/rdf/display/everytime/article_custom_fields.n3 b/home/src/main/resources/rdf/display/everytime/article_custom_fields.n3 index 3bc0bb3a..38ffd54e 100644 --- a/home/src/main/resources/rdf/display/everytime/article_custom_fields.n3 +++ b/home/src/main/resources/rdf/display/everytime/article_custom_fields.n3 @@ -1,73 +1,46 @@ @prefix : . -@prefix searchIndex: . - @prefix rdfs: . -:vivodocumentModifier_excerptsInComplexPublications +:vivodocumentModifier_excerptsInArticles a , ; - rdfs:label "Populate complex publications with excerpts" ; + rdfs:label "Elenph article excerpts" ; :hasTargetField "ALLTEXT" ; :hasSelectQuery """ PREFIX rdfs: - PREFIX ts: + PREFIX ts_: PREFIX rdf: SELECT DISTINCT ?value WHERE { - ?uri ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt . - VALUES ?property { ts:works ts:bibliography ts:htmlExcerpt ts:keywords } - ?excerpt ?property ?value . + ?uri rdf:type ts_:elenphArticle . + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + VALUES ?property { ts_:works ts_:bibliography ts_:htmlExcerpt ts_:keywords } + ?elenphExcerpt ?property ?value . } """ . - -:vivoUriFinder_excerptsInComplexPublications - a searchIndex:indexing.IndexingUriFinder , - searchIndex:indexing.SelectQueryUriFinder ; - rdfs:label "When excerpts change" ; - :hasSelectQuery """ - PREFIX ts: - 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: - SELECT ?uri - WHERE { - ?subject a ts:textExcerpt . - VALUES ?uri { ?subject } - } - """ . - -:vivodocumentModifier_PopulateTextWithHTMLContentsOfExcerpts + +:vivodocumentModifier_PopulateText a , ; rdfs:label "Html text to text field" ; :hasTargetField "text" ; :hasSelectQuery """ PREFIX rdfs: - PREFIX ts: + PREFIX ts_: PREFIX rdf: SELECT DISTINCT ?htmlExcerpt WHERE { { - ?uri rdf:type ts:textExcerpt . - ?uri ts:htmlExcerpt ?htmlExcerpt . + ?uri rdf:type ts_:textExcerpt . + ?uri ts_:htmlExcerpt ?htmlExcerpt . } UNION { - ?uri rdf:type ts:complexPublication . - ?uri ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt . - ?excerpt ts:htmlExcerpt ?htmlExcerpt . + ?uri rdf:type ts_:publication . + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt . + ?artExcerpt ts_:htmlExcerpt ?htmlExcerpt . } } """ . @@ -79,22 +52,22 @@ :hasTargetField "rubrics" ; :hasSelectQuery """ PREFIX rdfs: - PREFIX ts: + PREFIX ts_: PREFIX rdf: PREFIX pr: SELECT DISTINCT ?rubric WHERE { { - ?uri rdf:type ts:textExcerpt . + ?uri rdf:type ts_:elenphExcerpt . ?uri pr:belongsTo ?assignedRubric . ?assignedRubric (pr:hasParent)* ?rubric . } UNION { - ?uri rdf:type ts:complexPublication . - ?uri ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?excerpt . - ?excerpt pr:belongsTo ?assignedRubric . + ?uri rdf:type ts_:elenphArticle . + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?artExcerpt . + ?artExcerpt pr:belongsTo ?assignedRubric . ?assignedRubric (pr:hasParent)* ?rubric . } } @@ -122,20 +95,20 @@ :hasTargetField "keywords" ; :hasSelectQuery """ PREFIX rdfs: - PREFIX ts: + PREFIX ts_: PREFIX rdf: SELECT DISTINCT ?keywords WHERE { { - ?uri rdf:type ts:elenphArticle . - ?uri ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?elenphExcerpt . - ?elenphExcerpt ts:keywords ?keywords . + ?uri rdf:type ts_:elenphArticle . + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:keywords ?keywords . } UNION { - ?uri rdf:type ts:elenphExcerpt . - ?uri ts:keywords ?keywords . + ?uri rdf:type ts_:elenphExcerpt . + ?uri ts_:keywords ?keywords . } } """ . @@ -147,20 +120,20 @@ :hasTargetField "bibliography" ; :hasSelectQuery """ PREFIX rdfs: - PREFIX ts: + PREFIX ts_: PREFIX rdf: SELECT DISTINCT ?bibliography WHERE { { - ?uri rdf:type ts:elenphArticle . - ?uri ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)+/ts:hasText ?elenphExcerpt . - ?elenphExcerpt ts:bibliography ?bibliography . + ?uri rdf:type ts_:elenphArticle . + ?uri ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:bibliography ?bibliography . } UNION { - ?uri rdf:type ts:elenphExcerpt . - ?uri ts:bibliography ?bibliography . + ?uri rdf:type ts_:elenphExcerpt . + ?uri ts_:bibliography ?bibliography . } } """ . diff --git a/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 b/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 deleted file mode 100644 index eab30a54..00000000 --- a/home/src/main/resources/rdf/display/everytime/compilationDataGetters.n3 +++ /dev/null @@ -1,144 +0,0 @@ -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix vitro: . -@prefix xsd: . -@prefix ts_: . -@prefix display: . - - - display:hasDataGetter display:getCompilationExcerptsContentDataGetter . - - display:hasDataGetter display:getCompilationExcerptPathsDataGetter . - - display:hasDataGetter display:getCompilationWorksDataGetter . - - display:hasDataGetter display:getCompilationBibliographyDataGetter . - - display:hasDataGetter display:getCompilationAuthorsDataGetter . - - display:hasDataGetter display:getCompilationRubricsDataGetter . - -display:getCompilationExcerptsContentDataGetter - a ; - display:saveToVar "excerpts"; - display:query - """ - PREFIX rdfs: - PREFIX ts_: - 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 ; - display:saveToVar "paths"; - display:query - """ - PREFIX rdfs: - PREFIX rdf: - PREFIX ts_: - 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 . - ?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 ; - display:saveToVar "bibliography"; - display:query - """ - PREFIX rdfs: - PREFIX ts_: - PREFIX rdf: - SELECT DISTINCT ?bibliography ?excerpt - WHERE { - ?individualURI ts_:hasTOC ?toc . - ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt . - ?excerpt ts_:bibliography ?bibliography . - } ORDER BY ?bibliography - """ . - -display:getCompilationWorksDataGetter - a ; - display:saveToVar "works"; - display:query - """ - PREFIX rdfs: - PREFIX ts_: - PREFIX rdf: - SELECT DISTINCT ?works ?excerpt - WHERE { - ?individualURI ts_:hasTOC ?toc . - ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt . - ?excerpt ts_:works ?works . - } ORDER BY ?works - """ . - -display:getCompilationAuthorsDataGetter - a ; - display:saveToVar "authors"; - display:query - """ - PREFIX rdfs: - PREFIX ts_: - PREFIX rdf: - 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 ; - display:saveToVar "rubrics"; - display:query - """ - PREFIX rdfs: - PREFIX ts_: - PREFIX rdf: - PREFIX pr: - 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 - """ . - - diff --git a/home/src/main/resources/rdf/display/everytime/deleteQueries.n3 b/home/src/main/resources/rdf/display/everytime/deleteQueries.n3 deleted file mode 100644 index 6431a4f9..00000000 --- a/home/src/main/resources/rdf/display/everytime/deleteQueries.n3 +++ /dev/null @@ -1,48 +0,0 @@ -@prefix display: . - display:hasDeleteQuery """ - PREFIX ts: - DESCRIBE ?individualURI ?tocElement ?tocItem ?toc - WHERE { - OPTIONAL { - ?individualURI ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)* ?tocElement . - OPTIONAL { - ?tocElement ts:hasTOCItem ?tocItem . - } - } - } - """ . - display:hasDeleteQuery """ - PREFIX ts: - PREFIX rdf: - DESCRIBE ?individualURI ?tocElement ?tocItem ?toc ?excerpt ?author ?organization - WHERE { - ?individualURI rdf:type ts:elenphArticle . - OPTIONAL { - ?individualURI ts:hasTOC ?toc . - ?toc (ts:hasTOCItem/ts:pointsTo)* ?tocElement . - OPTIONAL { - ?tocElement ts:hasTOCItem ?tocItem . - } - OPTIONAL { - ?tocElement ts:hasText ?excerpt . - OPTIONAL { - ?excerpt ts:hasAuthor ?author . - OPTIONAL { - ?author ts:affiliatedWith ?organization . - } - } - } - } - } - """ . - - display:hasDeleteQuery """ - PREFIX ts: - DESCRIBE ?individualURI ?tocElement - WHERE - { - ?tocElement ts:hasText ?individualURI . - FILTER NOT EXISTS {?tocElement ts:hasTOCItem ?tocItem } - } - """ . diff --git a/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 b/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 index 3c7a3977..20fc78aa 100644 --- a/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 +++ b/home/src/main/resources/rdf/display/everytime/elenphArticleDataGetters.n3 @@ -42,11 +42,11 @@ display:getArticleExcerptPathsDataGetter display:saveToVar "paths"; display:query """ - PREFIX rdfs: - PREFIX rdf: - PREFIX ts_: - SELECT (GROUP_CONCAT(substr(concat("000",str(?outline)),strlen(str(?outline))); SEPARATOR = ".") AS ?path ) (COUNT(?outline) AS ?level) ?tocElement ?elenphExcerpt - WHERE { + PREFIX rdfs: + PREFIX rdf: + PREFIX ts_: + 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 . @@ -56,11 +56,12 @@ 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 @@ -74,11 +75,11 @@ display:getArticleBibliographyDataGetter PREFIX rdfs: PREFIX ts_: PREFIX rdf: - SELECT DISTINCT ?bibliography ?excerpt + SELECT DISTINCT ?bibliography ?elenphExcerpt WHERE { ?individualURI ts_:hasTOC ?toc . - ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt . - ?excerpt ts_:bibliography ?bibliography . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:bibliography ?bibliography . } ORDER BY ?bibliography """ . @@ -90,11 +91,11 @@ display:getArticleWorksDataGetter PREFIX rdfs: PREFIX ts_: PREFIX rdf: - SELECT DISTINCT ?works ?excerpt + SELECT DISTINCT ?works ?elenphExcerpt WHERE { ?individualURI ts_:hasTOC ?toc . - ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?excerpt . - ?excerpt ts_:works ?works . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:works ?works . } ORDER BY ?works """ . @@ -106,21 +107,12 @@ display:getArticleAuthorsDataGetter PREFIX rdfs: PREFIX ts_: PREFIX rdf: - 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 + SELECT DISTINCT ?author + WHERE { + ?individualURI ts_:hasTOC ?toc . + ?toc (ts_:hasTOCItem/ts_:pointsTo)+/ts_:hasText ?elenphExcerpt . + ?elenphExcerpt ts_:author ?author . + } ORDER BY ?author """ . 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 8cbf13e7..bf9c94e7 100644 --- a/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 +++ b/home/src/main/resources/rdf/display/everytime/elenphExcerptDataGetters.n3 @@ -8,7 +8,6 @@ display:hasDataGetter display:getExcerptAssignedArticlesDataGetter . - display:hasDataGetter display:getExcerptAuthorsDataGetter . display:getExcerptAssignedArticlesDataGetter @@ -28,25 +27,3 @@ 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/display/everytime/excluded_classes.n3 b/home/src/main/resources/rdf/display/everytime/excluded_classes.n3 index bf183cda..25b5794a 100644 --- a/home/src/main/resources/rdf/display/everytime/excluded_classes.n3 +++ b/home/src/main/resources/rdf/display/everytime/excluded_classes.n3 @@ -7,5 +7,3 @@ vitroDisplay:SearchIndex vitroDisplay:excludeClass . vitroDisplay:SearchIndex vitroDisplay:excludeClass . vitroDisplay:SearchIndex vitroDisplay:excludeClass . -vitroDisplay:SearchIndex vitroDisplay:excludeClass . -vitroDisplay:SearchIndex vitroDisplay:excludeClass . 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 ef5adf7e..9406a408 100644 --- a/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl +++ b/home/src/main/resources/rdf/tbox/filegraph/text_structures.owl @@ -37,6 +37,25 @@ >Text structures Ontology ts + + + Book + Book + + + -1 + -1 + -1 + -1 + + + + @@ -76,106 +95,15 @@ >-1 - Publication Publication + Publication -1 -1 - - Publication Participant - -1 - -1 - - - - - - TOC Item - TOC Item - - - - - - - - - Organization - - - - - - - elenphAritcle.ftl - Electronic philosophical encyclopedia article - - - - - - - - - - - - compilation.ftl - Compilation - edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.CompilationGenerator - - - - - - - - - - Text excerpt - - - - Book - Book - - - -1 - -1 - -1 - -1 - - - - -1 - -1 - - -1 - -1 - - Journal Article - - - Encyclopedia article @@ -188,6 +116,14 @@ >-1 + + TOC Item + TOC Item + + + + @@ -195,11 +131,53 @@ elenphExcerpt.ftl - + + + Elenph Excerpt + + + + elenphAritcle.ftl + Electronic philosophical encyclopedia article + + + + + + + + Text excerpt + + + + + + + + + + + + + -1 + -1 + -1 + -1 + + Journal + Journal + @@ -212,36 +190,6 @@ - - has author - - - - - - true - - - affiliated with - - - - - - true - - - compilatorOf - - - - - - true - @@ -287,31 +235,29 @@ true - - Query Builder Rules - + + + author + + - - - + + + - - Raw Query String - + + - - - - - + + - - - Publication Participant Initials - + Works + @@ -326,14 +272,6 @@ - - Publication Participant Given Name - - - - - - @@ -346,15 +284,6 @@ >First publication - - Modification time - - - - - - - Keywords @@ -380,46 +309,6 @@ html Excerpt - - Publication Participant Family - - - - - - - - - - Issue - - - - - - - - - Publication Participant email - - - - - - - - - - - - - - - Works - - Year and month @@ -433,6 +322,18 @@ + + + + + + + + + + Affiliation + @@ -458,31 +359,18 @@ - - Organization Address - - - - - - - - Organization Postal Code - + + + Issue + + - - - - - - Official Organization Name + - - - - + diff --git a/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 b/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 deleted file mode 100644 index c912bc22..00000000 --- a/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ts_: . -@prefix display: . -@prefix mydomain: . - -ts_:elenphExcerpt display:hasCustomView mydomain:elenphExcerptShortView . - -mydomain:elenphExcerptShortView - a display:customViewForIndividual ; - display:appliesToContext "SEARCH" ; - display:hasTemplate "elenphExcerptShortView.ftl" ; - display:hasDataGetter mydomain:elenphExcerptShortViewDataGetter . - -mydomain:elenphExcerptShortViewDataGetter - a ; - display:saveToVar "excerptInfo"; - display:query - """ - PREFIX rdfs: - PREFIX vivo: - PREFIX rdf: - PREFIX ts_: - SELECT ?property ?value - WHERE { - ?individualUri ?property ?value . - ?individualUri rdf:type ts_:elenphExcerpt . - } - """ . diff --git a/webapp/src/main/webapp/favicon.ico b/webapp/src/main/webapp/favicon.ico index d6f769bc..fe936708 100644 Binary files a/webapp/src/main/webapp/favicon.ico and b/webapp/src/main/webapp/favicon.ico differ diff --git a/webapp/src/main/webapp/js/toc.js b/webapp/src/main/webapp/js/toc.js deleted file mode 100644 index 3d46e7c7..00000000 --- a/webapp/src/main/webapp/js/toc.js +++ /dev/null @@ -1,18 +0,0 @@ -{ - let content = document.getElementById("wrapper-content"); - let toc = document.getElementById("TOC"); - createTOC(content, toc); - - function createTOC(content, toc){ - if (toc === null){ - alert("no TOC element found"); - return; - } - if (content === null){ - alert("no content element found"); - return; - } - - } - -} diff --git a/webapp/src/main/webapp/robots.txt b/webapp/src/main/webapp/robots.txt index 659b6c36..ed35ce7c 100644 --- a/webapp/src/main/webapp/robots.txt +++ b/webapp/src/main/webapp/robots.txt @@ -22,3 +22,4 @@ Disallow: /vis/ # VIVO addition Disallow: /visualizationAjax/ # VIVO addition Disallow: /visualizationData/ # VIVO addition Disallow: /qrcode # VIVO addition +Disallow: /individual # VIVO addition diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/menupage/menupage-browse.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/menupage/menupage-browse.ftl deleted file mode 100644 index 5f94bcdb..00000000 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/menupage/menupage-browse.ftl +++ /dev/null @@ -1,49 +0,0 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> - -<#-- Template for browsing individuals in class groups for menupages --> - -<#import "lib-string.ftl" as str> - - - - diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/shortview/view-search-default.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/shortview/view-search-default.ftl index 33db0830..be693ca2 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/shortview/view-search-default.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/shortview/view-search-default.ftl @@ -4,10 +4,8 @@ <#import "lib-vivo-properties.ftl" as p> -
${individual.name} <@p.displayTitle individual />

${individual.snippet}

-
diff --git a/webapp/src/main/webapp/templates/freemarker/body/search/search-error.ftl b/webapp/src/main/webapp/templates/freemarker/body/search/search-error.ftl deleted file mode 100644 index 3f08f55d..00000000 --- a/webapp/src/main/webapp/templates/freemarker/body/search/search-error.ftl +++ /dev/null @@ -1,16 +0,0 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> - -<#-- Template for displaying search error message --> - -<#if title??> -
-

${title?html}

-
- -
-

- ${message?html} -

-
-<#include "searchSelector.ftl"> -<#include "search-help.ftl" > diff --git a/webapp/src/main/webapp/templates/freemarker/body/search/search-help.ftl b/webapp/src/main/webapp/templates/freemarker/body/search/search-help.ftl deleted file mode 100644 index e892f96d..00000000 --- a/webapp/src/main/webapp/templates/freemarker/body/search/search-help.ftl +++ /dev/null @@ -1,49 +0,0 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> - -<#if origination?has_content && origination == "helpLink"> -
-

Search Tips

-
- - Back to results - -<#else> -
-

Search Tips

-
- -
    -
  • Keep it simple! Use short, single terms unless your searches are returning too many results.
  • -
  • Use quotes to search for an entire phrase -- e.g., "protein folding".
  • -
  • Except for boolean operators, searches are not case-sensitive, so "Geneva" and "geneva" are equivalent
  • -
  • If you are unsure of the correct spelling, put ~ at the end of your search term -- e.g., cabage~ finds cabbage, steven~ finds Stephen and Stefan (as well as other similar names).
  • -
- - - - -${stylesheets.add('')} - diff --git a/webapp/src/main/webapp/templates/freemarker/body/search/search-pagedResults.ftl b/webapp/src/main/webapp/templates/freemarker/body/search/search-pagedResults.ftl deleted file mode 100644 index 83c45e9f..00000000 --- a/webapp/src/main/webapp/templates/freemarker/body/search/search-pagedResults.ftl +++ /dev/null @@ -1,252 +0,0 @@ -<#-- $This file is distributed under the terms of the license in LICENSE$ --> - -<#-- Template for displaying paged search results --> - -

- -<#include "searchSelector.ftl"> - -<#escape x as x?html> -
${i18n().search_results_for} '${querytext}'
-
<#if classGroupName?has_content>${i18n().limited_to_type} '${classGroupName}'
-
<#if typeName?has_content>${i18n().limited_to_type} '${typeName}'
- - - - ${i18n().download_results} -<#-- --> -

- -${i18n().not_expected_results} -
- - <#-- Refinement links --> - <#if classGroupLinks?has_content && classGroupLinks?size gt 1> -
-

${i18n().display_only}

-
    - <#list classGroupLinks as link> -
  • ${link.text}(${link.count})
  • - -
-
- - - <#if classLinks?has_content && classLinks?size gt 1 > -
- <#if classGroupName?has_content> -

${i18n().limit} ${classGroupName} ${i18n().to}

- <#else> -

${i18n().limit_to}

- -
    - <#list classLinks as link> -
  • ${link.text}(${link.count})
  • - -
-
- - - -
- - <#if user.loggedIn> - - -
- - - - <#-- Search results --> -
    - <#list individuals as individual> -
  • - <@shortView uri=individual.uri viewContext="search" /> -
  • - -
- - - <#-- Paging controls --> - <#if (pagingLinks?size > 0)> -
- ${i18n().pages}: - <#if prevPage??> - <#list pagingLinks as link> - <#if link.url??> - ${link.text} - <#else> - ${link.text} <#-- no link if current page --> - - - <#if nextPage??> -
- -
- - <#-- VIVO OpenSocial Extension by UCSF --> - <#if openSocial??> - <#if openSocial.visible> -

OpenSocial

- - - - - - -
- - - -${stylesheets.add('', - '', - '')} - -${headScripts.add('', - '', - '' - )} - -${scripts.add('')} diff --git a/webapp/src/main/webapp/themes/iph/templates/compilation.ftl b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl similarity index 61% rename from webapp/src/main/webapp/themes/iph/templates/compilation.ftl rename to webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl index 73e9704b..f50ca943 100644 --- a/webapp/src/main/webapp/themes/iph/templates/compilation.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphAritcle.ftl @@ -7,13 +7,8 @@ <#include "individual-setup.ftl"> ${scripts.add('')} ${scripts.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> -<#include "text-lib.ftl"> - <#--Number of labels present--> <#if !labelCount??> <#assign labelCount = 0 > @@ -34,8 +29,6 @@ ${scripts.add(' <#-- <@dumpAll /> --> <#assign selectedTemplate = "individual--foaf-person-2column.ftl" > @@ -184,6 +264,23 @@ ${scripts.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} -${scripts.add('')} - - +<#-- $This file is distributed under the terms of the license in LICENSE$ --> <#-- Individual profile page template for foaf:Person individuals --> - <#-- <#include "individual-setup.ftl"> --> <#import "individual-qrCodeGenerator.ftl" as qr> <#import "lib-vivo-properties.ftl" as vp> -<#include "text-lib.ftl"> - <#--Number of labels present--> <#if !labelCount??> <#assign labelCount = 0 > @@ -38,8 +27,6 @@ ${scripts.add('')} +${scripts.add('')} + +<#assign selectedTemplate = "elenphExcerpt-internal.ftl" > + +<#if profilePageTypesEnabled > + <#assign profilePageType = profileType > + + <#-- targetedView takes precedence over the profilePageType. --> + + <#if targetedView?has_content> + <#if targetedView != "standardView"> + <#assign selectedTemplate = "individual--foaf-person-quickview.ftl" > + + <#elseif profilePageType == "quickView" > + <#assign selectedTemplate = "individual--foaf-person-quickview.ftl" > + + +<#include selectedTemplate > diff --git a/webapp/src/main/webapp/themes/iph/templates/elenphExcerptShortView.ftl b/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl similarity index 85% rename from webapp/src/main/webapp/themes/iph/templates/elenphExcerptShortView.ftl rename to webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl index bae63143..f02ff303 100644 --- a/webapp/src/main/webapp/themes/iph/templates/elenphExcerptShortView.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenphExcerptShortView.ftl @@ -4,6 +4,7 @@ <#import "lib-vivo-properties.ftl" as p> <#-- <@dumpAll /> --> + -
+
${individual.name} <@p.displayTitle individual />

${individual.snippet}

diff --git a/webapp/src/main/webapp/themes/iph/templates/elenph_issue.ftl b/webapp/src/main/webapp/templates/freemarker/elenph_issue.ftl similarity index 72% rename from webapp/src/main/webapp/themes/iph/templates/elenph_issue.ftl rename to webapp/src/main/webapp/templates/freemarker/elenph_issue.ftl index 5f1ed9eb..a8158d42 100644 --- a/webapp/src/main/webapp/themes/iph/templates/elenph_issue.ftl +++ b/webapp/src/main/webapp/templates/freemarker/elenph_issue.ftl @@ -5,16 +5,16 @@ <#if !issueName??> <#assign issueName = article.issue> <#assign divOpened = true > - -
+ +

${article.name}

<#elseif issueName == article.issue>

${article.name}

<#else> <#assign issueName = article.issue>
- -
+ +

${article.name}

@@ -38,8 +38,4 @@ for (i = 0; i < coll.length; i++) { } }); } -var issueContents = document.getElementsByClassName("issue"); -for (i = 0; i < issueContents.length; i++) { - issueContents[i].style.display = "none"; -} diff --git a/webapp/src/main/webapp/themes/iph/templates/rubric.ftl b/webapp/src/main/webapp/templates/freemarker/rubric.ftl similarity index 70% rename from webapp/src/main/webapp/themes/iph/templates/rubric.ftl rename to webapp/src/main/webapp/templates/freemarker/rubric.ftl index cddbd8b1..f2330967 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rubric.ftl +++ b/webapp/src/main/webapp/templates/freemarker/rubric.ftl @@ -1,20 +1,16 @@ <#import "lib-vivo-properties.ftl" as vp> <#include "individual-setup.ftl"> -${scripts.add('')} -${scripts.add('')} -
<#include "individual-adminPanel.ftl">
-
<#if relatedSubject??>

${relatedSubject.relatingPredicateDomainPublic} ${i18n().for} ${relatedSubject.name}

← ${i18n().return_to(relatedSubject.name)}

<#else> -

style="width:100%;border-right:1px solid #A6B1B0;"> +

style="float:left;width:100%;border-right:1px solid #A6B1B0;"> <@p.label individual editable labelCount localesCount/>

@@ -22,7 +18,6 @@ ${scripts.add(' + + diff --git a/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl b/webapp/src/main/webapp/templates/freemarker/rubrics.ftl similarity index 66% rename from webapp/src/main/webapp/themes/iph/templates/rubrics.ftl rename to webapp/src/main/webapp/templates/freemarker/rubrics.ftl index 16f4c88b..ae08ad5a 100644 --- a/webapp/src/main/webapp/themes/iph/templates/rubrics.ftl +++ b/webapp/src/main/webapp/templates/freemarker/rubrics.ftl @@ -1,15 +1,8 @@ -${scripts.add('')} -${scripts.add('')} - <#list rubrics as rubric> <#if !rubric.parentUri??> <#assign childs = rubric.childs?number> + <@openButton childs=childs/>${rubric.name}
<#include "developer.ftl"> @@ -10,4 +10,23 @@
  • class="selected" >${item.linkText}
  • - \ No newline at end of file + + +
    + <#if flash?has_content> + <#if flash?starts_with(i18n().menu_welcomestart) > +
    + +
    + <#else> +
    + +
    + + + + diff --git a/webapp/src/main/webapp/themes/iph/templates/page-home.ftl b/webapp/src/main/webapp/themes/iph/templates/page-home.ftl index b533b050..fd220426 100644 --- a/webapp/src/main/webapp/themes/iph/templates/page-home.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/page-home.ftl @@ -30,7 +30,7 @@ <#include "identity.ftl"> <#include "menu.ftl"> - <#include "contentWrapper.ftl"> +
    <#--

    ${i18n().intro_title}

    @@ -39,66 +39,66 @@
    -

    filteredSearch

    +

    ПоискfilteredSearch

    ${i18n().search_form}
    <#include "searchSelector.ftl"> -
    - -
    -
    О проекте
    -
    -

    Электронная Философская Энциклопедия (ЭФЭ) — открытый научно-исследовательский проект Института философии РАН, ставящий своей целью анализ и систематизацию достижений философских наук за последние десятилетия, создание на этой основе обобщающей картины развития философской мысли в мире во всем ее тематическом и содержательном многообразии. В отличие от прежних энциклопедических изданий, ЭФЭ призвана рассмотреть достижения философии прошлого сквозь призму современных дискуссий, отразить новейшие результаты исследований российских учёных и актуальные тенденции гуманитарного знания. Она нацелена на обобщающий взгляд, который не только фиксирует многообразие имен, понятий, терминов, школ и произведений мировой философии, но, прежде всего, выявляет ее сложную, противоречивую и плюралистичную целостность. Одной из ее доминант является преодоление европоцентризма в понимании философии, всечеловеческое расширение духовного горизонта. Создаваемая ведущими специалистами, ЭФЭ должна способствовать повышению философской культуры общества, стать надежным и авторитетным источником информации, составив конкуренцию всевозможным "пиратским" сайтам, бездумно копирующим сведения из неизвестных и непроверенных источников. Как полноценное электронное издание с выходными данными и закрепленными за отдельными статьями DOI, ЭФЭ позволит специалистам представлять результаты своих исследований в виде энциклопедических статей.

    -
    -
    -

    Редакционно-издательский совет

    -

    А.А. Гусейнов, В.А. Лекторский, А.В. Смирнов, С.В. Месяц

    -

    Редколлегия

    -

    Н.С. Автономова, Р.Г. Апресян, В.В. Бычков, В.Г. Буданов,
    В.В. Васильев, П.А. Гаджикурбанова, А.Л. Доброхотов, А.А. Кара-Мурза,
    И.Т. Касавин, В.Г. Лысенко, М.А. Маслин, В.В. Миронов,
    Н.В. Мотрошилова, В.А. Подорога, Ю.В. Синеокая, М.Т. Степанянц,
    В.Г. Федотова, В.К. Шохин, А.В. Черняев

    -

    Экспертный совет

    -

    Р.Г. Апресян, В.Г. Буданов, Г.В. Вдовина, И.Д. Джохадзе, Л.Б. Карелова,
    В.Г. Лысенко, Н.Б. Маньковская, А.В. Павлов, В.В. Петров,
    С.Ю. Рыков, Ю.В. Синеокая, М.А. Солопова, Ю.Е. Федорова,
    В.И. Шалак, В.К. Шохин, А.В. Черняев

    -

    Научный редактор

    -

    Ю.Н. Попов

    -

    Научно-техническая редакция

    -

    М.В. Егорочкин, Г.В. Литвинов, С.Л. Гурко, С.В. Лаврентьева

    -
    - -
    -

    ISSN (Online): 2658-7092

    -

    Учредитель и издатель: Федеральное государственное бюджетное учреждение науки Институт философии Российской Академии наук.

    -

    Периодичность: 4 раза в год. Выходит с 2018 г.

    -

    Адрес учредителя и издателя: Российская Федерация, 109240, г. Москва, ул. Гончарная, д. 12, стр. 1.

    -

    Сайт: www.elenph.org

    - -
    - -
    -

    Энциклопедия зарегистрирована Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор). Свидетельство о регистрации СМИ: серия ЭЛ № ФС77 -74569 от 14.12.2018.

    -

    Энциклопедия включена в: базу ROAD (справочник электронных научных ресурсов с полностью открытым доступом к статьям).

    - -
    -
    +
    +

    Электронная Философская Энциклопедия (ЭФЭ) — открытый научно-исследовательский проект Института философии РАН, ставящий своей целью анализ и систематизацию достижений философских наук за последние десятилетия, создание на этой основе обобщающей картины развития философской мысли в мире во всем ее тематическом и содержательном многообразии. В отличие от прежних энциклопедических изданий, ЭФЭ призвана рассмотреть достижения философии прошлого сквозь призму современных дискуссий, отразить новейшие результаты исследований российских учёных и актуальные тенденции гуманитарного знания. Она нацелена на обобщающий взгляд, который не только фиксирует многообразие имен, понятий, терминов, школ и произведений мировой философии, но, прежде всего, выявляет ее сложную, противоречивую и плюралистичную целостность. Одной из ее доминант является преодоление европоцентризма в понимании философии, всечеловеческое расширение духовного горизонта. Создаваемая ведущими специалистами, ЭФЭ должна способствовать повышению философской культуры общества, стать надежным и авторитетным источником информации, составив конкуренцию всевозможным "пиратским" сайтам, бездумно копирующим сведения из неизвестных и непроверенных источников. Как полноценное электронное издание с выходными данными и закрепленными за отдельными статьями DOI, ЭФЭ позволит специалистам представлять результаты своих исследований в виде энциклопедических статей.

    +

    Редакционно-издательский совет

    +

    А.А. Гусейнов, В.А. Лекторский, А.В. Смирнов, С.В. Месяц

    +

    Редколлегия

    +

    Н.С. Автономова, Р.Г. Апресян, В.В. Бычков, В.Г. Буданов, В.В. Васильев,
    П.А. Гаджикурбанова, А.Л. Доброхотов, А.А. Кара-Мурза, И.Т. Касавин,
    В.Г. Лысенко, М.А. Маслин, В.В. Миронов, Н.В. Мотрошилова,
    В.А. Подорога, Ю.В. Синеокая, М.Т. Степанянц, В.Г. Федотова,
    В.К. Шохин, А.В. Черняев

    +

    Экспертный совет

    +

    Р.Г. Апресян, В.Г. Буданов, Г.В. Вдовина, И.Д. Джохадзе, Л.Б. Карелова,
    В.Г. Лысенко, Н.Б. Маньковская, А.В. Павлов, В.В. Петров,
    С.Ю. Рыков, Ю.В. Синеокая, М.А. Солопова, Ю.Е. Федорова,
    В.И. Шалак, В.К. Шохин, А.В. Черняев

    +

    Научный редактор

    +

    Ю.Н. Попов

    +

    Научно-техническая редакция

    +

    М.В. Егорочкин, Г.В. Литвинов, С.Л. Гурко, С.В. Лаврентьева

    + + + + + + + + + + + +
    +

    ISSN (Online): 2658-7092

    +

    Учредитель и издатель: Федеральное государственное бюджетное учреждение науки Институт философии Российской Академии наук.

    +

    Периодичность: 4 раза в год. Выходит с 2018 г.

    +

    Адрес учредителя и издателя: Российская Федерация, 109240, г. Москва, ул. Гончарная, д. 12, стр. 1.

    +

    Сайт: www.elenph.org

    +
    +

    Энциклопедия зарегистрирована Федеральной службой по надзору в сфере связи, информационных технологий и массовых коммуникаций (Роскомнадзор). Свидетельство о регистрации СМИ: серия ЭЛ № ФС77 -74569 от 14.12.2018.

    +

    Энциклопедия включена в: базу ROAD (справочник электронных научных ресурсов с полностью открытым доступом к статьям).

    +
    - + + + <#-- <@lh.researchClasses /> --> - <#-- <@lh.facultyMbrHtml /> --> + <#-- <@lh.facultyMbrHtml /> --> - <#-- <@lh.academicDeptsHtml /> --> + <#-- <@lh.academicDeptsHtml /> --> <#if geoFocusMapsEnabled > <@lh.geographicFocusHtml /> - + + <@lh.allClassGroups vClassGroups! /> - <#include "footer.ftl"> <#-- builds a json object that is used by js to render the academic departments section --> <@lh.listAcademicDepartments /> diff --git a/webapp/src/main/webapp/themes/iph/templates/page.ftl b/webapp/src/main/webapp/themes/iph/templates/page.ftl index 224f8745..5cb056f2 100644 --- a/webapp/src/main/webapp/themes/iph/templates/page.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/page.ftl @@ -7,29 +7,14 @@ <#include "head.ftl"> - + <#include "identity.ftl"> + <#if !querytext?? > + <#include "customsearchpanel.ftl" > + <#include "menu.ftl"> -
    - <#if currentServlet = "individual"||currentServlet = "display"||currentServlet = "entity"> - <#include "rightPanel.ftl"> - - <#include "contentWrapper.ftl"> - <#if currentServlet != "individual" && currentServlet != "login" && currentServlet != "display" && currentServlet != "customsearch" && currentServlet != "entity"> -
    -

    filteredSearch

    - -
    - ${i18n().search_form} -
    - - <#include "searchSelector.ftl"> - -
    - - <#-- VIVO OpenSocial Extension by UCSF --> <#if openSocial??> <#if openSocial.visible> @@ -38,7 +23,7 @@ ${body} -
    + <#include "footer.ftl"> diff --git a/webapp/src/main/webapp/themes/iph/templates/queryBuilder.ftl b/webapp/src/main/webapp/themes/iph/templates/queryBuilder.ftl index 81062b49..bfcdd005 100644 --- a/webapp/src/main/webapp/themes/iph/templates/queryBuilder.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/queryBuilder.ftl @@ -1,122 +1,85 @@ <#macro freeField field > { @@ -251,38 +162,13 @@ type: 'string', input: 'select', values: { - - <#if searchFields??> <#list searchFilters as filter> <#if filter.field == field.field> '"${filter.id}"':'${filter.name}', - <#else> - { - id: 'ALLTEXT', - label: 'Everywhere', - type: 'string', - operators: ['contains', 'not_contains'] - }, - + }, operators: ['contains', 'not_contains'] }, - -<#macro selectHitsPerPage> - <#if !hitsPerPage?? > - <#assign hitsPerPage = 20 > - - <#assign hitsValues= [20,40,60,80,100]> - - diff --git a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl b/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl deleted file mode 100644 index bd8b287b..00000000 --- a/webapp/src/main/webapp/themes/iph/templates/rightPanel.ftl +++ /dev/null @@ -1,17 +0,0 @@ -
    -
    -
    - <#include "customsearchpanel.ftl" > - -
    - diff --git a/webapp/src/main/webapp/themes/iph/templates/searchSelector.ftl b/webapp/src/main/webapp/themes/iph/templates/searchSelector.ftl index 7c950df7..af5e89d9 100644 --- a/webapp/src/main/webapp/themes/iph/templates/searchSelector.ftl +++ b/webapp/src/main/webapp/themes/iph/templates/searchSelector.ftl @@ -1,6 +1,6 @@
    <#include "customSearchForm.ftl"> - +
    <#include "queryBuilder.ftl"> diff --git a/webapp/src/main/webapp/themes/iph/templates/statistic_counters.ftl b/webapp/src/main/webapp/themes/iph/templates/statistic_counters.ftl deleted file mode 100644 index e69de29b..00000000 diff --git a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl b/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl deleted file mode 100644 index 56b90055..00000000 --- a/webapp/src/main/webapp/themes/iph/templates/text-lib.ftl +++ /dev/null @@ -1,254 +0,0 @@ -<#macro showRubrics> - <#assign currentRubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> - <#if currentRubrics?? && currentRubrics?has_content> -
    ${i18n().metadata_relates_to_rubrics} <@p.addLink currentRubrics editable /> <@p.verboseDisplay currentRubrics />
    - <#if rubrics?? && rubrics?has_content> - <#list rubrics as rubric> -
  • - ${rubric.rubricName} -
  • - - -
    - - - -<#macro showIssue> - <#assign issue = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#issue")!> - <#if issue.statements?has_content && issue.type == "data"> -
    -
    ${i18n().metadata_relates_to_issue}
    - <@p.dataPropertyList issue editable /> -
    - - - -<#macro showYear> - <#assign year = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#year")!> - <#if year.statements?has_content && year.type == "data"> -
    -
    ${i18n().metadata_year}
    - <@p.dataPropertyList year editable /> -
    - - - -<#macro documentRubrics > - <#assign docRubrics = propertyGroups.pullProperty("https://iph.ras.ru/relationships#belongsTo")!> - <#if ( docRubrics?? && docRubrics?has_content ) || (rubrics?? && rubrics?has_content)> -
    - <#if docRubrics?? && docRubrics?has_content > - <@p.addLink docRubrics editable /> <@p.verboseDisplay docRubrics />
    - -
    - - <#if rubrics?? && rubrics?has_content> - - - - -<#macro arrangeDocumentParts > -
    - <#assign lastLevel = 0 > - <#list paths as order> - <#-- ${order.path} --> - <#list excerpts as excerptProperties> - <#if order.elenphExcerpt?has_content && excerptProperties.elenphExcerpt == order.elenphExcerpt> - <#assign excerptText = excerptProperties.htmlContent > - <#assign excerptTextName = excerptProperties.htmlLabel > - <#assign worksCounter = excerptProperties.worksCounter > - <#assign bibliographyCounter = excerptProperties.bibliographyCounter > - - - <@startDocumentPart order.level?number order.path lastLevel/> - <#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content> -
    - ${excerptText} -
    - <@arrangeSources works worksCounter?number order.path order.elenphExcerpt /> - <@arrangeLiterature bibliography bibliographyCounter?number order.path order.elenphExcerpt /> - - <#assign lastLevel = order.level?number > - - <@endDocumentPart lastLevel /> - <@arrangeSources works works?size "anchor-all-sources" /> - <@arrangeLiterature bibliography bibliography?size "anchor-all-literature" /> -
    - - - -<#macro startDocumentPart newLevel path lastLevel=0 > - <#assign depth = newLevel - lastLevel > - <#if depth == 0> - <@closeDocPart 1 /> - <@openDocPart 1 path /> - <#elseif depth > 0> - <@openDocPart depth path /> - <#else > - <@closeDocPart -depth+1 /> - <@openDocPart 1 path /> - - - -<#macro endDocumentPart lastLevel newLevel=0> - <#assign depth = lastLevel - newLevel > - <#if depth > 0> - <@closeDocPart depth /> - - - -<#macro closeDocPart count> - <#list 1..count as x> -
    - - - -<#macro openDocPart count path > - <#if excerptTextName??> - <#assign buttonText = excerptTextName > - <#else> - <#assign buttonText = "No text" > - - <#list 1..count as x> - -
    - - - -<#macro arrangeSources sources counter identifier filter="none"> - <#if sources?? && sources?has_content && counter > 0> - <@compress single_line=true> - - -
    - <#assign lastSource = ""/> - <#list sources as source> - <#if filter == "none" && lastSource != source.works || source.excerpt == filter > - <#assign lastSource = source.works/> -
    -

    ${source.works}

    -
    - - -
    - - - -<#macro arrangeLiterature literature counter identifier filter="none"> - - <#if literature?? && literature?has_content && counter > 0> - <@compress single_line=true> - - -
    - <#assign lastLiterature = ""/> - <#list literature as literatureItem> - <#if filter == "none" && lastLiterature != literatureItem.bibliography || literatureItem.excerpt == filter > - <#assign lastLiterature = literatureItem.bibliography/> -
    -

    ${literatureItem.bibliography}

    -
    - - -
    - - - - -<#macro authors_metadata> - <#if authors?? && authors?has_content> - - - - - - -<#macro authors_underline> - <#if authors?? && authors?has_content> -
    - <#list authors as author> - <#if author.authorFamily??>${author.authorFamily?trim}<#if author.authorInitials??> ${author.authorInitials?trim}<#sep>, - -
    - - - -<#macro expandMetadataSwitch> -
    - -
    - - -<#macro expandSwitch> -
    - -
    - - -<#macro userSettingsModal> - - - - - - -