diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..e71b19cbd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Windows, Linux] + - Browser [e.g. chrome, safari] + - Tomcat version [e.g. 8, 9] + - VIVO version [e.g. 1.11.0, 1.12.0] + - Apache Solr or ElasticSearch version + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..bbcbbe7d6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0d0ac84f6..8eddc16e6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ **Thank you for submitting a pull request! Title this pull request with a brief description of what the pull request fixes/improves/changes. Please describe the pull request in detail using the template below.** * * * -**[JIRA Issue](https://jira.duraspace.org/projects/VIVO)**: (please link to issue) +**[JIRA Issue](https://jira.lyrasis.org/projects/VIVO)**: (please link to issue) * Other Relevant Links (Mailing list discussion, related pull requests, etc.) diff --git a/.gitignore b/.gitignore index a3e48d48a..7af2b2898 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ utilities/sdb_to_tdb/.work **/.classpath **/.project **/bin/ + +.fake +.ionide \ No newline at end of file diff --git a/README.md b/README.md index d65138c6a..dbbc2abf8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ With Vitro, you can: * Search your data with Apache Solr Vitro was originally developed at Cornell University, and is used as the core of the popular -research and scholarship portal, [VIVO](https://duraspace.org/vivo/). +research and scholarship portal, [VIVO](https://lyrasis.org/vivo/). -For more information, contact the [VIVO community](https://duraspace.org/vivo/resources/contact/). +For more information, contact the [VIVO community](https://lyrasis.org/vivo/resources/contact/). diff --git a/api/pom.xml b/api/pom.xml index bf032b4e4..e951420a7 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -21,6 +21,13 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + alphabetical + + org.apache.maven.plugins maven-jar-plugin diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoTest.java index fe3938974..0c4654ad8 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDaoTest.java @@ -22,6 +22,7 @@ import org.apache.jena.vocabulary.RDF; import org.apache.jena.vocabulary.RDFS; import org.apache.jena.vocabulary.XSD; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import edu.cornell.mannlib.vitro.testing.AbstractTestClass; @@ -36,6 +37,9 @@ import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatementImpl; import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.dao.InsertException; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub; +import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub; +import stubs.javax.servlet.ServletContextStub; public class JenaBaseDaoTest extends AbstractTestClass { @@ -54,6 +58,12 @@ public class JenaBaseDaoTest extends AbstractTestClass { "@prefix owl: <" + OWL.getURI() + "> . \n" + "@prefix ex: . \n" ; + @Before + public void setup() { + WebappDaoFactoryStub wdf = new WebappDaoFactoryStub(); + ServletContextStub ctx = new ServletContextStub(); + new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf); + } @Test public void smartRemoveTestForIndivdiualDelete(){ diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/OntModelSegementationTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/OntModelSegementationTest.java index 7800acedf..e6af574af 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/OntModelSegementationTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/OntModelSegementationTest.java @@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.dao.jena; import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import org.junit.Assert; - +import org.junit.Before; import org.junit.Ignore; import org.junit.Test; @@ -23,6 +23,8 @@ import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao; import edu.cornell.mannlib.vitro.webapp.dao.UserAccountsDao; import edu.cornell.mannlib.vitro.webapp.dao.VClassDao; import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub; +import stubs.javax.servlet.ServletContextStub; /** * Test that the Jena DAOs write different types of data to the appropriate models. @@ -31,11 +33,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; */ public class OntModelSegementationTest extends AbstractTestClass { - private WebappDaoFactoryJena wadf; - @org.junit.Before +private WebappDaoFactoryJena wadf; + + @Before public void setUpWebappDaoFactoryJena() { super.setUp(); wadf = new WebappDaoFactoryJena(new SimpleOntModelSelector()); + ServletContextStub ctx = new ServletContextStub(); + new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wadf); } @Test diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/PropertyInstanceDaoJenaTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/PropertyInstanceDaoJenaTest.java index 76e681466..56d6d01b7 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/PropertyInstanceDaoJenaTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/PropertyInstanceDaoJenaTest.java @@ -9,7 +9,7 @@ import java.util.Map; import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import org.junit.Assert; - +import org.junit.Before; import org.apache.jena.ontology.OntModel; import org.apache.jena.ontology.OntModelSpec; import org.apache.jena.rdf.model.Model; @@ -19,6 +19,8 @@ import org.apache.jena.vocabulary.XSD; import edu.cornell.mannlib.vitro.webapp.beans.PropertyInstance; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; +import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub; +import stubs.javax.servlet.ServletContextStub; public class PropertyInstanceDaoJenaTest extends AbstractTestClass { @@ -37,7 +39,16 @@ public class PropertyInstanceDaoJenaTest extends AbstractTestClass { "@prefix rdfs: . \n"+ "@prefix owl: . \n"; + private WebappDaoFactoryJena wadf; + @Before + public void setUpWebappDaoFactoryJena() { + super.setUp(); + wadf = new WebappDaoFactoryJena(new SimpleOntModelSelector()); + ServletContextStub ctx = new ServletContextStub(); + new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wadf); + } + void printModels(Model expected, Model result){ System.out.println("Expected:"); expected.write(System.out); diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassDaoTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassDaoTest.java index 94068bf97..9a305f7aa 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassDaoTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassDaoTest.java @@ -19,11 +19,16 @@ import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.ResourceFactory; import org.apache.jena.vocabulary.OWL; +import org.junit.Before; import org.junit.Test; import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub; +import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub; +import stubs.javax.servlet.ServletContextStub; + /** * @@ -31,7 +36,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; */ public class VClassDaoTest extends AbstractTestClass { - + + @Before + public void setup() { + WebappDaoFactoryStub wdf = new WebappDaoFactoryStub(); + ServletContextStub ctx = new ServletContextStub(); + new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf); + } + @Test // Test that the VClassDaoJena::updateVClass method will only update the jena model for // those properties in VClass that have a different value from what is already in the @@ -45,7 +57,9 @@ public class VClassDaoTest extends AbstractTestClass { // it will migrate to the super-model) because of the way jena handles additions and // deletions with respect to super and sub models. This migration of statements may cause // undesirable behavior in the vivo/vitro application. + + public void modelIsolation(){ // 1. create two models and attach one as a sub-model of the other diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassJenaTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassJenaTest.java index 3aeb732fc..ddc914f3a 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassJenaTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassJenaTest.java @@ -7,8 +7,8 @@ import java.net.URLEncoder; import java.util.Iterator; import java.util.List; -import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.apache.jena.ontology.AllValuesFromRestriction; @@ -38,11 +38,15 @@ import org.apache.jena.shared.Lock; import org.apache.jena.util.iterator.ClosableIterator; import org.apache.jena.vocabulary.RDFS; +import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import edu.cornell.mannlib.vitro.webapp.beans.BaseResourceBean; import edu.cornell.mannlib.vitro.webapp.beans.Ontology; import edu.cornell.mannlib.vitro.webapp.beans.VClass; import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; +import stubs.edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactoryStub; +import stubs.edu.cornell.mannlib.vitro.webapp.modelaccess.ModelAccessFactoryStub; +import stubs.javax.servlet.ServletContextStub; /** * @@ -51,7 +55,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; */ public class VClassJenaTest extends AbstractTestClass { - + + @Before + public void setup() { + WebappDaoFactoryStub wdf = new WebappDaoFactoryStub(); + ServletContextStub ctx = new ServletContextStub(); + new ModelAccessFactoryStub().get(ctx).setWebappDaoFactory(wdf); + } + @Test // NIHVIVO-1157 introduced VClassJena.java, a lazy-loading version of VClass.java. // Per instructions from Brian L., this test tests that for one randomly selected Class, diff --git a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/validators/AntiXssValidationTest.java b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/validators/AntiXssValidationTest.java index 3c238facd..0926ec3d8 100644 --- a/api/src/test/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/validators/AntiXssValidationTest.java +++ b/api/src/test/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/validators/AntiXssValidationTest.java @@ -9,6 +9,7 @@ import java.util.Map; import org.junit.Assert; import org.junit.Test; +import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.EditConfigurationVTwo; import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.MultiValueEditSubmission; @@ -16,7 +17,7 @@ import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldVTwo; import stubs.javax.servlet.http.HttpServletRequestStub; -public class AntiXssValidationTest { +public class AntiXssValidationTest extends AbstractTestClass{ @Test public void testLiteral( ){ diff --git a/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.2.n3 b/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.2.n3 index 856211eea..6c2a691cb 100644 --- a/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.2.n3 +++ b/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.2.n3 @@ -33,7 +33,7 @@ @prefix vitro: . vivo:overview "There is a form feed in the following text. Hex 0c, that sometimes displays as ^L. Star Award for excellence in scientic publication and for productive collaborations with other Center scientists, U.S. Department of the Interior, 2009. Publications Award for scientist at Florida Integrated Science Center with highest annual scien-tic productivity as measured by number, quality, and impact of publications., U.S. Department of the Interior, 2009."; - vivo:webpage ; + vivo:webpage ; a mann:CornellNonAcademicStaff, local:InternalThing, vivoc:CornellAffiliatedPerson, diff --git a/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.n3 b/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.n3 index a0b9bd15a..95f9e7119 100644 --- a/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.n3 +++ b/api/src/test/resources/testontologies/SolrQueryTestRDF/vivo15.n3 @@ -33,7 +33,7 @@ @prefix vitro: . vivo:overview "There is a form feed in the following text. Hex 0c, that sometimes displays as ^L. Star Award for excellence in scienti c publication and for productive collaborations with other Center scientists, U.S. Department of the Interior, 2009. Publications Award for scientist at Florida Integrated Science Center with highest annual scien-ti c productivity as measured by number, quality, and impact of publications., U.S. Department of the Interior, 2009."; - vivo:webpage ; + vivo:webpage ; a mann:CornellNonAcademicStaff, local:InternalThing, vivoc:CornellAffiliatedPerson, diff --git a/home/src/main/resources/config/example.developer.properties b/home/src/main/resources/config/example.developer.properties index 67b119f92..3d08a5e5b 100644 --- a/home/src/main/resources/config/example.developer.properties +++ b/home/src/main/resources/config/example.developer.properties @@ -14,7 +14,7 @@ # not be enabled in a production instance of VIVO. # # For more information go to -# https://wiki.duraspace.org/display/VIVO/The+Developer+Panel +# https://wiki.lyrasis.org/display/VDOC16/The+Developer+Panel # # ----------------------------------------------------------------------------- # diff --git a/home/src/main/resources/config/example.runtime.properties b/home/src/main/resources/config/example.runtime.properties index 8e287ca0e..375316dd6 100644 --- a/home/src/main/resources/config/example.runtime.properties +++ b/home/src/main/resources/config/example.runtime.properties @@ -145,7 +145,7 @@ proxy.eligibleTypeList = http://www.w3.org/2002/07/owl#Thing # profile pages that it creates. # # For more information, see -# https://wiki.duraspace.org/display/VIVO/Use+HTTP+caching+to+improve+performance +# https://wiki.lyrasis.org/display/VIVODOC112x/Use+HTTP+caching+to+improve+performance # # Developers will likely want to leave caching disabled, since a change to a # Freemarker template or to a Java class would not cause the page to be diff --git a/rc_script.sh b/rc_script.sh index d24076047..f2a306789 100755 --- a/rc_script.sh +++ b/rc_script.sh @@ -1,7 +1,7 @@ #!/bin/bash # RC Script -RC_VERSION=1.11.1 +RC_VERSION=1.12.0 RC_NUM=1 git checkout master diff --git a/update-versions.sh b/update-versions.sh index d5c4272d7..97ef9113d 100755 --- a/update-versions.sh +++ b/update-versions.sh @@ -2,7 +2,7 @@ if [ -z "$1" ] then - echo 'New version number required eg. 1.9.0-rc1' + echo 'New version number required eg. 1.12.0-RC1' exit 1 fi diff --git a/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 b/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 index 0d969074f..6442acf06 100644 --- a/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 +++ b/webapp/src/main/webapp/WEB-INF/resources/shortview_config.n3 @@ -9,5 +9,5 @@ # Ontology is complete. # # Find out how to use this file at -# https://wiki.duraspace.org/display/VIVO/Using+Short+Views+in+Release+1.5 +# https://wiki.lyrasis.org/display/VIVODOC112x/Creating+short+views+of+individuals # diff --git a/webapp/src/main/webapp/WEB-INF/resources/startup_listeners.txt b/webapp/src/main/webapp/WEB-INF/resources/startup_listeners.txt index cd3feb29c..40d34f39c 100644 --- a/webapp/src/main/webapp/WEB-INF/resources/startup_listeners.txt +++ b/webapp/src/main/webapp/WEB-INF/resources/startup_listeners.txt @@ -2,7 +2,7 @@ # ServletContextListeners for Vitro, to be instantiated and run by the StartupManager. # # For more information, -# https://wiki.duraspace.org/display/VIVO/The+StartupManager +# https://wiki.lyrasis.org/display/VIVODOC112x/The+StartupManager # edu.cornell.mannlib.vitro.webapp.servlet.setup.JvmSmokeTests diff --git a/webapp/src/main/webapp/config/listViewConfig-dataDefault.xml b/webapp/src/main/webapp/config/listViewConfig-dataDefault.xml index 8d80c3e8d..8a11affce 100644 --- a/webapp/src/main/webapp/config/listViewConfig-dataDefault.xml +++ b/webapp/src/main/webapp/config/listViewConfig-dataDefault.xml @@ -3,7 +3,7 @@ + See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations --> diff --git a/webapp/src/main/webapp/config/listViewConfig-default.xml b/webapp/src/main/webapp/config/listViewConfig-default.xml index 109c9b4e5..e92d462a8 100644 --- a/webapp/src/main/webapp/config/listViewConfig-default.xml +++ b/webapp/src/main/webapp/config/listViewConfig-default.xml @@ -3,7 +3,7 @@ + See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations --> diff --git a/webapp/src/main/webapp/config/listViewConfig-hasElement.xml b/webapp/src/main/webapp/config/listViewConfig-hasElement.xml index de0754a17..8d5c0c532 100644 --- a/webapp/src/main/webapp/config/listViewConfig-hasElement.xml +++ b/webapp/src/main/webapp/config/listViewConfig-hasElement.xml @@ -3,7 +3,7 @@ + See guidelines at https://wiki.lyrasis.org/display/VIVODOC112x/Custom+List+View+Configurations -->