Merge branch 'rel-1.12.0-RC' into main
This commit is contained in:
commit
9f6b545b84
39 changed files with 7842 additions and 293 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -28,4 +28,4 @@ jobs:
|
|||
java-version: 11
|
||||
|
||||
- name: Maven Build
|
||||
run: mvn clean install
|
||||
run: mvn clean package -s installer/example-settings.xml
|
||||
|
|
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
server-password: MAVEN_PASSWORD
|
||||
|
||||
- name: Maven Deploy
|
||||
run: mvn --batch-mode deploy
|
||||
run: mvn --batch-mode deploy -Pskip
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
|
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
|||
java-version: 11
|
||||
|
||||
- name: Maven Build
|
||||
run: mvn clean install
|
||||
run: mvn clean package -s installer/example-settings.xml
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
|
12
Dockerfile
12
Dockerfile
|
@ -1,20 +1,18 @@
|
|||
FROM tomcat:9-jdk11-openjdk
|
||||
|
||||
ARG SOLR_URL=http://localhost:8983/solr/vivocore
|
||||
ARG VIVO_DIR=/opt/vivo/home
|
||||
ARG VIVO_DIR=/usr/local/vivo/home
|
||||
ARG TDB_FILE_MODE=direct
|
||||
|
||||
ENV SOLR_URL=${SOLR_URL}
|
||||
ENV JAVA_OPTS="${JAVA_OPTS} -Dvivo-dir=$VIVO_DIR -Dtdb:fileMode=$TDB_FILE_MODE"
|
||||
ENV JAVA_OPTS="${JAVA_OPTS} -Dtdb:fileMode=$TDB_FILE_MODE"
|
||||
|
||||
RUN mkdir /opt/vivo
|
||||
RUN mkdir /opt/vivo/home
|
||||
RUN mkdir /usr/local/vivo
|
||||
RUN mkdir /usr/local/vivo/home
|
||||
|
||||
COPY ./installer/home/target/vivo /vivo-home
|
||||
COPY ./installer/webapp/target/vivo.war /usr/local/tomcat/webapps/ROOT.war
|
||||
|
||||
COPY ./home/src/main/resources/config/default.applicationSetup.n3 /applicationSetup.n3
|
||||
COPY ./home/src/main/resources/config/default.runtime.properties /runtime.properties
|
||||
|
||||
COPY start.sh /start.sh
|
||||
|
||||
EXPOSE 8080
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2018, Cornell University
|
||||
Copyright (c) 2021, Cornell University
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
25
README.md
25
README.md
|
@ -19,7 +19,7 @@ https://wiki.duraspace.org/display/VIVO/
|
|||
### Installation Instructions
|
||||
|
||||
Installation instructions for the latest release can be found at this location on the wiki:
|
||||
https://wiki.duraspace.org/display/VIVODOC110x/Installing+VIVO
|
||||
https://wiki.duraspace.org/display/VIVODOC112x/Installing+VIVO
|
||||
|
||||
### Docker
|
||||
|
||||
|
@ -27,7 +27,7 @@ VIVO docker container is available at [vivoweb/vivo](https://hub.docker.com/repo
|
|||
|
||||
### Docker Compose
|
||||
|
||||
Docker Compose environment variables.
|
||||
Docker Compose environment variables:
|
||||
|
||||
.env defaults
|
||||
```
|
||||
|
@ -36,14 +36,27 @@ RESET_HOME=false
|
|||
RESET_CORE=false
|
||||
```
|
||||
|
||||
- `LOCAL_VIVO_HOME`: VIVO home directory on your host machine which will mount to volume in docker container.
|
||||
- `RESET_HOME`: Convinience to reset VIVO home when starting container. **Caution** will delete local configuration, content, and configuration model.
|
||||
- `RESET_CORE`: Convinience to reset VIVO Solr core when starting container. **Caution** will require complete reindex.
|
||||
- `LOCAL_VIVO_HOME`: VIVO home directory on your host machine which will mount to volume in docker container. Set this environment variable to persist your VIVO data on your host machine.
|
||||
- `RESET_HOME`: Convenience to reset VIVO home when starting container. **Caution**, will delete local configuration, content, and configuration model.
|
||||
- `RESET_CORE`: Convenience to reset VIVO Solr core when starting container. **Caution**, will require complete reindex.
|
||||
|
||||
Before building VIVO, you will also need to clone (and switch to the same branch, if other than main) of [Vitro](https://github.com/vivo-project/Vitro). The Vitro project must be cloned to a sibling directory next to VIVO so that it can be found during the build. You will also need to clone (and switch to the appropriate branch) of [Vitro-languages](https://github.com/vivo-project/Vitro-languages) and [VIVO-languages](https://github.com/vivo-project/VIVO-languages).
|
||||
|
||||
Build and start VIVO.
|
||||
|
||||
1. In Vitro-languages, run:
|
||||
```
|
||||
mvn clean install
|
||||
mvn install
|
||||
```
|
||||
|
||||
2. In VIVO-languages, run:
|
||||
```
|
||||
mvn install
|
||||
```
|
||||
|
||||
3. In VIVO (with Vitro cloned alongside it), run:
|
||||
```
|
||||
mvn clean package -s installer/example-settings.xml
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-api</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-project</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,12 +4,18 @@ package edu.cornell.mannlib.semservices.service.impl;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.client.fluent.Form;
|
||||
import org.apache.http.client.fluent.Request;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
@ -18,11 +24,6 @@ import edu.cornell.mannlib.semservices.bo.Concept;
|
|||
import edu.cornell.mannlib.semservices.exceptions.ConceptsNotFoundException;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.vitro.webapp.utils.json.JacksonUtils;
|
||||
import org.apache.http.HttpVersion;
|
||||
import org.apache.http.client.fluent.Form;
|
||||
import org.apache.http.client.fluent.Request;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* @author jaf30
|
||||
|
@ -54,11 +55,13 @@ public class UMLSService implements ExternalConceptService {
|
|||
private static String UMLS_AUTH_USER_URL = "https://utslogin.nlm.nih.gov/cas/v1/tickets";
|
||||
private static String UMLS_AUTH_KEY_URL = "https://utslogin.nlm.nih.gov/cas/v1/api-key";
|
||||
private static String UTS_SERVICE_URL = "http://umlsks.nlm.nih.gov";
|
||||
private static final String UMLS_PROPERTIES = "/umls.properties";
|
||||
private static final Log log = LogFactory.getLog(UMLSService.class);
|
||||
|
||||
{
|
||||
if (username == null || apikey == null) {
|
||||
final Properties properties = new Properties();
|
||||
try (InputStream stream = getClass().getResourceAsStream("/umls.properties")) {
|
||||
try (InputStream stream = getClass().getResourceAsStream(UMLS_PROPERTIES)) {
|
||||
properties.load(stream);
|
||||
username = properties.getProperty("username");
|
||||
password = properties.getProperty("password");
|
||||
|
@ -73,12 +76,19 @@ public class UMLSService implements ExternalConceptService {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e, e);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error(e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean configurationFileExists() {
|
||||
URL config = UMLSService.class.getResource(UMLS_PROPERTIES);
|
||||
return (config != null);
|
||||
}
|
||||
|
||||
public boolean isConfigured() {
|
||||
return !(StringUtils.isEmpty(username) && StringUtils.isEmpty(apikey));
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ManagePublicationsForIndividualController extends FreemarkerHttpSer
|
|||
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
|
||||
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
|
||||
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
|
||||
+ "SELECT DISTINCT ?subclass ?authorship (str(?label) as ?title) ?pub ?hideThis WHERE { \n"
|
||||
+ "SELECT DISTINCT ?subclass ?authorship (?label as ?title) ?pub ?hideThis WHERE { \n"
|
||||
+ " ?subject core:relatedBy ?authorship . \n"
|
||||
+ " ?authorship a core:Authorship . \n"
|
||||
+ " OPTIONAL { \n "
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
|
@ -41,6 +42,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo;
|
|||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.FoafNameToRdfsLabelPreprocessor;
|
||||
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.ManageLabelsForPersonPreprocessor;
|
||||
import edu.cornell.mannlib.vitro.webapp.i18n.selection.SelectedLocale;
|
||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.filter.LanguageFilteringUtils;
|
||||
import edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.DataPropertyStatementTemplateModel;
|
||||
|
||||
/**
|
||||
|
@ -246,12 +248,12 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat
|
|||
|
||||
private void addFormSpecificData(EditConfigurationVTwo config,
|
||||
VitroRequest vreq) {
|
||||
//Get all language codes/labels in the system, and this list is sorted by language name
|
||||
List<HashMap<String, String>> locales = this.getLocales(vreq);
|
||||
ArrayList<Literal> existingLabels = this.getExistingLabels(config.getSubjectUri(), vreq);
|
||||
//Get language codes/labels for existing labels, and this list is sorted by language name
|
||||
List<HashMap<String, String>> locales = this.getLocales(vreq, existingLabels);
|
||||
//Get code to label hashmap - we use this to get the language name for the language code returned in the rdf literal
|
||||
HashMap<String, String> localeCodeToNameMap = this.getFullCodeToLanguageNameMap(locales);
|
||||
//the labels already added by the user
|
||||
ArrayList<Literal> existingLabels = this.getExistingLabels(config.getSubjectUri(), vreq);
|
||||
int numberExistingLabels = existingLabels.size();
|
||||
//existing labels keyed by language name and each of the list of labels is sorted by language name
|
||||
HashMap<String, List<LabelInformation>> existingLabelsByLanguageName = this.getLabelsSortedByLanguageName(existingLabels, localeCodeToNameMap, config, vreq);
|
||||
|
@ -439,21 +441,20 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat
|
|||
|
||||
ArrayList<Literal> labels = new ArrayList<Literal>();
|
||||
try {
|
||||
//We want to get the labels for all the languages, not just the display language
|
||||
ResultSet results = QueryUtils.getLanguageNeutralQueryResults(queryStr, vreq);
|
||||
// No longer retrieving language-neutral results here, so that
|
||||
// language editing is consistent with other editing forms.
|
||||
// Editable values depend on the interface's locale selector.
|
||||
ResultSet results = QueryUtils.getQueryResults(queryStr, vreq);
|
||||
while (results.hasNext()) {
|
||||
QuerySolution soln = results.nextSolution();
|
||||
Literal nodeLiteral = soln.get("label").asLiteral();
|
||||
labels.add(nodeLiteral);
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e, e);
|
||||
}
|
||||
return labels;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Putting this into a method allows overriding it in subclasses
|
||||
|
@ -467,30 +468,32 @@ public class ManageLabelsForPersonGenerator extends BaseEditConfigurationGenerat
|
|||
return template;
|
||||
}
|
||||
|
||||
//get locales present in list of literals
|
||||
public List<HashMap<String, String>> getLocales(VitroRequest vreq,
|
||||
List<Literal> existingLiterals) {
|
||||
Set<Locale> locales = new HashSet<Locale>();
|
||||
for(Literal literal : existingLiterals) {
|
||||
String language = literal.getLanguage();
|
||||
if(!StringUtils.isEmpty(language)) {
|
||||
locales.add(LanguageFilteringUtils.languageToLocale(language));
|
||||
}
|
||||
}
|
||||
if (locales.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
|
||||
Locale currentLocale = SelectedLocale.getCurrentLocale(vreq);
|
||||
for (Locale locale : locales) {
|
||||
try {
|
||||
list.add(buildLocaleMap(locale, currentLocale));
|
||||
} catch (FileNotFoundException e) {
|
||||
log.warn("Can't show locale '" + locale + "': " + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//get locales
|
||||
public List<HashMap<String, String>> getLocales(VitroRequest vreq) {
|
||||
List<Locale> selectables = SelectedLocale.getSelectableLocales(vreq);
|
||||
if (selectables.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
|
||||
Locale currentLocale = SelectedLocale.getCurrentLocale(vreq);
|
||||
for (Locale locale : selectables) {
|
||||
try {
|
||||
list.add(buildLocaleMap(locale, currentLocale));
|
||||
} catch (FileNotFoundException e) {
|
||||
log.warn("Can't show the Locale selector for '" + locale
|
||||
+ "': " + e);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public HashMap<String, String> getFullCodeToLanguageNameMap(List<HashMap<String, String>> localesList) {
|
||||
HashMap<String, String> codeToLanguageMap = new HashMap<String, String>();
|
||||
for(Map<String, String> locale: localesList) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.commons.logging.LogFactory;
|
|||
|
||||
import edu.cornell.mannlib.semservices.bo.Concept;
|
||||
import edu.cornell.mannlib.semservices.service.ExternalConceptService;
|
||||
import edu.cornell.mannlib.semservices.service.impl.UMLSService;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
/**
|
||||
* Utilities for search
|
||||
|
@ -38,7 +39,9 @@ public class ConceptSearchServiceUtils {
|
|||
//URL to label
|
||||
public static HashMap<String, VocabSourceDescription> getVocabSources() {
|
||||
HashMap<String, VocabSourceDescription> map = new HashMap<String, VocabSourceDescription>();
|
||||
map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System"));
|
||||
if(UMLSService.configurationFileExists()) {
|
||||
map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System"));
|
||||
}
|
||||
//Commenting out agrovoc for now until implementation is updated
|
||||
map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "http://www.fao.org/agrovoc/", "Agricultural Vocabulary"));
|
||||
map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus"));
|
||||
|
@ -53,6 +56,7 @@ public class ConceptSearchServiceUtils {
|
|||
//Get the hashmap mapping service name to Service class
|
||||
private static HashMap<String, String> getMapping() {
|
||||
HashMap<String, String> map = new HashMap<String, String>();
|
||||
|
||||
map.put(UMLSVocabSource, "edu.cornell.mannlib.semservices.service.impl.UMLSService");
|
||||
map.put(AgrovocVocabSource, "edu.cornell.mannlib.semservices.service.impl.AgrovocService");
|
||||
map.put(GemetVocabSource, "edu.cornell.mannlib.semservices.service.impl.GemetService");
|
||||
|
|
|
@ -2,29 +2,40 @@
|
|||
|
||||
package org.vivoweb.webapp.sitemap;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jena.query.QuerySolution;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
|
||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
|
||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.jena.query.QuerySolution;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
|
||||
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
|
||||
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
|
||||
|
||||
@WebServlet(name = "SiteMapServlet", urlPatterns = {"/robots.txt","/sitemap.xml"})
|
||||
public class SiteMapServlet extends VitroHttpServlet {
|
||||
|
||||
private static final int MAX_URLS = 50000; // max URLs per sitemap
|
||||
private static final Log log = LogFactory.getLog(SiteMapServlet.class);
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
String requestURI = request.getRequestURI();
|
||||
|
||||
if (requestURI != null) {
|
||||
|
@ -60,7 +71,7 @@ public class SiteMapServlet extends VitroHttpServlet {
|
|||
"WHERE\n" +
|
||||
"{\n" +
|
||||
" ?person a foaf:Person .\n" +
|
||||
"}\n";
|
||||
"} LIMIT " + MAX_URLS + "\n";
|
||||
|
||||
final VitroRequest vreq = new VitroRequest(request);
|
||||
final ServletOutputStream out = response.getOutputStream();
|
||||
|
@ -68,26 +79,31 @@ public class SiteMapServlet extends VitroHttpServlet {
|
|||
out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
out.println("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
|
||||
|
||||
List<String> personURIs = new ArrayList<String>();
|
||||
|
||||
try {
|
||||
vreq.getRDFService().sparqlSelectQuery(query, new ResultSetConsumer() {
|
||||
@Override
|
||||
protected void processQuerySolution(QuerySolution qs) {
|
||||
String person = qs.getResource("person").getURI();
|
||||
|
||||
String profileUrl = UrlBuilder.getIndividualProfileUrl(person, vreq);
|
||||
|
||||
if (!StringUtils.isEmpty(profileUrl)) {
|
||||
try {
|
||||
out.println(" <url>");
|
||||
out.println(" <loc>" + schemeAndServer + profileUrl + "</loc>");
|
||||
out.println(" <changefreq>weekly</changefreq>");
|
||||
out.println(" </url>");
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
personURIs.add(qs.getResource("person").getURI());
|
||||
}
|
||||
});
|
||||
} catch (RDFServiceException rse) {
|
||||
log.error(rse, rse);
|
||||
}
|
||||
|
||||
for(String person : personURIs) {
|
||||
String profileUrl = UrlBuilder.getIndividualProfileUrl(person, vreq);
|
||||
if (!StringUtils.isEmpty(profileUrl)) {
|
||||
try {
|
||||
out.println(" <url>");
|
||||
out.println(" <loc>" + schemeAndServer + profileUrl + "</loc>");
|
||||
out.println(" <changefreq>weekly</changefreq>");
|
||||
out.println(" </url>");
|
||||
} catch (Exception e) {
|
||||
log.error(e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out.println("</urlset>");
|
||||
|
@ -104,7 +120,8 @@ public class SiteMapServlet extends VitroHttpServlet {
|
|||
if ("http".equalsIgnoreCase(scheme) || "https".equalsIgnoreCase(scheme)) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(scheme).append("://").append(serverName);
|
||||
if (("http".equalsIgnoreCase(scheme) && serverPort != 80) || ("https".equalsIgnoreCase(scheme) && serverPort != 443) ) {
|
||||
if (("http".equalsIgnoreCase(scheme) && serverPort != 80)
|
||||
|| ("https".equalsIgnoreCase(scheme) && serverPort != 443) ) {
|
||||
builder.append(":").append(serverPort);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ services:
|
|||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- VIVO_DIR=/opt/vivo/home
|
||||
- VIVO_DIR=/usr/local/vivo/home
|
||||
- TDB_FILE_MODE=direct
|
||||
- SOLR_URL=http://solr:8983/solr/vivocore
|
||||
environment:
|
||||
|
@ -28,7 +28,7 @@ services:
|
|||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
- ${LOCAL_VIVO_HOME}:/opt/vivo/home
|
||||
- ${LOCAL_VIVO_HOME}:/usr/local/vivo/home
|
||||
networks:
|
||||
- vivo
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-home</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-project</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -19,6 +19,26 @@
|
|||
# BASIC PROPERTIES
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# This namespace will be used when generating URIs for objects created in the
|
||||
# editor. In order to serve linked data, the default namespace must be composed
|
||||
# as follows (optional elements in parentheses):
|
||||
#
|
||||
# scheme + server_name (+ port) (+ servlet_context) + "/individual/"
|
||||
#
|
||||
# For example, Cornell's default namespace is:
|
||||
#
|
||||
# http://vivo.cornell.edu/individual/
|
||||
#
|
||||
Vitro.defaultNamespace = http://vivo.mydomain.edu/individual/
|
||||
|
||||
#
|
||||
# The email address of the root user for the VIVO application. The password
|
||||
# for this user is initially set to "rootPassword", but you will be asked to
|
||||
# change the password the first time you log in.
|
||||
#
|
||||
rootUser.emailAddress = vivo_root@mydomain.edu
|
||||
|
||||
#
|
||||
# Argon2 password hashing parameters for time, memory and parallelism required to
|
||||
# compute a hash.
|
||||
|
@ -51,8 +71,12 @@ argon2.time = 1000
|
|||
# Email parameters which VIVO can use to send mail. If these are left empty,
|
||||
# the "Contact Us" form will be disabled and users will not be notified of
|
||||
# changes to their accounts.
|
||||
# email.smtpHost = smtp.mydomain.edu
|
||||
# email.replyTo = vivoAdmin@mydomain.edu
|
||||
# Example:
|
||||
# email.smtpHost = smtp.mydomain.edu
|
||||
# email.replyTo = vivoAdmin@mydomain.edu
|
||||
#
|
||||
# email.smtpHost =
|
||||
# email.replyTo =
|
||||
|
||||
#
|
||||
# URL of Solr context used in local VIVO search. This will usually consist of:
|
||||
|
@ -90,6 +114,22 @@ selfEditing.idMatchingProperty = http://vivo.mydomain.edu/ns#networkId
|
|||
#
|
||||
#externalAuth.netIdHeaderName = remote_userID
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# OPTIMIZING LIST VIEW QUERIES
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Include sections between <precise-subquery></precise-subquery>
|
||||
# tags when executing 'list view' queries that retrieve data
|
||||
# for property lists on profile pages.
|
||||
#
|
||||
# Including these optional sections does not change the query
|
||||
# semantics, but may improve performance.
|
||||
#
|
||||
# Default is true if not set.
|
||||
# (Prior to v1.12, default was true for SDB and false for TDB.)
|
||||
#
|
||||
# listview.usePreciseSubquery = true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# TUNING THE DATABASE CONNECTION POOL
|
||||
|
@ -108,7 +148,6 @@ selfEditing.idMatchingProperty = http://vivo.mydomain.edu/ns#networkId
|
|||
#
|
||||
# VitroConnection.DataSource.pool.maxIdle = 10
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# USING A DIFFERENT DATABASE
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -387,7 +426,15 @@ Vitro.reconcile.defaultTypeList = http://vivoweb.org/ontology/core#Role, core:Ro
|
|||
# If you do not wish to use the claiming interface, set this property to nothing (empty)
|
||||
createAndLink.providers = doi, pmid
|
||||
|
||||
# Triple pattern fragments is a very fast, very simple means for querying a triple store.
|
||||
# The triple pattern fragments API in VIVO puts little load on the server, providing a simple means for getting data from the triple store. The API has a web interface for manual use, can be used from the command line via curl, and can be used by programs.
|
||||
# Triple Pattern Fragments is a very fast, very simple means for querying a
|
||||
# triple store. The Triple Pattern Fragments API in VIVO puts little load on
|
||||
# the server, providing a simple means for getting data from the triple store.
|
||||
# The API has a web interface for manual use, can be used from the command
|
||||
# line via curl, and can be used by programs.
|
||||
#
|
||||
# VIVO's Triple Pattern Fragments API does not require authentication and
|
||||
# makes the full RDF graph available regardless of display or publish levels
|
||||
# set on particular properties. Enable Triple Pattern Fragments only if your
|
||||
# VIVO does not contain restricted data that should not be shared with others.
|
||||
#
|
||||
# tpf.activeFlag = true
|
|
@ -117,6 +117,22 @@
|
|||
}
|
||||
""" .
|
||||
|
||||
# URI finder that will find the relevant person to update when the
|
||||
# property linking to the email or preferred title resource is removed
|
||||
:vivoUriFinder_VCard_2
|
||||
a searchIndex:indexing.IndexingUriFinder ,
|
||||
searchIndex:indexing.SelectQueryUriFinder ;
|
||||
rdfs:label "Preferred title / email person URI finder #2" ;
|
||||
:hasPredicateRestriction "http://www.w3.org/2006/vcard/ns#hasTitle" ;
|
||||
:hasPredicateRestriction "http://www.w3.org/2006/vcard/ns#hasEmail" ;
|
||||
:hasSelectQuery """
|
||||
PREFIX obo: <http://purl.obolibrary.org/obo/>
|
||||
SELECT ?uri
|
||||
WHERE {
|
||||
?uri obo:ARG_2000028 ?subject .
|
||||
}
|
||||
""" .
|
||||
|
||||
:vivodocumentModifier_PreferredTitle
|
||||
a searchIndex:documentBuilding.SelectQueryDocumentModifier ,
|
||||
searchIndex:documentBuilding.DocumentModifier ;
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
This directory contains ontology "TBox" files with class and property definitions.
|
||||
These are loaded by the VIVO application when it starts for the first time, after
|
||||
the initial installation or after an upgrade installation that involves changes
|
||||
to these files.
|
||||
This directory contains ontology "TBox" files with class and property
|
||||
definitions or annotations that are intended to be editable in the VIVO GUI.
|
||||
|
||||
These files are loaded by the VIVO application when it starts for the first time
|
||||
and during later restarts if the contents have changed. A triple is updated
|
||||
if there is no conflicting value for the same subject and predicate that was
|
||||
added to the triple store via the GUI or data ingest (e.g. SPARQL UPDATE).
|
||||
|
||||
The file vitroAnnotations.n3 contains triples with predicates in the vitro
|
||||
namespace and objects that are not literals with language tags.
|
||||
|
||||
The VIVO-languages project contains additional language-specific
|
||||
vitroAnnotations.n3 files where all of the triples contain language-tagged
|
||||
literals.
|
||||
|
||||
VIVO-languages also provides additional annotation files
|
||||
(e.g. initialTBoxAnnotations_en_US.n3) containing triples with predicates
|
||||
in ontologies/voabularies outside the vitro namespace (e.g. rdfs:label).
|
||||
|
||||
See ../filegraph/README.md for more information about "TBox" files.
|
||||
|
|
7232
home/src/main/resources/rdf/tbox/firsttime/vitroAnnotations.n3
Normal file
7232
home/src/main/resources/rdf/tbox/firsttime/vitroAnnotations.n3
Normal file
File diff suppressed because it is too large
Load diff
22
installer/example-settings.xml
Normal file
22
installer/example-settings.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>defaults</id>
|
||||
<properties>
|
||||
<app-name>vivo</app-name>
|
||||
|
||||
<vivo-dir>/usr/local/vivo/home</vivo-dir>
|
||||
<tomcat-dir>/usr/local/tomcat</tomcat-dir>
|
||||
|
||||
<default-theme>wilma</default-theme>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<activeProfiles>
|
||||
<activeProfile>defaults</activeProfile>
|
||||
</activeProfiles>
|
||||
</settings>
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer-home</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -23,24 +23,108 @@
|
|||
<default-theme>wilma</default-theme>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>package</id>
|
||||
<activation>
|
||||
<property><name>vivo-dir</name></property>
|
||||
</activation>
|
||||
<build>
|
||||
<finalName>${app-name}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/home.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>install</id>
|
||||
<activation>
|
||||
<property><name>vivo-dir</name></property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/home.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>remove-webapp</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete dir="${vivo-dir}/rdf" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${vivo-dir}</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/${project.build.finalName}</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/home.xml</descriptor>
|
||||
</descriptors>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<id>home</id>
|
||||
<formats>
|
||||
<format>dir</format>
|
||||
<format>tar</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<dependencySets>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>VIVO Installer</name>
|
||||
|
@ -29,6 +29,12 @@
|
|||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
|
@ -142,6 +148,12 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
|
@ -165,6 +177,60 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-war</id>
|
||||
<phase/>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>install</id>
|
||||
<activation>
|
||||
<property><name>vivo-dir</name></property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-properties</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireProperty>
|
||||
<property>app-name</property>
|
||||
<message>You must provide an application name (app-name)</message>
|
||||
</requireProperty>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>skip</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
|
|
@ -7,21 +7,129 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer-vivo</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<name>VIVO Install Web App</name>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>package</id>
|
||||
<activation>
|
||||
<property><name>app-name</name></property>
|
||||
</activation>
|
||||
<build>
|
||||
<finalName>${app-name}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
</manifest>
|
||||
</archive>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<overlays>
|
||||
<overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-webapp</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
<!-- Overlays for multilingual support -->
|
||||
<!-- overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vitro-languages-webapp</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-languages-webapp</artifactId>
|
||||
<type>war</type>
|
||||
</overlay -->
|
||||
</overlays>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>src/main/webResources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>install</id>
|
||||
<activation>
|
||||
<property><name>tomcat-dir</name></property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>remove-webapp</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete dir="${tomcat-dir}/webapps/${project.build.finalName}" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${tomcat-dir}/webapps/${project.build.finalName}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<finalName>${app-name}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<configuration>
|
||||
|
@ -32,75 +140,6 @@
|
|||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
|
||||
<configuration>
|
||||
<skip>false</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>include-home</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-installer-home</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>tar</type>
|
||||
<destFileName>vivo-home.tar</destFileName>
|
||||
<outputDirectory>${project.build.directory}/home-files</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
</manifest>
|
||||
</archive>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<overlays>
|
||||
<overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-webapp</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
<!-- Overlays for multilingual support -->
|
||||
<overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vitro-languages-webapp-core</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
<overlay>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-languages-webapp-core</artifactId>
|
||||
<type>war</type>
|
||||
</overlay>
|
||||
</overlays>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>src/main/webResources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/home-files/</directory>
|
||||
<targetPath>WEB-INF/resources/home-files/</targetPath>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -1,52 +1,9 @@
|
|||
<Context> <!-- useHttpOnly="false" -->
|
||||
|
||||
<!--
|
||||
# The 'home' property specifies the location of VIVO HOME.
|
||||
# The system user used to run the VIVO web application must have write access
|
||||
# to the parent directory of the directory defined in this property, if VIVO HOME
|
||||
# does not already exist.
|
||||
# If this directory already exists, the system user used to run the VIVO web application
|
||||
# must have write access to this directory.
|
||||
-->
|
||||
<Environment
|
||||
type="java.lang.String"
|
||||
name="vitro/home"
|
||||
value="${vivo-dir}" override="true"/>
|
||||
|
||||
<!--
|
||||
# The name of the application (possibly not used).
|
||||
-->
|
||||
<Environment
|
||||
type="java.lang.String"
|
||||
name="vitro/appName"
|
||||
value="${app-name}" override="true"/>
|
||||
|
||||
<!--
|
||||
# The email address of the root user for the VIVO application. The password
|
||||
# for this user is initially set to "rootPassword", but you will be asked to
|
||||
# change the password the first time you log in.
|
||||
-->
|
||||
<Environment
|
||||
type="java.lang.String"
|
||||
name="vitro/rootUserAddress"
|
||||
value="vivo_root@mydomain.edu" override="true"/>
|
||||
|
||||
<!--
|
||||
# This namespace will be used when generating URIs for objects created in the
|
||||
# editor. In order to serve linked data, the default namespace must be composed
|
||||
# as follows (optional elements in parentheses):
|
||||
#
|
||||
# scheme + server_name (+ port) (+ servlet_context) + "/individual/"
|
||||
#
|
||||
# For example, Cornell's default namespace is:
|
||||
#
|
||||
# http://vivo.cornell.edu/individual/
|
||||
-->
|
||||
<Environment
|
||||
type="java.lang.String"
|
||||
name="vitro/defaultNamespace"
|
||||
value="http://vivo.mydomain.edu/individual/" override="true"/>
|
||||
|
||||
<!-- Disable persist sessions on shut down.-->
|
||||
<Manager pathname="" />
|
||||
</Context>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
# debug.log4j.properties exists will be used instead, if it exists, but is not stored in Subversion.
|
||||
|
||||
log4j.appender.AllAppender=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.AllAppender.File= ${catalina.base}/logs/vivo.all.log
|
||||
log4j.appender.AllAppender.File=${catalina.base}/logs/${app-name}.all.log
|
||||
log4j.appender.AllAppender.MaxFileSize=10MB
|
||||
log4j.appender.AllAppender.MaxBackupIndex=10
|
||||
log4j.appender.AllAppender.layout=org.apache.log4j.PatternLayout
|
||||
|
|
62
pom.xml
62
pom.xml
|
@ -1,13 +1,11 @@
|
|||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-project</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>VIVO</name>
|
||||
|
@ -43,11 +41,9 @@
|
|||
</developer>
|
||||
</developers>
|
||||
|
||||
<!--
|
||||
The SCM repository location is used by Continuum to update against
|
||||
when changes have occurred. This spawns a new build cycle and releases
|
||||
snapshots into the snapshot repository below.
|
||||
-->
|
||||
<!-- The SCM repository location is used by Continuum to update against
|
||||
when changes have occurred. This spawns a new build cycle and releases snapshots
|
||||
into the snapshot repository below. -->
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:vivo-project/VIVO.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:vivo-project/VIVO.git</developerConnection>
|
||||
|
@ -56,7 +52,6 @@
|
|||
</scm>
|
||||
|
||||
<properties>
|
||||
<app-name>vivo</app-name>
|
||||
<vitro-version>${project.version}</vitro-version>
|
||||
<vivo-dir>${basedir}</vivo-dir>
|
||||
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
|
||||
|
@ -73,7 +68,29 @@
|
|||
</modules>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<profile>
|
||||
<id>Vitro-languages</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>../Vitro-languages/pom.xml</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>../Vitro-languages</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>VIVO-languages</id>
|
||||
<activation>
|
||||
<file>
|
||||
<exists>../VIVO-languages/pom.xml</exists>
|
||||
</file>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>../VIVO-languages</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>vitro</id>
|
||||
<activation>
|
||||
<file>
|
||||
|
@ -336,7 +353,8 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Used to validate all code style rules in source code using Checkstyle -->
|
||||
<!-- Used to validate all code style rules in source code using
|
||||
Checkstyle -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
@ -344,7 +362,8 @@
|
|||
<executions>
|
||||
<execution>
|
||||
<id>verify-style</id>
|
||||
<!-- Bind to verify so it runs after package & unit tests, but before install -->
|
||||
<!-- Bind to verify so it runs after package & unit
|
||||
tests, but before install -->
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
|
@ -353,10 +372,10 @@
|
|||
</executions>
|
||||
<configuration>
|
||||
<configLocation>
|
||||
duraspace-checkstyle/checkstyle.xml
|
||||
duraspace-checkstyle/checkstyle.xml
|
||||
</configLocation>
|
||||
<suppressionsLocation>
|
||||
vitro-checkstyle/checkstyle-suppressions.xml
|
||||
vitro-checkstyle/checkstyle-suppressions.xml
|
||||
</suppressionsLocation>
|
||||
<encoding>UTF-8</encoding>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
|
@ -476,9 +495,11 @@
|
|||
<report>test-javadoc</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
<reportSet><!-- aggregate reportSet, to define in poms having modules -->
|
||||
<reportSet><!-- aggregate reportSet, to define in poms
|
||||
having modules -->
|
||||
<id>aggregate</id>
|
||||
<inherited>false</inherited><!-- don't run aggregate in child modules -->
|
||||
<inherited>false</inherited><!-- don't run aggregate
|
||||
in child modules -->
|
||||
<reports>
|
||||
<report>aggregate</report>
|
||||
</reports>
|
||||
|
@ -502,10 +523,9 @@
|
|||
</plugins>
|
||||
</reporting>
|
||||
|
||||
<!--
|
||||
Add a custom repository, which is actually just a simple GitHub project
|
||||
in order to distribute some dependencies that aren't part of Maven central
|
||||
-->
|
||||
<!-- Add a custom repository, which is actually just a simple GitHub
|
||||
project in order to distribute some dependencies that aren't part of Maven
|
||||
central -->
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>vivo-dependencies</id>
|
||||
|
|
58
start.sh
58
start.sh
|
@ -9,43 +9,51 @@ fi
|
|||
|
||||
# allow easier reset home with `docker run -e RESET_HOME=true`
|
||||
if [[ "$RESET_HOME" = "true" ]]; then
|
||||
echo 'Clearing VIVO HOME /opt/vivo/home'
|
||||
rm -rf /opt/vivo/home/*
|
||||
echo 'Clearing VIVO HOME /usr/local/vivo/home'
|
||||
rm -rf /usr/local/vivo/home/*
|
||||
fi
|
||||
|
||||
# ensure home config directory exists
|
||||
mkdir -p /opt/vivo/home/config
|
||||
|
||||
# generate digest.md5 for existing VIVO home if not already exist
|
||||
if [ ! -f /opt/vivo/home/digest.md5 ]; then
|
||||
find /opt/vivo/home -type f | grep -E '^/opt/vivo/home/bin/|^/opt/vivo/home/config/|^/opt/vivo/home/rdf/' | xargs md5sum > /opt/vivo/home/digest.md5
|
||||
echo "Generated digest.md5 for VIVO home"
|
||||
cat /opt/vivo/home/digest.md5
|
||||
# copy home bin if not exists
|
||||
if [ ! -d /usr/local/vivo/home/bin ]; then
|
||||
echo "Copying home bin directory to /usr/local/vivo/home/bin"
|
||||
cp -r /vivo-home/bin /usr/local/vivo/home/bin
|
||||
fi
|
||||
|
||||
# only move runtime.properties first time and if it does not already exist in target home directory
|
||||
if [ -f /runtime.properties ]; then
|
||||
# template runtime.properties vitro.local.solr.url value to $SOLR_URL value
|
||||
echo "Templating runtime.properties vitro.local.solr.url = $SOLR_URL"
|
||||
sed -i "s,http://localhost:8983/solr/vivocore,$SOLR_URL,g" /runtime.properties
|
||||
# copy home config if not exists
|
||||
if [ ! -d /usr/local/vivo/home/config ]; then
|
||||
echo "Copying home config directory to /usr/local/vivo/home/config"
|
||||
cp -r /vivo-home/config /usr/local/vivo/home/config
|
||||
fi
|
||||
|
||||
if [ ! -f /opt/vivo/home/config/runtime.properties ]
|
||||
# copy home rdf if not exists
|
||||
if [ ! -d /usr/local/vivo/home/rdf ]; then
|
||||
echo "Copying home rdf directory to /usr/local/vivo/home/rdf"
|
||||
cp -r /vivo-home/rdf /usr/local/vivo/home/rdf
|
||||
fi
|
||||
|
||||
# copy runtime.properties if it does not already exist in target home directory
|
||||
if [ -f /usr/local/vivo/home/config/example.runtime.properties ]; then
|
||||
if [ ! -f /usr/local/vivo/home/config/runtime.properties ]
|
||||
then
|
||||
echo "First time: moving /runtime.properties to /opt/vivo/home/config/runtime.properties"
|
||||
mv -n /runtime.properties /opt/vivo/home/config/runtime.properties
|
||||
echo "Copying example.runtime.properties to /usr/local/vivo/home/config/runtime.properties"
|
||||
cp /usr/local/vivo/home/config/example.runtime.properties /usr/local/vivo/home/config/runtime.properties
|
||||
|
||||
# template runtime.properties vitro.local.solr.url value to $SOLR_URL value
|
||||
echo "Templating runtime.properties vitro.local.solr.url = $SOLR_URL"
|
||||
sed -i "s,http://localhost:8983/solr/vivocore,$SOLR_URL,g" /usr/local/vivo/home/config/runtime.properties
|
||||
else
|
||||
echo "Using existing /opt/vivo/home/config/runtime.properties"
|
||||
echo "Using existing /usr/local/vivo/home/config/runtime.properties"
|
||||
fi
|
||||
fi
|
||||
|
||||
# only move applicationSetup.n3 first time and if it does not already exist in target home directory
|
||||
if [ -f /applicationSetup.n3 ]; then
|
||||
if [ ! -f /opt/vivo/home/config/applicationSetup.n3 ]
|
||||
# copy applicationSetup.n3 if it does not already exist in target home directory
|
||||
if [ -f /usr/local/vivo/home/config/example.applicationSetup.n3 ]; then
|
||||
if [ ! -f /usr/local/vivo/home/config/applicationSetup.n3 ]
|
||||
then
|
||||
echo "First time: moving /applicationSetup.n3 to /opt/vivo/home/config/applicationSetup.n3"
|
||||
mv -n /applicationSetup.n3 /opt/vivo/home/config/applicationSetup.n3
|
||||
echo "Copying example.applicationSetup.n3 to /usr/local/vivo/home/config/applicationSetup.n3"
|
||||
cp /usr/local/vivo/home/config/example.applicationSetup.n3 /usr/local/vivo/home/config/applicationSetup.n3
|
||||
else
|
||||
echo "Using existing /opt/vivo/home/config/applicationSetup.n3"
|
||||
echo "Using existing /usr/local/vivo/home/config/applicationSetup.n3"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-webapp</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-project</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
<dependency>
|
||||
<groupId>org.vivoweb</groupId>
|
||||
<artifactId>vivo-api</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.12.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -1069,7 +1069,7 @@ function prepareTableForDataTablePagination(jsonData, dataTableParams){
|
|||
|
||||
// console.log(processJSONData.currentEntityLevel);
|
||||
|
||||
if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS AND PEOPLE") {
|
||||
if (processJSONData.currentEntityLevel === i18nStringsGuiEvents.organizationsAndPeople) {
|
||||
$.fn.dataTableExt.afnFiltering.push(DatatableCustomFilters.peopleOrOrganizations);
|
||||
}
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ function prepareTableForDataTablePagination(jsonData, dataTableParams){
|
|||
*/
|
||||
function reloadDataTablePagination(preselectedEntityURIs, jsonData){
|
||||
|
||||
if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS AND PEOPLE") {
|
||||
if (processJSONData.currentEntityLevel === i18nStringsGuiEvents.organizationsAndPeople) {
|
||||
|
||||
/*
|
||||
* This will make sure that duplicate filters are not added.
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<#else>
|
||||
<h1 itemprop="name" class="vcard foaf-person fn" <#if !editable>style="float:left;border-right:1px solid #A6B1B0;"</#if>>
|
||||
<#-- Label -->
|
||||
<@p.label individual editable labelCount localesCount/>
|
||||
<@p.label individual editable labelCount localesCount languageCount />
|
||||
</h1>
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
<#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<div id="photo-wrapper">${individualImage}</div>
|
||||
<h1 itemprop="name" class="vcard foaf-person fn" <#if !editable>style="float:left;border-right:1px solid #A6B1B0;"</#if>>
|
||||
<#-- Label -->
|
||||
<@p.label individual editable labelCount localesCount/>
|
||||
<@p.label individual editable labelCount localesCount languageCount />
|
||||
</h1>
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
<#assign title = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Title")!>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<#assign temporalGraphDownloadCSVCommonURL = '${urls.base}${dataVisualizationURLRoot}?uri=${organizationURI}&labelField=label'>
|
||||
|
||||
<#assign publicationParameter = { "name": "${i18n().publication?js_string}",
|
||||
<#assign publicationParameter = { "name": "publication",
|
||||
"pluralName": "${i18n().publications?js_string}",
|
||||
"verbName": "${i18n().published?js_string}",
|
||||
"dropDownText": "${i18n().by_publications?js_string}",
|
||||
|
@ -44,7 +44,7 @@
|
|||
"csvLink": "${temporalGraphDownloadCSVCommonURL}&vis=entity_comparison",
|
||||
"value": "${i18n().publications?js_string}" }>
|
||||
|
||||
<#assign grantParameter = { "name": "${i18n().grant?js_string}",
|
||||
<#assign grantParameter = { "name": "grant",
|
||||
"pluralName": "${i18n().grants?js_string}",
|
||||
"verbName": "${i18n().granted?js_string}",
|
||||
"dropDownText": "${i18n().by_grants?js_string}",
|
||||
|
@ -74,7 +74,7 @@ var activitiesLabel = {
|
|||
plural: '${i18n().activities?js_string}'
|
||||
};
|
||||
var i18nStringsGuiEvents = {
|
||||
temporalGraphCapped: '${i18n().temporal_graph_capitalized?js_string?js_string},
|
||||
temporalGraphCapped: '${i18n().temporal_graph_capitalized?js_string?js_string}',
|
||||
temporalGraphLower: '${i18n().temporal_graph?js_string?js_string}',
|
||||
viewString: '${i18n().view?js_string}',
|
||||
entityMaxNote: '${i18n().max_entity_note?js_string}',
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<section class="vcard person">
|
||||
<h1 class="foaf-person">
|
||||
<#-- Label -->
|
||||
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span>
|
||||
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount languageCount /></span>
|
||||
</h1>
|
||||
<section id="preferredTitle">
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<#import "lib-home-page.ftl" as lh>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${country}">
|
||||
<head>
|
||||
<#include "head.ftl">
|
||||
<#if geoFocusMapsEnabled >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${country}">
|
||||
<head>
|
||||
<#include "head.ftl">
|
||||
</head>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<#else>
|
||||
<h1 class="foaf-person">
|
||||
<#-- Label -->
|
||||
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount/></span>
|
||||
<span itemprop="name" class="fn"><@p.label individual editable labelCount localesCount languageCount /></span>
|
||||
</h1>
|
||||
<section id="preferredTitle">
|
||||
<#-- Display preferredTitle if it exists; otherwise mostSpecificTypes -->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<#import "lib-home-page.ftl" as lh>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${country}">
|
||||
<head>
|
||||
<#include "head.ftl">
|
||||
<#if geoFocusMapsEnabled >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="${country}">
|
||||
<head>
|
||||
<#include "head.ftl">
|
||||
</head>
|
||||
|
|
Loading…
Add table
Reference in a new issue