Compare commits

...

2150 Commits

Author SHA1 Message Date
Tim Donohue
80cd821f20 [maven-release-plugin] prepare release dspace-7.0-beta1 2020-03-03 12:07:57 -06:00
Tim Donohue
3e3356d785 Merge pull request #2697 from tdonohue/disable_old_rest
DS-4303: Disable "dspace-rest" from default build. Add more deprecation warnings
2020-03-02 15:21:09 -06:00
Tim Donohue
a7954aa697 Ensure Travis CI always builds/tests dspace-rest 2020-02-28 13:06:08 -06:00
Tim Donohue
501233f4ed Additional deprecation warnings in key places of dspace-rest 2020-02-28 12:23:54 -06:00
Tim Donohue
e02883afe2 Update Dockerfiles per disabled dspace-rest module 2020-02-28 12:23:29 -06:00
Tim Donohue
d14d6ecaae Disable dspace-rest by default 2020-02-28 12:23:10 -06:00
Tim Donohue
880ed67732 Merge pull request #2673 from atmire/w2p-68607_add-link-to-parent-community
[DS-3532] Breadcrumbs in header
2020-02-28 10:36:02 -06:00
Raf Ponsaerts
ccf8aa905c Merge remote-tracking branch 'dspace/master' into w2p-68607_add-link-to-parent-community
Conflicts:
	dspace-server-webapp/src/test/java/org/dspace/app/rest/WorkspaceItemRestRepositoryIT.java
2020-02-28 15:12:04 +01:00
Raf Ponsaerts
2a54bfab40 [Task 69156] applied feedback to the breadcrumbs tests 2020-02-28 14:34:32 +01:00
Tim Donohue
9f0ba4914a Merge pull request #2684 from atmire/DS-4438_ProjectionsForPOSTRequests
DS-4438 Respect client-provided projections for non-GETs
2020-02-27 11:40:47 -06:00
Raf Ponsaerts
abf82a3f46 [Task 69130] applied feedback to the breadcrumbs functionality 2020-02-27 15:01:21 +01:00
benbosman
373e8e1603 Merge pull request #2646 from atmire/workflow-step-definitions
Workflow step definitions
We're at +2 and Tim's feedback has been processed
2020-02-25 11:55:53 +01:00
Raf Ponsaerts
06f5199ec7 Re-adding javadoc to the CollectionParentCommunityLinkRepository 2020-02-25 11:38:16 +01:00
Raf Ponsaerts
b963622191 Merge remote-tracking branch 'dspace/master' into w2p-68607_add-link-to-parent-community 2020-02-25 11:19:25 +01:00
Raf Ponsaerts
c1d7edafbe [Task 68945] processed feedback on breadcrumbs ITs 2020-02-25 11:18:08 +01:00
Marie Verdonck
ba6792a43c is(HttpStatus.SC_BAD_REQUEST) to isBadRequest() 2020-02-25 10:40:16 +01:00
Tim Donohue
9910d89caa Merge pull request #2690 from tdonohue/update_oai
DS-4380:  Update XOAI (OAI-PMH) for full JDK11 compatibility
2020-02-24 11:24:06 -06:00
Tim Donohue
d78f3c393b Minor refactor to make it easier to debug OAI Solr connection problems. Update to new config format 2020-02-24 10:35:14 -06:00
Tim Donohue
8cceea8f06 Upgrade to XOAI 3.3.0 for JDK11 compatibility. 2020-02-24 10:35:05 -06:00
Marie Verdonck
8a83d344f5 checkstyle 2020-02-24 15:52:37 +01:00
Marie Verdonck
c4548d3c61 missing licenses 2020-02-24 15:10:46 +01:00
Marie Verdonck
ffc1505f01 LinkRepositories so that subresources paths work without projection=full (for workflowdefinitions/defaultWorkflow/steps and /workflowsteps/editstep/actions) 2020-02-24 14:29:04 +01:00
Marie Verdonck
e0acfbc6e4 constant for expected http status 2020-02-24 13:27:08 +01:00
Marie Verdonck
d395be6a3e test fix after master merge 2020-02-24 13:24:07 +01:00
Marie Verdonck
ff30538dad Merge remote-tracking branch 'dspace-origin/master' into workflow-step-definitions
# Conflicts:
#	dspace-api/src/test/java/org/dspace/xmlworkflow/XmlWorkflowFactoryTest.java
2020-02-24 12:55:58 +01:00
Andrew Wood
738365d94f DS-4438 Update ITs check for projections from POST request 2020-02-21 11:26:18 -05:00
Raf Ponsaerts
d79deb6e1e [DS-3532] added javadoc to the linkRestRepositories for ParentCommunity Linking 2020-02-21 08:58:38 +01:00
Chris Wilper
b0510dc486 drop unnecessary test object 2020-02-20 14:38:52 -05:00
Andrew Wood
13daed22ab DS-4438 Update projections refrence and ITs 2020-02-20 13:13:12 -05:00
Tim Donohue
057cd30936 Merge pull request #2668 from Micheleboychuk/missingParameterException-DS-4428
DS-4428 missing parameter exception
2020-02-20 10:38:24 -06:00
Tim Donohue
453c69132b Merge pull request #2669 from tdonohue/DS-4380_errorprone_fixes
DS-4380 : Fix errorprone test warnings after JDK11 upgrade
2020-02-20 10:36:56 -06:00
Tim Donohue
81ae8b1738 Merge pull request #2674 from tdonohue/DS-4434_fix_context_behavior
[DS-4434] Fix Context.commit() and Context.isValid() behavior. Add more tests
2020-02-20 10:28:10 -06:00
Tim Donohue
808316599e Minor test correction. Use example.com for test emails as its guarranteed undeliverable 2020-02-19 16:56:32 -06:00
Tim Donohue
280ccac20c Fix Objects.toString() calls to return empty string if null 2020-02-19 16:51:28 -06:00
Andrea Bollini
dbf5012298 Merge remote-tracking branch 'origin/master' into missingParameterException-DS-4428 2020-02-19 22:10:53 +01:00
Andrea Bollini
91db234849 Merge remote-tracking branch 'origin/master' into missingParameterException-DS-4428 2020-02-19 19:11:58 +01:00
Chris Wilper
95ee328862 DS-4438 Respect client-provided projection when creating item in workspace 2020-02-19 13:01:41 -05:00
Tim Donohue
b33e5834a9 Merge pull request #2682 from atmire/DefaultFullProjectionForNewSubmissions
Default to full projection for workspace item POSTs
2020-02-19 11:13:36 -06:00
Chris Wilper
fa4678c745 Default to full projection for workspace item POSTs (workaround; angular currently expects embeds here) 2020-02-19 10:04:20 -05:00
Marie Verdonck
570f77d1a6 68860: test fixes after merging latest dspace-origin/master 2020-02-19 15:28:35 +01:00
benbosman
e0282d1fb3 Merge pull request #2591 from atmire/DS-4389-improving-patch-system-framework
Ds 4389 improving patch system framework Part 1
2020-02-19 11:56:42 +01:00
Kevin Van de Velde
c498838e39 Merge remote-tracking branch 'upstream/master' into workflow-step-definitions 2020-02-19 09:39:21 +01:00
Kevin Van de Velde
4512ed5024 Removing obsolete "extends Object" from ResourcePatch 2020-02-17 14:17:33 +01:00
Marie Verdonck
1c489fbf85 DS-4389: checkstyle 2020-02-17 13:30:20 +01:00
Marie Verdonck
a6e3298d19 DS-4389: ResourceNotFoundException if ResourcePolicy can't be retrieved 2020-02-17 12:14:22 +01:00
Mykhaylo Boychuk
8ed4f6d54c fixed unit test, should return 400 BADREQUEST 2020-02-17 12:02:35 +01:00
Marie Verdonck
e94168e099 DS-4389: Changes after merging latest master 2020-02-17 11:32:26 +01:00
Mykhaylo Boychuk
427d96af07 fixed QueryMethodParameterConversion should return 400 2020-02-17 11:07:59 +01:00
Marie Verdonck
e75d17f6a4 Merge remote-tracking branch 'dspace-origin/master' into DS-4389-improving-patch-system-framework
# Conflicts:
#	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/CollectionRestRepository.java
#	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ItemRestRepository.java
2020-02-17 10:07:38 +01:00
Marie Verdonck
1bee20c732 [DS-4389] Refactored new ResourcePolicy Patch system to work like the improved patch system (ResourcePolicy from DS-4398) 2020-02-14 18:56:01 +01:00
Tim Donohue
a5fe08c158 Minor spelling/grammar fixes 2020-02-14 09:39:04 -06:00
Tim Donohue
5e953f8bde Merge pull request #2656 from atmire/w2p-65257_Collection-item-template-crud
Collection item template updates
2020-02-14 09:24:11 -06:00
Tim Donohue
73f8dc100e Do not reuse global Context for cleanup actions...it may already be closed 2020-02-14 08:57:36 -06:00
Tim Donohue
7f879a2086 Add tests for HibernateDBConnection. Fix failing ContexTest methods. Bug fixes found via Tests 2020-02-14 08:57:36 -06:00
Tim Donohue
6a14699bd1 Add more Tests for Context. Bug fixes based on that. Enhance javadocs in HibernateDBConnection 2020-02-14 08:57:35 -06:00
Raf Ponsaerts
b4992cad3e Fixed checkstyle in ItemTemplateRestController 2020-02-14 15:33:07 +01:00
Raf Ponsaerts
cbd6870d72 [Task 68537] implemented feedback with regards to javadoc and annotations for the TemplateItem functionality 2020-02-14 14:16:56 +01:00
Raf Ponsaerts
580f6d7ad8 [Task 68537] fixed the templateItemOf link 2020-02-14 14:16:56 +01:00
Raf Ponsaerts
3e736e130a [Task 68537] applied feedback and fixes to the itemtemplate endpoints 2020-02-14 14:16:56 +01:00
Raf Ponsaerts
7322d983c4 Fixed tests on the ItemTemplate endpoints after rebasing on master 2020-02-14 14:16:56 +01:00
Raf Ponsaerts
36f2f0aa97 [Task 68059] removed superfluous information and links from templateItem endpoints and added/fixed tests 2020-02-14 14:16:55 +01:00
Peter Nijs
5e7da85197 67526: CRUD on Collection Item template
- Make the output of /core/collections/{id}/itemtemplate equal to /core/items/{id}
2020-02-14 14:13:38 +01:00
Kevin Van de Velde
7c7422e4cf Fixing the dspace.url references in the new patch classes 2020-02-14 09:57:04 +01:00
Raf Ponsaerts
6447176f02 Fixed headers and checkstyle for parentCommunity link functionality 2020-02-14 09:27:21 +01:00
Kevin Van de Velde
ffc1d37f8e Merge branch 'master' into DS-4389-improving-patch-system-framework 2020-02-14 09:14:20 +01:00
Tim Donohue
fb8ef5044b Fix checkstyle errors 2020-02-13 15:31:47 -06:00
Tim Donohue
4f9fb7d339 Minor fix to test cleanup 2020-02-13 15:31:47 -06:00
Tim Donohue
e69a63c5a7 Fix a number of errorprone warnings in tests. 2020-02-13 15:31:47 -06:00
Tim Donohue
db09a70d8f Fix deprecation of ObjectUtils.toString 2020-02-13 15:31:46 -06:00
Tim Donohue
3ae9009dbd Fixes to various errorprone warnings in tests 2020-02-13 15:31:46 -06:00
Tim Donohue
14586eb594 Fix errorprone warnings (UnusedVariable, out of order params) 2020-02-13 15:31:46 -06:00
Tim Donohue
82c90ca15c Fix errorprone warning https://errorprone.info/bugpattern/StringSplitter 2020-02-13 15:31:45 -06:00
Tim Donohue
f73b2b5fea Fix deprecation warnings 2020-02-13 15:31:45 -06:00
Tim Donohue
408acc2b90 Fix deprecation warning 2020-02-13 15:31:45 -06:00
Tim Donohue
1b40e6d6e9 Minor test class refactors to remove errorprone warnings. 2020-02-13 15:31:45 -06:00
Tim Donohue
f50156d320 Refactor to remove deprecation warning for ObjectUtils.equals 2020-02-13 15:31:45 -06:00
Tim Donohue
657319b02c Rename IntegrationTest to end in IT. 2020-02-13 15:31:45 -06:00
Tim Donohue
820722d2e6 Merge pull request #2657 from tdonohue/DS-4257_url_config_cleanup
[DS-4257] dspace.url and dspace.baseUrl config cleanup
2020-02-13 14:52:14 -06:00
Tim Donohue
19f1e60b67 Merge pull request #2654 from tdonohue/DS-4380_jdk11
DS-4380 : Upgrading 7.x to JDK11.  Remove JMockit (replace with Mockito)
2020-02-13 14:37:28 -06:00
Tim Donohue
7fe454d1a5 Upgrade Hibernate for full JDK11 compatibility. See https://hibernate.org/orm/releases/5.4/ 2020-02-13 13:43:50 -06:00
Tim Donohue
33bae06be6 Fix illegal reflective access from old version of Axiom. Also fix Geronimo warnings in builds. 2020-02-13 13:43:50 -06:00
Tim Donohue
b6b70b2c9c Fix build warning about "patterns were never triggered in this artifact exclusion filter" 2020-02-13 13:43:50 -06:00
Tim Donohue
29e5dcc5a9 Upgrade Dockerfiles and docker-compose files to all use JDK11. Remove JDK from names (JDK8 no longer supported) 2020-02-13 13:43:50 -06:00
Tim Donohue
7c335c8170 Updates to all maven plugin versions. General POM cleanup. 2020-02-13 13:43:50 -06:00
Tim Donohue
2d6b207b4f Comment out restlet <repository>. Old URL works again. Seems to have been only temporarily unavailable. 2020-02-13 13:43:50 -06:00
Tim Donohue
3894b9c7fc Move xml-maven-plugin to parent POM. It is already accessing XMLs outside of dspace-api. 2020-02-13 13:43:50 -06:00
Tim Donohue
447b7722f0 Test fixes after rebase. Remove unnecessary new code. 2020-02-13 13:43:49 -06:00
Tim Donohue
576f699e08 Minor code cleanup / import fixes 2020-02-13 13:43:49 -06:00
Tim Donohue
ecdba21a71 Workaround for trautonen/coveralls-maven-plugin#112 2020-02-13 13:43:49 -06:00
Tim Donohue
4537897e17 Final removal of JMockit. Move last tests to Mockito. Cleanup unused tests & resources 2020-02-13 13:43:49 -06:00
Tim Donohue
eb8c0cc605 Move context.complete() call to avoid closing passed in context 2020-02-13 13:43:49 -06:00
Tim Donohue
ebfc5dfb1f Refactor to no longer use JMockit mocks. 2020-02-13 13:43:49 -06:00
Tim Donohue
40f053751b Refactor AuthorizeUtil to NOT cache services (in static final variables). This allows authorization to be more easily mocked/overridden in tests. 2020-02-13 13:43:49 -06:00
Tim Donohue
50be2508ab Move JMockit init for Maven 2020-02-13 13:43:49 -06:00
Tim Donohue
b53be1f471 Refactor MockSolrLoggerServiceImpl to use Mockito. Remove FakeDatabaseReader 2020-02-13 13:43:49 -06:00
Tim Donohue
9b990f1834 Refactor to use Mockito (or no mocks) 2020-02-13 13:43:49 -06:00
Tim Donohue
7deed9040f Update to use Mockito. Other minor changes 2020-02-13 13:43:49 -06:00
Tim Donohue
33a2e94d44 Refactor to use Mockito (mostly) 2020-02-13 13:43:48 -06:00
Tim Donohue
0118c2bbd3 Refactor to use Mockito 2020-02-13 13:43:48 -06:00
Tim Donohue
6248867de7 Refactor tests to use Mockito instead of JMockit 2020-02-13 13:43:48 -06:00
Tim Donohue
eb53950660 Correct location of MockitoJUnitRunner (new package) 2020-02-13 13:43:48 -06:00
Tim Donohue
93c39cf318 Refactor (most) tests to use Mockito instead of JMockit 2020-02-13 13:43:48 -06:00
Tim Donohue
3ab37aafb9 Refactor tests to use Mockito instead of JMockit 2020-02-13 13:43:48 -06:00
Tim Donohue
e97218616d Implement destroy properly & fix an incorrect test 2020-02-13 13:43:48 -06:00
Tim Donohue
8c7127ed8c Refactor tests to use Mockito 2020-02-13 13:43:48 -06:00
Tim Donohue
412c8a1ec8 Refactor tests to use Mockito instead of JMockit 2020-02-13 13:43:48 -06:00
Tim Donohue
d6a4bf21b9 Remove stubs that Mockito says are not used. Then remove duplicative tests. 2020-02-13 13:43:48 -06:00
Tim Donohue
cfde3e905b Switch CommunityTest to mostly using Mockito (exceptions for Util classes) 2020-02-13 13:43:48 -06:00
Tim Donohue
db18ddfb5a Update dependencies. Fixes Maven issues with initializing dspace.dir 2020-02-13 13:43:48 -06:00
Tim Donohue
78fb4cfe82 Remove MockUtil and replace with handling NPE that can occur when running Util in test mode. 2020-02-13 13:43:47 -06:00
Tim Donohue
7700d6a3b5 Replace jmockit with mockito in dspace-services. Correct tests 2020-02-13 13:43:47 -06:00
Tim Donohue
6a8516e957 Enable Mockito to mock/spy final classes & methods 2020-02-13 13:43:47 -06:00
Tim Donohue
f9709c0d8e Fix test to no longer overwrite test configs. 2020-02-13 13:43:47 -06:00
Tim Donohue
3e4937a2ba Ensure "dspace.dir" is explicitly set for tests. Implicit no longer works. 2020-02-13 13:43:47 -06:00
Tim Donohue
27e275e237 Reinitialize jmockit for all tests 2020-02-13 13:43:47 -06:00
Tim Donohue
1982ceb076 Fix errors reported by latest version of ErrorProne 2020-02-13 13:43:47 -06:00
Tim Donohue
f3e4bfa29a Reenable ErrorProne on JDK11 2020-02-13 13:43:47 -06:00
Tim Donohue
da19d7c360 Update Travis CI to use JDK11. Minor comment changes 2020-02-13 13:43:47 -06:00
Tim Donohue
ef6e32f435 Base dependency updates for JDK11, based on cwilper's PR#2611 2020-02-13 13:43:47 -06:00
Tim Donohue
3c43dbdcdd Replace dspace.url with dspace.server.url in recent code comments 2020-02-13 13:42:36 -06:00
Tim Donohue
b116c55714 Refactor code to remove the need for a "hostname" configuration. 2020-02-13 13:40:35 -06:00
Tim Donohue
d455d7df87 Fix minor test & checkstyle failures 2020-02-13 13:40:34 -06:00
Tim Donohue
c55f29de6a Replace dspace.hostname with dspace.ui.hostname. Enhance descriptions of how/where configs are used 2020-02-13 13:40:34 -06:00
Tim Donohue
e8180f11cb Replace all usages of dspace.url with either dspace.ui.url or dspace.server.url (depending on use case) 2020-02-13 13:40:33 -06:00
Tim Donohue
5e3e9b8f9d Replace all usages of dspace.baseUrl with either dspace.server.url or dspace.ui.url (depending on use case) 2020-02-13 13:40:23 -06:00
Tim Donohue
f64553e31c Remove final references to old dspace.restUrl config 2020-02-13 13:36:00 -06:00
Tim Donohue
9de65efa8c Merge pull request #2625 from atmire/DS-3533_Projections-Continued
DS-3533 Projections continued
2020-02-13 10:41:01 -06:00
Raf Ponsaerts
61400e1145 Added parentCommunity to test matchers for collections and communities 2020-02-13 16:17:22 +01:00
Raf Ponsaerts
fc1744c322 Merge branch 'DS-3533_Projections-Continued' into w2p-68607_add-link-to-parent-community 2020-02-13 15:42:28 +01:00
Chris Wilper
fe8e069aa7 DS-3533 Address PR feedback 2020-02-13 09:17:05 -05:00
Chris Wilper
7206456f30 Merge branch 'master' into DS-3533_Projections-Continued
Manually resolved conflicts, including removing CollectionDefaultAccessConditionsLinkRepository
because that subresource is no longer expected to be on collections.
2020-02-12 16:48:32 -05:00
Marie Verdonck
207f745512 [DS-2646]: test and checkstyle fixes 2020-02-12 18:29:08 +01:00
Mykhaylo Boychuk
5adb1ce549 fix unit test from 422 to 400 2020-02-12 17:30:37 +01:00
Mykhaylo Boychuk
496b88093d fixed handle missing servlet request parameter 2020-02-12 17:30:37 +01:00
Mykhaylo Boychuk
cbe07eb15a fix javadoc 2020-02-12 17:30:36 +01:00
Mykhaylo Boychuk
4e080150cb fixed unit tests: missing parameters should return 400 BAD REQUEST 2020-02-12 17:30:36 +01:00
Mykhaylo Boychuk
0a9d4cd4c1 DS-4428 fix bad request 2020-02-12 17:30:36 +01:00
Mykhaylo Boychuk
c71c52bb46 DS-4428 enable tests for bad request 2020-02-12 17:30:36 +01:00
Marie Verdonck
0c9e50ca72 [DS-2646]: /workflowdefintions/<:name>/steps fixed + new tests &
endpoint result names changed to without Resource
2020-02-12 16:46:14 +01:00
Tim Donohue
14445d599c Merge pull request #2604 from Micheleboychuk/resourcepolicies
DS-4398 initial implementation of the resource policies endpoint
2020-02-12 09:39:39 -06:00
Chris Wilper
0c73f333d7 DS-4427 Update tests based on new embed expectations 2020-02-12 09:37:42 -05:00
Chris Wilper
1acd62ed96 DS-3533 Add javadoc for new method 2020-02-12 08:41:18 -05:00
Chris Wilper
c9d6797396 DS-4427 Re-enable embedding for link repositories in favor of embed level limiting 2020-02-12 08:36:45 -05:00
Chris Wilper
b4e8851b12 DS-3533 Fix test issue and imports 2020-02-12 07:10:32 -05:00
Chris Wilper
dd55ad3609 DS-3533 Increase max embed level to 3 and fix tests 2020-02-11 13:25:08 -05:00
Andrew Wood
08ee6e5c76 DS-3533 Refactor projection embeds ITs to match new style 2020-02-11 10:16:31 -05:00
Raf Ponsaerts
2241b591f7 [Task 68608] added ITs for the parent communities and owning collections 2020-02-11 16:10:42 +01:00
Raf Ponsaerts
fa07bc27d0 Merge branch 'DS-3533_Projections-Continued' into w2p-68607_add-link-to-parent-community 2020-02-11 12:44:37 +01:00
Chris Wilper
e6e5da191d DS-4427 Only embed up to one level 2020-02-10 16:36:00 -05:00
Chris Wilper
8e7646f5f5 DS-3533 Fix incorrect comment noted by Tim 2020-02-10 11:25:53 -05:00
Marie Verdonck
c1193c6890 [DS-2646]: test fix 2020-02-10 16:25:26 +01:00
Chris Wilper
414d4dc248 DS-3533 Begin consolidating embedded/link tests per dso type 2020-02-10 10:15:52 -05:00
Marie Verdonck
1f8e440793 [DS-2646]: checkstyle 2020-02-10 15:18:58 +01:00
Raf Ponsaerts
ea509448a9 [Task 68608] test setup for parent community IT 2020-02-10 14:32:16 +01:00
Marie Verdonck
e35e5a6b3a [DS-2646]: /workflowdefinitions/<:name>/collections via @LinkRest (Controller to LinkRepository)
and /steps set embedOptional to true
> /workflowdefinitions/<:name> has links of subresources, but no embeds
2020-02-10 14:27:49 +01:00
Marie Verdonck
2fd967744c [DS-2646]: Workflow Endpoints now need authenticated access + tests:
WorkflowDefinition, WorkflowActions & WorkflowSteps Endpoints
2020-02-10 11:05:52 +01:00
Andrew Wood
b77b4f0336 DS-3533 Create test for embeds and links against DSO REST ITs 2020-02-07 15:37:05 -05:00
Chris Wilper
b1e7e9f2aa DS-3533 Disable embedding of authority entryValues as a direct subresource 2020-02-07 15:36:13 -05:00
Chris Wilper
4a5cbb3678 DS-3533 Make authority entries subresource embeddable 2020-02-07 15:32:40 -05:00
Raf Ponsaerts
0faeaabdef [Task 68607] added links to the parentCommunity for collections and communities on their respective endpoints 2020-02-07 15:38:25 +01:00
Chris Wilper
afdefcbeed DS-3533 Drop unused import 2020-02-06 14:56:01 -05:00
Mykhaylo Boychuk
b4798511b4 update test to access single resource policy owned by Anonymous group
resource policy endpoints are now restricted to authenticated people according to the reviewed contract
2020-02-06 17:14:52 +01:00
Mykhaylo Boychuk
dc06efbb83 added unit test to retrieve a resource policy attached to the Anonymous group with/without using authentication 2020-02-06 15:52:58 +01:00
Chris Wilper
b1d54273de DS-3533 Adjust javadocs 2020-02-06 09:12:03 -05:00
Chris Wilper
241289a2f9 DS-3533 Fix formatting 2020-02-06 08:52:12 -05:00
Chris Wilper
d2d03bca9e DS-3533 Run test with admin perms since permission is now checked 2020-02-06 08:52:12 -05:00
Andrew Wood
58ad460e74 DS-3533 Fix BrowsesResourceControllerIT test 2020-02-06 08:52:12 -05:00
Chris Wilper
e0f0483b5d DS-3533 Fix expectation browseEntries -> entries 2020-02-06 08:52:12 -05:00
Andrew Wood
7f45d1defc DS-3533 Rest IT fixes 2020-02-06 08:52:12 -05:00
Chris Wilper
c84939e57d DS-3533 Fix ConverterService tests based on new expectations 2020-02-06 08:52:12 -05:00
Chris Wilper
e6e0360e8f DS-3533 Drop extends; not a link repository 2020-02-06 08:52:12 -05:00
Chris Wilper
6ef0e165dc DS-3533 Drop linkClass; unused 2020-02-06 08:52:12 -05:00
Chris Wilper
7d3885f939 DS-3533 Drop embed/linkOptional properties from LinkRest 2020-02-06 08:52:12 -05:00
Andrew Wood
169cd502a2 DS-3533 Consistency: Use same json for paged subresources
This ensures that when a subresource is a paged collection,
the json is constructed in the same way, whether it is embedded
in its parent, or requested separately.
2020-02-06 08:49:35 -05:00
Chris Wilper
c71090a04f DS-3533 Request embeds for relevant ITs 2020-02-06 08:49:27 -05:00
Mykhaylo Boychuk
3e0db7a7a1 Forbid anonymous users to search by gorup 2020-02-06 10:40:26 +01:00
Mykhaylo Boychuk
434774f1f6 Add test to verify that anonymous users cannot search by group 2020-02-06 10:37:12 +01:00
Chris Wilper
0fded8de83 DS-3533 Permit embedding group in eperson 2020-02-05 13:19:23 -05:00
Chris Wilper
2019e095db DS-3533 Avoid embedding subresources that may nest (groups in groups, communities in communities) 2020-02-05 13:19:23 -05:00
Chris Wilper
d4c0bbde52 DS-3533 Consistency: Use link repo to GET bitstream bundle subresource 2020-02-05 13:19:23 -05:00
Chris Wilper
d67aeb41d9 DS-3533 Fix collection license subresource authorization 2020-02-05 13:19:23 -05:00
Chris Wilper
fc9512a495 DS-3533 Make group subresource embeds optional 2020-02-05 13:19:23 -05:00
Chris Wilper
876a1fad1d DS-3533 Consistency: Use link repo for eperson groups 2020-02-05 13:19:23 -05:00
Chris Wilper
8c2953c66d DS-3533 Consistency: Use link repo for mapped items 2020-02-05 13:19:23 -05:00
Chris Wilper
10dcd35880 DS-3533 Consistency: Return NOT FOUND when resource not found for subresource request 2020-02-05 13:19:23 -05:00
Chris Wilper
17180337d7 DS-3533 Consistency: Use link repo for mapped collections 2020-02-05 13:19:23 -05:00
Chris Wilper
3a56f002e5 DS-3533 Make community subresource embeds optional 2020-02-05 13:19:23 -05:00
Chris Wilper
3cdb947098 DS-3533 Get optional pageable from one place 2020-02-05 13:19:23 -05:00
Chris Wilper
20a00db673 DS-3533 Make collection subresource embeds optional 2020-02-05 13:19:23 -05:00
Chris Wilper
2865ff9171 DS-3533 Rename for consistency among link repos 2020-02-05 13:19:23 -05:00
Chris Wilper
de71486e6b DS-3533 Consistency: Return NO CONTENT when link repo returns null 2020-02-05 13:19:23 -05:00
Chris Wilper
460ada4098 DS-3533 Require read access to get subresources 2020-02-05 13:19:22 -05:00
Chris Wilper
f98e011738 DS-3533 Make bitstream subresource embeds optional 2020-02-05 13:19:22 -05:00
Chris Wilper
2884a80958 DS-3533 Make bundle subresource embeds optional 2020-02-05 13:19:22 -05:00
Chris Wilper
2f018c6f89 DS-3533 Make item subresource embeds optional 2020-02-05 13:19:22 -05:00
Chris Wilper
fb36d4bd7b DS-3533 Fix test to match new expectation 2020-02-05 13:19:22 -05:00
Chris Wilper
e331d5557e DS-3533 Include optional links by default 2020-02-05 13:19:22 -05:00
Chris Wilper
7637857505 DS-3533 Drop "list" projection; no longer relevant 2020-02-05 13:19:22 -05:00
Chris Wilper
37692eb120 DS-3533 Correct javadocs 2020-02-05 13:19:22 -05:00
Raf Ponsaerts
e0c1e14330 DS-3533 Update javadocs 2020-02-05 13:19:22 -05:00
Raf Ponsaerts
f8eb5843f2 DS-3533 Disable embeds by default 2020-02-05 13:19:22 -05:00
Andrea Bollini
03238bcbb5 Community feedback: improved javadoc and naming 2020-02-05 19:02:42 +01:00
Mykhaylo Boychuk
325f992936 uniform naming and code cleanup 2020-02-04 15:24:43 +01:00
Mykhaylo Boychuk
6248acd8fa fix findByResourceUuid query 2020-02-04 15:22:23 +01:00
Mykhaylo Boychuk
8c3f572c0b remove references to default bitstream policies to avoid infinite loop 2020-02-04 15:18:00 +01:00
Julius Gruber
707168dd1e Dspace bat file (#2544)
* First test

* Minor changes to bat file

* Removed files not to part of  the PR

* Added config files

* Removed buildpath.bat

* Changed bat file

* Enabled shibooleth in config

* Removed unnecessary comment from bat file

* Linux dspace script made similar to dspace bat file

* Removed authentication.cfg from this PR

* Now really removed authentication.cfg from this PR

* Remove OAI from classpath

Co-authored-by: Tim Donohue <tim.donohue@lyrasis.org>
2020-02-03 11:18:57 -06:00
Tim Donohue
9dbda4e2e1 Merge pull request #2650 from atmire/default-webui.submit.upload.required
Default webui.submit.upload.required
2020-02-03 10:55:44 -06:00
Kevin Van de Velde
f732577425 Merge branch 'master' into workflow-step-definitions 2020-02-03 13:15:57 +01:00
Kevin Van de Velde
bda2e51041 Fixing configuration in the workflow-actions.xml test file 2020-02-03 13:15:30 +01:00
Tim Donohue
205cb103dc Merge pull request #2658 from atmire/w2p-68458_Indexing-Performance-is-very-slow-since-refactor--ITs-take-twice-as-long
[DS-4425] Indexing Performance is very slow since refactor. ITs take twice as long
2020-01-31 09:26:03 -06:00
Marie Verdonck
6680d233e2 [DS-2646]: checkstyle fix 2020-01-31 16:03:36 +01:00
Samuel
274ca1fcb2 taskid 68458 optimize performance - IndexEventConsumer change 2020-01-31 13:14:44 +01:00
Marie Verdonck
1820659a80 [DS-2646]: api/config/workflowdefinitions/defaultWorkflow/collections :
returns all non-mapped collections & all collections specifically mapped to defaultWorkflow
& Exception comment
2020-01-31 13:11:40 +01:00
Marie Verdonck
aaa9d5ed29 [DS-2646]: javadoc & SUBMIT_EDIT_METADATA to ProcessingAction 2020-01-31 13:10:42 +01:00
Marie Verdonck
8b51ba692d Merge remote-tracking branch 'dspace-origin/master' into workflow-step-definitions 2020-01-31 11:55:48 +01:00
Kevin Van de Velde
d9acb5ba8a Enabling the patchItemMetadataAuthorized() test 2020-01-30 11:56:58 +01:00
Kevin Van de Velde
a9c8a3b49e Merge branch 'master' into DS-4389-improving-patch-system-framework 2020-01-30 10:46:58 +01:00
benbosman
48cf744040 Merge pull request #2420 from KevinVdV/DS-4239-migrate-workflow-xml-to-spring
[DS-4239] Migrate the workflow.xml to spring
Merging since there are 2 approvals and it's a dependency for https://github.com/DSpace/DSpace/pull/2646
2020-01-29 09:19:00 +01:00
Tim Donohue
75ea08f077 Merge pull request #2632 from mwoodiupui/DS-4409
[DS-4409] Remove GeoIP download Ant target, reconfigure for external provision
2020-01-23 11:23:09 -06:00
Mykhaylo Boychuk
f6d6d14add added some checks in resourcePolicyMatcher 2020-01-23 17:54:37 +01:00
Tim Donohue
61a685f792 Merge pull request #2496 from mwoodiupui/DS-2378
[DS-2378] Remove support for multiple ServiceManagers
2020-01-23 10:20:39 -06:00
Tim Donohue
07370e7f08 Merge pull request #2644 from paulo-graca/patch-5
Fix for DS-4422
2020-01-23 09:46:46 -06:00
Mykhaylo Boychuk
ed14f0c33b added unit test for method findByResource 2020-01-23 16:00:45 +01:00
Tim Donohue
1db367f437 Merge pull request #2641 from atmire/w2p-67817_RelationshipTypeRestController-minor-change
relationship type rest controller bug fix
2020-01-22 09:39:16 -06:00
Marie Verdonck
f8ab7def82 68373: test fix by setting webui.submit.upload.required=false &
extra tests for file upload when upload.required = true
2020-01-22 15:23:31 +01:00
Tim Donohue
60d9f15aec Merge pull request #2640 from paulo-graca/patch-4
Fix for DS-4420 OpenAIREv4 XSLT Warning in Spring Boot
2020-01-21 09:37:18 -06:00
Kevin Van de Velde
20d9b330d0 Fixing merge issue in the workflow-actions.xml file 2020-01-21 12:49:29 +01:00
Kevin Van de Velde
25dd5162b0 Merge branch 'DS-4239-migrate-workflow-xml-to-spring' into workflow-step-definitions 2020-01-21 09:30:07 +01:00
Kevin Van de Velde
5ba7a16e5a [DS-4239] Migrate the workflow.xml to spring: Aligning the workflow.xml from the test to the one in default config 2020-01-20 13:57:41 +01:00
Tim Donohue
903ff57994 Merge pull request #2643 from tdonohue/fix_solr_dockerfile
[Docker] Fix Solr Dockerfile. Pull DSpace Solr configs from 'dspace' image
2020-01-17 16:37:57 -06:00
Tim Donohue
d39027f9d6 Update comment to note why we are pinning to Solr 7 2020-01-17 15:33:14 -06:00
Tim Donohue
54dd0496b3 Make sure DSpace Solr schemas/configs are owned by solr user 2020-01-17 15:17:20 -06:00
Paulo Graça
f34562bb19 Fix for https://jira.lyrasis.org/browse/DS-4422 2020-01-17 14:55:20 +00:00
Ben Bosman
bcd89e9145 JavaDoc for new params 2020-01-17 15:26:36 +01:00
Kevin Van de Velde
5b2f50060d [DS-4239] Migrate the workflow.xml to spring: Bugfixes to the optional select reviewer workflow 2020-01-17 10:07:56 +01:00
Tim Donohue
7f918a5986 Update/enhance README 2020-01-16 16:46:28 -06:00
Tim Donohue
7babc754cf Fix Solr Dockerfile by pulling Solr configs from main dspace image 2020-01-16 16:46:28 -06:00
Tim Donohue
6c864d678c Merge pull request #2642 from tdonohue/fix_broken_build
[HIGH PRIORITY] Fix Maven build where restlet dependency not found for solr-cell
2020-01-16 16:45:27 -06:00
Tim Donohue
31b960d4e1 Merge pull request #2612 from atmire/DS-4287-indexableobject-refactor
[DS 4287] Refactoring the IndexableObject & SolrServiceImpl
2020-01-16 16:21:57 -06:00
Tim Donohue
ad7d22cba7 Update repository to use HTTPS 2020-01-16 16:12:21 -06:00
Tim Donohue
6424b5d12d Fix Maven build where restlet dependency not found for solr-cell 2020-01-16 16:01:17 -06:00
Paulo Graça
81a5204e74 Fix for DS-4420 [Received] OpenAIREv4 XSLT Warning in Spring Boot 2020-01-16 16:05:37 +00:00
Ben Bosman
b7d407fe40 Merge remote-tracking branch 'community/master' into w2p-67817_RelationshipTypeRestController-minor-change 2020-01-16 16:30:23 +01:00
Marie Verdonck
c171140371 68274: /workflowdefinitions/<:definition-name>/steps endpoint as embedded resource and collections link 2020-01-16 14:19:11 +01:00
Tim Donohue
c6641f5d1b Merge pull request #2638 from atmire/w2p-68148_bug-in-viewevents
Bug in ViewEvents
2020-01-15 10:24:58 -06:00
Tim Donohue
6e9d459e00 Merge pull request #2637 from tdonohue/version_updates
Minor dependency updates to resolve GitHub security alerts
2020-01-15 10:22:44 -06:00
Mykhaylo Boychuk
5c93722d67 Implement community feedbacks 2020-01-15 15:34:13 +01:00
Mykhaylo Boychuk
8fce3d109a added javadoc and rename some methods 2020-01-15 15:31:31 +01:00
Marie Verdonck
b76933e7c1 68274: /api/config/workflowdefinitions/<:definition-name>/steps endpoint and link 2020-01-14 13:06:27 +01:00
Mykhaylo Boychuk
dc9fe87987 Implemented unit test 2020-01-13 16:30:56 +01:00
Mykhaylo Boychuk
7d5ed97676 added javadoc 2020-01-13 16:27:36 +01:00
Kevin Van de Velde
5236534847 [DS-4287] Refactoring the IndexableObject & SolrServiceImpl: Fixing some tests 2020-01-13 13:09:18 +01:00
Marie Verdonck
2c5acf0cfb 68253: GET /api/config/workflowsteps/<:step-name> IT 2020-01-13 12:45:54 +01:00
Mykhaylo Boychuk
74cfc838d6 Merge branch 'master' of https://github.com/DSpace/DSpace into resourcepolicies 2020-01-13 09:36:20 +01:00
Mykhaylo Boychuk
92f632d08f Implement community feedbacks 2020-01-11 11:49:32 +01:00
Mykhaylo Boychuk
8d66d7f534 added javadoc 2020-01-11 11:41:21 +01:00
Mykhaylo Boychuk
7808834e9c renamed the class and add javadoc 2020-01-11 11:33:07 +01:00
Mark H. Wood
aa4f2898c6 [DS-4409] Leave GeoLite database location unconfigured by default. 2020-01-10 11:46:08 -05:00
Marie Verdonck
766d021a1a 68253: GET /api/config/workflowsteps/<:step-name> endpoint 2020-01-10 17:01:33 +01:00
Kevin Van de Velde
f112d93cd5 Merge branch 'master' into DS-4287-indexableobject-refactor 2020-01-10 10:48:55 +01:00
Kevin Van de Velde
2c5ed44f81 [DS-4287] Refactoring the IndexableObject & SolrServiceImpl: Additional comments, some more narrowing of generics, additional error catching & cleaner way to resolve permissions 2020-01-10 10:33:56 +01:00
Mark H. Wood
ad03a97660 [DS04409] There is another set of mock/fake classes for dspace-server-webapp. Activate them. 2020-01-09 16:13:38 -05:00
Tim Donohue
053eb1be3c Merge pull request #2635 from tdonohue/docker_wait_on_db
[Docker] Ensure dspace container waits until db is accepting connections before starting Tomcat
2020-01-09 11:23:53 -06:00
Marie Verdonck
22b1f6231d 68155: xmlWorkflowFactory autowired where possible & WorkflowAction.name > id 2020-01-09 14:24:37 +01:00
Tim Donohue
6a1c170fe6 Minor updates to Spring configs for Spring Security v5 2020-01-08 16:10:12 -06:00
Tim Donohue
676fbb1450 Fix CVE-2019-0201 and CVE-2019-17531 2020-01-08 14:30:31 -06:00
Tim Donohue
9bb75570b0 Fix CVE-2019-17195 2020-01-08 14:29:58 -06:00
Tim Donohue
899b697e5f Fix warning about missing <version> tag 2020-01-08 14:29:18 -06:00
Tim Donohue
33d3b67f98 Fix CVE-2016-5007 2020-01-08 14:28:35 -06:00
Tim Donohue
2839fef6d4 Fix warning about new groupId for hibernate-validator-cdi 2020-01-08 14:27:43 -06:00
Tim Donohue
a0ca6e2fad Merge pull request #2619 from atmire/DS-4351-upgrade-dependencies
DS-4351 upgrade dependencies
2020-01-08 10:18:46 -06:00
Peter Nijs
516a1e298a 68148: Bug in ViewEvents
- Remove 'id' field from the ViewEventRest
2020-01-08 14:53:07 +01:00
Marie Verdonck
4f0b48b4ff 68155: SUBMIT_CANCEL option removed from SelectReviewerAction 2020-01-08 14:13:40 +01:00
Kevin Van de Velde
34b7663c89 [DS-4351] upgrade dependencies: Excluding byte-buddy instead of pinning on a version & removing some duplicate dependencies 2020-01-08 14:11:05 +01:00
Marie Verdonck
50eb5be31c 68150: resolve collection handles to collection in XmlWorkflowFactory & forgotten exception 2020-01-08 11:55:19 +01:00
Mark H. Wood
692bbd9449 [DS-4409] Don't use live GeoLite database for testing -- there might not be one. 2020-01-07 16:23:17 -05:00
Tim Donohue
da3a48ed04 Minor fix. Discard any output of TCP connection command, so we don't see initial connection errors. 2020-01-07 14:44:20 -06:00
Tim Donohue
d84cde2cc3 Ensure dspace container waits until db is accepting connections 2020-01-07 12:20:06 -06:00
Mykhaylo Boychuk
32c775445f added patchOperations for name and description 2020-01-07 11:44:53 +01:00
Mykhaylo Boychuk
64a2caed73 added patchOperatins for startDate and endDate 2020-01-07 11:36:46 +01:00
Mykhaylo Boychuk
d2ed1925c3 added unit tests for patch 2020-01-07 11:25:04 +01:00
Mykhaylo Boychuk
6be3b6a95e added methods withEndDate(), withDescriptions, withName for ResourcePolicyBuilder 2020-01-07 11:14:14 +01:00
Marie Verdonck
2c6c51752e 68155: /api/config/workflowactions/<:action-name> endpoint + tests 2020-01-06 16:50:02 +01:00
Kevin Van de Velde
977b3f409d [DS-4351] upgrade dependencies: Fixing a display issue in HAl & resolving a warning with slf4j on tomcat startup 2020-01-06 15:52:21 +01:00
Marie Verdonck
a254ae31e2 68150: /workflowdefinitions/defaultWorkflow/collections now returns all non-mapped collections and now returns paginated result + tests 2020-01-06 12:50:52 +01:00
Mykhaylo Boychuk
20f0ac3d22 Added permission evaluator plagin for patch in ResourcePolicy 2020-01-05 19:58:03 +01:00
Mark H. Wood
e018386175 [DS-4409] Remove GeoIP download Ant target, reconfigure for external provision. 2020-01-03 16:31:27 -05:00
Peter Nijs
87515d6deb 68007: Refactoring the IndexableObject & SolrServiceImpl 2020-01-03 17:54:25 +01:00
Marie Verdonck
7ed292e754 68150: fix and tests for pagination for api/config/workflowdefinitions 2020-01-03 17:11:26 +01:00
Ben Bosman
575e672fba webui.submit.upload.required should default to true 2020-01-03 13:57:25 +01:00
Marie Verdonck
d8dc4f113c 67998: non-numbered handle config so can't accidentally be created 2020-01-03 12:39:06 +01:00
Ben Bosman
1bb451db41 webui.submit.upload.required should default to true 2020-01-03 12:10:12 +01:00
Ben Bosman
f935faade1 webui.submit.upload.required should default to true 2020-01-03 10:59:11 +01:00
Ben Bosman
a962c35a81 webui.submit.upload.required should default to true 2020-01-03 09:40:37 +01:00
Ben Bosman
d2876e29dc webui.submit.upload.required should default to true 2020-01-02 18:28:22 +01:00
Marie Verdonck
9dd433412a 67998: tested config handle moved, since other non-collection dso already create at that handle 2020-01-02 17:40:18 +01:00
Marie Verdonck
414b82f9cb 67998: feedback exceptions 2020-01-02 17:05:19 +01:00
Kevin Van de Velde
b96138e3da Merge remote-tracking branch 'upstream/master' into DS-4351-upgrade-dependencies 2020-01-02 15:20:14 +01:00
Kevin Van de Velde
169f3d7e8e [DS-4239] Migrate the workflow.xml to spring: Fixing import issue 2020-01-02 10:41:04 +01:00
Kevin Van de Velde
a6eb614332 [DS-4239] Migrate the workflow.xml to spring: Adding some additional tests 2020-01-02 10:25:16 +01:00
Andrea Bollini
03623259dc Implement add, replace, delete operations for startDate 2019-12-30 18:06:30 +01:00
Mykhaylo Boychuk
b9f0f877bb Add ITs for patch operations, fix cast errors 2019-12-30 16:44:16 +01:00
Mykhaylo Boychuk
0604cf415a Merge branch 'resourcepolicies' of https://github.com/abollini/dspace into resourcepolicy_auth
merge resourcepolicy with resourcepolicy_auth
2019-12-24 11:47:08 +01:00
Andrea Bollini
a4fab8db03 Draft patch operations for ResourcePolicies 2019-12-24 11:11:06 +01:00
Andrea Bollini
613ceb8e5c Merge branch 'resourcepolicy_auth' into resourcepolicies 2019-12-24 08:42:06 +01:00
Mykhaylo Boychuk
d5313ca12e add property @PreAuthorize for methods createAndReturn and delete 2019-12-23 17:59:28 +01:00
Mykhaylo Boychuk
e88f6f9d8e Implemented unit tests for methods create and delete 2019-12-23 17:58:08 +01:00
Mykhaylo Boychuk
8ac971a63b Merge branch 'master' of https://github.com/DSpace/DSpace into resourcepolicies 2019-12-23 12:30:46 +01:00
Marie Verdonck
2521fa5107 67998: Merged in w2p-67996, altered XmlWorkflowFactoryTest to destroy created comcol 2019-12-23 12:09:02 +01:00
Mykhaylo Boychuk
d56b3b8013 Implement community feedbacks 2019-12-23 11:23:42 +01:00
Tim Donohue
c8bbe99e37 Merge pull request #2592 from paulo-graca/rcaap-openaire4-oai_openaire-support
OpenAIRE4 oai_openaire metadata format support
2019-12-20 14:33:31 -06:00
Tim Donohue
acb94e20f1 Merge pull request #2607 from atmire/w2p-67450_Discovery-clean-index-fix_7
[DS-4393] Discovery clean index fix
2019-12-20 13:58:28 -06:00
Tim Donohue
611258c0c8 Merge pull request #2580 from mspalti/discoveryAdmin
[DS-3906] REST endpoint for discovering withdrawn and private items.
2019-12-20 13:54:45 -06:00
Tim Donohue
0227b89a2c Merge pull request #2597 from atmire/DS-4391_fix_nonincoming_bitstream_gets
DS-4391 Get modified date from the right store
2019-12-20 13:52:25 -06:00
Kevin Van de Velde
a5ca3813b7 DS-4351 Upgrade spring (boot) & hibernate to newer versions: Removing unused mock 2019-12-20 17:03:45 +01:00
Kevin Van de Velde
0d41de5bf7 DS-4351 Upgrade spring (boot) & hibernate to newer versions: Removing unused mock 2019-12-20 16:38:52 +01:00
Kevin Van de Velde
98c483f7ca Merge branch 'master' into DS-4351-upgrade-dependencies 2019-12-20 11:48:47 +01:00
Marie Verdonck
59ef4ef065 Merge branch 'w2p-67996-workflow-junit-tests' into workflow-step-definitions 2019-12-20 11:22:59 +01:00
Marie Verdonck
7ef537507f - Merged with KevinVdV/DSpace/DS-4239-migrate-workflow-xml-to-spring
- Changed all implementations of XmlWorkflowFactoryImpl to work with new mapping
- Moved their java doc to XmlWorkflowFactory
- Removed/Changed exceptions
- Altered tests in WorkflowDefinitionRestRepositoryIT to work with changes

Merge remote-tracking branch 'github-kevin/DS-4239-migrate-workflow-xml-to-spring' into workflow-step-definitions

# Conflicts:
#	dspace-api/src/main/java/org/dspace/xmlworkflow/XmlWorkflowFactoryImpl.java
#	dspace-api/src/main/java/org/dspace/xmlworkflow/factory/XmlWorkflowFactory.java
2019-12-20 11:21:17 +01:00
Paulo Graça
d08fe3e4f5 remove openaire4 unused beans 2019-12-19 16:38:14 +00:00
Marie Verdonck
500fe6641d 67993: Tests for changes in workflow config 2019-12-19 16:26:25 +01:00
Kevin Van de Velde
96c084c4c2 Removing wrongly added @Ignore annotations 2019-12-19 14:44:14 +01:00
Marie Verdonck
39c727a803 67694: forgot to log error stack itself 2019-12-19 10:50:02 +01:00
Paulo Graça
c5e8cdac96 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-18 17:03:02 +00:00
Paulo Graça
817b8b1f45 changing the relation type to fetch the required funding sub fields 2019-12-18 16:53:41 +00:00
Paulo Graça
7814a9a1df adding comments for each template 2019-12-18 16:52:19 +00:00
Tim Donohue
ded7243a76 Merge pull request #2629 from paulo-graca/rcaap-openaire4-relationships
OpenAIRE4 missing relationships on registries
2019-12-18 09:39:53 -06:00
Paulo Graça
859eebf624 openaire4 transformer configuration 2019-12-18 14:23:03 +00:00
Paulo Graça
6970f4278a adding comments 2019-12-18 14:22:25 +00:00
Paulo Graça
1f07232d2b adding required openaire4 relationships 2019-12-18 11:44:55 +00:00
Paulo Graça
754d02378e fixing missing funder relationship 2019-12-18 11:38:15 +00:00
Paulo Graça
5aa76ce908 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-17 18:07:40 +00:00
Tim Donohue
124bc38a2c Merge pull request #2621 from paulo-graca/rcaap-openaire4-miscfixes
OpenAIRE4 adding missing field person.identifier
2019-12-17 11:50:32 -06:00
Tim Donohue
7bdb5a28d8 Merge pull request #2608 from paulo-graca/rcaap-openaire4-submissionform
OpenAIRE 4 submission forms
2019-12-17 11:47:15 -06:00
Paulo Graça
e3ac9a7874 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-miscfixes 2019-12-17 17:19:51 +00:00
Paulo Graça
f42f1c2a64 removing extra Turkish entry 2019-12-17 16:01:07 +00:00
Paulo Graça
c28b576975 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-17 15:58:47 +00:00
Paulo Graça
b892e883ed support for subjects and publihsers 2019-12-17 15:55:11 +00:00
Paulo Graça
784ef4b3ae Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-17 15:53:57 +00:00
Marie Verdonck
943b3f1356 67694: isDefault fix, workflowdefinitions IT, exception handling 2019-12-17 16:31:31 +01:00
Tim Donohue
e205009feb Merge pull request #2628 from atmire/w2p-67824_Entity-type-request-by-label
EntityType by label endpoint and integration tests
2019-12-17 09:21:00 -06:00
Paulo Graça
5fa561cf89 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-miscfixes 2019-12-17 14:26:56 +00:00
Paulo Graça
93ed485c7a changing comment 2019-12-17 10:24:29 +00:00
Paulo Graça
822d1bb02d Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-17 10:21:10 +00:00
Paulo Graça
ff61bb1521 replacing openAIRECreator with personOrOrganization 2019-12-17 10:18:51 +00:00
Paulo Graça
8ef8ff378f Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-17 10:15:29 +00:00
Marie Verdonck
8a3479e753 67694: Exception handling improvements and /search moved to repository 2019-12-17 11:08:17 +01:00
Tim Donohue
b610dd53c7 Merge pull request #2622 from atmire/default-entity-relationship-types
Default Entities relationship types used for the demos
2019-12-16 13:33:44 -06:00
Tim Donohue
023b143b95 Merge pull request #2618 from atmire/entities-submission-config
Entities submission config
2019-12-16 13:31:30 -06:00
Tim Donohue
da8488c7de Merge pull request #2614 from atmire/feature-external-sources-entities-post-workspace-item
Creating a workspace item from an external source
2019-12-16 13:28:44 -06:00
Paulo Graça
129a411a25 remove oai_openaire metadata format from the default context 2019-12-16 17:06:51 +00:00
Paulo Graça
f3673b132d removing trailling whitespaces 2019-12-16 15:34:44 +00:00
Paulo Graça
0d427faa20 adding a specific filter for openaire4 2019-12-16 15:32:14 +00:00
Paulo Graça
a696d6ec43 removing 'configuration' word from openaire configuration naming and fixing wrong element and qualifier names 2019-12-16 12:06:59 +00:00
Kevin Van de Velde
f4304673ed Merge branch 'master' into DS-4239-migrate-workflow-xml-to-spring 2019-12-16 13:00:54 +01:00
Paulo Graça
dbf9054182 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-16 11:56:02 +00:00
Marie Verdonck
5831f4cbde 67824: EntityType by label endpoint and integration tests 2019-12-16 12:48:34 +01:00
Paulo Graça
a502b190f5 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-16 11:27:20 +00:00
Paulo Graça
1e0743c251 fixing errors with earlier transformation/normalization 2019-12-16 11:27:03 +00:00
benbosman
fd8e8fc76e Merge pull request #2615 from atmire/get-entity-type-performance
Get entity type performance improvement
2019-12-16 11:25:43 +01:00
benbosman
5edae495f4 Merge pull request #2617 from atmire/DS-4401
DS-4401 Enforce relational place ordering when place direction is known
2019-12-16 11:24:29 +01:00
Mykhaylo Boychuk
63701ce239 implemented method delete() 2019-12-16 10:01:08 +01:00
Mykhaylo Boychuk
5f2235e434 implemented unit test deleteOne 2019-12-16 09:59:01 +01:00
Mykhaylo Boychuk
8e8b1762e2 add Jackson(Access.OnlyRead) property to method getType, and fix method createAndReturn 2019-12-16 09:57:55 +01:00
Mykhaylo Boychuk
edb7a0f2e3 added method createAndReturn 2019-12-14 19:28:13 +01:00
Mykhaylo Boychuk
2810a815e4 added static method delete by id in ResourcePolicyBuilder 2019-12-14 18:58:04 +01:00
Mykhaylo Boychuk
bf05290b0c Implemented unit test for method createAndReturn 2019-12-14 18:42:20 +01:00
Paulo Graça
dcaad7584b modifying default values and add more openaire4 support 2019-12-13 16:31:22 +00:00
Raf Ponsaerts
525a586e53 Applied feedback to the external sources entities post workspace item feature 2019-12-13 16:23:02 +01:00
Paulo Graça
4fc7ce6072 adding support for entities and other elements like: creator, contributors, fundingReference, dates 2019-12-12 16:00:27 +00:00
Paulo Graça
bd5efcd4e9 removing unsed filter 2019-12-12 15:58:26 +00:00
Paulo Graça
ea2e3e2a02 Changing XOAI dependency to version that solves an existing bug 2019-12-12 15:57:25 +00:00
Paulo Graça
255a77c4a6 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-12 13:28:46 +00:00
Paulo Graça
51cda8668e adding a new dspace url as a field element 2019-12-12 13:28:37 +00:00
Marie Verdonck
6084fae357 67694: checkstyle and licenses 2019-12-12 10:42:04 +01:00
Andrew Wood
c76994a3a0 DS-4401 apply place ordering in findByLabel for RelationshipRestRepository 2019-12-11 14:48:32 -05:00
Tim Donohue
884e1f8d73 Merge pull request #2623 from tdonohue/update_entities_sample_data
[Docker] Update DSpace 7 Entities sample data SQL and assetstore
2019-12-11 10:17:24 -06:00
Tim Donohue
f1ba87474f Update Entities sample data SQL and assetstore 2019-12-11 09:43:55 -06:00
Raf Ponsaerts
2f870cbe78 [Task 67817] cleaned up code 2019-12-11 16:07:38 +01:00
Raf Ponsaerts
35e9e3ed5d [Task 67817] first fix for the relationshiptypes for entitytype endpoint 2019-12-11 15:23:17 +01:00
Ben Bosman
ea914a42ae Default Entities relationship types used for the demos 2019-12-11 14:52:15 +01:00
Marie Verdonck
58870b079d 67694: new /api/config/workflowsdefintions endpoints:
/api/config/workflowdefinitions/<:definition-name>
/api/config/workflowdefinitions
/api/config/workflowdefinitions/search/findByCollection?uuid=<:collection-uuid>
/api/config/workflowdefinitions/<:definition-name>/collections

Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-12-11 13:58:24 +01:00
Marie Verdonck
76853f8dd6 Merge remote-tracking branch 'dspace-origin/master' into DS-4389-improving-patch-system-framework
# Conflicts:
#	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ItemRestRepository.java
2019-12-11 09:55:07 +01:00
Kevin Van de Velde
2dd5512286 Merge pull request #2600 from atmire/DS-4317_bundles-in-REST-continued
Ds 4317 bundles in rest continued
2019-12-11 09:53:09 +01:00
Paulo Graça
992d65df4f Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-10 18:22:42 +00:00
Paulo Graça
351c3debac adding a catch all person.identifier field 2019-12-10 17:55:08 +00:00
Paulo Graça
cbfc5c826d moving openAIRE submission steps to just before the sample item 2019-12-10 17:46:04 +00:00
Ben Bosman
35d743601a Entities submission configuration 2019-12-10 18:39:03 +01:00
Paulo Graça
713f0caa89 removing form-value-pairs for language iso 3 and replacing with the default also adding portuguese to the default languages list 2019-12-10 17:35:59 +00:00
Paulo Graça
d687ff3390 enhancing comments and rename bean from openAIREAuthor to a more generic personOrOrganization 2019-12-10 17:34:44 +00:00
Paulo Graça
12700203a8 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-10 17:12:43 +00:00
Marie Verdonck
ce2662c58d DS-4389 improving patch system framework - Minor feedback changes PR 2591 2019-12-10 17:40:15 +01:00
Kevin Van de Velde
1c6d262c03 DS-4351 Upgrade spring (boot) & hibernate to newer versions: Fixing issues with the latest master merge 2019-12-10 15:58:11 +01:00
Ben Bosman
eda9a8fcaa Entities submission configuration 2019-12-10 15:47:46 +01:00
Ben Bosman
7130e5d3d2 Entities submission configuration 2019-12-10 15:05:44 +01:00
Ben Bosman
f26d0475ac Entities submission configuration 2019-12-10 14:55:48 +01:00
Kevin Van de Velde
5bf433f71b DS-4351 Upgrade spring (boot) & hibernate to newer versions: Fixing issues with the latest master merge & fixing the tests 2019-12-10 14:16:54 +01:00
benbosman
40128ab632 Merge pull request #2599 from atmire/w2p-66086_delete-relationships-relationshiptype-copyleft-copyright-variables
Delete item with relationships: configure defaults
2019-12-10 13:27:09 +01:00
Mykhaylo Boychuk
b917a479e9 Implement community feedbacks 2019-12-10 12:59:15 +01:00
Andrew Wood
f6d17aa0ba DS-4401 Enforce relational place ordering when place direction is known 2019-12-09 16:04:55 -05:00
Paulo Graça
fa5882fc7d Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-09 17:26:02 +00:00
Paulo Graça
0505ed9aa8 virtual metadata default settings and oai_openaire4 default transformation 2019-12-09 17:25:52 +00:00
Mykhaylo Boychuk
0178c6b490 created:
Class:
		- DSpaceObjectRestPermissionEvaluatorPlugin
		- DSpaceObjectUtils - this class contain the method that permit to find some DSpaceObject by UUID
2019-12-09 16:30:07 +01:00
Kevin Van de Velde
3e74b20d8e Merge branch 'master' into DS-4351-upgrade-dependencies 2019-12-09 15:32:26 +01:00
Kevin Van de Velde
8d4ebac101 DS-4351 Upgrade spring (boot) & hibernate to newer versions: Restore datasource 2019-12-09 14:25:04 +01:00
Tim Donohue
1b533d5d0c Merge pull request #2613 from atmire/avoid-lang-ANY-virtual-metadata
Avoid setting the virtual metadata language to ANY (*)
2019-12-06 09:43:12 -06:00
Raf Ponsaerts
3b8b3db22c Fixed Travis failure on EntityServiceImplTest 2019-12-06 14:17:27 +01:00
Paulo Graça
a0edc14bcc Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-06 11:41:08 +00:00
Paulo Graça
4c914c147b reverting virtual metadata 2019-12-06 11:32:16 +00:00
Paulo Graça
b7847c0268 reverting errors 2019-12-06 11:30:04 +00:00
Paulo Graça
9f647bb6ca Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-06 11:26:30 +00:00
Paulo Graça
7ec0733de0 reverting virtual metadata changes (they will be moved to oai_openaire PR) 2019-12-06 11:26:17 +00:00
Paulo Graça
929262e9a6 Indentation fix and allowing openAIRE specific discovery search configurations 2019-12-06 11:25:11 +00:00
Paulo Graça
e348cf031a setting name variants parameter 2019-12-06 11:21:26 +00:00
Raf Ponsaerts
78c1773fac Merge remote-tracking branch 'dspace/master' into feature-external-sources-entities-post-workspace-item 2019-12-06 10:36:23 +01:00
Raf Ponsaerts
5585d27991 Refactored the UriListHandler and its implementations and supported the workspace item creation from ExternalDataObjects 2019-12-06 10:36:12 +01:00
Ben Bosman
533b0b9838 Avoid setting the virtual metadata language to ANY (*) 2019-12-06 09:48:12 +01:00
Tim Donohue
dd0ab630e0 Merge pull request #2590 from atmire/feature-external-sources-entities-post
Feature: Creating an archived item from an external source
2019-12-05 14:52:42 -06:00
Ben Bosman
bd14a517f2 Avoid setting the virtual metadata language to ANY (*) 2019-12-05 15:06:17 +01:00
Raf Ponsaerts
30eb596224 Removed redundant admin check in ExternalSourceEntryUriListHandler 2019-12-05 14:49:00 +01:00
Raf Ponsaerts
43f9e9c545 Applied feedback to the ExternalSourceEntryUriListHandler 2019-12-05 13:50:49 +01:00
Raf Ponsaerts
b0cdb3907d Renamed copyLeft and copyRight, added defaults for them in the test Relationship-types file and added a test for the place check after deleting a relationship and keeping the virtual metadata 2019-12-05 11:03:11 +01:00
Michael W Spalti
7b36453c58 Minor update in discovery.xml 2019-12-04 12:46:36 -08:00
Michael W Spalti
00ac347361 Merge remote-tracking branch 'upstream/master' into discoveryAdmin 2019-12-04 12:25:48 -08:00
Michael W Spalti
4b64105962 Added check for commuity/collection admins to solr plugin for private items. 2019-12-04 11:54:55 -08:00
Michael W Spalti
9c5f1c1e11 Renamed discovery configuration and added error message. 2019-12-04 10:31:50 -08:00
Paulo Graça
dd570ead94 new filter 2019-12-04 17:35:34 +00:00
Paulo Graça
da216d12bf field descriptions 2019-12-04 17:34:58 +00:00
Paulo Graça
a138dff22f Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-submissionform 2019-12-04 09:53:38 +00:00
Paulo Graça
58c48d1190 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-04 09:52:16 +00:00
Michael W Spalti
50794b6015 Fixed style check error. 2019-12-03 18:06:24 -08:00
Michael W Spalti
9e320da6b1 Removes browse for private and withdrawn items, removes the includeUnDiscoverable boolean from SearchService methods, adds solr plugin to prevent non-admin discovery of private items. 2019-12-03 17:19:50 -08:00
Tim Donohue
cb5e71cb18 Merge pull request #2610 from atmire/w2p-67600_bug-update-relationships
Updating Relationships through JSON put causes place alterations to be broken
2019-12-03 15:30:14 -06:00
Tim Donohue
f9098ae126 Merge pull request #2576 from paulo-graca/rcaap-openaire4-fields
OpenAIRE 4 required fields
2019-12-03 15:26:05 -06:00
Paulo Graça
dd27fe758f Removing relationships loading for each item - leaving the refactored code 2019-12-03 17:55:22 +00:00
Paulo Graça
019a6c42a3 Removing relationships loading for each item - leaving the refactored code 2019-12-03 17:54:48 +00:00
Paulo Graça
e24921502d Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-12-03 17:50:25 +00:00
Paulo Graça
d4a59d8214 initial virtual metadata 2019-12-03 15:50:52 +00:00
Paulo Graça
5e163f3beb new openaire discovery search filters 2019-12-03 15:21:51 +00:00
Paulo Graça
4ceed51567 OpenAIRE default discovery settings 2019-12-03 15:09:16 +00:00
Paulo Graça
db1408b796 OpenAIRE default discovery settings 2019-12-03 15:07:37 +00:00
Paulo Graça
73fb573742 address submission forms changes 2019-12-03 12:06:31 +00:00
Mykhaylo Boychuk
fbdee987c9 added the following unit test:
- findOneAccessGrantToAdminTest()
        - findOneAccessGrantToSomeOneUserTest()
2019-12-03 12:53:43 +01:00
Raf Ponsaerts
bf3796874d Fixed the bug in the PUT endpoint for Relationships 2019-12-03 10:20:23 +01:00
Raf Ponsaerts
3c917619f3 Made a test to prove that the PUT on Relationships with JSON fails 2019-12-03 09:50:57 +01:00
Mykhaylo Boychuk
27735d7126 created:
class:
        - resourcePolicyRestPermissionEvaluatorPlugin
    method:
       - boolean hasDSpasePermission(Authentication authentication, Serializable targetId, String targetType, DSpaceRestPermission permission)
       - boolean isMyResoursePolicy(Context context, EPerson eperson, Integer id)  - this one checks if the resourcePolicy, that I'm searching, is of the authenticated person
       - ResourcePolicy findOneById (DAO)
2019-12-02 16:15:32 +01:00
Raf Ponsaerts
daeab74815 Added proper authorization handling for the ExternalSources item create endpoint 2019-12-02 12:07:49 +01:00
Raf Ponsaerts
5b16e21980 Merge branch 'feature-external-sources-entities-post' of https://github.com/atmire/DSpace into feature-external-sources-entities-post 2019-12-02 11:27:25 +01:00
Raf Ponsaerts
664c970da9 Fixed minor bug in the UriList parsing and added IT tests 2019-12-02 11:27:12 +01:00
Mykhaylo Boychuk
5eff3c6295 I added the following unit tests:
- findOneForbiddenTest()
- searchResoucesPolicyByEPersonUuidForbiddenTest()
- searchResoucesPoliciesByResourceUuidForbiddenTest()
- searchResoucesPolicyByGroupUuidForbiddenTest()
2019-12-01 11:49:27 +01:00
Marie Verdonck
b781ae5560 [DS-4389] (Improving patch system framework) Rename of package since there are no more factories 2019-11-29 15:47:58 +01:00
Kevin Van de Velde
4c9a30bb14 [DS 4287] Refactoring the IndexableObject & SolrServiceImpl to become more expandable 2019-11-29 14:26:50 +01:00
Paulo Graça
dbfbc853bf changing case for identifiers 2019-11-29 10:55:44 +00:00
Mykhaylo Boychuk
3c7d59a8a4 DS-4398 fix checkstyle issues 2019-11-29 11:44:03 +01:00
Paulo Graça
3afd0d8d02 changing form names and adding references into item-submission and indentation 2019-11-29 10:40:54 +00:00
Paulo Graça
90b0862453 initial openaire on default item submission forms 2019-11-28 17:31:09 +00:00
Mykhaylo Boychuk
b236b8e487 Merge branch 'master' of https://github.com/DSpace/DSpace into resourcepolicies
# Conflicts:
#	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ResourcePolicyRestRepository.java
2019-11-28 17:33:18 +01:00
Paulo Graça
3c8d906539 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-fields 2019-11-28 16:05:26 +00:00
Paulo Graça
a8bf0f7efa comments 2019-11-28 16:04:51 +00:00
Paulo Graça
9c53334088 Initial openaire submission forms 2019-11-28 15:45:29 +00:00
Ben Bosman
4fda5c1354 improving performance of the getType function, it's not a virtual field 2019-11-28 14:16:04 +01:00
Mykhaylo Boychuk
f0eb9cb3d9 DS-4398 initial implementation of the resource policies endpoint
DONE
- sync implementation of findAll with the contract
- add ITs for implemented methods

TODO
- enforce security in access resource policy details
- method to create a resource policy
- method to patch a resource policy
2019-11-28 13:20:43 +01:00
Paulo Graça
e24fa61c8e indentation fix 2019-11-28 10:39:30 +00:00
Kevin Van de Velde
a5cd7b8fb4 Merge remote-tracking branch 'upstream/master' into DS-4317_bundles-in-REST-continued 2019-11-28 10:44:58 +01:00
Kevin Van de Velde
219b086979 Merge branch 'master' into DS-4317_bundles-in-REST-continued 2019-11-28 10:39:25 +01:00
Kevin Van de Velde
2bcd6013eb [DS 4389] Improving patch system framework: Fixing merge issues with master 2019-11-28 10:33:32 +01:00
Tim Donohue
9c17f1706b Merge pull request #2575 from paulo-graca/rcaap-openaire4-relationships
OpenAIRE 4 Entities and Relationships
2019-11-27 09:04:16 -06:00
Paulo Graça
b0016fc245 remove trailing whitespaces 2019-11-27 14:37:13 +00:00
Paulo Graça
12b468a366 remove trailing whitespaces 2019-11-27 13:56:53 +00:00
Kevin Van de Velde
62461febe1 Merge branch 'master' into DS-4389-improving-patch-system-framework 2019-11-27 14:55:16 +01:00
Paulo Graça
fdd6caf9ab Removing types of publication ids from schema and change the generic authorid to scopus-author-id 2019-11-27 13:50:38 +00:00
Paulo Graça
d5854256d3 reset dublin-core-types file 2019-11-27 13:15:55 +00:00
Paulo Graça
e4661ebb54 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-fields 2019-11-27 12:04:47 +00:00
Paulo Graça
a5d999dbd8 remove trailing whitespaces 2019-11-27 12:03:30 +00:00
Paulo Graça
dacc74c0a3 comments 2019-11-27 11:58:51 +00:00
Kevin Van de Velde
5133266cad Fixing a merge issue 2019-11-27 12:45:34 +01:00
Kevin Van de Velde
75b508d4ea Merge branch 'master' into feature-external-sources-entities-post 2019-11-27 11:46:47 +01:00
Kristof De Langhe
a4006cd17e 67450: Discovery clean index fix 2019-11-27 11:43:19 +01:00
Paulo Graça
28deccf57e Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-11-27 10:01:04 +00:00
Paulo Graça
f1baeb5ad1 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-relationships 2019-11-26 17:32:24 +00:00
Paulo Graça
08262593b7 openaire entities and relationships 2019-11-26 17:32:14 +00:00
Paulo Graça
4c160a4725 Moving relationships into /config/entities folder 2019-11-26 17:27:09 +00:00
Tim Donohue
b2657cdc4e Merge pull request #2577 from atmire/w2p-65267_delete-in-relationshipservice
Delete item with relationships
2019-11-26 11:06:00 -06:00
Tim Donohue
60eb7aa7b2 Merge pull request #2598 from atmire/w2p-66436_projects-discovery-configuration
Entities: Projects discovery configuration
2019-11-26 11:02:27 -06:00
Tim Donohue
f4d51cc905 Merge pull request #2560 from atmire/feature-external-sources
Feature: external sources
2019-11-26 10:51:58 -06:00
Peter Nijs
0fd4831466 Merge branch 'w2p-65267_delete-in-relationshipservice' into w2p-66086_delete-relationships-relationshiptype-copyleft-copyright-variables 2019-11-26 17:33:40 +01:00
Peter Nijs
d12f999c49 Merge remote-tracking branch 'dspace/master' into w2p-65267_delete-in-relationshipservice manual fix 2019-11-26 17:28:52 +01:00
Peter Nijs
736d30f48a Merge remote-tracking branch 'dspace/master' into w2p-65267_delete-in-relationshipservice 2019-11-26 17:28:22 +01:00
Kevin Van de Velde
cba7b3dc3a Merge pull request #2579 from atmire/w2p-65257_Collection-item-template-crud
CRUD for collection item template
2019-11-26 16:39:40 +01:00
Kevin Van de Velde
9102945aae Restoring the original capitalization of the "sherpa.romeo.apiKey" configuration value 2019-11-26 16:33:56 +01:00
jonas-atmire
4c011a7918 Removal of unused variable 2019-11-26 15:56:54 +01:00
Raf Ponsaerts
3471498018 Small improvements to the external sources feature 2019-11-26 14:03:28 +01:00
Raf Ponsaerts
967b598b99 Fixed import in ExternalDataServiceImpl 2019-11-26 13:53:35 +01:00
Raf Ponsaerts
92e8f98216 Merge branch 'feature-external-sources' into feature-external-sources-entities-post 2019-11-26 13:30:47 +01:00
Raf Ponsaerts
3596913505 Fixed checkstyle and removed unused variables in ExternalSourceRestRepository 2019-11-26 13:29:46 +01:00
Raf Ponsaerts
3dac3e8911 Merge branch 'feature-external-sources' into feature-external-sources-entities-post 2019-11-26 13:27:03 +01:00
Raf Ponsaerts
031ceffeaa Refactored javadoc on MetadataValue, refactored package, altered property in external-services.xml 2019-11-26 13:26:35 +01:00
Raf Ponsaerts
196894e46e Refactored Mockmetadata to MetadataValueDTO and fixed checkstyle 2019-11-26 13:20:36 +01:00
Raf Ponsaerts
c85f88d737 Merge branch 'feature-external-sources' into feature-external-sources-entities-post
Conflicts:
	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ItemRestRepository.java
2019-11-26 13:20:03 +01:00
Paulo Graça
9f7438394d Replacing Organization with OrgUnit 2019-11-26 11:49:03 +00:00
benbosman
295ee3fd0b removing line breaks 2019-11-26 11:07:05 +01:00
Raf Ponsaerts
7a935f4f8b Integrating projections into feature-external-sources 2019-11-26 10:48:14 +01:00
Peter Nijs
076e3c17d3 Merge remote-tracking branch 'dspace/master' into w2p-65257_Collection-item-template-crud manual fixes 2019-11-26 10:16:12 +01:00
Peter Nijs
ef3d3a4158 Merge remote-tracking branch 'dspace/master' into w2p-65257_Collection-item-template-crud 2019-11-26 10:14:52 +01:00
Raf Ponsaerts
070480418b Merge remote-tracking branch 'dspace/master' into feature-external-sources 2019-11-26 09:29:07 +01:00
Raf Ponsaerts
57894bb8b6 [Task 66453] applied feedback to the variable naming and properties for external sources feature 2019-11-26 09:27:03 +01:00
Paulo Graça
192cd265b6 Merge branch 'rcaap-openaire4-fields' of https://github.com/paulo-graca/DSpace into rcaap-openaire4-fields 2019-11-25 17:01:38 +00:00
Paulo Graça
b1e16c71fa revert test parameters 2019-11-25 16:08:44 +00:00
Paulo Graça
f7e1bf6896 moving DC fields and identifiers into proper Schemas 2019-11-25 16:05:40 +00:00
Paulo Graça
7bbc2c57ad Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-fields 2019-11-25 14:14:13 +00:00
Paulo Graça
e6e4ccb942 Changing Relationships to Entities node element 2019-11-25 14:13:52 +00:00
Paulo Graça
532d8434c8 Initial oai_openaire metadata format support with entities 2019-11-25 13:31:04 +00:00
Paulo Graça
e1d13f074f Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-11-25 12:01:55 +00:00
Paulo Graça
46d4f5e30a Initial oai_openaire metadata format support with entities 2019-11-25 12:01:40 +00:00
benbosman
012d88db17 Merge pull request #2547 from atmire/DS-3533_Projections
DS-3533 projections support
2019-11-25 11:37:02 +01:00
Raf Ponsaerts
7c7aedfed4 Refactored the findOne and findAll methods to work through the RestResourceController instead of a custom one 2019-11-25 11:34:26 +01:00
Chris Wilper
ff3930a734 Merge branch 'master' into DS-3533_Projections 2019-11-24 12:51:33 -05:00
Chris Wilper
ccf047cd63 DS-4391 Get modified date from the right store
This also tightens up the contract and improves javadocs a bit,
so callers know what to expect.
2019-11-23 07:18:39 -05:00
Tim Donohue
3b578c6766 Merge pull request #2596 from atmire/DS-4390_scripts-bug-scriptlauncher
[DS-4390] rewrote ScriptLauncher to include scripts from other config…
2019-11-22 09:31:23 -06:00
Raf Ponsaerts
9ceb8cd10e [Task 66437] added project discovery config 2019-11-22 15:42:24 +01:00
Raf Ponsaerts
64180c6041 [Task 66436] added Project discovery configuration to the discovery.xml 2019-11-22 14:31:58 +01:00
Raf Ponsaerts
e87dd5a8b7 [DS-4390] fixed test failure and cleaned up ScriptRestRepository from DSpaceRunnable logic, moved to ScriptService instead 2019-11-22 14:15:26 +01:00
Raf Ponsaerts
02d98b2760 [DS-4390] undid MultipartFileException 2019-11-22 13:35:33 +01:00
Raf Ponsaerts
959dacad6a [DS-4390] cleaned up Integer in scriptlauncher 2019-11-22 13:27:15 +01:00
Peter Nijs
76347b0cf0 66458: Use shared UUID regex instead of object's own one 2019-11-22 13:27:01 +01:00
Raf Ponsaerts
9be226e6d3 [DS-4390] cleanup retrieval of DSpaceRunnable by name and cleanup in ScriptLauncher.java 2019-11-22 13:24:46 +01:00
Raf Ponsaerts
71b1360cbf [DS-4390] rewrote ScriptLauncher to include scripts from other config to be checked as well as fixing tests 2019-11-22 11:06:12 +01:00
Raf Ponsaerts
4e0b97fb88 Processing feedback on external sources PR 2019-11-22 09:44:46 +01:00
Peter Nijs
4cc7cec563 Merge remote-tracking branch 'dspace/master' into w2p-65257_Collection-item-template-crud 2019-11-22 09:43:35 +01:00
Tim Donohue
4240ade8ca Merge pull request #2594 from atmire/w2p-66396_bug-in-get-collections
Bug in GET collections
2019-11-21 15:16:53 -06:00
Tim Donohue
abf6a36fe3 Merge pull request #2529 from atmire/w2p-64334_scripts-prototype
Scripts and processes endpoint
2019-11-21 15:06:35 -06:00
Tim Donohue
ecfdc2b627 Merge pull request #2548 from atmire/DS-4317_bundles-in-REST
Ds 4317 bundles in rest
2019-11-21 14:51:56 -06:00
Marie Verdonck
6f822dbb98 DS-4317 - bundles in REST: Redefined RequestMapping to use constants defined in Rest classes 2019-11-21 12:10:15 +01:00
Marie Verdonck
7148f7cd0b DS-4317 - bundles in REST: Redefining RequestMapping of Controllers to be unique and to use constants defined in Rest classes 2019-11-21 11:43:11 +01:00
Raf Ponsaerts
bc9fc2f066 Fixed the CollectionDAOImpl#findAll method to only return one entry per Collection even if it has multiple language values for the dc.title metadata field 2019-11-21 11:07:51 +01:00
Raf Ponsaerts
9e6fe1c9a2 [Task 66396] added a test that proves that the collection endpoint returns the same collection multiple times if it has different language fields for dc.title 2019-11-21 10:12:33 +01:00
Peter Nijs
ebd6ee73fb 65257: fix typo in error message 2019-11-21 09:56:28 +01:00
Raf Ponsaerts
0ea677914f Refactored the naming and the request mapping of the Scripts Controller to be less ambiguous and less confusing 2019-11-21 09:26:24 +01:00
Paulo Graça
67c467ade4 Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-oai_openaire-support 2019-11-20 15:49:15 +00:00
Paulo Graça
646651a6d9 Filtering Entities on the default context 2019-11-20 15:48:50 +00:00
Tim Donohue
d99ccc6bfc Merge pull request #2551 from atmire/w2p-65568_bugs-place-management-creating-relationships
Entities bug-fixes in place management
2019-11-20 09:07:31 -06:00
Kevin Van de Velde
78da4b53fc Merge remote-tracking branch 'upstream/master' into DS-4389-improving-patch-system-framework 2019-11-20 16:02:12 +01:00
Raf Ponsaerts
623451dd3e [Task 66408] applied community feedback to the Relationship Delete methods 2019-11-20 14:19:54 +01:00
Kevin Van de Velde
6daad55762 Patch refactor: The supports method now accepts an object instead of a DSpaceObject, else other objects aren't supported for these patches. Also adding missing @Override annotations 2019-11-20 14:16:03 +01:00
Raf Ponsaerts
bb4eef94f2 [Task 65568] added a testGetNextLeftPlace test in the RelationshipMetadataServiceTest 2019-11-20 13:28:49 +01:00
Tim Donohue
41fa29e5b0 Merge pull request #2585 from atmire/DS-4386_nullpointer-exception-item-put-endpoint-authenticated-user
[DS-4386] fixed the nullpointer issue when an authenticated non-admin…
2019-11-19 15:59:28 -06:00
Tim Donohue
09646aabde Merge pull request #2589 from atmire/search-relationships-total-fix
Entities: Search relationships total fix
2019-11-19 15:54:32 -06:00
Chris Wilper
0a36fc13f1 DS-3533 Make MetadataConverter a DSpaceCoverter, supporting projections 2019-11-19 12:45:09 -05:00
Tim Donohue
7b90332049 Merge pull request #2568 from atmire/DS-4379_Omit-metadatvalue-rels
DS-4379 Stop adding relations as metadata for new items
2019-11-19 09:24:35 -06:00
Tim Donohue
64702f5745 Merge pull request #2561 from atmire/w2p-65570_Configuring-whether-name-variants-should-be-used
Entities: configuring whether name variants should be used
2019-11-19 09:23:14 -06:00
Paulo Graça
3eff84a4bd Separate citation elements into qualifiers 2019-11-19 12:03:45 +00:00
Ben Bosman
d225489cab Travis trigger 2019-11-19 13:01:58 +01:00
Ben Bosman
864ea1d591 fixing total calculation 2019-11-19 11:31:57 +01:00
Ben Bosman
4415ea2237 whitespace 2019-11-19 10:56:16 +01:00
Ben Bosman
7109a357ed IT for fixing total calculation 2019-11-19 09:55:39 +01:00
Ben Bosman
02df6154e4 fixing total calculation 2019-11-19 09:47:56 +01:00
Raf Ponsaerts
3dfa695dbf [DS-4386] added a context.restoreAuthSystemState to the update test 2019-11-19 09:41:23 +01:00
Marie Verdonck
1deb82f0e3 66183: feedback processed:
- Split DSOMetadataOperation in separate operation classed
- supports() also checks operation.getOp()
- ResourcePatchOperation removed
- removed some unneeded null checks
- DspaceObjectMetadataOperation.performPatchOperation() exceptions thrown without changes
- All services autowired, not via factories
2019-11-18 14:05:27 +01:00
Paulo Graça
ec7b037a6f Merge branch 'master' of github.com:DSpace/DSpace into rcaap-openaire4-fields 2019-11-18 12:15:22 +00:00
kshepherd
6add401f81 Merge pull request #2587 from tdonohue/Docker_one_path_for_server_webapp
[Docker Fix] Ensure the "server" webapp runs on ONLY one path in Docker
2019-11-17 12:15:19 +13:00
Tim Donohue
238232bbfd Ensure the "server" webapp runs on one path in Docker 2019-11-15 15:08:42 -06:00
Tim Donohue
ad325a0679 Merge pull request #2586 from tdonohue/fix_script_line_endings
[Docker Build Fix]: Ensure bin scripts ALWAYS have correct line endings
2019-11-15 12:48:32 -06:00
Tim Donohue
a8cb5359d6 Ensure bin scripts ALWAYS have correct line endings 2019-11-15 11:43:18 -06:00
Raf Ponsaerts
2b97950b4c [DS-4386] fixed the nullpointer issue when an authenticated non-admin user tries to update an item using the Item PUT endpoint 2019-11-15 11:35:17 +01:00
Tim Donohue
dea19f8412 Merge pull request #2582 from mwoodiupui/DS-4385
[DS-4385] Replace <prerequisites> with enforcer rules in POM
2019-11-14 13:00:01 -06:00
Marie Verdonck
454745b91a Merge branch 'master' into DS-4317_bundles-in-REST
# Conflicts:
#	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/BitstreamRestRepository.java
2019-11-14 18:37:30 +01:00
Mark H. Wood
84ab9252b4 [DS-4385] Move Maven minimum version to enforcer plugin. 2019-11-14 11:46:23 -05:00
Chris Wilper
18ea0a2434 DS-3533 Add projection-related tests, resolve minor functional issues, and improve javadocs 2019-11-14 09:32:40 -05:00
Peter Nijs
6e56c8bad1 65956: Cleanup and preauthorize fix for CRUD on Collection Item template 2019-11-14 15:25:34 +01:00
Marie Verdonck
69327477a7 Bundles in REST: Feedback implemented:
- Renaming: BundleController > BundleUploadBitstreamController, ItemController > ItemAddBundleController
 - Moved: BitstreamRestController#getBundle() & #move() to new BitstreamBundleController class
 - Javadocs added to all three
 - Correction @RequestMapping of BundleUploadBitstreamController
2019-11-14 15:24:52 +01:00
Raf Ponsaerts
fcd6429ec0 [Task 66086] implemented a configuration on the RelationshipType object to determine whether metadata should be copied left or right or not at all when deleting a relationship 2019-11-14 11:18:47 +01:00
Michael W Spalti
9d45a1d89f Formatting corrections. 2019-11-13 17:49:53 -08:00
Michael W Spalti
b6849e51a6 Fixing tests for travis (currently unable to test on local machine) 2019-11-13 17:33:25 -08:00
Michael W Spalti
2113317946 [DS-3906] REST endpoint for discovering withdrawn and private items. 2019-11-13 16:35:49 -08:00
Marie Verdonck
ac57139d10 66075: Improvements from feedback:
- DspaceObjectMetadataOperation.performPatchOperation()
  > Logic split into seperate methods
- DspaceObjectMetadataOperation.replace()
  > Split into method per case
2019-11-13 19:01:18 +01:00
Paulo Graça
d0047c8d65 adjust MetadatafieldRestRepositoryIT.findall test to cover more metadatafield results 2019-11-13 14:50:40 +00:00
Paulo Graça
a1d4123352 adjust MetadatafieldRestRepositoryIT.findall test to cover more metadatafield results 2019-11-13 14:12:50 +00:00
Raf Ponsaerts
4c1f4e422c [Task 66031] wrote javadocs or ProcessRestPermissionEvaluatorPlugin, cleaned up ProcessRestRepository 2019-11-13 14:13:42 +01:00
Marie Verdonck
57c23f3e82 66075: added back existingValue checks to non-boolean replace operations,
the set functionality should be in an ADDoperation (not yet implemented)
- EPersonCertificateReplaceOperation, EPersonLoginReplaceOperation, ItemDiscoverableReplaceOperation, ItemWithdrawReplaceOperation
    > Check for existing not required since boolean type value
- EPersonEmailReplaceOperation
    > added back null-check in checkModelForExistingValue
- EPersonPasswordReplaceOperation
    > added checkModelForExistingValue which checks if ePersonService has non-null pw hash, because getPassword is protected

- Test added for password replace with no existing pw
2019-11-13 12:40:51 +01:00
Marie Verdonck
505daf5bbb 66075: Feedback improvements 2:
DspaceObjectMetadataOperation
 - JsonPatchConverter removed
 - SQL exceptions thrown as is, others to DSpaceBadRequestException
 - DspaceObjectMetadataOperation.remove()
    > UnprocessableEntityException with exceptionalities
    > Already parsed value used in second parse

PatchOperation
 - M no longer extends DSO
 - supports in child classes with R objectToMatch

ItemWithdrawReplaceOperation
 - one try-catch block with relevant exception handling
2019-11-13 11:15:00 +01:00
Peter Nijs
37e7bda2d5 65956: add link to itemtemplate on collections 2019-11-12 16:13:36 +01:00
Paulo Graça
607859ec3e fixing wrong element 2019-11-12 14:14:01 +00:00
Peter Nijs
5e409ae0be Merge remote-tracking branch 'dspace/master' into w2p-65267_delete-in-relationshipservice manual fixes 2019-11-12 14:12:49 +01:00
Peter Nijs
61da3d13ab Merge remote-tracking branch 'dspace/master' into w2p-65267_delete-in-relationshipservice 2019-11-12 14:12:03 +01:00
Paulo Graça
077ee4edab Indentation 2019-11-12 11:44:02 +00:00
Paulo Graça
182606d67e Indentation 2019-11-12 11:38:44 +00:00
Paulo Graça
4f33932cb4 New identifiers for Persons, Organizations and Publications 2019-11-12 11:35:41 +00:00
Raf Ponsaerts
1f2549c1e1 Added ProcessRestPermissionEvaluatorPlugin and changed authorization to be checked with the annotation on the ProcessRestRepository#findOne method 2019-11-12 11:41:59 +01:00
Ben Bosman
082dd94aef docs 2019-11-12 10:58:33 +01:00
Paulo Graça
ca84156658 OpenAIRE 4 fields 2019-11-12 09:37:33 +00:00
Paulo Graça
f26cff1bd7 OpenAIRE 4 Entities and Relationships 2019-11-12 09:30:50 +00:00
Raf Ponsaerts
a3381be1bf Fixed issue in findNextRightPlaceByRightItem and added a test for it. Also wrote additional docs 2019-11-12 10:08:49 +01:00
Peter Nijs
0683cdae3c 65956: CRUD on Collection Item template feedback
- manual changes after rebase
- javadoc clarification
2019-11-12 09:51:18 +01:00
Ben Bosman
cd938c9f35 explaining tests 2019-11-12 09:39:16 +01:00
Ben Bosman
9900c3c196 explaining tests 2019-11-12 09:09:20 +01:00
Chris Wilper
1ca24c1eba DS-3533 Begin projection/converter tests 2019-11-10 23:49:57 -05:00
Chris Wilper
5e4ddcdeb9 DS-3533 Fix typo 2019-11-10 08:45:33 -05:00
Chris Wilper
d0661d144e DS-3533 Cache method link annotation info to improve performance 2019-11-09 23:17:27 -05:00
Chris Wilper
f7d9175728 Merge branch 'master' into DS-3533_Projections 2019-11-09 21:36:06 -05:00
Chris Wilper
66108a7532 DS-3533 Fix failure to link when embedding from link repo 2019-11-09 10:39:50 -05:00
Chris Wilper
c556c379f5 DS-3533 Fix incorrect embedded page details when provided by link repo 2019-11-09 09:57:18 -05:00
Ben Bosman
fed1828912 explaining tests 2019-11-08 18:30:13 +01:00
Ben Bosman
7d2eb90af6 fixes for incorrect virtual metadata 2019-11-08 18:06:16 +01:00
Ben Bosman
7f0ffa8586 JavaDocs 2019-11-08 17:49:42 +01:00
Ben Bosman
b030397ba9 fixes for incorrect virtual metadata 2019-11-08 17:27:16 +01:00
Peter Nijs
0919bad5be 65956: CRUD on Collection Item template feedback
- rename classes
2019-11-08 16:50:28 +01:00
Peter Nijs
46efec9ee4 65543: CRUD on Collection Item template
- add javadocs
2019-11-08 16:50:28 +01:00
Peter Nijs
499f718ae2 65543: CRUD on Collection Item template
- implement contract changes
- correct permission
- add javadocs
2019-11-08 16:50:28 +01:00
Peter Nijs
dab2022629 65543: Collection item template
- Moved corresponding repository endpoints
2019-11-08 16:41:48 +01:00
Peter Nijs
99522b2e96 65543: Collection item template
- Moved endpoints
2019-11-08 16:41:48 +01:00
Peter Nijs
3f552078b9 65257: update and delete for collection template items 2019-11-08 16:41:48 +01:00
Peter Nijs
f20687ad36 65257: create and read for collection template items 2019-11-08 16:36:22 +01:00
Tim Donohue
c7d3c3e18c Merge pull request #2562 from atmire/w2p-65247_Create-Read-on-Collection-and-Community-logo
CRUD on Collection & Community logo
2019-11-08 09:16:38 -06:00
Peter Nijs
dcf99fc15b 65996: Feedback collection and community logo
- Return Rest objects from Repositories
- Made controller name more specific
2019-11-08 14:37:34 +01:00
Marie Verdonck
7a847db62b Feedback on PR 2561 2019-11-08 09:02:39 +01:00
Andrea Bollini
ed947ae169 Merge pull request #2573 from 4Science/fix-missing-spring-expression
Fix build - spring-expression is required at runtime
2019-11-08 00:29:44 +01:00
Andrea Bollini
32d94fa31d Fix build - spring-expression is required at runtime 2019-11-08 00:25:29 +01:00
Tim Donohue
fa7489222a Merge pull request #2572 from tdonohue/another_master_fix
(HIGH PRIORITY) Ensure test-jar is only a dependency if tests are enabled
2019-11-07 16:30:51 -06:00
Tim Donohue
3fbdd70a4f Ensure test-jar is only a dependency if tests are enabled 2019-11-07 15:51:32 -06:00
Tim Donohue
cc440791ae Merge pull request #2571 from tdonohue/fix_broken_master
(HIGH PRIORITY) Fix broken master builds
2019-11-07 15:31:04 -06:00
Tim Donohue
9d770718c4 Remove unused dspace-xmlui-lang dependency 2019-11-07 14:56:27 -06:00
Tim Donohue
4b0870bc9e Fix broken master build. Only include server test-jar when running tests 2019-11-07 14:55:38 -06:00
Marie Verdonck
c56216e46b 65985: bundle delete improvements (from feedback) 2019-11-07 17:24:15 +01:00
Tim Donohue
caef38c241 Merge pull request #2553 from atmire/DS-4358-tests-in-modules
DS-4358 tests in modules
2019-11-07 10:02:27 -06:00
Chris Wilper
1d914b74c7 DS-3533 Simplify and normalize code 2019-11-07 10:52:32 -05:00
Peter Nijs
dca93b5228 65571: REST changes to delete of an item
- fix RelationshipDeleteRestRepositoryIT test failures
    - fix issue with deleting a collection with ResourcePolicies
- remove a redundant itemService from ItemRestRepository
- implement input validation on the copyVirtualMetadata parameter
    - add test for this
- use Object.deepEquals() for array comparison
- documented deleteMultipleRelationshipsCopyVirtualMetadata()
2019-11-07 14:43:11 +01:00
Marie Verdonck
f93da1fb0c 65997: checkstyle 2019-11-07 12:37:49 +01:00
Marie Verdonck
efe178a351 65997: COPY metadata patch functionality 2019-11-07 11:50:44 +01:00
Chris Wilper
7eb1508387 DS-3533 Apply projections uniformly 2019-11-07 05:30:17 -05:00
Marie Verdonck
c54903006d 65997: Fix metadata patch replace case 4 (replace attribute of single md)
TODO: implement COPY metadata patch
2019-11-07 10:26:54 +01:00
Marie Verdonck
8af15603ef 65997: ReplacePatchOperation function moved to subclasses &
EPersonOperationFactory removed, no longer useful
TODO: fix failing tests of replace in two operations
2019-11-06 20:12:49 +01:00
Raf Ponsaerts
28b1e4b121 Inprogress evaluating feedback with regards to comments in RelationshipServiceImpl and the place tests 2019-11-06 16:06:41 +01:00
Raf Ponsaerts
f1adf4f375 Removed the ProcessRestController class and instead refactored the ProcessRestRepository, ProcessRest and ProcessResource to now be compliant with the RestResourceController's framework 2019-11-06 15:18:55 +01:00
Peter Nijs
ca37eee3fe 65571: REST changes to delete of an item
- Copy relationship data on item delete
2019-11-06 14:44:08 +01:00
jonas-atmire
d379552e2c Updating returned object for 'setLogo' to its 'Rest' version to be inline with other RestRepository methods 2019-11-06 12:49:17 +01:00
Samuel
f372176dd0 [DS-4358] Tests in modules: feedback - fix build 2019-11-06 12:06:24 +01:00
Samuel
fad5a0247c [DS-4358] Tests in modules: feedback - modules/server pom 2019-11-06 11:34:32 +01:00
Marie Verdonck
e8fe89581f 65997: ReplacePatchOperation function moved to subclasses &
EPersonOperationFactory removed, no longer useful
2019-11-06 11:00:26 +01:00
Kevin Van de Velde
727f97aa44 [DS-4317] Bundles in rest: Moving BitstreamBundleController to the existing BitstreamRestController 2019-11-06 10:47:44 +01:00
Kevin Van de Velde
5c3dd61382 [DS-4317] Bundles in rest: Fixing style issue & renaming the "BitstreamController" to the "BitstreamBundleController" as the RequestMapping maps to /api/content/bitstreams/uuid/bundle and not /api/content/bitstream/uuid 2019-11-06 10:29:18 +01:00
Samuel
8ccd816b9e [DS-4358] Tests in modules: feedback 2019-11-05 17:36:34 +01:00
Chris Wilper
adbc730a36 DS-4379 Stop adding relations as metadata for new items 2019-11-05 10:55:19 -05:00
Kevin Van de Velde
cca64996be [DS-4317] Bundles in rest: Renaming method that moves bitstreams in a bundle 2019-11-05 13:58:03 +01:00
Marie Verdonck
40a08746d9 65997: Overrides added, javadocs, unused classes removed 2019-11-05 09:59:33 +01:00
Marie Verdonck
f8529f3200 [w2p-65997] Patch framework improvements: Internal feedback #1 2019-11-04 18:11:48 +01:00
Marie Verdonck
840106ba63 [DS-4317] DELETE /api/core/bundles/<:uuid> endpoint functionality
> deletes bundle with given uuid and all its bitstreams

> with IT cases and javadoc
2019-11-04 15:47:51 +01:00
Marie Verdonck
b0738b576d Code for moving bitstreams to a different bundle moved to BundleService 2019-11-04 13:21:29 +01:00
Chris Wilper
640c9071ef DS-3533 Add javadocs for new classes 2019-11-01 14:23:23 -04:00
Chris Wilper
71c81d28cf DS-3533 Fix checkstyle issues 2019-10-31 14:52:06 -04:00
Chris Wilper
b67a67c2b8 DS-3533 Use list projection for ItemRestRepository.findALl 2019-10-31 10:31:30 -04:00
Chris Wilper
f4737bb74b DS-3533 Provide item relationships via link repository 2019-10-31 10:31:30 -04:00
Chris Wilper
32098c4ffb DS-3533 Use list projection when embedding a page from a link repository 2019-10-31 10:30:56 -04:00
Chris Wilper
6f5f4da745 DS-3533 Add projections 2019-10-31 10:30:51 -04:00
Marie Verdonck
64ee1d72b6 65944: Patch framework refactoring finished, all tests ok 2019-10-31 13:34:48 +01:00
Marie Verdonck
032ae2ad94 65944: Patch framework refactoring; TODO fix /metadata PATCH handling 2019-10-30 17:40:52 +01:00
Samuel
52661fed8c DS-4351 Upgrade spring (boot) & hibernate to newer versions - taskid 65955 internal questions - fix Q6 2019-10-30 15:53:49 +01:00
Samuel
930951445f DS-4351 Upgrade spring (boot) & hibernate to newer versions - taskid 65955 internal questions - fix Q2 2019-10-30 15:53:49 +01:00
Raf Ponsaerts
a1ed84d072 Applied feedback to the external sources entity post feature in ExternalDataService and ExternalSourceEntryUriListHandler 2019-10-30 09:17:18 +01:00
Marie Verdonck
e56e71a903 65942: Test fix since implementation changed as well 2019-10-29 13:21:26 +01:00
Marie Verdonck
68342ae10c 65942: Merge branch 'master' into w2p-65568_bugs-place-management-creating-relationships
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/dao/RelationshipDAO.java
2019-10-29 12:37:02 +01:00
Alexander Sulfrian
57df5a3f98 DS-4275: Fix case of resourcepolicies endpoint
The endpoint is specified in lowercase in the REST contract.
2019-10-29 11:24:40 +01:00
Kevin Van de Velde
d056d8df53 [DS-4317] Bundles in rest: Merging lasted master style fixes 2019-10-29 10:56:27 +01:00
Kevin Van de Velde
1087de26bf Merge branch 'master' into DS-4317_bundles-in-REST 2019-10-29 10:25:35 +01:00
Raf Ponsaerts
f3efe500b1 [Task 65902] implemented functionality to create an archived item from the urilist call to the items endpoint with an ExternalSourceEntry in the uriList 2019-10-29 10:12:20 +01:00
Raf Ponsaerts
c90e52f429 Fixed checkstyle issue in MockMetadataConverter 2019-10-28 09:21:50 +01:00
Samuel
e2c353d75e DS-4351 Upgrade spring (boot) & hibernate to newer versions 2019-10-25 18:21:49 +02:00
Raf Ponsaerts
d66c3da752 Fixed MockMetadataConverter issue where multiple metadatavalues for a single metadatafield would get lost due to sorting issues 2019-10-25 16:40:02 +02:00
Peter Nijs
822b6b7361 65788: CRUD on Collection & Community logo feedback 2019-10-25 14:03:46 +02:00
Peter Nijs
f84624fb59 Merge remote-tracking branch 'dspace/master' into w2p-65247_Create-Read-on-Collection-and-Community-logo 2019-10-25 13:45:32 +02:00
Peter Nijs
a31dc75c3e 65268: changes to delete of a relationship 2019-10-25 11:51:43 +02:00
Andrea Bollini
0fbe314890 Merge pull request #2503 from atmire/DS-4337-bitstream-bitstreamformat-relation-endpoints
DS-4337 implement bitstream-bitstreamformat relation endpoints
2019-10-24 17:05:49 +02:00
jonas-atmire
0ab96d5c58 Removal of superfluous method. Handled by allowing a null file to be sent, and sending back an error if that is the case 2019-10-24 14:04:14 +02:00
Tim Donohue
9dbfe5d32b Merge pull request #2535 from atmire/DS-4224-paginated-methods-for-relationships
Ds 4224 paginated methods for relationships
2019-10-23 13:49:29 -05:00
Kevin Van de Velde
4cb2f83432 [DS-4358] Tests in modules: Fixing an issue where the server webapp wouldn't start anymore 2019-10-22 13:15:57 +02:00
Raf Ponsaerts
4f351aa28f Added DSpaceCommandLineParameterTest class 2019-10-22 12:03:06 +02:00
Kevin Van de Velde
1dc8cf7f32 [DS-4337] Bitstream format PUT endpoint javadoc update 2019-10-22 11:19:37 +02:00
Kevin Van de Velde
11745fe69f External sources: Cleaning up some unused variables / comments 2019-10-22 10:02:05 +02:00
Raf Ponsaerts
bdb8f2603c [Task 65768] added proper implementation for getNumerOfResults for test DataProvider and fixed checkstyle 2019-10-22 09:49:37 +02:00
Raf Ponsaerts
e2cc3a9391 Evaluated feedback on scripts and processes endpoints and model classes. Added javadoc, fixed tests and made improvements to various parts of the Scripts and processes feature 2019-10-21 16:31:04 +02:00
Raf Ponsaerts
e51b06a4b7 [Task 65768] implemented the getNumberOfResults method on the ExternalDataService and used this in the ExternalDataRestRepositories for an accurate pagination on the search methods 2019-10-21 11:53:49 +02:00
Tim Donohue
827311cb66 Merge pull request #2554 from 4Science/DS-4367
DS-4367 remove unnecessary dspace.restUrl and fix default configuration
2019-10-18 10:04:06 -05:00
Andrea Bollini
d38baea57d DS-4367 add IT for root endpoint properties 2019-10-18 12:41:03 +02:00
benbosman
810634f2a5 Travis build trigger 2019-10-18 11:12:03 +02:00
Andrea Bollini
fbd5f444df DS-4367 fix property used in test initialization 2019-10-18 11:06:28 +02:00
benbosman
30ad7676ef Merge pull request #2528 from atmire/authority-control-bugfixes
Authority control bugfixes
2019-10-18 11:03:24 +02:00
Raf Ponsaerts
91e763d7a1 Removed the config setting in the destroy method of the AuthorityRestRepositoryIT class 2019-10-18 10:28:55 +02:00
Andrea Bollini
7648e099ae DS-4367 fix comments about baseUrl 2019-10-17 17:58:39 +02:00
Andrea Bollini
b26222f278 DS-4367 remove unnecessary dspace.restUrl and fix default configuration 2019-10-17 17:51:24 +02:00
Raf Ponsaerts
9bb2e7e526 Implemented the External Sources feature 2019-10-17 14:50:17 +02:00
Peter Nijs
8640337224 65542: CRUD on Collection & Community logo: Feedback 2019-10-17 12:36:23 +02:00
Andrew Wood
4882a7914d DS-4224 Comply with community master 2019-10-16 15:54:27 -04:00
Andrew Wood
a4c0b62b52 DS-4224 Improve paging impl for Entities 2019-10-16 15:54:27 -04:00
Andrew Wood
d82fb48878 DS-4224 Improve code style consistency 2019-10-16 15:54:27 -04:00
Andrew Wood
c2aa03d9f5 DS-4224 Catch up with master 2019-10-16 15:54:27 -04:00
Andrew Wood
a15ceb71e8 DS-4224 Adjust stylings and improve jdocs 2019-10-16 15:54:27 -04:00
Andrew Wood
9bc63b7eed DS-4224 Relationship paging refactor 2019-10-16 15:54:26 -04:00
Andrew Wood
83ba0936c7 DS-4224 Improve related test and add additional test 2019-10-16 15:54:26 -04:00
Raf Ponsaerts
febe98f43f Implemented the Relationship logic in the submissionforms endpoint 2019-10-16 15:54:26 -04:00
Raf Ponsaerts
3aa75eaeeb Implemented feedback and testing on item bitstreams post endpoint 2019-10-16 15:54:26 -04:00
Andrew Wood
58e986d08d DS-4224 Update unit test to comply with refactoring 2019-10-16 15:54:26 -04:00
Samuel
6da844941d DS-4096 paginated methods for relationships 2019-10-16 15:54:26 -04:00
Raf Ponsaerts
72e2b87226 Fix after merge 2019-10-16 14:40:50 +02:00
Raf Ponsaerts
901b6aecec Merge remote-tracking branch 'dspace/master' into w2p-65568_bugs-place-management-creating-relationships
Conflicts:
	dspace-api/src/main/java/org/dspace/app/bulkedit/MetadataImport.java
2019-10-16 14:38:30 +02:00
Raf Ponsaerts
4d4535d3a2 [Task 65681] updated RelationshipSeviceImplTes 2019-10-16 14:18:42 +02:00
Samuel
aa3100583f taskid 65539 Testing for non source modules: cleanup - added documentation 2019-10-15 18:46:08 +02:00
benbosman
f8e42eb5e5 Merge pull request #2527 from atmire/w2p-64809_Updating-indexing-method
Discovery indexing: Ensuring discovery configuration is used during indexing
2019-10-15 18:05:03 +02:00
Ben Bosman
01aac84699 JavaDoc 2019-10-15 16:44:54 +02:00
benbosman
f7d9e0c1cd Merge pull request #2522 from atmire/DS-4226-CSV_Import_Entities_Improvments
DS-4226 Improvements to Entity validation first pass
2019-10-15 16:26:50 +02:00
Samuel
b60cb236a3 DS-4337 implement bitstream-bitstreamformat relation endpoints - feedback bis 2019-10-15 15:58:18 +02:00
Peter Nijs
a64fb7a29d 65491: Journal JUnit tests for Changes to delete in RelationshipService 2019-10-15 15:11:31 +02:00
Raf Ponsaerts
b0b886d16f [Task 65568] updated javadoc and comments 2019-10-15 13:48:44 +02:00
Raf Ponsaerts
6c762d52fe Fixes after master merge 2019-10-15 13:15:15 +02:00
Raf Ponsaerts
31a28e0ffa Merge remote-tracking branch 'dspace/master' into w2p-65568_bugs-place-management-creating-relationships
Conflicts:
	dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/RelationshipRestRepository.java
2019-10-15 12:03:07 +02:00
Raf Ponsaerts
27d5853d8e [Task 65568] implemented tests and fixed checkstyle 2019-10-15 08:48:52 +02:00
Marie Verdonck
df7ee6410c w2p-65570 - Tests modified for name variants configuration check 2019-10-14 13:51:02 +02:00
Marie Verdonck
9994dd8d7c w2p-65570 - Configuring whether name variants should be used 2019-10-14 13:49:55 +02:00
Raf Ponsaerts
15555a1afe [Task 65568] initial fixes and test fixes 2019-10-14 13:35:17 +02:00
Samuel
99fbbe1749 DS-4337 implement bitstream-bitstreamformat relation endpoints - feedback 2019-10-11 18:13:14 +02:00
Samuel
661d9c41c9 added license headers 2019-10-11 17:19:16 +02:00
Raf Ponsaerts
4e87687b47 applied naming feedback and comments on ChoiceAuthorityService and AuthorityRestRepositoryIT 2019-10-11 16:13:08 +02:00
Kevin Van de Velde
86b7989efe [DS-4317] Bundles in rest: Processing feedback 2019-10-11 11:21:13 +02:00
Tim Donohue
a5d4924cc2 Merge pull request #2489 from mspalti/DS-4153_createandreturn
[DS-4153] Added repository createAndReturn that accepts parent id
2019-10-10 10:37:27 -05:00
Samuel
cd1e6ba278 DS-4337 implement bitstream-bitstreamformat relation endpoints - feedback 2019-10-10 17:30:22 +02:00
benbosman
ad29df9756 Merge pull request #2546 from atmire/DS-4360_statistics-endpoint-searchevents-link-fix
[DS-4360] fixed construction of the SearchEvents link on the statistics endpoint
2019-10-10 17:15:08 +02:00
benbosman
96490e5570 Merge pull request #2545 from atmire/DS-4359_issue-entity-type-null
[DS-4359] added nullcheck in EntityServiceImpl#getAllRelationshipTypes
2019-10-10 17:13:15 +02:00
Andrea Bollini
e922227f29 Merge pull request #2486 from atmire/w2p-62967_multiple-title-community-endpoint-issue
Issue when community has multiple dc.title values
2019-10-10 16:51:44 +02:00
Peter Nijs
3b2e9e30d3 65487: tests for changes to delete in RelationshipService 2019-10-10 16:27:44 +02:00
Raf Ponsaerts
f63b81b440 [DS-4360] fixed construction of the SearchEvents link on the /statistics endpoint 2019-10-10 14:22:36 +02:00
Raf Ponsaerts
15a4202472 [DS-4359] added nullcheck in EntityServiceImpl#getAllRelationshipTypes 2019-10-10 14:08:30 +02:00
Michael W Spalti
2d6b97b539 Fixed checkstyle error for unused import. 2019-10-09 17:09:25 -07:00
Michael W Spalti
573b2a514c Added optional RequestParam and updated internal post method to accept parent parameter. 2019-10-09 16:36:54 -07:00
Tim Donohue
6986b211e1 Merge pull request #2491 from atmire/oai-harvesting-setup
Oai harvesting setup
2019-10-09 15:44:13 -05:00
Andrew Wood
0773f79d5c DS-4226 Add validation for multi typeName reference case improve test improve languaged used 2019-10-09 11:18:33 -04:00
Andrew Wood
a5af5c130a DS-4226 Conform with changes from community master 2019-10-09 11:18:33 -04:00
Andrew Wood
51555e4f28 DS-4226 Fix ambigious bug 2019-10-09 11:18:33 -04:00
Andrew Wood
3739b718eb DS-4226 Improvements to Entity validation first pass 2019-10-09 11:18:33 -04:00
Samuel
b6150874f6 taskid 65494 Testing for non source modules: Additions tests 2019-10-08 15:20:58 +02:00
Samuel
bf9c1c0e18 taskid 65493 Testing for non source modules: Internal test 2019-10-08 14:49:20 +02:00
Tim Donohue
74ec72add1 Merge pull request #2541 from Georgetown-University-Libraries/ds4356
[DS-4356] Document Dockerfile Manual Build Steps (README change)
2019-10-07 10:36:17 -05:00
Raf Ponsaerts
2202195cfc Altered wrongly defined URL in CollectionHarvesterSettingsControllerIT 2019-10-07 16:07:23 +02:00
Peter Nijs
60489c2c02 65251: replace and delete a logo for collections and communities 2019-10-07 13:26:16 +02:00
Raf Ponsaerts
0e05a79db7 [Task 65267] implemented the RelationshipService delete endpoint changes 2019-10-07 12:53:03 +02:00
Kristof De Langhe
64ac844e9e 64640: Message fix + Missing JavaDocs 2019-10-07 11:07:32 +02:00
Terry Brady
8f4b34b071 Merge branch 'ds4356' of https://github.com/Georgetown-University-Libraries/DSpace into ds4356 2019-10-04 15:23:08 -07:00
Terry Brady
8fbc4e0034 clarify cd instructions 2019-10-04 15:22:10 -07:00
Terry Brady
6a5ca55579 document docker build instructions 2019-10-04 15:09:57 -07:00
Terry Brady
e7933ee7b5 document docker build instructions 2019-10-04 15:09:23 -07:00
Tim Donohue
6cbe99bddf Merge pull request #2539 from Georgetown-University-Libraries/ds4355r7
[DS-4355] 7x: Re-scope .dockerignore file
2019-10-04 22:35:53 +02:00
Tim Donohue
f40ddceecc Merge pull request #2538 from tdonohue/docker-db-before-tomcat
Docker bug fix: Ensure database is initialized before starting Tomcat
2019-10-04 22:26:41 +02:00
Terry Brady
29c5a1f264 additional exclude 2019-10-04 13:23:17 -07:00
Terry Brady
62401e673a fix .dockerigore 2019-10-04 13:12:04 -07:00
Tim Donohue
e547af0cbc Ensure database is initialized before starting Tomcat 2019-10-04 14:43:28 -05:00
Tim Donohue
0c172efbc3 Merge pull request #2533 from terrywbrady/ds4349m
[DS-4349] 7x: Migrate Postgres Dockerfiles into code base
2019-10-04 21:06:00 +02:00
Terry Brady
b53906fbc2 Merge branch 'master' into ds4349m 2019-10-04 10:58:40 -07:00
Tim Donohue
dc0e23653a Merge pull request #2530 from terrywbrady/ds4346mV2
[DS-4346] 7x: V2: Add default docker-compose file to code base
2019-10-04 19:12:02 +02:00
Raf Ponsaerts
f28acee6bf Added tests for Community endpoint pagination 2019-10-04 15:14:25 +02:00
Peter Nijs
918839fdea 65247: tests for uploading a logo for collections and communities 2019-10-04 13:36:56 +02:00
Tim Donohue
4f76f7f683 Merge pull request #2536 from paulo-graca/patch-2
Fixing exception error when using UUID on Harvesting
2019-10-03 19:20:03 +02:00
Peter Nijs
51d86d420b 65247: add support for uploading a logo for collections and communities 2019-10-03 15:46:08 +02:00
Peter Nijs
23c10854b2 65247: add support for uploading a logo for collections and communities 2019-10-03 15:44:46 +02:00
Paulo Graça
5d86c10717 Replacing Collection ID references with UUIDs 2019-10-03 13:54:22 +01:00
Ben Bosman
bc38bcdc86 JavaDocs 2019-10-03 13:12:52 +02:00
Kevin Van de Velde
4b92af8239 [DS-4351] Upgrade spring (boot) & hibernate to newer versions 2019-10-03 09:41:51 +02:00
Samuel
dd5dfd6d77 taskid 65007 Get SolrServiceIndexPlugin to work - dependencies 2019-10-02 17:55:57 +02:00
Tim Donohue
e638c47622 Merge pull request #2488 from atmire/feature-name-variants
Rename properties and support for name variants
2019-10-02 16:57:45 +02:00
Samuel
d360232b2f taskid 65253 Testing for non source modules - add test profiles 2019-10-02 12:22:46 +02:00
Ben Bosman
53ff1afea5 comments 2019-10-02 10:37:33 +02:00
Raf Ponsaerts
85b88b05a6 Applied feedback 2019-10-02 09:34:27 +02:00
Terry Brady
02043d41e9 update README for angular compose 2019-10-01 23:52:30 -07:00
Terry Brady
086bd36dc9 update README 2019-10-01 18:20:13 -07:00
Terry Brady
7da196cbbc refine angular compose and readme 2019-10-01 16:31:49 -07:00
Terry Brady
417104629a Clarify pull/build in README 2019-10-01 15:33:23 -07:00
Terry Brady
32ae484a50 Add docker-compose README 2019-10-01 10:52:41 -07:00
Samuel
48daaed59f taskid 65253 Testing for non source modules 2019-10-01 17:10:06 +02:00
Yana De Pauw
5c8f6bb805 65188: Add typedocs 2019-10-01 11:54:06 +02:00
Terry Brady
af878788ef add docker-compose README files 2019-09-30 22:40:20 -07:00
Terry Brady
851a39cf61 add solr readme 2019-09-30 22:21:17 -07:00
Terry Brady
81242ab7f7 add license to script files 2019-09-30 13:44:04 -07:00
Terry Brady
120a873a2d add license to dockerfiles 2019-09-30 13:27:34 -07:00
Terry Brady
577ec17634 add .dockerignore 2019-09-30 13:15:11 -07:00
Terry Brady
61f13807c0 add postgres dockerfiles 2019-09-30 13:13:44 -07:00
Terry Brady
a8f25fec49 fix license header 2019-09-30 12:53:37 -07:00
Terry Brady
cd6d849c17 Add angular option 2019-09-30 11:45:04 -07:00
Yana De Pauw
0b97fe9293 65188: Implement feedback 2019-09-30 13:48:32 +02:00
Raf Ponsaerts
b06bd5e786 Added comments and added pagination test for community findall 2019-09-30 09:49:42 +02:00
Terry Brady
3e97876cb9 rm angular container 2019-09-29 10:50:04 -07:00
Raf Ponsaerts
56fc8d5741 Applied feedback 2019-09-27 16:13:42 +02:00
Raf Ponsaerts
2b014833c5 Added javadoc 2019-09-27 11:26:52 +02:00
Raf Ponsaerts
fa023db4ee Added tests and various fixes 2019-09-27 10:09:43 +02:00
Raf Ponsaerts
eaf91b6af7 added another clear 2019-09-26 12:48:20 +02:00
Raf Ponsaerts
017ba13710 Added a method to clear controller in cas 2019-09-26 10:54:10 +02:00
Raf Ponsaerts
1392b62d83 Added method to clear config 2019-09-26 09:31:19 +02:00
benbosman
f65c8523a8 Merge pull request #2502 from atmire/w2p-64649_endpoints-to-collect-statistics
Endpoints to collect Statistics
2019-09-25 15:55:40 +02:00
Kristof De Langhe
09039d1f20 64640: BundleRestRepository IT, JavaDocs and CheckStyle fixes 2019-09-25 15:24:20 +02:00
Raf Ponsaerts
04d14efe5f Applied feedback 2019-09-25 15:10:19 +02:00
Kristof De Langhe
04a7a31797 64640: Move PATCH request for bitstreams in bundles 2019-09-25 12:36:06 +02:00
Raf Ponsaerts
82e6cef95b Fixed the duplication of communities if muliple dc title fields with different languages 2019-09-24 14:06:22 +02:00
kshepherd
c44fd4c5ce Merge pull request #2524 from Georgetown-University-Libraries/ds4347
[DS-4347] remove solr from ant step in docker build
2019-09-24 09:24:17 +12:00
Terry Brady
3d8c6cfb3d remove solr from ant step in docker build 2019-09-23 13:42:46 -07:00
Terry Brady
6b6cda3eaa remove solr from ant step in docker build 2019-09-23 13:34:37 -07:00
Terry Brady
69de77790c fix tag name 2019-09-23 13:31:56 -07:00
Terry Brady
cd3dc07958 correct license headers 2019-09-23 13:09:12 -07:00
Terry Brady
1985cb11d9 Create docker compose files in the code base 2019-09-23 13:05:24 -07:00
Yana De Pauw
6c807f8a62 65105: Implement feedback 2019-09-23 11:45:31 +02:00
Raf Ponsaerts
3df6f84387 Applied feedback 2019-09-20 15:25:24 +02:00
Raf Ponsaerts
6797ae0b9c [Task 64894] fixed the self link 2019-09-20 14:18:33 +02:00
Raf Ponsaerts
17a2eaa0a3 [Task 64807] fixed SolrAuthorAuthority in the IT 2019-09-20 14:05:43 +02:00
Raf Ponsaerts
cbc3768ca5 Added authorization check on the ScriptRestRepository.findOne method 2019-09-19 16:26:25 +02:00
Michael W Spalti
48697d32dc Restoring the authorization system in integration tests for community and collection repositories. 2019-09-18 12:38:24 -07:00
Raf Ponsaerts
97c5292f3a [Task 65095] fixed typo in link 2019-09-18 16:24:23 +02:00
Raf Ponsaerts
a6c5046045 Re-enabled test 2019-09-18 16:04:12 +02:00
Raf Ponsaerts
73b42de798 [Task 64808] returning null instead of empty choice 2019-09-18 12:54:56 +02:00
Raf Ponsaerts
be2624b666 [Task 64993] applied feedback 2019-09-18 10:37:26 +02:00
kshepherd
c7ddf85f4f Merge pull request #2508 from mwoodiupui/DS-4338
[DS-4338] Remove final smidgeon of Solr source code.
2019-09-18 09:47:50 +12:00
Ben Bosman
bdb16b2543 IT fixes 2019-09-17 14:55:35 +02:00
Raf Ponsaerts
9a026956d7 Applied feedback 2019-09-17 13:51:12 +02:00
Raf Ponsaerts
2de90e0f54 [Task 64911] added RelationshipMetadataService test 2019-09-17 11:49:20 +02:00
Michael W Spalti
8c492e128e Updated several integration tests to turn on auth system. 2019-09-16 14:40:28 -07:00
Tim Donohue
33b0e04d09 Merge pull request #2393 from mwoodiupui/DS-3695-upgrade
[DS-3695] Solr 7 fixes for upgrading to DSpace 7
2019-09-16 22:08:53 +02:00
Yana De Pauw
6462ab15af 64638: Retrieving and updating bundle of a bitstream 2019-09-16 17:54:19 +02:00
Raf Ponsaerts
b6a6f11a8a [Task 64926] applied feedback and change request to response code and id on scripts 2019-09-16 13:16:45 +02:00
Raf Ponsaerts
0279155af7 Adding javadoc and log cleanup 2019-09-16 11:47:59 +02:00
Raf Ponsaerts
9675df2d68 [Task 64926] applied the feedback 2019-09-16 09:01:41 +02:00
benbosman
3c833ed1ad Merge pull request #2498 from atmire/w2p-64721_Rename-discovery-config-for-Entities
[DS-4325]: Rename Discovery configuration for Entities
2019-09-13 17:58:48 +02:00
benbosman
336a6b177b Merge pull request #2499 from atmire/w2p-64645_Removal-of-filtered-discovery-page
Removal of filtered-discovery-page in REST
2019-09-13 09:35:58 +02:00
Mark H. Wood
7ad2aacd49 [DS-3695] Repair merge conflict. 2019-09-12 15:56:37 -04:00
Mark H. Wood
44b3375983 Merge remote-tracking branch 'upstream/master' into DS-3695-upgrade 2019-09-12 15:12:45 -04:00
Mark H. Wood
bf7a813618 Merge pull request #2495 from mwoodiupui/DS-3695-simple
[D-3695] Upgrade to Solr 7:  support sharded statistics simply
2019-09-12 10:54:45 -04:00
Raf Ponsaerts
28c8129811 [Task 64894] fixed the link and AccessDeniedException mistake through reflection call for findRel 2019-09-12 14:15:04 +02:00
Raf Ponsaerts
52aac9df70 [Task 64808] fixed certain tests 2019-09-12 11:42:41 +02:00
Raf Ponsaerts
31184a8670 Added ignores back to authority tests 2019-09-11 15:28:13 +02:00
Raf Ponsaerts
61b584b8f3 [Task 64893] added self link to entries endpoint 2019-09-11 15:24:39 +02:00
Raf Ponsaerts
bf33dbf5c8 [Task 64807] enabled MockAuthoritySolrService in the REST IT 2019-09-11 12:40:28 +02:00
Yana De Pauw
bf68914a19 64499: Add bundle link to bitstream 2019-09-10 11:34:43 +02:00
Michael W Spalti
830351af11 Updated error messages and added new integration tests for collection repository. 2019-09-09 15:22:53 -07:00
Kristof De Langhe
b1f31cef9c 64809: Checkstyle fixes 2019-09-09 17:39:59 +02:00
Ben Bosman
46e86326b8 Change method names to make them easier to understand 2019-09-09 14:44:43 +02:00
Kristof De Langhe
ba39f6e4fb 64809: Update discovery configuration indexing 2019-09-09 14:40:48 +02:00
benbosman
cb7db98fcf Merge pull request #2471 from atmire/w2p-63043_CSV-placeholder-support
DS-4316: Indirect entity refs during csv import
2019-09-09 14:35:09 +02:00
kshepherd
8786f415a1 Merge pull request #2480 from terrywbrady/dspace-cli7
[DS-4321] master: docker image dspace/dspace-cli:dspace-7_x
2019-09-07 11:47:20 +12:00
Terry Brady
341a3fb2b2 simplify package exclusions 2019-09-06 16:06:37 -07:00
Terry Brady
c3640959a6 update ant archive 2019-09-06 14:58:10 -07:00
Terry Brady
8d0c3c291c Merge pull request #2509 from J4bbi/master
[DS-4336] Point Ant to archived, stable URL
2019-09-06 12:25:11 -07:00
j4bbi
991fe4f5b6 Point Ant to archived, stable URL 2019-09-06 19:51:55 +01:00
Tim Donohue
84df078380 Merge pull request #2504 from Georgetown-University-Libraries/ds4336r7
[DS-4336] Update ant version in Docker Build (master)
2019-09-06 18:06:27 +02:00
Mark H. Wood
2268abd83b [DS-4338] Remove final smidgeon of Solr source code. 2019-09-05 16:24:25 -04:00
Andrew Wood
42d6183828 w2p-63043 Populate row map in case of pre existing reference 2019-09-05 14:42:03 -04:00
Terry Brady
ad600a431c DS-4336 2019-09-05 11:04:21 -07:00
Terry Brady
e94da8fadb Update ant version 2019-09-05 10:38:24 -07:00
Andrew Wood
591df53e7a w2p-63043 Minor tweeks to testing enviorment and edge case correction 2019-09-05 11:30:50 -04:00
Raf Ponsaerts
97e322a21d Applied feedback with regards to view and searchevents 2019-09-05 13:49:07 +02:00
Raf Ponsaerts
14a72b5c39 Implemented separate controller for Statistics 2019-09-05 12:52:10 +02:00
Ben Bosman
e8662d7e2a Change method names to make them easier to understand
Add javadocs to complex private methods
2019-09-05 09:59:11 +02:00
Ben Bosman
0e45859336 Change method names to make them easier to understand
Add javadocs to complex private methods
2019-09-05 09:28:06 +02:00
Ben Bosman
a9217c8ca0 mock authority control solr 2019-09-04 15:17:43 +02:00
Ben Bosman
1d08e15254 solr authority 2019-09-04 13:22:56 +02:00
Ben Bosman
2665cc2c72 disabling features which don't work 2019-09-04 13:11:46 +02:00
Ben Bosman
b44ed7085d expanding the ITs 2019-09-04 12:12:05 +02:00
Ben Bosman
262e14fc74 exact amount expectations 2019-09-04 11:49:06 +02:00
Raf Ponsaerts
53a4043e03 [Task 64789] added nullcheck for metadata configs 2019-09-04 10:16:51 +02:00
Raf Ponsaerts
821e917ace [Task 64789] fixed empty response from update on harvest collections and refactored code 2019-09-04 10:04:57 +02:00
Raf Ponsaerts
e26d5fe113 Merge remote-tracking branch 'dspace/master' into oai-harvesting-setup
Conflicts:
	dspace-server-webapp/src/main/java/org/dspace/app/rest/model/hateoas/CollectionResource.java
2019-09-04 09:45:04 +02:00
Raf Ponsaerts
a73ba83db0 Created basic IT 2019-09-04 09:23:47 +02:00
Terry Brady
17fb867a62 update mvn build calls 2019-09-03 10:46:31 -07:00
Raf Ponsaerts
a0e18d57f0 Merge remote-tracking branch 'dspace/master' into feature-name-variants
Conflicts:
	dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java
2019-09-03 14:23:38 +02:00
Raf Ponsaerts
2c02568475 Added the harvester link to the CollectionResource 2019-09-03 11:50:00 +02:00
Terry Brady
50bfa62091 scope maven build 2019-09-02 18:54:41 -07:00
Terry Brady
d4df7b3c07 update comment 2019-09-02 18:42:59 -07:00
Yana De Pauw
e9154e9bf9 64639: Support creation of new bitstreams in bundles 2019-09-02 16:22:35 +02:00
Raf Ponsaerts
ebd63b1283 Created endpoints to collect View and Search statistics 2019-09-02 13:39:11 +02:00
Raf Ponsaerts
ec3b07e500 Changes type to typeName to avoid confusing, fixed checkstyle 2019-09-02 12:43:32 +02:00
Yana De Pauw
d4343eafb1 Merge branch 'master' into DS-4317_bundles-in-REST 2019-09-02 10:34:14 +02:00
Andrew Wood
c4626c1a49 w2p-63043 Improve error reporting when resolving references during metadata import 2019-08-30 15:35:40 -04:00
Yana De Pauw
509acb22a9 64645: Removal of filtered-discovery-page in REST 2019-08-30 18:03:46 +02:00
Ben Bosman
5864b53555 authority control bigfixes 2019-08-30 17:59:06 +02:00
Kristof De Langhe
d8a7852388 64721: Entity configuration changes 2019-08-30 13:11:35 +02:00
Tim Donohue
41a6f86dcc Merge pull request #2497 from atmire/DS-4251_test-csv-file-fix
[DS-4251] made sure that the test.csv file gets deleted
2019-08-28 17:28:41 +02:00
Tim Donohue
d2e224591c Use filename also in run command 2019-08-28 10:04:02 -05:00
Andrew Wood
e3cf391448 w2p-63043 Add additional IT for metadataImport 2019-08-28 09:54:15 -04:00
Raf Ponsaerts
598c28c6d6 [DS-4251] made sure that the test.csv file gets deleted and doesn't stay in the project structure after running tests 2019-08-28 08:34:32 +02:00
Tim Donohue
3139104997 Merge pull request #2472 from atmire/w2p-63533_changes-to-dtd-and-api-relationship-submission
support for defining relationship lookups in the submission forms
2019-08-27 23:27:17 +02:00
Andrew Wood
d67afa957e w2p-63043 Improve java docs for metadataImport 2019-08-27 12:19:57 -04:00
Andrew Wood
02559516d7 w2p-63043 remove stale spring rest webapp 2019-08-27 11:23:25 -04:00
Andrew Wood
28e2c7e13c Merge remote-tracking branch 'community/master' into w2p-63043_CSV-placeholder-support 2019-08-27 11:22:15 -04:00
Andrew Wood
17d977205f w2p-63043 Correct line reprocessing bug when value is empty 2019-08-27 11:11:08 -04:00
Yana De Pauw
6acddef596 64498: Add test to retrieve bistreams from bundle 2019-08-27 13:17:19 +02:00
Mark H. Wood
84803770c0 [DS-2378] Copy a blob of test code from deleted TestSpringServiceManager. 2019-08-26 16:17:00 -04:00
Mark H. Wood
21235b45c4 Merge remote-tracking branch 'upstream/master' into DS-3695-simple 2019-08-26 15:04:09 -04:00
Mark H. Wood
f4d7c35108 [DS-3695] Add statistics shard configset, fix various errors, improve logging. 2019-08-26 13:54:44 -04:00
Yana De Pauw
b52f7be3de 64495: Add unit tests for bundle + fix issues 2019-08-26 17:02:12 +02:00
Tim Donohue
30b2ea01a8 Merge pull request #2455 from tdonohue/fix_OAI_date_test
Another attempt at fixing Date test in `OAIpmhIT` integration test
2019-08-26 16:21:11 +02:00
Tim Donohue
4760d579d4 Correct return value to be nowToNearestSecond. 2019-08-26 08:55:09 -05:00
Tim Donohue
cd07247112 Fix occasional date mismatches by rounding to nearest second. 2019-08-26 08:55:07 -05:00
Mark H. Wood
de3c46bd5f [DS-2378] Pass 2: fold SpringServiceManager into DSpaceServiceManager and simplify. 2019-08-25 14:51:00 -04:00
Mark H. Wood
7811bb8966 [DS-2378] First pass: collapse loops to single SpringServiceManager.
Also tidy the code, make better use of logger.
2019-08-24 07:06:29 -04:00
Andrea Bollini
fe77a0a200 Merge pull request #2492 from tdonohue/clarify_sequence_id
Clarify purpose of Bitstream's Sequence ID
2019-08-23 17:15:41 +02:00
Jelle Pelgrims
54cec441c9 Add endpoint to add bundle to item 2019-08-23 12:42:16 +02:00
Jelle Pelgrims
601ed8a5f4 Fix tests for recent item changes
The item matcher didn't match anymore because it was still looking
for the bitstream link, which isn't there anymore because the item
only holds bundles now (see commit 48ea95bc). The tests were changed
to look for a bundle link.

Other than that a few tests were also specifically looking for a
bitstream link to see if a bitstream was correctly created. These
links were changed to bundle links, since a new bitstream should
be added to a new bundle by default (if there are no bundles yet)
during creation.
2019-08-23 08:44:23 +02:00
Tim Donohue
16117bf132 Clarify purpose of Sequence ID 2019-08-22 16:48:07 -05:00
Tim Donohue
018b18e214 Merge pull request #2473 from atmire/w2p-63475_implement-upload-bitstream-to-archived-item
implement upload bitstream to archived item
2019-08-22 18:39:12 +02:00
Ben Bosman
f264cff0ec unused import 2019-08-22 17:58:22 +02:00
Ben Bosman
a325221a7e Making the sequence ID read-only 2019-08-22 17:30:30 +02:00
Jelle Pelgrims
466e42d0f9 Add utility class for URL mapping Regexes
Added a utility class so that the URL mapping regexes (mostly used
in RestResourceController) can be reused in other controllers.
2019-08-22 16:51:54 +02:00
Jelle Pelgrims
5daf5be97d Add integration tests for bundle GET endpoint 2019-08-22 11:43:09 +02:00
Jelle Pelgrims
8c60fbb3e2 Fix CollectionharvestSettingsController permissions 2019-08-21 11:19:21 +02:00
Jelle Pelgrims
f5561a2dfc Add small changes 2019-08-21 11:11:16 +02:00
Jelle Pelgrims
0f4ea91834 Clean up code added in previous commits 2019-08-21 10:35:23 +02:00
Jelle Pelgrims
591f32bfe3 Finish GET endpoints 2019-08-20 16:21:20 +02:00
Jelle Pelgrims
712b4a4abf Rename code matching '[mM]apping[a-zA-Z]*' to '[mM]apped[a-zA-Z]*'
Rename 'mappingCollection' and similar code to 'mappedCollection', in order
to resolve Tim Donohue's feedback on the pull request.
2019-08-20 10:10:47 -04:00
Marie Verdonck
668b6551b0 Undo HALResource change, all tests run locally 2019-08-20 10:10:47 -04:00
Marie Verdonck
f6bf8b09fd Non-code changes, just whitelines 2019-08-20 10:10:47 -04:00
Marie Verdonck
1bd0f96a1a Error & Status for non-successful POST/DELETE mappedCollections requests
- POST /api/core/items/<:uuid>/mappedCollections
 > 405: item is a template item
 > 422: specified collection not found or is owningCollection of item
- DELETE /api/core/items/<:uuid>/mappedCollections/<:collection_uuid>
 > 405: item is a template item
 > 422: specified collection not found or is owningCollection of item
2019-08-20 10:10:47 -04:00
Samuel
f555692126 DS-4097 name change from mappingCollections to mappedCollections + data change to uri-list 2019-08-20 10:10:47 -04:00
Raf Ponsaerts
b42dafe166 Implemented the Item Mapper functionality 2019-08-20 10:10:46 -04:00
Andrew Wood
e5ec0164f7 w2p-63043 Improve documentation 2019-08-20 10:09:40 -04:00
Andrew Wood
55cc060b13 w2p-63043 Improve related query performance and improve affiliated test 2019-08-20 10:09:40 -04:00
Andrew Wood
e40a209113 DS-4316 Add tests for indirect entity refs during csv import 2019-08-20 10:09:40 -04:00
Andrew Wood
7220cecfa6 DS-4316 Support indirect entity refs during csv import 2019-08-20 10:09:40 -04:00
Andrew Wood
f9886529f5 DS-4316 Support querying MetadataValues by field and value 2019-08-20 10:09:40 -04:00
Jelle Pelgrims
48ea95bc15 Replace bitstreams in ItemRest with bundles
The list of bitstreams in ItemRest is now replaced with a list of
bundles. The bitstreams can now be accessed through the bundles.
2019-08-20 11:13:24 +02:00
Jelle Pelgrims
21116ec7eb Add initial class structure for bundles endpoint 2019-08-20 10:29:47 +02:00
Jelle Pelgrims
3b7eca366e Add comments explaining changes 2019-08-19 09:01:44 +02:00
Ben Bosman
68fc698f4b JavaDocs 2019-08-16 11:32:54 +02:00
Raf Ponsaerts
6e95aae040 Fixed issue with spaces in parameters causing UUIDs to not get recognized 2019-08-16 10:35:52 +02:00
Raf Ponsaerts
62596b1eaa Fixed feedback 2019-08-16 10:10:49 +02:00
Michael W Spalti
0ee78acba3 [DS-4153] Added repository create method that takes a parameter for the parent object.
Implementions are added to the collection and community repository classes.
2019-08-15 13:18:54 -07:00
Mark H. Wood
0eef0b0859 [DS-3695] Add missing libraries reported by Michael Spalti, Chris Wilper. 2019-08-15 11:30:58 -04:00
Mark H. Wood
e103a9305d [DS-3695] Merge damage: method was split, making local variable inaccessible. 2019-08-15 10:51:28 -04:00
Mark H. Wood
9046ecfcb4 Merge branch 'master' into DS-3695-upgrade 2019-08-15 10:23:53 -04:00
Mark H. Wood
8878b3a313 [DS-3695] Ask Solr what cores it has, instead of assuming that we know where they are in the filesystem.
(Solr might not even be installed on the same host.)
2019-08-15 10:16:10 -04:00
Raf Ponsaerts
c7327b6a14 Added javadoc 2019-08-14 13:34:04 +02:00
Jelle Pelgrims
ed17587170 Rename leftwardLabel and rightwardLabel
Renamed the leftwardLabel and rightwardlabel for Relationship to
leftwardValue and rightwardValue. Renamed the same values for
RelationshipType to leftwardType and rightwardType.
2019-08-13 15:30:49 +02:00
Ben Bosman
fcac5ecb56 Exception handling 2019-08-13 13:53:59 +02:00
Jelle Pelgrims
1831c4f92d Fix small issues 2019-08-13 13:06:51 +02:00
Jelle Pelgrims
d2470286a6 Add endpoint to retrieve collection harvest settings 2019-08-13 12:48:14 +02:00
Raf Ponsaerts
c890570b12 [Task 64334] implemented the scripts prototype 2019-08-13 12:33:35 +02:00
Jelle Pelgrims
d401af5f99 Update javadoc author tag email 2019-08-09 09:36:02 +02:00
Jelle Pelgrims
38679befd8 Implement fixes/tweaks and add javadocs 2019-08-09 09:19:00 +02:00
Tim Donohue
fc31a0cbe3 Merge pull request #2485 from mwoodiupui/DS-3422
[DS-3422] Remove XMLUI and JSPUI from the official distribution
2019-08-08 22:40:31 +02:00
Mark H. Wood
1dceb56b44 [DS-3422] Remove obsolete XMLUI configuration. 2019-08-08 15:10:46 -04:00
Jelle Pelgrims
8265964ebd Fix duplicate community issue for findAllNoParent function 2019-08-08 13:09:40 +02:00
Jelle Pelgrims
e46551e84c Add integration test for collection endpoint ordering 2019-08-08 12:46:32 +02:00
Ben Bosman
718340e3d3 wording fixes 2019-08-08 10:41:58 +02:00
Jelle Pelgrims
5b175bb62f Merge branch 'master' into w2p-62967_multiple-title-community-endpoint-issue 2019-08-08 09:52:10 +02:00
Jelle Pelgrims
234ef08eac Add integration test for harvester metadata format endpoint 2019-08-08 09:25:00 +02:00
Mark H. Wood
4dfa7a370a [DS-3695] Remove Solr core updating targets from Ant configuration. 2019-08-07 16:23:00 -04:00
Raf Ponsaerts
7eeb9f944b Fixed tests 2019-08-07 15:56:36 +02:00
Jelle Pelgrims
99bc1b7e0f Add endpoint for harvesting configurations 2019-08-07 14:12:37 +02:00
Jelle Pelgrims
e8fd1e0e37 Revert previous commit 2019-08-07 11:30:23 +02:00
Jelle Pelgrims
6bf6336f11 Fix issue causing tests to fail 2019-08-07 11:24:23 +02:00
Jelle Pelgrims
07a8e33ab5 Add integration test for harvest settings verification 2019-08-07 10:34:28 +02:00
Jelle Pelgrims
361f48bea1 Add settings verification to harvest settings endpoint 2019-08-07 09:58:50 +02:00
Jelle Pelgrims
c2cd25d6d0 Merge branch 'feature-name-variants' of https://github.com/atmire/DSpace into feature-name-variants
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java
#	dspace-api/src/main/java/org/dspace/content/RelationshipMetadataServiceImpl.java
2019-08-07 09:52:42 +02:00
Tim Donohue
a4b4045d2e Merge pull request #2479 from mwoodiupui/DS-4110_7x
[DS-4110] fix issue in legacy id cleanup of stats records
2019-08-06 21:55:48 +02:00
Terry Brady
6da64a2f60 dspace-cli dockerfile 2019-08-06 11:34:05 -07:00
Terry Brady
6b93dfb89d dspace-cli dockerfile 2019-08-06 11:27:23 -07:00
Mark H. Wood
589aa0f576 [DS-4110] Port #2292 to master (v7) 2019-08-06 14:19:48 -04:00
Terry Brady
bd0b1b7abf dspace-cli dockerfile 2019-08-06 11:19:48 -07:00
Ben Bosman
afc9e5bd89 checkstyle 2019-08-06 18:42:25 +02:00
Ben Bosman
664dc0077c wording fixes 2019-08-06 17:37:46 +02:00
Ben Bosman
8f7c7da569 leftwards label vs left item 2019-08-06 17:29:56 +02:00
Ben Bosman
744dae41aa checkstyle 2019-08-06 16:54:09 +02:00
Ben Bosman
42eccd32c3 Process PR feedback 2019-08-06 16:24:36 +02:00
Ben Bosman
f6e5687385 Process PR feedback 2019-08-06 15:59:12 +02:00
Ben Bosman
cafb26bcb7 Ensure mandatory fields are present 2019-08-06 15:42:41 +02:00
Ben Bosman
af6eac966d Ensure mandatory fields are present 2019-08-06 15:34:54 +02:00
Jelle Pelgrims
3c31fdf648 Rename relationship type left and right labels
Renamed the columns 'left_label' and 'right_label' in the table
'relationship_type' to 'leftward_label' and 'rightward_label'.
Also renamed all instances of [l|L]eftLabel and [r|R]ightLabel
to [l|L]eftwardLabel and [r|R]ightwardLabel, respectively.
2019-08-06 13:59:58 +02:00
Raf Ponsaerts
d7a1015f70 Finished IT for name variants 2019-08-06 13:45:25 +02:00
Jelle Pelgrims
251d264378 Implemented changes 2019-08-06 11:56:31 +02:00
Jelle Pelgrims
db24de2ef0 Merge branch 'feature-name-variants' of https://github.com/atmire/DSpace into feature-name-variants 2019-08-06 09:07:57 +02:00
Jelle Pelgrims
535847d12f Rename database column names for leftward/rightwardLabel 2019-08-06 09:03:46 +02:00
Jelle Pelgrims
0c6f53758d Fix checkstyle errors 2019-08-06 08:48:54 +02:00
Raf Ponsaerts
f17fcc2f42 intermediary commit 2019-08-06 08:41:27 +02:00
Jelle Pelgrims
0bb2135a8e Add Integration tests for harvest settings endpoint 2019-08-06 08:41:11 +02:00
Tim Donohue
7eb73b9072 Merge pull request #2477 from AlexanderS/travis-trusty
Travis CI: Continue to use Ubuntu Trusty 14.04
2019-08-05 19:07:12 +02:00
Tim Donohue
cb50d88980 Merge pull request #2282 from atmire/DS-4097_item-mapper-squashed-final
Implemented the Item Mapper functionality
2019-08-05 18:56:08 +02:00
Alexander Sulfrian
e1b7a88225 Travis CI: Continue to use Ubuntu Trusty 14.04
Ubuntu Xenial 16.04 does not support OracleJDK8 anymore.
2019-08-05 17:14:45 +02:00
Jelle Pelgrims
73865a904b Refactor harvest settings endpoint after manual testing 2019-08-05 14:32:58 +02:00
Jelle Pelgrims
ad59842dd0 Add endpoint to update collection harvest settings 2019-08-05 13:41:39 +02:00
Raf Ponsaerts
1866ed2a96 Moved RelationshipMetadata logic to a new service 2019-08-05 10:40:27 +02:00
Ben Bosman
969158783f process feedback + PR 69
Adding JavaDoc
Processing https://github.com/DSpace/Rest7Contract/pull/69
2019-08-05 10:02:44 +02:00
Raf Ponsaerts
9b3d9e1fa0 Implemented feedback 2019-08-02 14:09:42 +02:00
Jelle Pelgrims
763d9ce8e6 Rename code matching '[mM]apping[a-zA-Z]*' to '[mM]apped[a-zA-Z]*'
Rename 'mappingCollection' and similar code to 'mappedCollection', in order
to resolve Tim Donohue's feedback on the pull request.
2019-08-02 13:13:48 +02:00
Jelle Pelgrims
e51aebf09d Merge branch 'master' into DS-4097_item-mapper-squashed-final 2019-08-02 11:27:46 +02:00
Jelle Pelgrims
be7f13316e Refactor RelationshipRestRepository Integration tests
Refactor the integration tests for the RelationshipRestRepository
to reduce the amount of code duplication. Many tests contained code
to create a number of variables to be used in the test, this code
was pretty much the same for every test. I refactored the integration
test class so that all variables used in multiple tests are now declared
at the top and are initialized in an @Before function. Test-specific
variables are unchanged.
2019-08-02 11:07:37 +02:00
Jelle Pelgrims
0377e0a605 Refactor PUT endpoint json parsing to make use of objectmapper 2019-08-01 15:30:04 +02:00
Jelle Pelgrims
c40dabf9c6 Fix two small issues 2019-08-01 14:36:10 +02:00
Jelle Pelgrims
bb85c4f3ad Add tests for relationship name variant 2019-08-01 13:57:16 +02:00
Jelle Pelgrims
bbb6dca621 Update PUT & POST endpoints for relationships to support name variants 2019-08-01 10:35:32 +02:00
Jelle Pelgrims
172e5ec863 Add leftWard/rightWard-Label to Relationship
Modified the Relationship so that it also has a leftWardLabel and a
rightWardLabel for storing alternative labels (name variants). Also
created an sql migration to add two columns for these labels to the
relationship table.
2019-07-31 11:57:09 +02:00
Raf Ponsaerts
db1a885604 Merged DSpace/master into w2p-63475_implement-upload-bitstream-to-archived-item 2019-07-31 11:36:55 +02:00
Raf Ponsaerts
f622ef1d2a Merge remote-tracking branch 'dspace/master' into w2p-63475_implement-upload-bitstream-to-archived-item 2019-07-31 11:17:32 +02:00
Raf Ponsaerts
5e8f355536 Merged DSpace/master into w2p-63533_changes-to-dtd-and-api-relationship-submission 2019-07-31 10:00:14 +02:00
Raf Ponsaerts
e678977f27 Merge remote-tracking branch 'dspace/master' into w2p-63533_changes-to-dtd-and-api-relationship-submission 2019-07-31 09:32:24 +02:00
Tim Donohue
d896fed7a7 Merge pull request #2394 from ilittle-cnri/DS-1477-update-handle-server
[DS-4205] Upgrade to Handle Server v9
2019-07-25 22:12:54 +02:00
Ian Little
65e1d2c7dc Merge branch 'master' into DS-1477-update-handle-server
# Conflicts:
#	dspace-api/pom.xml
#	pom.xml
2019-07-25 14:03:29 -04:00
Tim Donohue
a11d4423b6 Merge pull request #2459 from tdonohue/rename_spring_rest
[DS-4257] (One Webapp Phase 2) Rename "dspace-spring-rest" to "dspace-server-webapp"
2019-07-25 17:05:55 +02:00
Ben Bosman
c97a48339c selectableRelationships should only be included if they are present 2019-07-25 15:08:03 +02:00
Ben Bosman
a1e47b8bda Merge remote-tracking branch 'community/master' into w2p-63533_changes-to-dtd-and-api-relationship-submission 2019-07-25 14:16:00 +02:00
Raf Ponsaerts
c70c1d3030 [Task 63947] applied feedback on SubmissionForm matcher 2019-07-25 12:57:41 +02:00
Raf Ponsaerts
2c4d7e656e [Task 63946] applied the feedback 2019-07-25 10:53:48 +02:00
Raf Ponsaerts
a1f653bdd6 [Task 63747] added IT for the relationship config 2019-07-24 14:25:43 +02:00
Raf Ponsaerts
2966bc919d Added the setting of name when no properties are present in the item bitstream upload 2019-07-24 09:59:21 +02:00
Raf Ponsaerts
22de7a80d9 [Task 63822] applied feedback where possible 2019-07-24 09:53:13 +02:00
Raf Ponsaerts
17a51e985b [Task 63533] Made sure that the relationship section in the submission forms is only shown in the response when it's a relationship field 2019-07-24 08:38:28 +02:00
Tim Donohue
8dc1d27598 Correct sample URLs in tests 2019-07-19 16:35:53 -05:00
Tim Donohue
739ff181cc Rename "dspace-spring-rest" to "dspace-server-webapp" 2019-07-19 16:35:53 -05:00
Tim Donohue
4155108745 Merge pull request #1992 from mwoodiupui/DS-3872
[DS-3872] More powerful email template language, and a richer set of substituents
2019-07-19 22:28:07 +02:00
Mark H. Wood
86b90dc490 [DS-3872] From review: fix quoting in template, handle 0 arguments. 2019-07-18 16:11:36 -04:00
Andrea Bollini
c17c15ff22 Merge pull request #2442 from atmire/DS-4266-bitstream-format-crud
[DS-4266] bitstream format crud
2019-07-18 16:14:00 +02:00
Jelle Pelgrims
d92aab0597 Add tests for multiple community title issue, along with temporary solution 2019-07-17 14:38:43 +02:00
Kevin Van de Velde
5297c88292 Test that supportLevel is not changed 2019-07-17 11:36:37 +02:00
Raf Ponsaerts
e557f01360 Refined the SelectableMetadata representation 2019-07-16 11:07:43 +02:00
Raf Ponsaerts
f166e8981f Implemented the Relationship logic in the submissionforms endpoint 2019-07-16 09:33:19 +02:00
Raf Ponsaerts
d8beea83bd Changed endpoint mapping and fixed tests accordingly 2019-07-15 11:45:06 +02:00
Raf Ponsaerts
4d3e2a6fbf [DS-4097] added javadocs to the requested classes 2019-07-15 11:45:06 +02:00
Marie Verdonck
3dc50a1277 Undo HALResource change, all tests run locally 2019-07-15 11:45:06 +02:00
Marie Verdonck
35316f6d2f Non-code changes, just whitelines 2019-07-15 11:45:06 +02:00
Marie Verdonck
a7e2a79774 restored auth system everywhere and size check for items in MappedItems call ($._embedded.mappingItems) 2019-07-15 11:45:06 +02:00
Marie Verdonck
c727471309 - Unit tests for findByCollectionMapping (incl Pagination) & countByCollectionMapping 2019-07-15 11:45:06 +02:00
Marie Verdonck
59b0ce470a Tests for new expected exceptions in MappingCollection endpoint
POST/DELETE:
 405: item is a template item
 422: specified collection not found or owningCollection of the item
2019-07-15 11:45:06 +02:00
Marie Verdonck
3fd522bf2b POST mappedCollections does not work now if given collection is owningCollection of item
> Throws exception, error status 405
2019-07-15 11:45:06 +02:00
Marie Verdonck
5be2b9628f Error & Status for non-successful POST/DELETE mappedCollections requests
- POST /api/core/items/<:uuid>/mappedCollections
 > 405: item is a template item
 > 422: specified collection not found or is owningCollection of item
- DELETE /api/core/items/<:uuid>/mappedCollections/<:collection_uuid>
 > 405: item is a template item
 > 422: specified collection not found or is owningCollection of item
2019-07-15 11:45:05 +02:00
Samuel
e420c71098 DS-4097 name change from mappingCollections to mappedCollections + data change to uri-list 2019-07-15 11:44:13 +02:00
Raf Ponsaerts
4215e91964 Implemented the Item Mapper functionality 2019-07-15 11:44:12 +02:00
Tim Donohue
1812099674 Merge pull request #2443 from atmire/w2p-62610_metadata-schema-registries-for-entity-types-squashed-2
DS-4223 Metadata Schemas for configurable entities
2019-07-12 19:21:21 +02:00
Raf Ponsaerts
3ff164c0fe Implemented feedback and testing on item bitstreams post endpoint 2019-07-12 11:39:09 +02:00
Tim Donohue
d7bdfa92c0 Merge pull request #2467 from atmire/DS-4298_upload-endpoint-uuid-broken
[DS-4298] changed the PathVariable for the upload method with uuid to…
2019-07-11 23:17:57 +02:00
Mark H. Wood
87d2f071e2 Merge branch 'master' into DS-3872 2019-07-11 11:54:35 -04:00
Tim Donohue
e2ea244eb3 Merge pull request #2283 from atmire/DS-4096-updating-owning-collections2
DS-4096: updating owning collections
2019-07-10 23:39:42 +02:00
Tim Donohue
30494e0fc5 Merge pull request #2429 from 4Science/DS-4210
DS-4210 Deposit on collection without workflow seems to fail (405 but succeed)
2019-07-10 23:20:45 +02:00
Tim Donohue
f4cd6997d9 Merge pull request #2446 from atmire/DS-4244_Entities-unit-tests
DS-4244 Add configurable entities unit tests
2019-07-10 23:13:20 +02:00
Raf Ponsaerts
70b394b57f Implemented the upload of a bitstream to an archived item 2019-07-10 14:43:20 +02:00
Raf Ponsaerts
41c7003d43 [DS-4298] changed the PathVariable for the upload method with uuid to be called 'uuid' 2019-07-10 08:55:39 +02:00
Tim Donohue
1dece5ead3 Merge pull request #2457 from atmire/delete-relationship-it-squashed
Delete relationship Integration Test
2019-07-09 23:55:07 +02:00
Yana De Pauw
705cc80a91 63419: Bitstream format registry feedback 2019-07-09 18:05:28 +02:00
Raf Ponsaerts
c1288daf19 Reinstated a sanity check 2019-07-09 12:45:12 +02:00
Raf Ponsaerts
5a810644e1 [Task 63533] applied feedback 2019-07-09 10:42:39 +02:00
benbosman
e2c1ab5a17 Merge pull request #2456 from atmire/DS-4084_remove-leftid-rightid-relationship
[DS-4084] - Relationships should link to Items via REST API
2019-07-09 09:15:07 +02:00
Raf Ponsaerts
d8970ff9c4 Merged master into DS-4084_remove-leftid-rightid-relationship 2019-07-09 07:43:13 +02:00
Tim Donohue
74299e87a3 Merge pull request #2397 from mwoodiupui/DS-3823
[DS-3823] Our extensive EHCache configuration is ignored
2019-07-08 21:01:16 +02:00
Raf Ponsaerts
a846d2dc10 [Task 63533] made a working implementation for the submission-forms.xml 2019-07-08 15:15:12 +02:00
Yana De Pauw
bf0bc5b732 Add javadocs 2019-07-08 14:14:39 +02:00
benbosman
f6e16f9156 Merge pull request #2450 from atmire/w2p-62955_change-endpoint-to-search-relationships-by-label-update
Relationship search by label
2019-07-08 10:55:20 +02:00
Raf Ponsaerts
112078e858 Added javadoc 2019-07-04 15:00:17 +02:00
Mark H. Wood
eee406bccf Merge pull request #2466 from mwoodiupui/DS-1443-again
[DS-1443] Export Community/Collection structure with structure-builder
2019-07-03 13:51:55 -04:00
Mark H. Wood
5c02705a81 [DS-1443] Somebody replaced DC_SCHEMA with DC.getName(). 2019-07-03 12:59:29 -04:00
Mark H. Wood
180ce285aa Merge pull request #2421 from mwoodiupui/DS-1443-again
[DS-1443] Export structure with structure-builder
Since this is essentially the same as a PR already having two approvals, and has been reviewed again in its present form, I'm merging it.
2019-07-03 11:41:28 -04:00
Andrew Wood
c7aded19a8 DS-4244 Improve comments for relationship concept unit test 2019-07-01 15:28:19 -04:00
Raf Ponsaerts
0555186e82 Added inline comments to the RelationshipRestRepositoryIT#findRelationshipByLabelTest 2019-07-01 13:32:11 +02:00
Kevin Van de Velde
4f5e051c2d Merge branch 'master' into DS-4096-updating-owning-collections2 2019-06-28 13:00:28 +02:00
Tim Donohue
4d8777c24e Merge pull request #2448 from AlexanderS/minor-code-cleanup
Some minor code cleanup in the tests
2019-06-27 18:30:51 +02:00
Tim Donohue
4f2519d36d Merge pull request #2458 from tdonohue/lost_commit
DS-2376: Catch exception from encrypted PDF instead of expecting to test for it. (Bug fix follow-up)
2019-06-27 17:27:23 +02:00
Mark H. Wood
998c3109d0 Catch exception from encrypted PDF instead of expecting to test for it. 2019-06-27 09:52:33 -05:00
Tim Donohue
f29f2fe2b6 Merge pull request #2425 from tdonohue/security_updates
Minor dependency updates for `master` (pre-7.0)
2019-06-27 16:44:43 +02:00
Andrea Bollini
705c6e95d5 Remove unnecessary debugging sysout 2019-06-27 16:05:49 +02:00
Ben Bosman
dc38da9ef5 Squashed commit of the following:
commit fc632442c0f0fabf6738b515d629997644a40096
Author: Ben Bosman <ben@atmire.com>
Date:   Thu Jun 27 09:20:03 2019 +0200

    IT on delete, counting relationships per item
2019-06-27 11:07:35 +02:00
Ben Bosman
ee8d40cef2 IT on delete, counting relationships per item 2019-06-27 09:15:36 +02:00
Ben Bosman
e945a3e560 merge with master 2019-06-25 14:17:53 +02:00
Ben Bosman
8392429c89 merge with master 2019-06-25 13:48:07 +02:00
Ben Bosman
c51e28ed0f Merge remote-tracking branch 'community/master' into DS-4084_remove-leftid-rightid-relationship 2019-06-25 13:47:11 +02:00
Ben Bosman
0b4aef01b5 Travis trigger 2019-06-25 13:23:33 +02:00
Ben Bosman
488b0f9e6b Merge remote-tracking branch 'community/master' into w2p-62955_change-endpoint-to-search-relationships-by-label-update 2019-06-25 11:22:00 +02:00
Mark H. Wood
590d563197 [DS-3872] Finish removing autoconfigure from Application. 2019-06-24 17:23:18 -04:00
Mark H. Wood
5724b21149 [DS-3872] Remove outdated, redundant Commons Lang3 dependency. 2019-06-24 17:17:42 -04:00
Mark H. Wood
dd84ef0ce6 [DS-3872] More thorough documentation of header control. 2019-06-24 17:16:52 -04:00
Mark H. Wood
03377c24bd [DS-3872] Move exlcusion of Spring's Velocity autoconfig to where the others are. 2019-06-24 17:15:41 -04:00
Tim Donohue
05b721584d Merge pull request #2432 from 4Science/DS-4252
DS-4252 Discovery re-index doesn't work without -b
2019-06-24 19:50:59 +02:00
Tim Donohue
0b0931d96d Upgrade Spring per security notice 2019-06-24 12:15:10 -05:00
Tim Donohue
59f55180d3 Upgrade PDFBox per security notice. Remove BouncyCastle optional dependency (DSpace doesn't support encrypted PDFs) 2019-06-24 12:13:50 -05:00
Tim Donohue
b75c4e1a02 Security update for checkstyle 2019-06-24 12:13:50 -05:00
Tim Donohue
9d6b75466b Security update for jackson-databind 2019-06-24 12:13:50 -05:00
Kevin Van de Velde
46a3b5d20d Merge branch 'master' into DS-4266-bitstream-format-crud 2019-06-24 15:58:09 +02:00
Tim Donohue
b56b47629a Merge pull request #2440 from atmire/w2p-62574_PUT-relationships-modify-left-or-right-item-squashed
DS-4230 - PUT contract in relationships
2019-06-21 18:53:25 +02:00
Tim Donohue
f02c44c655 Merge pull request #2403 from atmire/DS-4217_PatchBadRequestException-name-refactor-and-fix-BadRequestException-errors
[DS-4217] applied the name refactor and rewrote BadRequestException t…
2019-06-21 18:13:31 +02:00
Raf Ponsaerts
0afb8d3203 Fixed tests 2019-06-21 14:17:42 +02:00
Andrea Bollini
971b28448f Merge pull request #2444 from 4Science/DS-4269
DS-4269 Incorrect hal pagination links in the browses endpoint
2019-06-20 17:06:46 +02:00
Andrea Bollini
f8a66833d7 revert unnecessary change 2019-06-20 16:37:33 +02:00
Andrea Bollini
4cd9d6ce6e Merge branch 'master' of https://github.com/DSpace/DSpace into DS-4210 2019-06-20 16:09:03 +02:00
Raf Ponsaerts
a15213bf6e Merged w2p-62955_change-endpoint-to-search-relationships-by-label-update into w2p-63107_merge-branches 2019-06-20 09:54:48 +02:00
Raf Ponsaerts
95ae7c0cbb Merge branch 'w2p-62574_PUT-relationships-modify-left-or-right-item-squashed' into w2p-63107_merge-branches 2019-06-20 09:29:56 +02:00
kshepherd
01ea800143 Merge pull request #2224 from mwoodiupui/DS-4032
[DS-4032] RequestItem.isAccept_request() can NPE if setAccept_request() was never called.
2019-06-19 22:41:04 +02:00
Raf Ponsaerts
f57d5113fe Fixed tests and checkstyle 2019-06-19 09:32:58 +02:00
Raf Ponsaerts
f0e4701c18 Added support for not passing a DSO parameter to the search endpoint 2019-06-19 08:04:01 +02:00
Raf Ponsaerts
a1995347fe Implemented the search method on the relationships endpoint
Conflicts:
	dspace-spring-rest/src/main/java/org/dspace/app/rest/model/RelationshipRestWrapper.java
	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/RelationshipRestRepository.java
	dspace-spring-rest/src/test/java/org/dspace/app/rest/RelationshipTypeRestControllerIT.java
2019-06-19 08:03:35 +02:00
Alexander Sulfrian
7dcc9fcf29 Inner class can be static
Inner classes, that does not reference the enclosing class, can be static.
2019-06-18 21:36:45 +02:00
Alexander Sulfrian
b007793ea0 IOUtil.copy without Charset is deprecated 2019-06-18 21:36:45 +02:00
Alexander Sulfrian
8ea6b21a73 Replace createSQLQuery with createNativeQuery
Since hibernate 5.2 createSQLQuery is deprecated in favor of createNativeQuery.
2019-06-18 19:54:18 +02:00
Alexander Sulfrian
1a4dae950c Remove shadowing variables
authorizeService and context are already defined in the AbstractUnitTest.
2019-06-18 19:54:17 +02:00
Alexander Sulfrian
63803e8314 Replace commons-io Charsets with StandardCharsets
org.apache.commons.io.Charsets is deprecated in favor of
java.nio.charset.StandardCharsets.
2019-06-18 19:54:17 +02:00
Alexander Sulfrian
324c8c8d44 Add missing @Override 2019-06-18 19:54:17 +02:00
Alexander Sulfrian
0679801945 Fix order of arguments of assertEquals 2019-06-18 19:54:04 +02:00
Andrew Wood
2a32c7ec02 DS-4244 Add entity and relationship unit tests 2019-06-17 09:20:45 -04:00
Raf Ponsaerts
99bba2ab63 DS-4244 Add RelationshipTypeTest
Refactored the RelationshipTypeTest to be more compliant with the JUnit tests
2019-06-17 09:20:31 -04:00
Raf Ponsaerts
cf2e443037 Removed the leftid and rightid properties from the Relationship response 2019-06-17 10:09:23 +02:00
Ben Bosman
65c3039c1d Support for requesting a specification configuration using e.g. /rest/api/discover/search/objects?configuration=publicationConfiguration 2019-06-13 15:49:40 +02:00
Ben Bosman
bb97672020 Discovery configuration specific to Publication 2019-06-13 15:04:03 +02:00
Raf Ponsaerts
bef7afae8c [DS-4266] fixed the lazy loading issue on bitstreamFormat 2019-06-12 13:04:23 +02:00
Tim Donohue
62de82fee0 Merge pull request #2437 from AlexanderS/fix-hal-login-form
[DS-4259] HAL login form does not support special characters
2019-06-11 20:44:00 +02:00
Andrea Bollini
e2f4eafd0f DS-4270 fix typo 2019-06-11 03:05:31 +02:00
Andrea Bollini
22cd4cf090 DS-4269 fix links issue when there were not parameters 2019-06-11 03:04:44 +02:00
Andrea Bollini
cd1ed182f0 DS-4269 improve IT for pagination links issue 2019-06-11 02:44:20 +02:00
Andrea Bollini
4b9b020669 DS-4269 IT to reproduce the bug in pagination links 2019-06-11 02:16:16 +02:00
Andrea Bollini
aa7c206e0b DS-4210 improve cleanup of workspace and workflow items 2019-06-11 01:25:52 +02:00
Andrea Bollini
8f1092e895 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-4210 2019-06-10 21:50:26 +02:00
Raf Ponsaerts
7fbf902de0 [DS-4217] changed all invalidrequest to DSpaceBadRequestExceptions 2019-06-07 12:36:32 +02:00
Raf Ponsaerts
99eae45db0 [DS-4217] added comment to test method 2019-06-07 11:11:28 +02:00
Ben Bosman
91651acc7a updated for schema.org metadata 2019-06-06 11:46:14 +02:00
Ben Bosman
8ae365724d updated for schema.org metadata 2019-06-06 10:57:06 +02:00
Ben Bosman
3290c49f48 Squashed commit of the following:
commit 182b9db8784b7c98f629d04ae91ca19abdd2cc71
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 17:35:15 2019 +0200

    whitespace fixes

commit ffce348b698b96c47995d962a5892566cd317e1e
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 17:31:14 2019 +0200

    whitespace fixes

commit a1aeb273ff598305609013f82afd7126e2286f07
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 16:58:33 2019 +0200

    merging https://github.com/DSpace/DSpace/pull/2116

commit e89ace0c3cdb5c28c3d59bab6334c514513667d5
Merge: 568aa0d5c a7a8545cd
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 16:56:35 2019 +0200

    Merge remote-tracking branch 'community/master' into w2p-62610_metadata-schema-registries-for-entity-types-squashed

    # Conflicts:
    #	dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseRegistryUpdater.java

commit 568aa0d5c9ea86cb31bf825f330a5e4c044a1653
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 14:57:20 2019 +0200

    configuring dates as date facets

commit 6390487d45a8e83e02d1e312ced319ed59525377
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 12:08:45 2019 +0200

    updated for schema.org metadata - removed collection mapping

commit 171ee9b201eabfa74d2375ef1e0fdba2ea85c404
Author: Ben Bosman <ben@atmire.com>
Date:   Wed Jun 5 12:03:54 2019 +0200

    Squashed commit of the following:

    commit 25fac292281741afe3eb8c7fad5cfff91965461d
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue Jun 4 13:34:58 2019 +0200

        updated for schema.org metadata

    commit c62fcb75e7ac21f3dc41aa34bed597a4d701e932
    Author: Raf Ponsaerts <raf.ponsaerts@atmire.com>
    Date:   Tue Jun 4 11:46:51 2019 +0200

        [Task 62732] updated the virtual-metadata config

    commit 9ade3f90c011a04e6eb79d91d0f82cc305f941dd
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue Jun 4 11:35:46 2019 +0200

        discovery config update

    commit eef08d7617be5ead9626829b0320bcb610d8cb40
    Author: Ben Bosman <ben@atmire.com>
    Date:   Mon Jun 3 15:12:59 2019 +0200

        new types for entities

    commit 434722b809cab29ff8e3b95eb04ed644008afc38
    Author: Ben Bosman <ben@atmire.com>
    Date:   Mon Jun 3 14:55:05 2019 +0200

        restored eperson types

    commit ef97353de6a9c07e91d4680cb9b1e5fb539b94d7
    Author: Marie Verdonck <maria.verdonck@atmire.com>
    Date:   Wed May 29 16:28:12 2019 +0200

        Discovery config for entities Organization; PublicationIssue;
           PublicationVolume; Periodical

        Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>

    commit 2c02d863c66174917bcf4309f370e5c2d56f4260
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue May 28 18:52:46 2019 +0200

        journal volume name

    commit ceb5a2d34fed3647f92997b6a0b1f06b34cdfa7c
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue May 28 18:10:20 2019 +0200

        sort by date accessioned

    commit 62751138875b130d3c512453199e0ba5b4a9451f
    Author: Marie Verdonck <maria.verdonck@atmire.com>
    Date:   Tue May 28 15:40:22 2019 +0200

        Discovery configuration for Person Entity

    commit 62622ccbc66bbebc4a297b216507461f3a1f37de
    Author: Marie Verdonck <maria.verdonck@atmire.com>
    Date:   Tue May 28 14:25:18 2019 +0200

        Submission-forms changed for new metadata mapping
        - Not yet mapped with replacement fields commented

    commit 2f6338d1e85352097f398281685e7800e00a5e87
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue May 28 11:07:48 2019 +0200

        fixes to submission forms

    commit 9aeebf61a8e180e3ee6b90001385eae3d7921f35
    Author: Ben Bosman <ben@atmire.com>
    Date:   Tue May 28 11:02:54 2019 +0200

        fixes to submission forms

    commit 9055ae6d8ed4b686c879853ea8ca761950d27f87
    Author: Marie Verdonck <maria.verdonck@atmire.com>
    Date:   Tue May 28 10:47:31 2019 +0200

        Equivalents found in dublin-core-types, list so far:
        * person-types.xml & eperson-types.xml > schema-person-types.xml
            * eperson.firstname > person.givenName
            * eperson.lastname > person.familyName
            * eperson.phone > persone.telephone
            * eperson.language > person.knowsLanguage
            * person.identifier.email > person.email
            * person.identifier.orcid > NOT FOUND
            * person.identifier.birthdate > person.birthDate
            * person.identifier.staffid > NOT FOUND
            * person.identifier.jobtitle > person.jobTitle
            * person.contributor.other > NOT FOUND
        * journalVolume-types.xml > schema-publicationVolume-types.xml
            * journalvolume.issuedate > creativework.datePublished
            * journalvolume.identifier.volume > publicationVolume.volumeNumber
            * journalvolume.identifier.name > NOT FOUND
            * journalvolume.identifier.description > dc.description
        * orgunit-types.xml > schema-organization-types.xml
            * orgunit.identifier.name > organization.legalName
            * orgunit.identifier.id > NOT FOUND
            * orgunit.identifier.dateestablished >organisation.foundingDate
            * orgunit.identifier.city > organisation.address.addressLocality
            * orgunit.identifier.country > organisation.address.addressCountry
            * orgunit.identifier.description > dc.description
        * project-types.xml > schema-project-types.xml

        ‘Project’ is still in ‘Pending’ https://pending.schema.org/
            * project.identifier.name > dc.title
            * project.identifier.id > dc.identifier
            * project.identifier.status > NOT FOUND
            * project.identifier.startdate > NOT FOUND
            * project.identifier.expectedcompletion > NOT FOUND
            * project.identifier.keyword > dc.subject
            * project.identifier.description > dc.description
            * project.contributor.other > dc.contributor.other
            * project.contributor.author > dc.contributor.author
        * journalissue-types.xml > schema-publicationIssue-types.xml
            * journalissue.issuedate > creativework.datePublished
            * journalissue.identifier.number > publicationissue.issueNumber
            * journalissue.identifier.name > dc.title
            * journalissue.identifier.description > dc.description
            * journalissue.identifier.keyword > creativework.keywords
        * journal-types > schema-periodical-types.xml
            * journal.contributor.editor > creativework.editor
            * journal.publisher > creativework.publisher
            * journal.identifier.issn > creativeworkseries.issn
            * journal.identifier.name > dc.title
            * journal.identifier.description > dc.description
            * journal.title > NOT FOUND

    commit 1578da3a76fa29567a63e64b587898a24004dbf4
    Author: Marie Verdonck <maria.verdonck@atmire.com>
    Date:   Mon May 27 15:38:54 2019 +0200

        Metadata registries for entity types (partially) mapped and replaced by schema.org values
        Non-mapped values logged in new files
        - person-types.xml & eperson-types.xml > schema-person-types.xml
        - journalVolume-types.xml > schema-publicationVolume-types.xml
        - orgunit-types.xml > schema-organization-types.xml
        - project-types.xml > schema-project-types.xml
        - journalissue-types.xml > schema-publicationIssue-types.xml
        - journal-types > schema-periodical-types.xmlnon-direct parent thing.name)
2019-06-05 17:45:08 +02:00
benbosman
a7a8545cd5 Merge pull request #2116 from mwoodiupui/DS-3953
[DS-3953] Externalize hard-coded list of metadata registry files in updater
2019-06-05 16:52:24 +02:00
Kevin Van de Velde
8d97f23375 [DS-4266] CRUD support for bitstream formats: Code style cleanup 2019-06-05 11:46:00 +02:00
Marie Verdonck
6a65cd2ad3 Error handling and cleanup:
- setAllValuesOfRest() SQLException now meaningful message
- metadataConverter never used, so removed
- id comparison check flipped so no NullPointer when no id in json in body,
but meaningful message
2019-06-04 13:15:20 +02:00
Marie Verdonck
f3cfe49a97 Removing non-code changes (indentation) 2019-06-04 10:35:55 +02:00
Mark H. Wood
55dbcb96cd [DS=3953] Configuration comment to explain how these properties are used. 2019-06-02 08:25:25 -04:00
Mark H. Wood
b6eb0b7d85 Merge branch 'DS-3953' of github.com:mwoodiupui/DSpace into DS-3953 2019-06-02 08:19:40 -04:00
Marie Verdonck
1f40ae51ad 400 - DSpaceBadRequestException when nonvalid supportLevel in rest call for
POST /api/core/bitstreamformats
PUT /api/core/bitstreamformats/<:id>

Implementation & Tests for create/update
2019-05-31 15:32:16 +02:00
Raf Ponsaerts
db8f203f01 [DS-4217] fixed compilation failure after rebase and wrote tests for the DSpaceBadRequestException
Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-05-31 15:00:43 +02:00
Raf Ponsaerts
d6b5abd694 [DS-4217] applied the name refactor and rewrote BadRequestException to use this class instead
Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-05-31 15:00:19 +02:00
Marie Verdonck
15f6f9e9b8 Tests for full CRUD functionality on bitstreamformat registry endpoint:
POST /api/core/bitstreamformats
PUT /api/core/bitstreamformats/<:id>
DELETE /api/core/bitstreamformats/<:id>

Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-05-31 14:50:52 +02:00
Marie Verdonck
44f8a8ef9f Thown sql exception with message & checkstyle 2019-05-31 14:49:59 +02:00
Marie Verdonck
c79006dca1 unused import, checkstyle violation 2019-05-31 14:49:12 +02:00
Marie Verdonck
e4f1ed698a comments removed & if supportlevel is -1 (not given), set to UNKNOWN 2019-05-31 14:48:29 +02:00
Marie Verdonck
198b97de6d getSupportLevelString removed and usage replaced with getSupportLevelText 2019-05-31 14:47:05 +02:00
Marie Verdonck
47ece82445 Codechanges ignoring whitespaces and empty lines of following commits:
Squashed commit of the following:

commit d65609c
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 11:18:46 2019 +0200

    travis build fixes

commit 62aeb94
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:53:48 2019 +0200

    license broken

commit 1d2e2ed
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:33:54 2019 +0200

    update comments

commit 552005f
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:22:31 2019 +0200

    removed unnecessary method

commit af149e7
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Wed May 29 17:47:27 2019 +0200

    Reduced complexity in relationship rest controller & tests (PUT)
    - No need for id integer check, pathvariable expects only integers
    - Tests added for exception cases:
       > Invalid relationship id (non-existent) > 404 - Not found
       > Invalid item id in body > 422 - Unprocesseable
    - Test verification andExpect() more efficient

commit 3c37d20
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Wed May 29 10:43:19 2019 +0200

    Tests for the endpoints: PUT /api/core/relationships/:id/leftItem
                             PUT /api/core/relationships/:id/rightItem

commit a58c611
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Tue May 28 10:18:19 2019 +0200

    Back to original isAllowedToModify method; regex for relationship id in mapping &
    - No need to check for leftItem=rightItem, is allowed
    - No need to check if relationship already exists, DB will prevent duplicates

commit 2424c5c
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Mon May 27 13:53:50 2019 +0200

    Changes in the PUT on relationships, new endpoints:
    - PUT /api/core/relationships/:id/leftItem
    - PUT /api/core/relationships/:id/rightItem

    > 403 Forbidden  - if not enough write rights (see below)
    > 422 Unprocesseable Entity -  if relationship id NaN or invalid item in body
    > 404 Resource Not Found if - relationship with given id not found

    Needed permissions:
    Replace left: right.WRITE OR (left.WRITE AND old-left.WRITE)
    Replace right: left.WRITE OR (right.WRITE AND old-right.WRITE)
2019-05-31 10:14:24 +02:00
Andrea Bollini
eef6055ead Fix wrong cleanup query 2019-05-30 14:55:46 +02:00
Andrea Bollini
b9b0fcd45f Merge branch 'master' of https://github.com/DSpace/DSpace into DS-4252 2019-05-30 14:47:16 +02:00
Ben Bosman
38f1468f42 Squashed commit of the following:
commit d65609c66e4dd54c5a8af2fc18d952c958c0f69b
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 11:18:46 2019 +0200

    travis build fixes

commit 62aeb9463d9c74070540ad1eb247bb539dae8cf9
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:53:48 2019 +0200

    license broken

commit 1d2e2edb085433f79aa2abe58cdc4d4065dbfc81
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:33:54 2019 +0200

    update comments

commit 552005fc2f1c912220d0f62e94c3045e9f772be2
Author: Ben Bosman <ben@atmire.com>
Date:   Thu May 30 10:22:31 2019 +0200

    removed unnecessary method

commit af149e7871f30e4bc17f7eeccf8655fe9d80cdf7
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Wed May 29 17:47:27 2019 +0200

    Reduced complexity in relationship rest controller & tests (PUT)
    - No need for id integer check, pathvariable expects only integers
    - Tests added for exception cases:
       > Invalid relationship id (non-existent) > 404 - Not found
       > Invalid item id in body > 422 - Unprocesseable
    - Test verification andExpect() more efficient

commit 3c37d208cbe609f5182470ce8302ec25de00939f
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Wed May 29 10:43:19 2019 +0200

    Tests for the endpoints: PUT /api/core/relationships/:id/leftItem
                             PUT /api/core/relationships/:id/rightItem

commit a58c611ad7a648b28933fb39840866def42384e6
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Tue May 28 10:18:19 2019 +0200

    Back to original isAllowedToModify method; regex for relationship id in mapping &
    - No need to check for leftItem=rightItem, is allowed
    - No need to check if relationship already exists, DB will prevent duplicates

commit 2424c5c71b63122263aec08e110cf7bb4b19cc5d
Author: Marie Verdonck <maria.verdonck@atmire.com>
Date:   Mon May 27 13:53:50 2019 +0200

    Changes in the PUT on relationships, new endpoints:
    - PUT /api/core/relationships/:id/leftItem
    - PUT /api/core/relationships/:id/rightItem

    > 403 Forbidden  - if not enough write rights (see below)
    > 422 Unprocesseable Entity -  if relationship id NaN or invalid item in body
    > 404 Resource Not Found if - relationship with given id not found

    Needed permissions:
    Replace left: right.WRITE OR (left.WRITE AND old-left.WRITE)
    Replace right: left.WRITE OR (right.WRITE AND old-right.WRITE)

    Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-05-30 11:48:20 +02:00
Marie Verdonck
e3ac8f98b1 Full CRUD on bitstreamformat registry endpoint; added:
POST /api/core/bitstreamformats
PUT /api/core/bitstreamformats/<:id>
DELETE /api/core/bitstreamformats/<:id>

Signed-off-by: Marie Verdonck <maria.verdonck@atmire.com>
2019-05-29 14:36:21 +02:00
Andrea Bollini
970955d722 DS-4210 Fix response code for created object via URI-LIST without further details 2019-05-28 10:55:03 +02:00
Andrea Bollini
ae671d27ab Merge branch 'master' of https://github.com/DSpace/DSpace into DS-4210 2019-05-28 10:52:10 +02:00
Alexander Sulfrian
812b459cf5 HAL: Use submit button in login form
This enables some automatic features of the browsers, f.e. the form will be
submitted when you press the return key in the username or password field.
2019-05-24 18:53:10 +02:00
Alexander Sulfrian
2111d03ffb HAL: Encode username and password in login form 2019-05-24 18:52:57 +02:00
Mark H. Wood
ce03072495 [DS-3823] Explain the existence and use of CacheSnooper. 2019-05-24 08:44:25 -04:00
Mark H. Wood
17daf04f21 [DS-3872] Re-remove factored-out code that was un-removed by a botched rebase. 2019-05-22 13:45:16 -04:00
Mark H. Wood
62acad25a3 [DS-3872] Add many inexplicably missing imports after rebase. 2019-05-22 12:10:14 -04:00
Mark H. Wood
ff5962cfa6 [DS-3872] Make config visible to introspector; enable testing arbitrary templates; remove more MessageFormat. 2019-05-22 11:18:16 -04:00
Mark H. Wood
db8a5effb3 [DS-3872] Avoid collision with other Velocity users by making resources local to the engine instance.
Also misc. clarifications and cleanups, drop unused new method.
2019-05-22 11:18:16 -04:00
Mark H. Wood
a579f8fe92 [DS-3872] Spring Boot looks for Velocity and tries to initialize it as v1. Suppress this. 2019-05-22 11:18:16 -04:00
Mark H. Wood
cb3edadf1f [DS-3872] Load template file into string resource repository, let Velocity figure out how to parse it. 2019-05-22 11:08:05 -04:00
Mark H. Wood
9f7b3e53df [DS-3872] Align commons-lang3 transitive dependencies. 2019-05-22 11:08:05 -04:00
Mark H. Wood
60f72fb90a [DS-3872] Checkstyle fixes lost in rebasing. 2019-05-22 11:08:05 -04:00
Mark H. Wood
d94264bc79 [DS-3872] Support 'charset' header; remove old code I had missed. 2019-05-22 11:08:04 -04:00
Mark H. Wood
66191be2aa [DS-3872] Restore ability to set Subject: from template text. 2019-05-22 11:08:04 -04:00
Mark H. Wood
b75c5e1bab [DS-3872] Convert MessageFormat email templates to VTL. 2019-05-22 11:08:04 -04:00
Mark H. Wood
3bea69ae82 [DS-3872] Upgrade to Velocity v2. 2019-05-22 11:08:04 -04:00
Mark H. Wood
5bfe44f93f Begin patching in Velocity 2019-05-22 11:08:04 -04:00
Tim Donohue
68a068db37 Merge pull request #2435 from tdonohue/fix_broken_IT
Fix race condition in IT on "master"
2019-05-21 12:49:50 -05:00
Tim Donohue
81040975ed Convert Mock into a Spy of currently loaded bean 2019-05-21 12:15:37 -05:00
Tim Donohue
73c2e9d2d6 Merge pull request #2265 from tdonohue/one_webapp_backend_redux
DS-4257: DSpace 7 backend as one webapp (RESTv7, SWORD, SWORDv2, OAI, RDF)
2019-05-21 11:02:58 -05:00
Kevin Van de Velde
e3199d76a7 [DS-4096] Updating owning collections: Additional checks to prevent moving to an items current owning collection and making sure that an item is archived or withdrawn 2019-05-21 09:55:44 +02:00
Raf Ponsaerts
15de4f2901 [DS-4217] fixed compilation failure after rebase and wrote tests for the DSpaceBadRequestException 2019-05-21 09:44:29 +02:00
Raf Ponsaerts
bd63a69d09 [DS-4217] applied the name refactor and rewrote BadRequestException to use this class instead 2019-05-21 09:44:24 +02:00
Marie Verdonck
af13e51d0e Max length of line rule 2019-05-20 12:04:37 +02:00
Marie Verdonck
3aea69f9a7 Reason behind context.commit in RestController 2019-05-20 12:04:01 +02:00
Marie Verdonck
69a392a5cd Better exception/error handling for invalid collection uri in PUT /api/core/items/<:uuid>/owningCollection 2019-05-20 10:47:44 +02:00
Andrea Bollini
4194443185 DS-4252 Discovery re-index doesn't work without -b 2019-05-19 22:45:12 +02:00
Tim Donohue
aebd0f9ce6 [maven-release-plugin] prepare for next development iteration 2019-05-17 15:34:13 -05:00
Tim Donohue
44e7b3aca6 [maven-release-plugin] prepare release dspace-7.0-preview-1 2019-05-17 15:34:04 -05:00
Tim Donohue
2b9d726214 Merge pull request #2430 from atmire/DS-4253-discovery-oom-fix
DS-4253 Avoid oom during discovery reindex
2019-05-17 10:05:32 -05:00
Samuel
f7e1489bf3 DS-4096 change data to uri-list 2019-05-17 10:08:06 +02:00
Chris Wilper
7238f42cf4 DS-4253 Avoid oom during discovery reindex 2019-05-16 16:35:30 -04:00
Samuel
e403afbd52 Merge branch 'master' into DS-4096-updating-owning-collections2 2019-05-16 18:15:19 +02:00
Mark H. Wood
d89186a192 Merge pull request #2392 from mwoodiupui/DS-3658
[DS-3658] Configure ReindexerThread disable reindex
2019-05-15 13:04:03 -04:00
Mark H. Wood
d48aae5baa [DS-3658] Remove JSPUI comment mistakenly reintroduced by comment fix. 2019-05-15 11:41:22 -04:00
Mark H. Wood
8afb630fcc Merge branch 'master' into DS-3658 2019-05-15 11:15:17 -04:00
Mark H. Wood
43444c84b7 [DS-3658] Accept abollini's fix to configuration comments, with minor adjustments. 2019-05-15 11:10:09 -04:00
Raf Ponsaerts
d0dcfe2699 [DS-4217] fixed compilation failure after rebase and wrote tests for the DSpaceBadRequestException 2019-05-14 09:01:12 +02:00
Raf Ponsaerts
50db4b8fc7 [DS-4217] applied the name refactor and rewrote BadRequestException to use this class instead 2019-05-13 14:56:15 +02:00
Tim Donohue
4d35e0fe28 Exclude old version of Jena from SWORDv2 to resolve conflicts with RDF. Add note about upgrading Jena for future. 2019-05-10 15:25:08 -05:00
Tim Donohue
11842b5485 Restore dependency that was accidentally removed 2019-05-10 15:25:08 -05:00
Terry Brady
7bf2d45d14 simplify dockerfile overrides 2019-05-10 15:25:08 -05:00
Terry Brady
4b94208676 fix ROOT 2019-05-10 15:25:08 -05:00
Terry Brady
10b25af158 handle root 2019-05-10 15:25:08 -05:00
Terry Brady
07029b9caf fix ROOT ref 2019-05-10 15:25:07 -05:00
Terry Brady
efea77fb7d simplify dockerfile for onewebapp 2019-05-10 15:25:07 -05:00
Tim Donohue
f89eebc714 Dependency bug fix. Avoid pulling in Spring Boot logging & other unnecessary dependencies 2019-05-10 15:25:07 -05:00
Tim Donohue
4938eb7f42 Configuration fixes. Add missing oai.cfg properties. Default dspace.baseUrl to single webapp path. 2019-05-10 15:25:07 -05:00
Tim Donohue
4fd0044ff8 Bug Fix. Ensure proper "baseUrl" is reported from each OAI context. Add IT to prove it works 2019-05-10 15:25:07 -05:00
Tim Donohue
ea4e05d8b8 Embed RDF into Boot webapp. Add basic ITs to prove it works. 2019-05-10 15:25:07 -05:00
Tim Donohue
20e4da56d3 Remove OAI Integration Tests, framework & stubs. These ITs were moved to Spring Boot in previous commit. 2019-05-10 15:25:07 -05:00
Tim Donohue
8c05914c04 Fix CommunityRestRepositoryIT tests that were not cleaning up after themselves 2019-05-10 15:25:07 -05:00
Tim Donohue
379968d12c Migrate existing OAI IntegrationTests to OAIpmhIT class in Spring Boot. Disable existing ITs (will be removed) 2019-05-10 15:01:48 -05:00
Tim Donohue
805e35743b Enhance inline comments in application.properties 2019-05-10 15:01:48 -05:00
Tim Donohue
f782a1ca3e OAI fixes: Update JTwig for compatibility with Spring Boot. Ensure static files are loaded properly 2019-05-10 15:01:48 -05:00
Tim Donohue
7c83a58a20 Minor bug fix to OAI-PMH found via ITs in previous commit 2019-05-10 15:01:48 -05:00
Tim Donohue
89400609aa Embed OAI-PMH into Boot webapp. Add basic ITs to prove it works. 2019-05-10 15:01:48 -05:00
Tim Donohue
cb86effb38 Correct comments to be more accurate 2019-05-10 15:01:48 -05:00
Tim Donohue
27512ad382 Correct location of SWORD ITs 2019-05-10 15:01:48 -05:00
Tim Donohue
06f8a2a6e2 More ITs for SWORDv2. Ensure all SWORDv2 endpoints have a sanity test. 2019-05-10 15:01:48 -05:00
Tim Donohue
ca5ac68e2d Embed SWORDv2 into Boot webapp. Add basic IT to prove it works. 2019-05-10 15:01:48 -05:00
Tim Donohue
46a50aeded Add basic validation tests for all SWORDv1 endpoints 2019-05-10 15:01:47 -05:00
Tim Donohue
6f51195e6c Ensure SWORD integration tests only run if SWORDWebConfig is loaded 2019-05-10 15:01:47 -05:00
Tim Donohue
56f7cb11bc Remove maven-war-plugin from SWORD POM. It's not needed anymore 2019-05-10 15:01:47 -05:00
Tim Donohue
8e3d12a34d Add basic Integration Tests for SWORDv1 endpoint using new AbstractWebClientIntegrationTest 2019-05-10 15:01:47 -05:00
Tim Donohue
adf68447e1 Make SWORD module configurable via sword-server.cfg. Remove obsolete web.xml 2019-05-10 15:01:47 -05:00
Tim Donohue
fa61b737db Refactor Application startup to load DSpace configs early in boot process. Also fixes DS-3492 2019-05-10 15:01:47 -05:00
Tim Donohue
7f3877c7bc Create SWORDWebConfig to replace SWORD's web.xml. Fix compilation error in servlet 2019-05-10 15:01:47 -05:00
Tim Donohue
1b143aa5cd Change SWORDv1 to a JAR dependency. Add as RESTv7 dependency 2019-05-10 15:01:47 -05:00
Tim Donohue
af16e6e780 Remove SWORD overlay folders/files 2019-05-10 15:01:47 -05:00
Tim Donohue
5eb338d9b7 Update RESTv7 to ComponentScan for webapp configs under org.dspace.app.configuration 2019-05-10 15:01:47 -05:00
Tim Donohue
f1073f0af0 Update RESTv7 to only use Spring Security on /api path 2019-05-10 15:01:47 -05:00
Mark H. Wood
27d811f5e5 [DS-3953] Add new data for configurable entities. 2019-05-10 11:55:19 -04:00
Mark H. Wood
b72c4218f4 [DS-3953] Expose list of metadata namespace files as configuration. 2019-05-10 11:55:19 -04:00
Tim Donohue
8f472d9197 Merge pull request #2376 from DSpace/configurable_entities
Adding Configurable "Entities" to DSpace 7 (Part 1: Architecture, Configuration, Search, Display)
2019-05-09 15:56:41 -05:00
Tim Donohue
ba267ce72b Merge pull request #2422 from atmire/entities-feedback-2019-05-07
Entities feedback 2019 05 07
2019-05-09 12:54:03 -05:00
Tim Donohue
be4c2f9ad5 Merge branch 'configurable_entities' into entities-feedback-2019-05-07 2019-05-09 12:09:42 -05:00
Tim Donohue
8097589db5 Merge pull request #2418 from atmire/entities-feedback-2019-04
Configurable entities feedback
2019-05-09 12:01:37 -05:00
Ben Bosman
858bf72fa9 Merge remote-tracking branch 'origin/w2p-62187_IT-changes' into entities-feedback-2019-05-07
# Conflicts:
#	dspace-spring-rest/src/test/java/org/dspace/app/rest/RelationshipRestRepositoryIT.java
2019-05-08 16:47:16 +02:00
Raf Ponsaerts
b76aacc626 Added the expect status code in test 2019-05-08 16:23:01 +02:00
Raf Ponsaerts
5c035fe6a6 Refacted the RelationshipRestRepositoryIT to now use a builder instead of the EPersonService when creating a user 2019-05-08 13:12:14 +02:00
Ben Bosman
be9d80c410 Temporarily disabled for https://github.com/DSpace/Rest7Contract/pull/57#discussion_r272605397 2019-05-07 19:54:20 +02:00
Ben Bosman
3f42590fb2 Temporarily disabled for https://github.com/DSpace/Rest7Contract/pull/57#discussion_r272605397 2019-05-07 18:52:58 +02:00
Ben Bosman
5895f08337 Temporarily disabled for https://github.com/DSpace/Rest7Contract/pull/57#discussion_r272605397 2019-05-07 18:27:51 +02:00
Ben Bosman
b5e29a36b8 reordered tests to first verify the normal import, and hereafter verify updating (for logic while reading the IT) 2019-05-07 17:48:38 +02:00
Ben Bosman
bee7313f8a Merge remote-tracking branch 'origin/w2p-62146_initialize-entities-it-changes' into entities-feedback-2019-05-07 2019-05-07 17:47:04 +02:00
Mark H. Wood
1458d8f1b2 [DS-1443] Define required "options" as required; ensure that usage output is flushed. 2019-05-07 11:00:58 -04:00
Raf Ponsaerts
b98943ff64 Fixed checkstyle 2019-05-07 10:32:35 +02:00
Raf Ponsaerts
71cd11b558 Implemented the InitializeEntitiesIT changes 2019-05-07 09:59:32 +02:00
Raf Ponsaerts
aac6b12de9 Additional pagination tests 2019-05-07 09:19:48 +02:00
Mark H. Wood
2a914e1499 [DS-1443] Recreate this patch atop current (7x) master. 2019-05-06 16:18:53 -04:00
Raf Ponsaerts
a3334bd10e Added inline comments to the RelatinshipRestRepositoryIT 2019-05-06 15:48:38 +02:00
Kevin Van de Velde
5006653277 [DS-4239] Migrate the workflow.xml to spring 2019-05-03 12:10:06 +02:00
benbosman
4ccf73ebb6 Merge pull request #2414 from atmire/entities-feedback-2019-04-29
feedback on configurable entities
2019-05-02 17:10:46 +02:00
benbosman
cd8226cc97 Merge pull request #2419 from atmire/w2p-62057_configurable-entities-feedback
configurable entities feedback
2019-05-02 17:10:03 +02:00
Andrea Bollini
8556441f43 DS-4210 fix the bug (still problems on the test) 2019-05-02 16:03:42 +02:00
Raf Ponsaerts
6e21bcdad1 Implemented feedback 2019-05-02 15:08:08 +02:00
Andrea Bollini
eedd6ed36d DS-4210 demonstate the bug: Deposit on collection without workflow seems to fail (405 but succeed) 2019-05-02 14:27:51 +02:00
Raf Ponsaerts
4c6e939e57 Implemented feedback 2019-05-02 13:26:30 +02:00
Raf Ponsaerts
7dfd34036c Implemented feedback 2019-04-30 15:51:28 +02:00
Andrea Bollini
fc05d2dab0 Merge pull request #2411 from atmire/refactoring-instanceof
Small improvements to configurable entities
2019-04-30 09:59:40 +02:00
Ben Bosman
62ca358f33 support for displaying an org unit as author of a publication 2019-04-29 18:15:14 +02:00
Ben Bosman
9a40fd817c store place in relation virtual metadata 2019-04-29 17:59:38 +02:00
Ben Bosman
ccbf681f96 feedback on configurable entities 2019-04-29 15:42:57 +02:00
Ben Bosman
20705e1da1 feedback on configurable entities 2019-04-29 11:54:29 +02:00
Ben Bosman
6707dfb2e6 feedback on configurable entities 2019-04-29 11:50:45 +02:00
benbosman
0bb9880d2c Merge pull request #2413 from atmire/override
override
2019-04-29 11:44:19 +02:00
Ben Bosman
70e34edfef override 2019-04-29 11:13:55 +02:00
Mark H. Wood
3789b36ff5 [DS-3695] Add a tool to correct statistics core exports by supplying missing 'uid' values. 2019-04-26 15:03:38 -04:00
Tim Donohue
51aa22cdb9 Merge pull request #2409 from atmire/rename-VirtualBean-VirtualMetadataPopularConfiguration
Rename virtual bean virtual metadata configuration
2019-04-26 10:44:16 -05:00
Ben Bosman
8f56970c33 order of imports 2019-04-26 09:34:37 +02:00
Ben Bosman
09c9d851a5 JavaDoc 2019-04-26 09:32:29 +02:00
Ben Bosman
b331b26f80 Avoid creating a new context 2019-04-25 17:01:23 +02:00
Ben Bosman
b2d28fcf83 Avoid creating a new context 2019-04-25 16:44:16 +02:00
Ben Bosman
7b9f08e7ad JavaDoc 2019-04-25 15:52:57 +02:00
Ben Bosman
658708832a Missing @Override 2019-04-25 15:48:30 +02:00
Ben Bosman
dcf9240f42 Refactoring instanceof 2019-04-25 15:45:24 +02:00
benbosman
d1cd9c4a9b Merge pull request #2408 from atmire/Missing-override
Missing @Override
2019-04-25 15:35:23 +02:00
Ben Bosman
ec8109a67e Missing @Override 2019-04-25 15:34:44 +02:00
Ben Bosman
5a69301212 Rename VirtualBean to VirtualMetadataPopularConfiguration 2019-04-25 15:15:39 +02:00
Ben Bosman
72afed29b8 Rename VirtualBean to VirtualMetadataPopularConfiguration 2019-04-25 15:01:11 +02:00
Ben Bosman
07ce7da613 Merge remote-tracking branch 'community/configurable_entities' into configurable_entities 2019-04-25 14:37:23 +02:00
Ben Bosman
0898e33319 An additional use case in the comments 2019-04-25 14:36:53 +02:00
benbosman
bba8feff5b Merge pull request #2407 from atmire/w2p-62018_update-configurable_entities-with-master
update configurable entities with master
2019-04-25 14:06:34 +02:00
Raf Ponsaerts
d97ea343e4 Merged dspace/master into dspace/configurable_entities 2019-04-25 13:30:25 +02:00
Tim Donohue
afc6682bfb Merge pull request #2391 from 4Science/DS-4166_mydspace
DS-4166 Index workspace, workflow and tasks in SOLR
2019-04-24 10:03:35 -05:00
Tim Donohue
1bf1131237 Merge pull request #2404 from atmire/w2p-61912_initialize-entities-update
DS-4218 - Support for second "initialize-entities"
2019-04-24 10:02:27 -05:00
Ben Bosman
c83ae49e7f Feedback on PR-2404
Missing context complete, this was lost in the previous commit from this PR
2019-04-24 09:50:11 +02:00
Tim Donohue
b30e1cc6f9 Merge pull request #2216 from tomdesair/DS-4006_EPerson-Group-Relation-and-Embeds
DS-4006: Embed membership groups on EPerson REST object
2019-04-23 16:23:53 -05:00
benbosman
fe0a67ca43 Merge pull request #15 from AlexanderS/w2p-61912_initialize-entities-update
Small indentation fix
2019-04-18 12:54:41 +02:00
Alexander Sulfrian
f8b0eac67a Fix indentation 2019-04-18 12:15:17 +02:00
Raf Ponsaerts
22b297b207 Added IT for the updated InitializeEntities script 2019-04-18 08:47:33 +02:00
Raf Ponsaerts
cfd4e0b435 Updated the InitializeEntities implementation and added a unique constraint to RelationshipType table based on types and labels 2019-04-17 13:41:24 +02:00
Andrea Bollini
5338a88892 DS-4166 community feedback: postpone support for highlighting over authority controlled metadata 2019-04-16 22:37:02 +02:00
Tim Donohue
fada353a06 Checkstyle fix 2019-04-16 13:00:39 -05:00
Tim Donohue
0065bd4950 Update version of Handle dependency 2019-04-16 12:10:49 -05:00
Tim Donohue
b0bff18b53 Merge pull request #2257 from mspalti/eperson_update
[DS-4062] Endpoint to allow logged in EPerson to change password or other profile information.
2019-04-15 16:08:21 -05:00
Michael W Spalti
4fe26b914e [DS-4062] Updated task and workflow plugins to implement the new permission method. 2019-04-12 17:15:20 -07:00
Michael W Spalti
ca02d36933 [DS-4062] Added support for eperson updates by the currently logged in user.
Removed misplaced factory call.

Removed misplaced factory call.

Added exception and updated signature for the eperson repository patch method.

Removed patch endpoint from the authentication controller and modifed eperson repository to use Spring PreAuthorize annotation and the eperson permission evaluator plugin.

[DS-4062] Removed unused autowired bean from DSpaceRestRepository.

No longer needed after the previous refactor to remove endpoint.

[DS-4062] Removed unused import.

[DS-4062] The EPersonRestRepository updated to hasPermission annontation only.

Also limiting (experimentally) some eperson patch operations to administrators.

Added adminstartor restriction for netid patch operation.

Removed support for patching eperson profile metadata.

Removed support for patching eperson profile metadata.

Added eperson email patch operation.

Updated permission plugins to support patch requests per suggestion by @tomdesair.

Updated eperson authentication plugin and added unit test.

Added the new PreAuthorize annotations for patch.

Added the missing header reported by checkstyle.

Changed order of static imports in unit test to pass checkstyle.

Added integration test to verify that a non-admin user cannot update another eperson password.
2019-04-12 16:25:37 -07:00
benbosman
489ed8350b Merge pull request #2401 from atmire/entities-feedback
Entities feedback
2019-04-09 17:25:32 +02:00
Ben Bosman
62c0f0714d Feedback on PR-2376 2019-04-09 16:01:56 +02:00
Mark H. Wood
9a1124809c [DS-3823] Simple CLI tool to display cache layout and some settings. 2019-04-09 09:40:29 -04:00
Ben Bosman
a23a8821e6 Feedback on PR-2376 2019-04-09 15:16:17 +02:00
benbosman
2ed91c616c Merge pull request #2400 from atmire/w2p-61605_move-virtual-metadata-to-separate-spring-file
Moved the virtual metadata populator xml logic to a separate file
2019-04-09 15:04:13 +02:00
Raf Ponsaerts
750bdecbc0 Moved the virtual metadata populator xml logic to a separate file 2019-04-09 14:16:37 +02:00
Andrea Bollini
84eabcbf91 DS-4166 community feedback: renamed FindableObjectService in IndexableObjectService 2019-04-09 11:50:02 +02:00
benbosman
b0c6b912b3 Merge pull request #2399 from atmire/w2p-61536_update-configurable-entities-with-latest-master
update configurable entities with latest master
2019-04-08 17:12:27 +02:00
Raf Ponsaerts
92cb9730fb Changed the URI parsing to better fit a generic approach on Repository level 2019-04-08 16:16:13 +02:00
Raf Ponsaerts
4f3885738a Fixed tests and refactored the way priorities work in the builders 2019-04-08 14:56:23 +02:00
Mark H. Wood
b9ca1deb42 [DS-3823] Give distinct names to the services and Hibernate cache managers. 2019-04-05 16:55:28 -04:00
Raf Ponsaerts
4fc6ebc28c Intermediary Commit 2019-04-05 15:46:18 +02:00
Raf Ponsaerts
211e8f72a1 Merged dspace/master into configurable_entities 2019-04-05 13:45:01 +02:00
Andrea Bollini
f8cedefa29 DS-4166 community feedback: improved javadocs and comments 2019-04-05 13:30:36 +02:00
Andrea Bollini
20a0e42098 DS-4166 fix configuration of the submitter facet 2019-04-05 08:46:15 +02:00
Andrea Bollini
d23ebd66c0 DS-4166 fix configuration of the namedresourcetype facet 2019-04-04 15:53:18 +02:00
Andrea Bollini
504cb3c5cf DS-4166 community feedback: merge -i and -item_uuid options 2019-04-04 13:09:02 +02:00
Andrea Bollini
6fd5a76837 DS-4166 community feedback: code cleanup 2019-04-04 12:56:55 +02:00
Tim Donohue
e17e8eea08 Merge pull request #2388 from atmire/configurable_entities
DS-4121: Refactor Entities ITs
2019-04-02 10:23:05 -05:00
Ian Little
12e7178220 Merge branch 'master' into DS-1477-update-handle-server 2019-04-02 11:15:15 -04:00
Mark H. Wood
4a5ea2913d [DS-3695] Another OAI date field needs formatting. 2019-04-01 15:11:39 -04:00
Mark H. Wood
57e076e781 [DS-3695] Remove unused dynamicField definitions. 2019-04-01 14:24:29 -04:00
Mark H. Wood
be8fe275fd [DS-3695] Fields indexed as dates need formatting as Solr expects. 2019-04-01 13:58:24 -04:00
Tim Donohue
1e6497f1d6 Merge pull request #2379 from AndrewZWood/DS-4194
DS-4194 Use lazy fetching iterator for long query results
2019-03-29 15:08:25 -05:00
Ian Little
d2f8db798f Fix hostip issue in make-handle-config script. 2019-03-29 14:48:21 -04:00
Ian Little
f845e5fbcd Include optional handle dependency that is needed for running the server. 2019-03-29 14:47:54 -04:00
Ian Little
d17a9072d4 Update Handle server version. 2019-03-29 10:42:38 -04:00
Tim Donohue
77928c2560 Add info about how/when auto-reindexing takes place 2019-03-28 12:57:02 -04:00
Andrew Wood
0324787e35 DS-3658 Document new property reflect default behavior in value 2019-03-28 12:57:02 -04:00
Andrew Wood
2dd14a06ba DS-3658 Configure ReindexerThread disable reindex 2019-03-28 12:57:02 -04:00
Andrea Bollini
5e3164bd06 DS-4166 community feedback: use a more appropriate exception 2019-03-28 15:38:39 +01:00
Andrea Bollini
8de7a50f5b DS-4166 community feedback: report about not existing uuid 2019-03-28 15:20:49 +01:00
Andrea Bollini
a8190fe27a DS-3851 add test and fix for invalid task claiming 2019-03-28 14:42:03 +01:00
Andrea Bollini
30899b0e55 DS-4166 move IndexableObject to the discovery package 2019-03-28 13:20:47 +01:00
Andrea Bollini
eba97f4080 Merge branch 'master' of https://github.com/DSpace/DSpace into mydspace_clean 2019-03-28 13:15:21 +01:00
Andrea Bollini
689ac4e3bd DS-4166 community feedback: implement the IndexableObject interface only where really needed 2019-03-28 12:06:22 +01:00
Yana De Pauw
b71b6e9f1b Fix check style issues in RelationShipTypeBuilder 2019-03-28 11:13:35 +01:00
Andrea Bollini
1252075ac9 DS-4166 community feedback: remove multithreads indexing support 2019-03-28 09:02:58 +01:00
Andrea Bollini
cc11f49556 DS-4166 community feedback: remove unused methods and configurations 2019-03-28 09:02:16 +01:00
Andrea Bollini
272f21a8dd DS-4166 community feedback: improve documentation 2019-03-28 00:22:43 +01:00
Andrea Bollini
006b938c4a DS-4166 community feedback: use dedicated fields for workspace/workflow searches 2019-03-28 00:09:13 +01:00
Andrea Bollini
d25463fedb Merge pull request #2312 from 4Science/DS-3851_workflow_new
DS-3851 Endpoint to interact with the workflow
2019-03-28 00:05:08 +01:00
Andrea Bollini
15f6ced31a DS-3851 community feedback: typo 2019-03-27 22:43:30 +01:00
Andrea Bollini
b98d8f4d21 DS-4166 community feedback: rename resultObject to indexableObject in the discover REST result 2019-03-27 20:51:01 +01:00
Andrea Bollini
4b85bf4c56 DS-4166 community feedback: rename BrowsableObject to IndexableObject 2019-03-27 20:31:22 +01:00
Yana De Pauw
13ce03c8c7 Refactor Entity ITs to not use the xml file but builders 2019-03-27 13:19:28 +01:00
benbosman
85480b9ec7 Merge pull request #2383 from atmire/Feedback-PR-2376
Feedback on PR-2376
2019-03-26 13:00:18 +01:00
Andrea Bollini
8c28d5136e DS-3851 community feedback: deal properly with wrong requests 2019-03-26 12:56:48 +01:00
Ben Bosman
b828e56bb8 Squashed feedback on PR-2376 2019-03-25 14:10:28 +01:00
Tim Donohue
7f2e696949 Merge remote-tracking branch 'upstream/master' into configurable_entities 2019-03-22 19:54:03 +00:00
Terry Brady
0cc2226b25 Merge pull request #2373 from the-library-code/DS-4189
DS-4189 Enhance configuration by environment variables
2019-03-22 15:48:10 -04:00
Tim Donohue
f56996634b Merge branch 'master' into configurable_entities 2019-03-22 19:12:19 +00:00
Terry Brady
aa2a5f8b6e Update config-definition.xml 2019-03-22 15:12:14 -04:00
Tim Donohue
a857932393 Merge pull request #2058 from mwoodiupui/DS-3695
[DS-3695] Upgrade Solr to 7.3.1.
2019-03-22 10:47:43 -05:00
Mark H. Wood
62928cedb6 [DS-3695] Remove unused 'solr.server.version' POM property. 2019-03-22 11:20:47 -04:00
Terry Brady
808f04852b Update DSpaceEnvironmentConfiguration.java 2019-03-21 14:34:35 -04:00
Terry Brady
a39495bef5 Add replacement for dash and dot 2019-03-21 14:13:32 -04:00
Andrew Wood
51cd8fa46a DS-4194 Use lazy fetching iterator for long query results 2019-03-20 16:29:22 -04:00
Pascal-Nicolas Becker
1cfc53db5c DS-4189 Enhance configuration by environment variables 2019-03-18 02:22:23 +01:00
Andrea Bollini
5d997e6cde DS-3851 manually solve unnoted merge conflict 2019-03-15 22:21:45 +01:00
Andrea Bollini
1df2d35c1f Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3851_workflow_new 2019-03-15 22:05:53 +01:00
Tim Donohue
b4e7d62725 Merge pull request #2375 from atmire/w2p-61144_place-in-metadata
Configurable Entities - Item metadata place
2019-03-15 11:48:10 -05:00
Tim Donohue
828861a871 Merge pull request #2331 from atmire/w2p-58898_place-column-calculation-error
Mixing entities and plain-text values
2019-03-15 10:58:34 -05:00
Raf Ponsaerts
00a4863178 Removed the jsonIgnore from place attribute in MetadataValueRest and fixed IT 2019-03-15 14:34:29 +01:00
benbosman
02d8e5f750 Merge pull request #13 from atmire/w2p-58898_place-column-calculation-error-prepare-merge
W2p 58898 place column calculation error prepare merge
2019-03-15 13:56:39 +01:00
Raf Ponsaerts
9678dbf573 Merged configurable_entities into w2p-58898_place-column-calculation-error-prepare-merge 2019-03-15 13:27:24 +01:00
Andrea Bollini
eee2929e51 DS-3851 remove unused import 2019-03-15 00:42:16 +01:00
Andrea Bollini
b481fbae17 DS-3851 community feedback: remove unused variable 2019-03-14 23:57:25 +01:00
Andrea Bollini
19606943b1 DS-3851 community feedback: code cleanup 2019-03-14 23:49:35 +01:00
Raf Ponsaerts
13f9c8e1e5 Merged dspace/master into w2p-58898_place-column-calculation-error-prepare-merge 2019-03-14 15:08:42 +01:00
Tim Donohue
7e4e22d472 Merge pull request #2367 from tdonohue/coveralls-refactor
Refactor Coveralls.io plugin to only run after successful build/test in Travis CI
2019-03-13 16:19:48 -05:00
Tim Donohue
b891f3190d Merge pull request #2208 from atmire/DS-4014_CORS-headers-missing-when-generic-exception-is-thrown
[DS-4014] added a catch in the DSpaceApiExceptionControllerAdvice for…
2019-03-13 14:38:14 -05:00
Tim Donohue
c87cd80ac3 Merge pull request #2372 from atmire/configurable_entities-prepare-for-merge
Configurable entities prepare for merge
2019-03-13 10:23:50 -05:00
Raf Ponsaerts
65fb4674a0 Merged master into configurable_entities-prepare-for-merge 2019-03-13 14:34:13 +01:00
Raf Ponsaerts
970b66edb2 Applied feedback; implemented context authorisation logic in tests 2019-03-13 13:10:49 +01:00
Andrea Bollini
3e22142aa7 DS-3851 cleanup the BrowsableObject interface 2019-03-12 23:31:17 +01:00
Andrea Bollini
e883c95de8 DS-3851 cleanup the BrowsableObject interface 2019-03-12 22:17:22 +01:00
Tim Donohue
e48fef5f62 Merge pull request #2332 from atmire/w2p-57159_permission-to-create-relations
Relationship CRUD
2019-03-12 08:17:13 -05:00
Tim Donohue
39e04c2223 Refactor Coveralls plugin to only run after successful build/test. Build can be limited to one step, too. 2019-03-11 19:09:13 +00:00
Tim Donohue
efbffe4ea5 Merge pull request #2313 from atmire/DS-3908_Metadata_patch_support
DS-3908 Metadata patch support
2019-03-08 11:38:08 -06:00
Chris Wilper
337daef738 DS-3908 Restore authz state as early as possible in tests 2019-03-07 12:32:23 -05:00
Chris Wilper
2171b7ff83 DS-3908 Address minor checkstyle issues 2019-03-07 10:35:17 -05:00
Chris Wilper
21fe803b53 DS-3908 Restore auth system state where appropriate 2019-03-07 09:59:19 -05:00
Chris Wilper
96d544d075 DS-3908 Improve javadocs 2019-03-07 09:54:24 -05:00
Andrea Bollini
000c47e7a3 DS-3851 demostrate that admins cannot manipulate tasks 2019-03-07 15:28:55 +01:00
Chris Wilper
229b9f1039 Merge branch 'master' into DS-3908_Metadata_patch_support 2019-03-07 08:32:57 -05:00
Andrea Bollini
cae9a6baa8 DS-4166 fix converter for authority based filter 2019-03-07 09:17:44 +01:00
Andrea Bollini
499fdcd61c DS-4166 renamed BrowsableDSpaceObject in BrowsableObject 2019-03-07 01:11:14 +01:00
Andrea Bollini
6a5838461a Merge branch 'DS-3851_workflow_new' of https://github.com/4Science/DSpace into DS-4166_mydspace 2019-03-07 00:49:46 +01:00
Andrea Bollini
0a54d4cf1e DS-3851 Add ITs for unauthorized approve/reject and improve error handling 2019-03-06 23:54:40 +01:00
Andrea Bollini
1c0e29bc64 DS-3851 raise events in the service layer 2019-03-06 22:44:25 +01:00
Andrea Bollini
a596a5cabf DS-3851 use MediaTypes constant from spring 2019-03-06 22:42:44 +01:00
Andrea Bollini
23bbf45048 DS-3851 remove unused methods 2019-03-06 22:13:26 +01:00
Andrea Bollini
d751d5dc59 DS-3851 add fixme to remember the need to remove getWorkflow group methods 2019-03-06 22:13:09 +01:00
Andrea Bollini
65d3495e18 DS-3851 raise events in the service layer 2019-03-06 19:36:24 +01:00
Andrea Bollini
15c4a33d77 DS-3851 add fixme notice for future refactoring of the uri-list processing 2019-03-06 19:35:36 +01:00
Andrea Bollini
ef10d47156 DS-3851 Add native support for pagination in the findBySubmitter 2019-03-06 18:00:30 +01:00
Andrea Bollini
434c0fa748 DS-3851 add IT to pass through a whole workflow 2019-03-06 17:04:25 +01:00
Andrea Bollini
4475eca5b2 DS-3851 code cleanup: community feedback 2019-03-06 15:51:00 +01:00
Raf Ponsaerts
6056bf94e0 Added the comment to the context.turnOffAuthorizationSystem 2019-03-06 14:54:01 +01:00
Raf Ponsaerts
e3fc9a52a7 Merge branch 'w2p-57159_permission-to-create-relations' into w2p-58898_place-column-calculation-error 2019-03-06 14:46:40 +01:00
Tom Desair
aa0a2a3b05 Remove unused import 2019-03-06 08:17:49 +01:00
Tom Desair
10fc1afaa3 Fix ignored delete EPerson test 2019-03-05 23:36:44 +01:00
Tom Desair
bfc91292d2 DS-4014: Correct status code for AccessDeniedException with authorized users 2019-03-05 23:35:49 +01:00
Raf Ponsaerts
15faacc70c [DS-4014] changed the exception handling to now look for the ResponseStatus on the Exception Class, if it doesn't exist we simply return a 500. AccessDeniedException does not have a ResponseStatus annotation but it has to be handled correctly, therefor a specific catch clause is required 2019-03-05 23:13:14 +01:00
Raf Ponsaerts
df1e464939 [DS-4014] fixed tests and added more exception catches 2019-03-05 23:13:14 +01:00
Raf Ponsaerts
7c122e55aa [DS-4014] added a catch in the DSpaceApiExceptionControllerAdvice for a generic exception and throws a 500 with cors headers available 2019-03-05 23:13:14 +01:00
Tom Desair
0961c5040d DS-4006: Added explicit check for "groups" link in Group Rest object 2019-03-05 22:36:13 +01:00
Tom Desair
aef31c8d37 DS-4006: Embed membership groups on EPerson REST object 2019-03-05 22:11:46 +01:00
Terry Brady
d7ec9e537a Merge pull request #2348 from Georgetown-University-Libraries/ds4167
[DS-4167] Migrate update-sequences.sql to `database` command
2019-03-05 10:56:44 -08:00
Raf Ponsaerts
033790e1b2 Added missing context.restoreAuthSystemState 2019-03-05 14:17:08 +01:00
Andrea Bollini
7f94383719 DS-4166 Fix SearchMatcher to be more strict 2019-03-03 22:12:49 +01:00
Andrea Bollini
e929c39fb2 DS-4166 add ITs for workspace/workflow discover configuration 2019-03-03 19:51:57 +01:00
Giuseppe
d5b4963e26 Update submission-forms.xml
Replaced twobox field with tag field
2019-02-28 17:31:09 +01:00
Andrea Bollini
b3423770dd DS-4166 restore official name to the configuration parameter 2019-02-28 15:56:45 +01:00
Mark H. Wood
999e912909 Merge pull request #2180 from mwoodiupui/DS-3989
[DS-3989] Always capture curation task output.
2019-02-27 16:12:07 -05:00
Andrea Bollini
9d378143a1 DS-4166 restore code removed by incident rebasing the PR 2019-02-26 14:47:51 +01:00
Chris Wilper
185766d8d2 DS-3908 Add DSO metadata PATCH tests 2019-02-25 19:26:40 -05:00
Chris Wilper
1ad0c88c3c DS-3908 Add PATCH support for DSO metadata 2019-02-25 19:26:40 -05:00
Terry Brady
4b6611353f Merge pull request #2354 from Georgetown-University-Libraries/ds4173
[DS-4173] Docker build - set build dir owner to dspace
2019-02-25 14:35:08 -08:00
Terry Brady
644970eba4 set build dir owner to dspace 2019-02-25 08:38:18 -08:00
Andrea Bollini
ff298b393f DS-4166 fix existing discover tests 2019-02-25 10:03:15 +01:00
Andrea Bollini
c56e41aec2 DS-4166 Index workspace, workflow and tasks in SOLR 2019-02-25 10:03:15 +01:00
Andrea Bollini
1e3e37d11e DS-3851 code cleanup: community feedback 2019-02-24 21:06:52 +01:00
Andrea Bollini
b0f8f828b7 Fix issue with the Builder comparator and cleanup of workflowgroups 2019-02-24 19:36:40 +01:00
Andrea Bollini
b7b3a74f85 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3851_workflow_new 2019-02-24 16:41:52 +01:00
Andrea Bollini
5b98f05e70 DS-3851 fix priority of Metadata Schema and MetadataField builder 2019-02-24 15:37:14 +01:00
Andrea Bollini
7ad47ad705 DS-3851 code cleanup: community feedback 2019-02-24 15:29:23 +01:00
Andrea Bollini
4858aa75d2 DS-3851 fix bugs discovered by ITs 2019-02-24 14:22:10 +01:00
Andrea Bollini
dbddc2f06a DS-3851 add ITs for the task repositories endpoints 2019-02-24 14:21:16 +01:00
Andrea Bollini
ea2ce38677 max upload must be set in the application.properties 2019-02-23 22:33:00 +01:00
Tim Donohue
cc21394276 Merge pull request #2287 from atmire/DS-4107_Metadata_as_map
DS-4107 Represent DSO metadata as a map in REST
2019-02-21 14:17:30 -06:00
Andrea Bollini
8c0a94e689 DS-3851 add ITs for the workflowitems endpoint 2019-02-21 15:52:10 +01:00
Andrea Bollini
3c8186e7c0 typo in the comment 2019-02-21 15:11:06 +01:00
Andrea Bollini
3c9626a5ef DS-3851 force a predictable order to simplify testing 2019-02-21 15:10:23 +01:00
Andrea Bollini
9f44be85a3 Allow to configure max upload 2019-02-21 15:07:54 +01:00
Raf Ponsaerts
800f254677 Merge branch 'w2p-57159_permission-to-create-relations' of https://github.com/atmire/DSpace into w2p-57159_permission-to-create-relations 2019-02-21 09:21:52 +01:00
Raf Ponsaerts
65a94cdda7 Implemented an IT for the text/uri-list parsing 2019-02-21 09:21:11 +01:00
Andrea Bollini
70091e59b8 DS-3851 partially remove legacy workflow to simplify testing
First tests for the workflow endpoint
2019-02-20 23:11:04 +01:00
Terry Brady
ac83a4edef Merge pull request #2344 from terrywbrady/ds4126m
[DS-4126] master: Optimize docker builds
2019-02-20 13:16:01 -08:00
Chris Wilper
0609a6f0b7 DS-4107 Improve javadocs 2019-02-20 14:48:24 -05:00
Chris Wilper
60ea589296 DS-4107 Represent DSO metadata as a map in REST 2019-02-20 14:48:20 -05:00
Terry Brady
35ca48e17a Merge pull request #15 from mwoodiupui/DS-4167
[DS-4167] Fix various problems with Oracle script.
2019-02-20 09:02:11 -08:00
Terry Brady
653bfceac8 Merge branch 'ds4167' into DS-4167 2019-02-20 09:02:00 -08:00
Terry Brady
35e98f0d4b v1 oracle sql 2019-02-20 08:40:34 -08:00
Ben Bosman
1989cd9ff4 JavaDoc 2019-02-20 17:26:43 +01:00
Mark H. Wood
3302835650 [DS-4167] Fix various problems with Oracle script. 2019-02-20 11:23:21 -05:00
Raf Ponsaerts
91caed0cf6 Refactored tests 2019-02-20 14:39:32 +01:00
Raf Ponsaerts
a0ebd616f2 Processed feedback 2019-02-20 13:11:39 +01:00
Raf Ponsaerts
7f194dfa95 Applied feedback 2019-02-20 11:28:34 +01:00
Raf Ponsaerts
53580fa228 Merged w2p-57159_permission-to-create-relations into w2p-58898_place-column-calculation-error 2019-02-20 09:31:40 +01:00
Terry Brady
7773b46aca update sql 2019-02-19 10:16:21 -08:00
Terry Brady
89c1cc7729 remove /org 2019-02-19 07:34:56 -08:00
Terry Brady
f829b7df5a remove dspace/etc from build steps 2019-02-19 07:11:23 -08:00
Terry Brady
4ac06271c8 attempt to fix headers 2019-02-19 06:53:30 -08:00
Terry Brady
22cc5469a2 simplify string extract from stream 2019-02-19 06:30:25 -08:00
Terry Brady
5f47771e4e remove /etc directory 2019-02-19 06:26:28 -08:00
Terry Brady
e421a7c7c7 apply review feedback 2019-02-19 06:26:12 -08:00
Andrea Bollini
d3d3b57133 DS-3802 switch to the local LateObjectEvaluator 2019-02-19 08:48:39 +01:00
Andrea Bollini
c7c204091f Revert "Rely on Spring LateObjectEvaluator instead than our custom porting"
This reverts commit 821d106439.
2019-02-19 08:24:17 +01:00
Raf Ponsaerts
37c3ab9e17 Applied feedback 2019-02-18 09:23:39 +01:00
Terry Brady
b6f73682a3 Migrate postgres update-sequences.sql 2019-02-15 15:33:39 -08:00
Mark H. Wood
59bf702500 [DS-3695] Record string value of object ID in usage statistics. 2019-02-15 14:08:18 -05:00
Mark H. Wood
501ea5b6a6 Revert "[DS-3695] Add missing query defaults in a method I overlooked."
This reverts commit 6ecc3b2351.
2019-02-15 12:04:15 -05:00
Mark H. Wood
4b59ef27fc Revert "[DS-3695] Replace removed default schema settings with query parameters."
This reverts commit 69fcb0ebce.
2019-02-15 12:01:05 -05:00
Mark H. Wood
0194f557c0 [DS-3695] Re-introduce configured default match operator, since I found to where they moved it. Default search field was already configured. 2019-02-15 11:59:08 -05:00
Mark H. Wood
caf95d5acb Merge pull request #2347 from mwoodiupui/DS-4163-7
[DS-4163] OAI exception on empty list
2019-02-14 13:49:37 -05:00
ssolim
0b12168218 XOAI.java skip empty list and dont add it to solr 2019-02-14 13:24:46 -05:00
Tim Donohue
44a3111e41 Merge pull request #2291 from atmire/manage_metadata_registry
Manage metadata registry
2019-02-14 11:19:05 -06:00
Andrea Bollini
6dd560bd92 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3851_workflow_new 2019-02-14 15:00:07 +01:00
Mark H. Wood
dd8a7c1fea [DS-3695] Remove commented elements and comments not about DSpace from solrconfig.xml. 2019-02-14 08:57:27 -05:00
Terry Brady
e6860e3724 Set solr.server to maatch docker config 2019-02-13 12:29:22 -08:00
Mark H. Wood
01b9707347 [DS-3695] Placate the style checker, and simplify a try block. 2019-02-13 14:39:11 -05:00
Mark H. Wood
8c971d9acd [DS-3695] Solr UUID field wants a *String* value. 2019-02-13 13:56:37 -05:00
Mark H. Wood
6ecc3b2351 [DS-3695] Add missing query defaults in a method I overlooked. 2019-02-13 13:54:53 -05:00
Mark H. Wood
cd2e6a7878 [DS-3695] Add license boilerplate to new Docker configuration 2019-02-13 12:41:12 -05:00
Mark H. Wood
589b719895 Merge pull request #14 from Georgetown-University-Libraries/mwoodiupui-DS-3695
Dockerfile support for external solr
2019-02-13 11:47:43 -05:00
Mark H. Wood
c1800427bd Merge branch 'DS-3695' into mwoodiupui-DS-3695 2019-02-13 11:39:03 -05:00
Terry Brady
cb3276b02e remove core.properties names 2019-02-13 08:28:33 -08:00
Mark H. Wood
69fcb0ebce [DS-3695] Replace removed default schema settings with query parameters. 2019-02-13 11:27:09 -05:00
Mark H. Wood
732bc7d92f [DS-3695] Tell developers where to find the example schema, for
comments and examples of what you can do here.
2019-02-13 11:27:09 -05:00
Mark H. Wood
e9296ac8a8 [DS-3695] All tests should start with an empty Solr. 2019-02-13 11:27:09 -05:00
Mark H. Wood
cd5911a68f [DS-3695] Add docValues to all *PointField by default to support faceting.
Some of these may be unnecessary, but I don't know on which we facet.
2019-02-13 11:27:09 -05:00
Mark H. Wood
ad50b73fd9 [DS-3695] Give the Solr admin. a clue about the purpose of each core. 2019-02-13 11:27:09 -05:00
Mark H. Wood
70b5d6bf4f [DS-3695] Reintroduce "ignored" fieldType, even though the field is
probably not used.
2019-02-13 11:27:09 -05:00
Mark H. Wood
0fa69a7f09 [DS-3695] Whoops, missed a few Trie*Field references. 2019-02-13 11:27:09 -05:00
Mark H. Wood
3bcb2edd1c [DS-3695] Remove redundant types, irrelevant attributes; tidy layout. 2019-02-13 11:27:09 -05:00
Mark H. Wood
094db7217a [DS-3695] Remove unused "fieldType"s, dusty old comments from stock
sample schema.  Tidy indentation, break very long elements into
multiple lines.
2019-02-13 11:27:09 -05:00
Mark H. Wood
687f04e269 [DS-3695] Rip out big handfuls of unused fieldtypes, commentary about
Solr not DSpace.  Break loooong tags into attribute-per-line format.
2019-02-13 11:27:09 -05:00
Mark H. Wood
0f83c7fe8b [DS-3695] We no longer control Solr's logging. 2019-02-13 11:27:09 -05:00
Mark H. Wood
17ffe721da [DS-3695] See bf4ead40575f0b180fd6840373ef17d98a6e778e. We *do* configure Solr for testing. 2019-02-13 11:27:09 -05:00
Mark H. Wood
bb350ca420 [DS-3695] Upgrade indexes all the way to 7_x. 2019-02-13 11:27:09 -05:00
Mark H. Wood
919ce45338 [DS-3695] We no longer configure Solr itself. 2019-02-13 11:27:09 -05:00
Mark H. Wood
da9d5c7452 [DS-3695] Remaining minimal changes to make all cores load in Solr 7. 2019-02-13 11:27:09 -05:00
Mark H. Wood
bce42a47f6 [DS-3695] Cure failing IT: the test was wrong. 2019-02-13 11:27:09 -05:00
Mark H. Wood
5db8a6a889 [DS-3695] Make 'search' core load in stock Solr 7.2.1.
This should work without altering Solr, across Solr releases, as long
as Solr ships the necessary additional analyzers in /contrib.
2019-02-13 11:27:09 -05:00
Mark H. Wood
38a88d8afb [DS-3695] Start ripping out Solr server. 2019-02-13 11:27:09 -05:00
Mark H. Wood
975ebb0b5b [DS-3695] Document what I puzzled out ot MockSolrServer, and small cleanups. 2019-02-13 11:27:09 -05:00
Tim Donohue
e928b94d07 Fix Solr startup errors by downgrading to 7.3.1 2019-02-13 11:27:09 -05:00
Mark H. Wood
63c43eab15 [DS-3695] Exclude Jetty from solr-core and solr-cell: Solr and Spring
Boot are fighting over versions.
2019-02-13 11:27:09 -05:00
Mark H. Wood
070c21a113 [DS-3695] Switch new class from SolrServer to SolrClient. 2019-02-13 11:27:09 -05:00
Mark H. Wood
e210e3ca35 [DS-3695] Complete botched conflict fixup. 2019-02-13 11:27:09 -05:00
Tim Donohue
0c7f3c0e90 Update to Solr 7.5. Sync dependencies and cleanup spring-rest POM 2019-02-13 11:27:09 -05:00
Tim Donohue
8323ccd051 Disable Solr autoconfiguration in Spring Boot. Minor config cleanup 2019-02-13 11:27:09 -05:00
Tim Donohue
205db5c6f8 Revert Spring Boot updates until DS-3802 is solved. Solr core only for testing. 2019-02-13 11:27:09 -05:00
Tim Donohue
174a77cde0 Fix minor compilation errors in OAI 2019-02-13 11:27:09 -05:00
Mark H. Wood
85c09cbb55 [DS-3695] Start work on dspace-spring-rest 2019-02-13 11:27:09 -05:00
Mark H. Wood
f09287c56b [DS-3695] Rip out lots of Solr config. that is no longer defined in v7. 2019-02-13 11:27:09 -05:00
Mark H. Wood
8a76b77e66 [DS-3695] Upgrade Solr *client* to 7.3.0. 2019-02-13 11:27:09 -05:00
Tim Donohue
db707750fe Merge pull request #2333 from kshepherd/DS-4136_oai_import_master
[DS-4136] Master port: Improve OAI import performance for a large install
2019-02-13 09:15:32 -06:00
Raf Ponsaerts
d450b59899 Applied feedback and added tests 2019-02-13 13:08:30 +01:00
Terry Brady
7115173d61 Support Docker testing of externalized solr 2019-02-12 18:46:02 -08:00
Kim Shepherd
7cde38d229 [DS-4136] Tidy up comments, only display per-1k msg if batch size !1000 2019-02-13 13:03:37 +13:00
Terry Brady
ed41d852b1 Merge branch 'DS-3695' of https://github.com/mwoodiupui/DSpace into mwoodiupui-DS-3695 2019-02-12 14:50:33 -08:00
Mark H. Wood
8c222b9826 [DS-3695] All tests should start with an empty Solr. 2019-02-11 10:59:07 -05:00
Mark H. Wood
6254cedd21 [DS-3695] Add docValues to all *PointField by default to support faceting.
Some of these may be unnecessary, but I don't know on which we facet.
2019-02-08 14:01:16 -05:00
Mark H. Wood
0fc979a2ad [DS-3695] Give the Solr admin. a clue about the purpose of each core. 2019-02-08 11:09:09 -05:00
Raf Ponsaerts
93d982dfc8 Applied feedback and fixed test cases 2019-02-08 09:37:03 +01:00
Tim Donohue
e517ba49a5 English grammar corrections 2019-02-08 09:36:29 +01:00
Tim Donohue
d7c5e224e1 More minor corrections to English 2019-02-08 09:36:29 +01:00
Tim Donohue
d0db6e533a Minor improvements to English in error messages. 2019-02-08 09:36:29 +01:00
Samuel
34127e4e0f Added support for the CRUD operations on the MetadataField and MetadataSchema REST endpoints - feedback 2019-02-08 09:36:29 +01:00
Samuel
0a7a8aab8e Added support for the CRUD operations on the MetadataField and MetadataSchema REST endpoints - feedback 2019-02-08 09:36:28 +01:00
Samuel
42942978a8 Added support for the CRUD operations on the MetadataField and MetadataSchema REST endpoints 2019-02-08 09:36:02 +01:00
Mark H. Wood
be453a0e55 [DS-3695] Reintroduce "ignored" fieldType, even though the field is
probably not used.
2019-02-07 16:23:27 -05:00
Mark H. Wood
77328c388d [DS-3695] Whoops, missed a few Trie*Field references. 2019-02-07 15:44:34 -05:00
Mark H. Wood
13c0b9b227 [DS-3695] Remove redundant types, irrelevant attributes; tidy layout. 2019-02-07 15:33:29 -05:00
Tim Donohue
211545a9d0 Merge pull request #2290 from atmire/rest_item_crud
Added support for the CRUD operations on the Item rest endpoint
2019-02-07 13:43:44 -06:00
Tim Donohue
2b1b10100a Merge pull request #2343 from atmire/DS-4164_error-handling-bug-in-open-search-controller
[DS-4164] fixed the bug in the error handling
2019-02-07 12:03:27 -06:00
Mark H. Wood
416732921c [DS-3695] Remove unused "fieldType"s, dusty old comments from stock
sample schema.  Tidy indentation, break very long elements into
multiple lines.
2019-02-07 09:48:08 -05:00
Raf Ponsaerts
aa4125c9e9 Removed the name check from the DspaceObjectRestEqualityUtils 2019-02-07 15:39:15 +01:00
Ben Bosman
15eb85eb08 Check for null values
Use typed Maps
2019-02-07 12:55:02 +01:00
Terry Brady
d90e60a92b Sync docker solr web.xml with web.xml 2019-02-06 15:28:53 -08:00
Terry Brady
d489636641 Migrate PR2307 2019-02-06 10:24:35 -08:00
Raf Ponsaerts
78f7066c94 [DS-4164] fixed the bug in the error handling 2019-02-06 16:19:10 +01:00
Ben Bosman
f2b3f7027c Support relationships using a uri-list: merge 2019-02-06 16:12:47 +01:00
Mark H. Wood
8fb1ac5bd6 [DS-3695] Rip out big handfuls of unused fieldtypes, commentary about
Solr not DSpace.  Break loooong tags into attribute-per-line format.
2019-02-06 09:45:14 -05:00
Ben Bosman
fb2e0d556e Merge branch 'w2p-57159_permission-to-create-relations' into w2p-58898_place-column-calculation-error
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/DSpaceRestRepository.java
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/RelationshipRestRepository.java
#	dspace-spring-rest/src/test/java/org/dspace/app/rest/RelationshipRestRepositoryIT.java
2019-02-06 14:47:19 +01:00
Kevin Van de Velde
05cb949655 Small changes in how exceptions are handled in the ItemRestRepository, DSpaceRestRepository classes 2019-02-06 14:21:37 +01:00
Raf Ponsaerts
47d7021350 Added owningCollection as parameter to the POST Item endpoint and removed this from ItemRest. Also added documentation for several public methods. 2019-02-06 14:21:36 +01:00
Kevin Van de Velde
02ff91259f [DS-4108] Rest api item CRUD: Updating item metadata 2019-02-06 14:20:21 +01:00
Ben Bosman
864f6f1237 Support relationnships using a uri-list 2019-02-06 14:19:12 +01:00
Raf Ponsaerts
db8f6f1bb8 Fixed the 500 internal server error when calling item delete endpoint with invalid UUID 2019-02-06 14:19:10 +01:00
Raf Ponsaerts
2e446bf9a3 Added admin access to item delete and wrote tests 2019-02-06 14:19:10 +01:00
Raf Ponsaerts
ac283df61d Implemented the create method in the ItemRestRepository 2019-02-06 14:19:10 +01:00
Mark H. Wood
241fdbb538 [DS-3695] We no longer control Solr's logging. 2019-02-04 15:15:48 -05:00
Mark H. Wood
cb17cb1b7f [DS-3695] See bf4ead40575f0b180fd6840373ef17d98a6e778e. We *do* configure Solr for testing. 2019-02-04 14:58:43 -05:00
Mark H. Wood
8c26a9a78e [DS-3695] Upgrade indexes all the way to 7_x. 2019-02-04 14:58:43 -05:00
Mark H. Wood
ba0edff464 [DS-3695] We no longer configure Solr itself. 2019-02-04 14:58:43 -05:00
Mark H. Wood
f2cfab2d8d [DS-3695] Remaining minimal changes to make all cores load in Solr 7. 2019-02-04 14:58:43 -05:00
Mark H. Wood
fa9cc7c958 [DS-3695] Cure failing IT: the test was wrong. 2019-02-04 14:58:43 -05:00
Mark H. Wood
c375fe1762 [DS-3695] Make 'search' core load in stock Solr 7.2.1.
This should work without altering Solr, across Solr releases, as long
as Solr ships the necessary additional analyzers in /contrib.
2019-02-04 14:58:43 -05:00
Mark H. Wood
0792ba77ed [DS-3695] Start ripping out Solr server. 2019-02-04 14:58:43 -05:00
Mark H. Wood
3e8e1aa60f [DS-3695] Document what I puzzled out ot MockSolrServer, and small cleanups. 2019-02-04 14:58:43 -05:00
Tim Donohue
cc38ec872a Fix Solr startup errors by downgrading to 7.3.1 2019-02-04 14:58:43 -05:00
Mark H. Wood
9d0483c146 [DS-3695] Exclude Jetty from solr-core and solr-cell: Solr and Spring
Boot are fighting over versions.
2019-02-04 14:58:43 -05:00
Mark H. Wood
8d5de13987 [DS-3695] Switch new class from SolrServer to SolrClient. 2019-02-04 14:58:43 -05:00
Mark H. Wood
ee3b60c45e [DS-3695] Complete botched conflict fixup. 2019-02-04 14:58:43 -05:00
Tim Donohue
3504397031 Update to Solr 7.5. Sync dependencies and cleanup spring-rest POM 2019-02-04 14:58:43 -05:00
Tim Donohue
5e78f408f3 Disable Solr autoconfiguration in Spring Boot. Minor config cleanup 2019-02-04 14:58:43 -05:00
Tim Donohue
ece64480a0 Revert Spring Boot updates until DS-3802 is solved. Solr core only for testing. 2019-02-04 14:58:43 -05:00
Tim Donohue
01b80025b7 Fix minor compilation errors in OAI 2019-02-04 14:58:43 -05:00
Mark H. Wood
32a3c74164 [DS-3695] Start work on dspace-spring-rest 2019-02-04 14:58:43 -05:00
Mark H. Wood
3aa6b89487 [DS-3695] Rip out lots of Solr config. that is no longer defined in v7. 2019-02-04 14:58:43 -05:00
Mark H. Wood
7b9bd509a2 [DS-3695] Upgrade Solr *client* to 7.3.0. 2019-02-04 14:58:43 -05:00
Tim Donohue
3e5c9426aa Merge pull request #2277 from atmire/rest_comm_coll_management
Added support for the CRUD operations on the Collection and Community…
2019-02-04 09:13:03 -06:00
Raf Ponsaerts
2db2b70e82 Altered permissions on the Collection and Community Repositories and added ITs 2019-02-04 10:11:52 +01:00
Andrea Bollini
8c35296cdf Merge pull request #2337 from Georgetown-University-Libraries/ds4150
[DS-4150] Ensure dspace.restUrl is supported out of the box for DSpace 7 Docker
2019-01-31 16:57:50 +01:00
kshepherd
ed4f63c0b4 Merge pull request #2338 from DSpace/README-running-tests
Add Notes on running Tests to README
2019-01-31 11:00:42 +13:00
Tim Donohue
1957f36988 Notes on running tests 2019-01-30 15:24:37 -06:00
Ben Bosman
855b3f9556 getValues should not return null values 2019-01-29 16:22:26 +01:00
Ben Bosman
e99252c16f Merge branch 'w2p-57159_permission-to-create-relations' into w2p-58898_place-column-calculation-error 2019-01-29 14:52:05 +01:00
Ben Bosman
0a91360061 Merge remote-tracking branch 'community/configurable_entities' into w2p-57159_permission-to-create-relations
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/service/RelationshipService.java
2019-01-29 14:31:15 +01:00
benbosman
c72d731f93 Merge pull request #2302 from atmire/w2p-57441_modified-behavior-retrieving-relations
Retrieving relations per relationship type
2019-01-29 14:25:35 +01:00
benbosman
a663f05ad5 Merge pull request #2324 from atmire/discovery-config-relations
Discovery config relations
2019-01-29 14:20:53 +01:00
Ben Bosman
e01e133765 wording 2019-01-29 13:07:49 +01:00
Ben Bosman
887a0999bd wording 2019-01-29 12:20:49 +01:00
Ben Bosman
2dc03adc58 better readable code 2019-01-29 11:11:48 +01:00
Ben Bosman
96f08e4414 Merge branch 'w2p-59343_support-ordered-metadata' into w2p-58898_place-column-calculation-error
# Conflicts:
#	dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/DSpaceRestRepository.java
2019-01-29 10:41:05 +01:00
Ben Bosman
765e14b007 Verify order of virtual and real metadata 2019-01-29 10:39:55 +01:00
Ben Bosman
f8497ff392 JavaDoc 2019-01-29 10:26:25 +01:00
Ben Bosman
7abc5b01e2 Merge remote-tracking branch 'origin/w2p-57159_permission-to-create-relations' into w2p-58898_place-column-calculation-error
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/RelationshipServiceImpl.java
#	dspace-api/src/main/java/org/dspace/content/service/RelationshipService.java
2019-01-29 09:58:22 +01:00
Terry Brady
da1346ef53 Match dspace.restUrl to module name 2019-01-28 10:05:48 -08:00
Raf Ponsaerts
7dc59a03a2 Fixed nullpointer issue in th comparator 2019-01-28 15:35:56 +01:00
Raf Ponsaerts
a62a66ec41 removed the ItemService from the DspaceObjectService 2019-01-28 14:10:36 +01:00
Raf Ponsaerts
b908df263c [Task 59343] sorted the list of metadatavalues and forced the itemconverter to use the itemservice 2019-01-28 13:24:35 +01:00
Raf Ponsaerts
7d961db6ce Applied feedback 2019-01-28 11:49:19 +01:00
benbosman
54a626892a indentation 2019-01-25 09:10:19 +01:00
Ben Bosman
e768866292 Merge branch 'w2p-58898_place-column-calculation-error' into w2p-59343_support-ordered-metadata 2019-01-24 15:22:13 +01:00
Ben Bosman
d7610ccf6e Resolving merge conflict 2019-01-24 14:19:09 +01:00
Ben Bosman
1311c40cb7 Merge remote-tracking branch 'origin/w2p-57159_permission-to-create-relations' into w2p-58898_place-column-calculation-error
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/ItemServiceImpl.java
#	dspace-api/src/main/java/org/dspace/content/RelationshipServiceImpl.java
#	dspace-api/src/main/java/org/dspace/content/service/ItemService.java
#	dspace-api/src/main/java/org/dspace/content/virtual/Collected.java
#	dspace-api/src/main/java/org/dspace/content/virtual/UUIDValue.java
#	dspace-spring-rest/src/test/java/org/dspace/app/rest/RelationshipRestRepositoryIT.java
#	dspace/config/spring/api/core-services.xml
2019-01-24 13:59:36 +01:00
Ben Bosman
257b14bc54 Merge branch 'w2p-58898_place-column-calculation-error' into w2p-59343_support-ordered-metadata 2019-01-24 13:51:52 +01:00
Ben Bosman
dac5ca467c Merge branch 'configurable_entities_temp_2' into w2p-58898_place-column-calculation-error 2019-01-24 13:48:33 +01:00
Ben Bosman
816c7d0772 Merge branch 'configurable_entities_comm' into w2p-58898_place-column-calculation-error 2019-01-24 13:34:16 +01:00
Ben Bosman
391c5b4dc6 Sort metadata values part 1 2019-01-24 13:33:13 +01:00
Ben Bosman
51de4cd87c JavaDocs and boolean name update 2019-01-24 13:26:35 +01:00
Raf Ponsaerts
1ed01310b0 Implemented the additional getMetadata function with the boolean 2019-01-24 10:06:42 +01:00
Ben Bosman
8557f44673 Merge branch 'configurable_entities_temp_2' into w2p-57159_permission-to-create-relations 2019-01-23 12:03:54 +01:00
Ben Bosman
025c77ee70 authorization for updating the place of both items 2019-01-23 12:01:50 +01:00
Ben Bosman
1ac514d4fb Merge branch 'configurable_entities_temp_2' into discovery-config-relations 2019-01-23 09:04:32 +01:00
benbosman
ccaca1aaaa indentation fix 2019-01-22 17:32:31 +01:00
Ben Bosman
a52b850080 temp disable ITs 2019-01-22 16:24:29 +01:00
Raf Ponsaerts
4847620a4c Fixed issues and wrote IT tests 2019-01-22 14:58:43 +01:00
Raf Ponsaerts
7e14562139 Merged configurable_entities into w2p-57159_permission-to-create-relations 2019-01-22 12:50:44 +01:00
Ben Bosman
461b5ee21a typing error 2019-01-22 11:15:28 +01:00
Raf Ponsaerts
86f3f9e9c3 Fixed tests and place calculation 2019-01-22 09:53:52 +01:00
Tim Donohue
f387ab18c0 Merge remote-tracking branch 'upstream/master' into configurable_entities 2019-01-21 20:02:17 +00:00
Yana De Pauw
e34b4e5448 Update item move rest contract and update tests 2019-01-21 12:47:28 +01:00
Raf Ponsaerts
f2c2b768f7 Fixed test failure 2019-01-21 10:14:09 +01:00
Raf Ponsaerts
bfc1b39ea2 Merged configurable_entities into w2p-58898_place-column-calculation-error 2019-01-21 09:19:01 +01:00
Kim Shepherd
929312d7e8 [DS-4136] tidy up commented out (old) configurationService instantiation in main() 2019-01-19 10:40:21 +13:00
Kim Shepherd
6d40a57df7 [DS-4136] Apply same changes as dspace 6.x version (PR #2320); replace xoai services configurationservice with proper DSpace configuration service; and replace all instances of legacy configuration manager with proper DSpace configuration service 2019-01-19 10:33:00 +13:00
Kim Shepherd
e7f39c23b2 WIP commit for oai master port 2019-01-18 07:30:47 +13:00
Giuseppe Digilio
48d90660ab Fixes after check on angular app 2019-01-17 17:15:04 +01:00
Raf Ponsaerts
0f6148db77 Fixed RunTimeException messages and addressed nullpointer error 2019-01-16 09:39:14 +01:00
Raf Ponsaerts
ae96aeafd4 Applied community feedback, javadocs 2019-01-15 15:49:42 +01:00
Ben Bosman
269fdd2852 additional filters in default configuration 2019-01-15 12:44:29 +01:00
Raf Ponsaerts
a757a6661e Fixed the relationship place ordering and MetadataValue place ordering 2019-01-15 11:51:48 +01:00
Ben Bosman
6ee687a4ae metadata attributes place, authority, confidence in rest 2019-01-15 08:50:52 +01:00
kshepherd
07d6846234 Merge pull request #2327 from J4bbi/ds4142_master
[DS-4142] master: update maven jdks for docker
2019-01-15 09:54:23 +13:00
Hrafn Malmquist
9b6e97fd24 update maven jdks for docker 2019-01-14 17:28:32 +00:00
Raf Ponsaerts
865b4256b9 Made sure that the itemService.update is called so that the metadata and relationship places get updated upon creation/deletion of a relationship 2019-01-14 15:53:24 +01:00
Raf Ponsaerts
7f225f1ad5 Fixed the place attribute not being set to the virtual metadata 2019-01-14 15:29:54 +01:00
Ben Bosman
6d40600dbb Merge branch 'configurable_entities' into discovery-config-relations
# Conflicts:
#	dspace/config/spring/api/discovery.xml
2019-01-14 14:23:34 +01:00
kshepherd
04d11924a5 Merge pull request #2323 from kshepherd/DS-4104_google_scholar_date_crosswalk_master
[DS-4104] Apply Google Scholar date crosswalk fix to master
2019-01-14 11:33:53 +13:00
Kim Shepherd
74fc3e97bb [DS-4104] Apply Google Scholar date crosswalk fix to master, porting from PR#2294 dspace 6 version 2019-01-14 09:20:43 +13:00
kshepherd
51550079c4 Merge pull request #2311 from mwoodiupui/DS-4087
[DS-4087] 'dspace structure-builder' errors are too hard to interpret
2019-01-13 13:22:13 +13:00
Raf Ponsaerts
3d011c5411 Applied fixes to catch clauses and added more docs 2019-01-11 15:01:59 +01:00
Raf Ponsaerts
b96cf91ef8 Applied community feedback and fixed tests 2019-01-11 09:38:21 +01:00
Raf Ponsaerts
612c8e315c Made the PUT and POST relationship endpoints now use relationshipType parameter instead of the relationshipType in the body 2019-01-07 10:54:17 +01:00
Terry Brady
6e02e145f0 Merge pull request #2314 from tdonohue/DS-4129
DS-4129: Remove unnecessary HarvestConsumer
2019-01-03 16:04:17 -08:00
Tim Donohue
33eedeaba8 DS-4129: Remove unnecessary HarvestConsumer 2019-01-03 16:13:05 +00:00
kshepherd
cd5d1b038d Merge pull request #2298 from kshepherd/DS-4113_clean_plugin
[DS-4113] Configure clean plugin in parent pom to also clean sub-modules
2019-01-03 18:09:55 +13:00
Andrea Bollini
67602275bd Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3851_workflow 2019-01-02 13:57:26 +01:00
Andrea Bollini
821d106439 Rely on Spring LateObjectEvaluator instead than our custom porting 2019-01-02 13:57:14 +01:00
Andrea Bollini
bf0139d5e9 Disable IT for basic workflow 2019-01-02 12:24:34 +01:00
Andrea Bollini
8a2ae7e891 Add javadocs: community feedback from https://github.com/4Science/DSpace/pull/37 2019-01-02 12:13:56 +01:00
Andrea Bollini
b3b1c8786e Fix H2 sql for xml workflow 2019-01-01 18:04:35 +01:00
Andrea Bollini
f84e951106 Add support for xmlworkflow in H2 database (Oracle sql as is) 2019-01-01 17:09:04 +01:00
Andrea Bollini
69f7c7588d Enable configuration workflow by default 2019-01-01 17:08:17 +01:00
Andrea Bollini
c8e11e6700 Merge remote-tracking branch 'origin/master' into DS-3851_workflow 2019-01-01 13:00:11 +01:00
Mark H. Wood
7b2b923390 [DS-4087] Small improvements to message texts. 2018-12-31 09:31:07 -05:00
Mark H. Wood
f255521c8e [DS-4087] First pass at better error reporting. 2018-12-30 18:37:00 -05:00
Andrea Bollini
1a7b22a784 Merge pull request #2293 from tdonohue/REST-IT-refactor
Super Speedy REST API v7 Integration Tests
2018-12-25 16:48:18 +01:00
benbosman
0692701f7a Merge pull request #2270 from atmire/virtual-metadata-update
Entities Virtual metadata update
2018-12-21 12:49:05 +01:00
Ben Bosman
c9bbbfde1f merge conflict 2018-12-20 11:26:05 +01:00
Ben Bosman
37fc3ee409 Merge remote-tracking branch 'community/configurable_entities' into w2p-57441_modified-behavior-retrieving-relations
# Conflicts:
#	dspace-api/src/main/java/org/dspace/content/RelationshipServiceImpl.java
#	dspace-api/src/main/java/org/dspace/content/dao/RelationshipTypeDAO.java
#	dspace-api/src/main/java/org/dspace/content/dao/impl/RelationshipTypeDAOImpl.java
#	dspace-api/src/main/java/org/dspace/content/service/RelationshipService.java
#	dspace-api/src/main/java/org/dspace/content/service/RelationshipTypeService.java
2018-12-20 11:10:06 +01:00
Tim Donohue
f3f784c6ec Merge pull request #2269 from atmire/w2p-57712_merging-csv-functionality
Entities csv import fixes for creating relations
2018-12-19 14:05:56 -06:00
Samuel
fb1a8b8c33 Added support for the CRUD operations on the Collection and Community REST endpoints - remove owningCommunity field from CommunityRest and CollectionRest 2018-12-19 14:05:22 +01:00
Tim Donohue
035832cfdd Merge pull request #2288 from atmire/w2p-57718_relationships-link-to-items
[DS-4084] - Relationships should link to Items via REST API
2018-12-18 14:18:35 -06:00
Samuel
e283f43467 Added support for the CRUD operations on the Collection and Community REST endpoints - send parentCommunity as request parameter 2018-12-18 11:09:12 +01:00
Ben Bosman
32c9585ede checkstyle 2018-12-18 10:55:22 +01:00
Ben Bosman
0d678aca58 JavaDoc 2018-12-18 10:35:30 +01:00
Ben Bosman
fe437ad88d checkstyle 2018-12-18 10:29:47 +01:00
Ben Bosman
dc6bd487e0 checkstyle 2018-12-18 10:29:04 +01:00
Ben Bosman
b050db1cae JavaDoc updates 2018-12-18 10:17:12 +01:00
Ben Bosman
efd579f054 typing error 2018-12-18 09:58:57 +01:00
Ben Bosman
1b0f00df18 Comment on relationship.type 2018-12-18 09:42:48 +01:00
Tim Donohue
dfd3ba4e38 Ensure BitstreamContent tests start with an empty Solr Statistics core 2018-12-17 21:04:56 +00:00
Tim Donohue
78e3e00e7f Rename OpenSearch tests to end in "IT" since they are Integration Tests. 2018-12-17 21:04:15 +00:00
Tim Donohue
7fe7da4813 Fix OpenSearch test issues by ensure OpenSearchServiceImpl doesn't cache configs & that Tests specify the config setting they expect. 2018-12-17 20:40:46 +00:00
Tim Donohue
74aa295787 Refactor MockSolrLoggerServiceImpl to initialize FakeDatabaseReader before every method 2018-12-17 18:44:27 +00:00
Tim Donohue
e0175bd198 Improve logging messages of SolrLogger service/listener. Debugging is otherwise impossible 2018-12-17 18:44:27 +00:00
Tim Donohue
f0ff442959 Stop using MockSolrServer directly and use the Solr Statistics Service 2018-12-17 18:44:27 +00:00
Tim Donohue
b05eec3b92 Cache default EPersons (for reuse). Fix EPersonRestRepository tests to not rely on default EPersons as heavily. 2018-12-17 18:44:27 +00:00
Tim Donohue
c305879b51 Remove @DirtiesContext and allow reuse of Spring ApplicationContext & DSpace Kernel 2018-12-17 18:44:27 +00:00
Tim Donohue
c2803a7f69 Ensure full stacktrace is logged for Integration Tests 2018-12-17 18:44:27 +00:00
Tim Donohue
ff1f46aedb Externalize DSpaceKernelInitializer so that it can be used by Integration Tests to start Kernel 2018-12-17 18:44:27 +00:00
Tim Donohue
942f2e7b92 Remove unnecessary (default) annotations. Comment what each annotation does. 2018-12-17 18:44:27 +00:00
Ben Bosman
39bf016eb8 Merging configurable_entities branch 2018-12-17 13:45:04 +01:00
Ben Bosman
1776f892e0 Merge remote-tracking branch 'community/configurable_entities' into w2p-57441_modified-behavior-retrieving-relations 2018-12-17 12:18:43 +01:00
Ben Bosman
10c610bf73 Merge branch 'w2p-57712_merging-csv-functionality' into virtual-metadata-update 2018-12-17 10:08:25 +01:00
Ben Bosman
6fca857429 Merge remote-tracking branch 'community/configurable_entities' into w2p-57712_merging-csv-functionality 2018-12-17 09:55:59 +01:00
Ben Bosman
feaa5d1adb Merge remote-tracking branch 'community/configurable_entities' into w2p-57718_relationships-link-to-items 2018-12-17 09:39:52 +01:00
Tim Donohue
21fe950593 Merge pull request #2299 from tdonohue/remove_xmlui_spring_configs
Remove obsolete XMLUI spring configs (from master)
2018-12-14 10:41:35 -06:00
Raf Ponsaerts
4e51fd0c86 Added support for the leftItem and rightItem through the parameters 2018-12-14 17:20:45 +01:00
Tim Donohue
33268e8980 Remove obsolete XMLUI spring configs 2018-12-14 16:09:19 +00:00
Tim Donohue
c3f2fa7f47 Increase memory available to Unit/Integration Tests 2018-12-14 15:29:04 +00:00
Tim Donohue
04475e42eb Merge pull request #2286 from tdonohue/temp_memory_issue_fix
[Configurable Entities] Temporary fix for Integration Test memory issues
2018-12-14 09:27:24 -06:00
Raf Ponsaerts
240636e978 Created new IT and fixed checkstyle 2018-12-14 14:53:11 +01:00
Raf Ponsaerts
2f0fb32c8c Fixed typo 2018-12-14 13:27:29 +01:00
Raf Ponsaerts
e932075d03 Added documentation and @Override where applicable 2018-12-14 13:26:16 +01:00
Raf Ponsaerts
3123c1dd61 Wrote documentation for the spring beans 2018-12-14 09:54:26 +01:00
Andrea Bollini
43bfdbb3ff Merge pull request #2253 from tantz001/DS-4050
DS-4050 Search method returns 204 NoContent or 200 for empty page if no result.
2018-12-13 22:54:01 +01:00
Andrea Bollini
c4ab55f6f5 Merge pull request #2128 from tubhh/dspace7_opensearch
DSpace7 opensearch
2018-12-13 22:48:35 +01:00
Kim Shepherd
20904f897d [DS-4113] Configure clean plugin in parent pom to also clean sub-modules 2018-12-14 10:17:11 +13:00
Raf Ponsaerts
d95c378edc Implemented the feedback 2018-12-13 15:45:15 +01:00
Oliver Goldschmidt
67046598c1 fixes typo 2018-12-13 09:34:40 +01:00
Oliver Goldschmidt
8ccb41a205 Merge branch 'master' of https://github.com/DSpace/DSpace into dspace7_opensearch 2018-12-13 09:33:46 +01:00
Andrea Bollini
7ccd99c97c Merge pull request #2173 from ppmdo/DS-3904
DS-3904 - Add support for startsWith parameters in the browse endpoint
2018-12-12 22:52:44 +01:00
Raf Ponsaerts
314e96a6ac Merged the merging-csv-functionality branch into virtual-metadata-update 2018-12-12 10:54:16 +01:00
Tim Donohue
1b2cc563d7 Increase memory available to Unit/Integration Tests 2018-12-11 15:32:11 +00:00
Raf Ponsaerts
4171729f84 Wrote IT test for CSV import and fixed a small error 2018-12-11 09:30:13 +01:00
Raf Ponsaerts
8024242fd1 Added @Override to applicable methods 2018-12-10 09:56:43 +01:00
Tim Donohue
0feb1748a0 Merge pull request #2284 from AlexanderS/ds3914-master
DS-3914: Fix community defiliation (master)
2018-12-07 09:37:06 -06:00
Raf Ponsaerts
6e16a3ed62 Applied community feedback 2018-12-07 16:09:29 +01:00
Alexander Sulfrian
e02174bad8 CommunityFiliator: Some cleanup
This removes the loops for checking if a community is contained in a list of
communities. Community.equals() does the same check, so we simply can use
contains().
2018-12-07 11:22:01 +01:00
Alexander Sulfrian
5ecc473311 DS-3914: Fix community defiliation
This fixes in issue in the defiliate method of the community filiator. The
child and parent relations should be managed using the provided methods of the
Community.

This changes the visibility of Community.removeSubCommunity() to public, but
Community.removeParentCommunity() was public before already.
2018-12-07 11:19:06 +01:00
Raf Ponsaerts
7d07a1e6f9 Merged branch configurable_entities into w2p-57712_merging-csv-functionality 2018-12-07 10:38:19 +01:00
Tim Donohue
09faec3f17 Update Entities code to use log4j2 and commons-lang v3 (per master merge) 2018-12-06 17:43:15 +00:00
Tim Donohue
ceed829800 Merge branch 'master' into configurable_entities 2018-12-06 17:05:31 +00:00
Kevin Van de Velde
783ec4bffe [DS-4096] Alter the moving item between collections to use PUT instead of POST 2018-12-06 11:02:00 +01:00
Yana De Pauw
a55a5fd795 [DS-4096] Add new endpoint to update the owning collection of an item and adding ITs to test the behaviour 2018-12-06 11:01:57 +01:00
Mark H. Wood
8df33db457 [DS-3989] Fix code from DS-3990 that was (expectedly) broken by DS-3989. 2018-12-05 16:13:24 -05:00
Mark H. Wood
844ef85583 [DS-3989] Placate Checkstyle. 2018-12-05 15:41:37 -05:00
Mark H. Wood
1d3a58958e [DS-3989] Update new method for Commons Configuration v2. 2018-12-05 15:41:37 -05:00
Mark H. Wood
1e5bcd47ce [DS-3989] Clarify help for --reporter option. 2018-12-05 15:41:37 -05:00
Mark H. Wood
c795c8b4b4 [DS-3989] Clarify submission task configuration. 2018-12-05 15:41:37 -05:00
Mark H. Wood
85db4fe2bb [DS-3989] Commit testing task. 2018-12-05 15:41:37 -05:00
Mark H. Wood
6084f892b2 [DS-3989] Remove unworkable task-id logging; ensure closure of Reporter. 2018-12-05 15:41:37 -05:00
Mark H. Wood
ff8a5fac97 [DS-3989] Add configuration for the Reporter plugin. 2018-12-05 15:41:37 -05:00
Mark H. Wood
dbcb1f291c [DS-3989] Fix invalid date format. 2018-12-05 15:41:37 -05:00
Mark H. Wood
d9c80d8afc [DS-3989] Fix checkstyle issues. 2018-12-05 15:41:37 -05:00
Mark H. Wood
9f64b9aa95 [DS-3989] Fix license blocks for new classes. 2018-12-05 15:41:37 -05:00
Mark H. Wood
de33ece1c9 [DS-3989] Pull report writing out through a pluggable interface, provide log and file plugins 2018-12-05 15:41:37 -05:00
Mark H. Wood
ab224b2508 [DS-3989] Integration test for Curator's reporting. 2018-12-05 15:41:37 -05:00
Mark H. Wood
1478ab36fa [DS-3989] Let tests set multiple values on a configuration property. 2018-12-05 15:41:37 -05:00
Mark H. Wood
d6d0e67017 [DS-3989] Placate Checkstyle: unused import. 2018-12-05 15:41:37 -05:00
Mark H. Wood
f23fef032f [DS-3989] Fix the date format. 2018-12-05 15:41:37 -05:00
Mark H. Wood
94ed795d00 [DS-3989] Accumulate reports; implement arbitrary output paths, not just standard output. 2018-12-05 15:41:37 -05:00
Mark H. Wood
301f804d44 Merge pull request #2279 from mwoodiupui/DS-4094
[DS-4094] DiscoveryRestController and DiscoveryRestRepository log as ScopeResolver
2018-12-05 15:23:58 -05:00
Mark H. Wood
90a9df75ef [DS-4094] Use correct logging categories; fix incorrect argument in a couple of messages. 2018-12-04 16:11:44 -05:00
Ivan Masár
6bbcc08e59 fix checkstyle broken by previous commit (sorry) 2018-12-03 22:44:36 +01:00
Santiago Tettamanti
733ef18184 DS-4019 Added a check for null when the group of a policy is obtained in getMostRecentModificationDate() and willChangeStatus() methods from XOAI.java class 2018-12-03 22:03:50 +01:00
Raf Ponsaerts
d77dd7fa4f Added support for the CRUD operations on the Collection and Community REST endpoints 2018-12-03 15:40:42 +01:00
Mark H. Wood
495ccdee21 Merge pull request #2168 from mwoodiupui/DS-3980
[DS-3980] Defend against bad MIME type in Email.addAttachment
2018-11-30 11:53:25 -05:00
Raf Ponsaerts
4c1fdfc49c Added a license header 2018-11-29 15:45:32 +01:00
Raf Ponsaerts
dcf21c04cf [Task 57718] added the leftItem and rightItem links to the relationship endpoint return 2018-11-29 15:25:48 +01:00
Raf Ponsaerts
699fb42683 [Task 57441] fixed the label vs id conflicting issue 2018-11-29 13:56:38 +01:00
Mark H. Wood
769398d6fb Merge pull request #2181 from mwoodiupui/DS-3990
[DS-3990] Curation task runs need per-run parameters.
2018-11-28 11:52:33 -05:00
Raf Ponsaerts
8f81f28607 [Task 57160] implemented CRUD methods on relationship endpoint 2018-11-28 14:17:11 +01:00
Tim Donohue
9bc1f1ce69 Merge pull request #2274 from DSpace/elasticsearch_cleanup
DS-3455: Delete elasticsearch-statistics-mapping.json (ElasticSearch was removed)
2018-11-27 07:58:57 -08:00
Raf Ponsaerts
13fea6312e Cleaned up and fix license headers 2018-11-27 09:37:17 +01:00
Raf Ponsaerts
41ff37de1b [Task 57441] fixed pagination on the /label endpoint 2018-11-27 08:33:10 +01:00
Tim Donohue
58c01c500c Delete elasticsearch-statistics-mapping.json 2018-11-26 16:30:46 -06:00
Tim Donohue
1d9a4edcc0 Merge pull request #2266 from mwoodiupui/DS-4077
[DS-4077] filter-media error on WordFilter -- remove old, failing WordFilter
2018-11-26 09:24:48 -08:00
Tim Donohue
b44cf37d9d Merge pull request #2267 from atmire/w2p-57442_relation-enum-metadataschema
DS-4083 Move all Schema constants to a new MetadataSchemaEnum class
2018-11-26 09:03:21 -08:00
Raf Ponsaerts
c6dfae90de intermediary commit 2018-11-26 09:02:30 +01:00
Raf Ponsaerts
925b83bc02 [Task 57441] Implemented the requested endpoints, except for one todo 2018-11-22 16:05:27 +01:00
Raf Ponsaerts
fc8e3744b6 Merged w2p-56183_additional-relationshiptype-endpoints into w2p-57441_modified-behavior-retrieving-relations and fixed checkstyle, license headers 2018-11-22 13:41:06 +01:00
Raf Ponsaerts
0b4dc28dfa Merge branch 'w2p-56182_additional-endpoint-relations' into w2p-57441_modified-behavior-retrieving-relations 2018-11-22 13:10:27 +01:00
Raf Ponsaerts
e7b6aded69 Fixed tests and added license headers 2018-11-22 10:41:45 +01:00
Pablo Prieto
30f8b61ad0 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3904 2018-11-21 21:24:39 -06:00
Pablo Prieto
6600839fa4 Fixed ITs 2018-11-21 21:23:00 -06:00
Pablo Prieto
8ebb6a1a41 Added handling of empty querystring. Added startsWithandPage test. 2018-11-21 18:58:09 -06:00
Mark H. Wood
7613a204ed [DS-3990] Trim parameter name, value; remove unused test code. 2018-11-21 11:10:42 -05:00
Raf Ponsaerts
912a1f0be6 Merged entities-PR2 into virtual-metadata-update 2018-11-21 15:47:08 +01:00
Raf Ponsaerts
38250f94ad Fixed checkstyle 2018-11-21 11:37:14 +01:00
Raf Ponsaerts
34a2b92754 Merged entities-PR2 into w2p-57712_merging-csv-functionality 2018-11-21 11:02:28 +01:00
Raf Ponsaerts
b905f69d63 Refactored the usages of MetadataSchema.DC to use the enum instead 2018-11-21 09:35:11 +01:00
Mark H. Wood
aeee597101 [DS-4077] Remove traces of tm-extractors. 2018-11-20 19:55:02 -05:00
Mark H. Wood
5114f21da8 [DS-4077] Remove old, failing WordFilter; use PoiWordFilter instead. 2018-11-20 18:58:41 -05:00
Tim Donohue
52f1cf1fdc Merge pull request #2246 from atmire/entities-PR2
Initial entities PR
2018-11-20 16:05:34 -06:00
Raf Ponsaerts
b8d6fa2fba [Task 57442] Added the MetadataSchemaEnum with DC and RELATION, rewrote methods using relation String 2018-11-20 15:51:41 +01:00
Raf Ponsaerts
cfeabe349c [Task 57188] added the logic for the advanced place column calculation. Enforced that all virtual metadata are valid metadatafields 2018-11-20 14:32:12 +01:00
Raf Ponsaerts
0ba6d75a30 Constructed a RelationshipMetadataValue object and refactored the getRelationshipMetadata methods in the ItemServiceImpl to use this object instead of it's parent MetadataValue 2018-11-19 16:14:51 +01:00
benbosman
ad7bd23038 Additional search filter 2018-11-16 17:39:36 +01:00
Raf Ponsaerts
3a972ba5b9 Added config for virtual metadata fields on the journalIssue and Publication item pages 2018-11-16 15:17:23 +01:00
Raf Ponsaerts
a755f296bf Added relation.isJournalOfPublication metadata field on the publication with config and addition of a new uuidvalue bean 2018-11-16 11:14:28 +01:00
Raf Ponsaerts
255de21271 [Task 57187] added the relationship ID after the virtual:: in the metadata field authority 2018-11-16 10:10:02 +01:00
Tim Donohue
76470f4eec Merge pull request #2262 from tdonohue/DS-4078
DS-4078: Bitstreams should keep their formats when being versioned. (Master port)
2018-11-15 11:35:55 -06:00
Tim Donohue
f3245e7c88 DS-4078: Bitstreams should keep their formats when being versioned. 2018-11-15 16:28:14 +00:00
Tim Donohue
5eeb40e530 Merge pull request #2258 from atmire/w2p-57063_http-vs-https-request-url
Make the REST URL configurable instead of relying on the request.getUrl
2018-11-15 10:20:48 -06:00
Raf Ponsaerts
8e8bb65f75 Removed a problematic context.close() 2018-11-15 15:13:16 +01:00
Raf Ponsaerts
01c1c0cddf [Task 57265] added the request search filters 2018-11-15 12:50:01 +01:00
Raf Ponsaerts
7b2233a9b7 [Task 57186] added useForPlace property to the beans and added setters and getters to the interface. defaulting to false. Added this property to the isAuthorOfPublication config 2018-11-15 10:45:45 +01:00
Raf Ponsaerts
86cd0c7025 [Task 57103] added javadoc 2018-11-15 09:27:56 +01:00
Raf Ponsaerts
353d4c9d60 [Task 57103] implemented the support for related beans and added the option for config to supply virtual metadata throughout many nested relations 2018-11-14 16:06:33 +01:00
Pablo Prieto
7d5e12a793 Added QueryString null handling. 2018-11-13 18:40:28 -06:00
Raf Ponsaerts
37ffda5d21 Made sure that the delete and create functions in relationshipservice update the place attributes accordingly. Fixed checkstyle and added license header. Changed cacheable functions to false in relationshipDAO 2018-11-12 15:56:28 +01:00
Raf Ponsaerts
5de574d65a Merged w2p-57104_csv-import-delete-functionality into w2p-57107_mixing-entities-and-plaintest-values 2018-11-12 13:14:40 +01:00
Raf Ponsaerts
b226666113 Added loops to set places on left and right places for relationships on create and delete 2018-11-12 13:11:43 +01:00
Raf Ponsaerts
b3a4a196d8 [Task 57107] changed the functionality of the VirtualMetadataPopulator to now support a bean 2018-11-12 12:43:10 +01:00
Ben Bosman
45afa91d0e Removed setter since it's no longer used 2018-11-12 09:32:40 +01:00
Ben Bosman
c30e548533 use only one extraction of the UUID 2018-11-12 09:26:18 +01:00
Tim Donohue
94aeb7c18a Merge pull request #2241 from mwoodiupui/DS-3135-again
[DS-3135] Replace log4j 1.2, which is EOL
2018-11-09 10:34:10 -06:00
Oliver Goldschmidt
e53af97a31 fixes checkstyle issue 2018-11-09 16:39:17 +01:00
Mark H. Wood
9e1c16990f [DS-3135] Remove leftover comment (and surrounding empty niladic constructor). 2018-11-09 09:02:59 -05:00
Mark H. Wood
18868370de [DS-3135] Remove commented-out attempt by logged code to tell logging framework its configuration path. 2018-11-09 09:02:59 -05:00
Mark H. Wood
468725346f Remove system property pointing to logging config. Instead just let
framework do its default search, which should find the config. on the
classpath.
2018-11-09 09:02:59 -05:00
Mark H. Wood
3929a5d7ac [DS-3135] Remove questionable loglevel fiddling; conform to webapp descriptor schema. 2018-11-09 09:02:59 -05:00
Mark H. Wood
e671680ae4 [DS-3135] Let Spring configure Log4J; correct logging config in Ant script. 2018-11-09 09:02:59 -05:00
Mark H. Wood
eff018aace [DS-3135] Squash another unused import for Checkstyle. 2018-11-09 09:02:59 -05:00
Mark H. Wood
38e1d0a8d4 [DS-3135] Set the log4jConfiguration context parameter properly. 2018-11-09 09:02:59 -05:00
Mark H. Wood
5b66fdf5db [DS-3135] Clean out temporary exclusions; tidy indentation. 2018-11-09 09:02:59 -05:00
Mark H. Wood
2925a3a3bf [DS-3135] Finish converting log4j2 configuration; make it work for Solr; tweak Ant usage. 2018-11-09 09:02:59 -05:00
Mark H. Wood
b668860a2b [DS-3135] Don't configure Solr with ConfigureLog4jListener which no longer exists. 2018-11-09 09:02:59 -05:00
Mark H. Wood
9133d289ed [DS-3135] Satisfy Checkstyle by removing unused includes; tighten up the code a little. 2018-11-09 09:02:59 -05:00
Mark H. Wood
959b5122b7 [DS-3135] Squash one more log4j1 dependency. 2018-11-09 09:02:59 -05:00
Mark H. Wood
f3505ed22b [DS-3135] Still more dependency cleanup. 2018-11-09 09:02:59 -05:00
Mark H. Wood
3f904dc4ec [DS-3135] Tell Log4J where to find its configuration. 2018-11-09 09:02:59 -05:00
Mark H. Wood
5cbe4fefb5 [DS-3135] Correct Log4J configuration file name. 2018-11-09 09:02:58 -05:00
Mark H. Wood
bb10bfe01a [DS-3135] More dependency cleanup 2018-11-09 09:02:58 -05:00
Mark H. Wood
9be54714d3 [DS-3135] More dependency fixes. 2018-11-09 09:02:58 -05:00
Mark H. Wood
f5d325b36b [DS-3135] Fix new class that uses old log4j. 2018-11-09 09:02:58 -05:00
Mark H. Wood
f48d005e2c [DS-3135] log4j 2 needs new configuration -- start with the command line tools 2018-11-09 09:02:58 -05:00
Patrick Trottier
538b0046e5 Change to version 2.6.2 of log4j
To ensure compatibility with Spring Boot v1.4.4
2018-11-09 09:02:58 -05:00
Patrick Trottier
8eb074b11f Fix dependency convergence 2018-11-09 09:02:58 -05:00
Patrick Trottier
a3db6f727c Fix import statement 2018-11-09 09:02:58 -05:00
Patrick Trottier
7996283d3c Fix files not conforming to code style 2018-11-09 09:02:58 -05:00
Patrick Trottier
56dd50d283 Additional refactoring for log4jv2 2018-11-09 09:02:58 -05:00
Patrick Trottier
7bd47362b6 Refactor additional loggers for log4jv2 2018-11-09 09:02:58 -05:00
Patrick Trottier
bb2dde22b1 Convert getLogger() and Log4J imports for Log4J 2 2018-11-09 09:01:25 -05:00
Patrick Trottier
a49486310a Update POMs to version 2.10.0 2018-11-09 08:58:56 -05:00
Patrick Trottier
a5a00816cc Additional refactoring for log4jv2 2018-11-09 08:58:56 -05:00
Patrick Trottier
00088c9739 Fix dependency convergence and use POM property for log4j version 2018-11-09 08:56:44 -05:00
Patrick Trottier
3b10caef0d Fix reference to log4jv2 2018-11-09 08:56:44 -05:00
Patrick Trottier
bda4fa0ba7 Refactor additional loggers for log4jv2 2018-11-09 08:56:44 -05:00
Patrick Trottier
35b5c6c321 Remove bean declaration for log4v1 service 2018-11-09 08:53:12 -05:00
Patrick Trottier
7f589a5ad6 Refactor import statements 2018-11-09 08:53:12 -05:00
Patrick Trottier
1eed2698ae Remove trailing whitespace in EventListenerExample 2018-11-09 08:51:47 -05:00
Patrick Trottier
b72fff4a25 Remove code related to log4j1 2018-11-09 08:51:47 -05:00
Patrick Trottier
1e3231967f Add Log4J LogManager to EventListenerExample 2018-11-09 08:41:42 -05:00
Patrick Trottier
7f4b4e9f8a Convert getLogger() and Log4J imports for Log4J 2 2018-11-09 08:41:42 -05:00
Patrick Trottier
fb4e7ae9cb Update POMs to version 2.10.0 2018-11-08 16:03:30 -05:00
Tim Donohue
195213d528 Merge pull request #2244 from tdonohue/commons_config_v2
DS-4056: Upgrade to Commons Configuration v2 (and Commons Lang v3)
2018-11-08 15:00:03 -06:00
Tim Donohue
34edf302b7 Remove unnecessary PropertyPlaceholderConfigurer 2018-11-08 20:35:58 +00:00
Tim Donohue
4d882bec60 Remove unnecessary exclusion 2018-11-08 20:35:58 +00:00
Tim Donohue
200cede397 Upgrade to commons-lang3 to avoid dependency conv issues. 2018-11-08 20:35:57 +00:00
Tim Donohue
b4eac9e5ff Update config-definition.xml to be v2 compatible 2018-11-08 20:35:57 +00:00
Tim Donohue
3ec449f3df Update dspace-api code to Commons Config v2 2018-11-08 20:35:54 +00:00
Tim Donohue
79d027776e Add Spring PropertySource integration + tests to prove it works 2018-11-08 20:33:28 +00:00
Tim Donohue
673d4b9d36 Replace DSpaceConfigurationFactoryBean with ConfigurationPropertiesFactoryBean 2018-11-08 20:33:28 +00:00
Tim Donohue
c810efccb3 Add / enhance unit tests to prove functionality unchanged after upgrade 2018-11-08 20:33:28 +00:00
Tim Donohue
cb913fd24f Initial upgrade of dspace-services to Commons Config v2 2018-11-08 20:33:28 +00:00
Tim Donohue
d364f351e6 Merge pull request #2259 from Georgetown-University-Libraries/ds4075
[DS-4075] correct command line usage for solr-upgrade-statistics-6x
2018-11-08 13:52:57 -06:00
Raf Ponsaerts
b37d0e2167 Applied community feedback 2018-11-08 14:28:58 +01:00
Terry Brady
68dca061b0 correct usage 2018-11-07 15:20:36 -08:00
Tim Donohue
af305d154a Merge pull request #1810 from Georgetown-University-Libraries/ds3602m
[DS-3602] Incremental Update of Legacy Id fields in Solr Statistics
2018-11-07 16:07:41 -06:00
Raf Ponsaerts
445e42ccc2 Merge branch 'w2p-57104_csv-import-error' into w2p-57104_csv-import-delete-functionality 2018-11-06 15:30:20 +01:00
Raf Ponsaerts
bfd0bd7362 [Task 57104] adding delete functionality for the csv import 2018-11-06 15:30:13 +01:00
Raf Ponsaerts
d8ced6aa7d Made sure that the relation.X name is always added to the item for every relationship that it has 2018-11-06 11:34:50 +01:00
Raf Ponsaerts
d90f4e63f5 [Task 56183] added the additional relationshiptype endpoint on the entitytype 2018-11-05 14:02:44 +01:00
Raf Ponsaerts
b81593c41c [Task 57104] added support for multiple relation import 2018-11-05 11:43:46 +01:00
Raf Ponsaerts
75358b2bdd Reverted the changes to the DSpaceCSVTest, bulkedit.cfg and thumbnail size in dspace.cfg 2018-11-05 10:51:08 +01:00
Raf Ponsaerts
0ee618385b [Task 56182] Added the endpoint to search across an items relationships by a label of the relationshiptype 2018-11-05 09:25:56 +01:00
Oliver Goldschmidt
53e548e4a9 remove OpenSearch path from config as its not configurable any more 2018-11-02 16:09:31 +01:00
Terry Brady
91f779aa8c handle shard corrupt multivals 2018-11-01 17:34:30 -07:00
Tim Donohue
218fdcbaf0 Merge pull request #2207 from tomdesair/Authentication_X-Forwarded-For
DS-4074: Only use X-Forwarded-For value from known proxies
2018-11-01 14:55:51 -05:00
Terry Brady
defa4671d8 more checkstyle fix 2018-11-01 10:39:40 -07:00
Bill Tantzen
8ec4780625 DS-4050 Search method returns 204 NoContent or 200 with an empty page if no result. 2018-11-01 12:31:16 -05:00
Terry Brady
a6276da8b0 checkstyle fixes 2018-11-01 10:13:20 -07:00
Terry Brady
ed94b9ce9e Update dspace/config/launcher.xml
upgrade launcher labels
2018-11-01 09:04:18 -07:00
Terry Brady
fa00fec49f Merge pull request #14 from Georgetown-University-Libraries/ds3602m1
Add string "-unmigrated" to ids that cannot be mapped
2018-10-31 16:20:22 -07:00
Terry Brady
fed22f30bf add unmigrated 2018-10-31 16:10:53 -07:00
Terry Brady
30c522f896 Merge pull request #13 from Georgetown-University-Libraries/ds3602m1
Remove DSpace Mig from Query, clarify command name
2018-10-31 15:50:19 -07:00
Terry Brady
b9b383bb05 rem comment 2018-10-31 15:47:14 -07:00
Terry Brady
3255206212 simplify not queries 2018-10-31 15:09:17 -07:00
Terry Brady
6c989433e1 try new query 2018-10-31 15:03:51 -07:00
Tim Donohue
74149ba247 Fix checkstyle failure (after rebase) 2018-10-31 15:29:34 -05:00
Terry Brady
9d5b59b46f Merge branch 'master' into ds3602m 2018-10-31 13:05:39 -07:00
Tim Donohue
9fee00445e Merge branch 'master' into Authentication_X-Forwarded-For 2018-10-31 14:55:53 -05:00
Tim Donohue
1f15bb874e Merge pull request #2206 from atmire/DS-4010_query-parameter-on-discover-endpoint-bug
[DS-4010] Removed the escaping on the query parameter for the discove…
2018-10-31 14:13:45 -05:00
Raf Ponsaerts
9e99c911c6 Added information into the exception message 2018-10-31 15:28:33 +01:00
Raf Ponsaerts
b5c3af6aa5 CSV Import fixes 2018-10-31 13:41:36 +01:00
Raf Ponsaerts
3c10296d0c [Task 57063] made the REST URL configurable instead of relying on the request.getUrl method to return the correct information 2018-10-31 10:17:48 +01:00
Tom Desair
b622781f5d DS-3542: Added unit tests for ClientInfoServiceImpl 2018-10-29 23:02:34 +01:00
Tim Donohue
f984cd17c1 Merge pull request #2249 from tdonohue/statistics_schema_uuid
Fix DS-4066 by update all IDs to string type in Solr Statistics schema
2018-10-29 16:31:29 -05:00
Tim Donohue
b283d5d9e4 Fix DS-4066 by update all IDs to string type in schema 2018-10-29 17:07:54 +00:00
Oliver Goldschmidt
0a9f5efcdc adds some tests 2018-10-29 13:53:51 +01:00
Oliver Goldschmidt
c08fb4af1d removes wrong line from comment 2018-10-29 13:53:20 +01:00
Oliver Goldschmidt
110f6c2a8d ignore test instead of having it commented out 2018-10-29 09:31:33 +01:00
Mark H. Wood
003831f4f6 Merge pull request #2247 from mwoodiupui/DS-3433
[DS-3433] Don't scare the admin. when an email Session is not found in JNDI
2018-10-26 12:08:07 -04:00
Raf Ponsaerts
eb0ea9a6bf Added relevant JavaDocs to public methods in altered classes 2018-10-26 08:48:33 +02:00
Tim Donohue
0c6c9afbd4 Merge pull request #2235 from tdonohue/dependency-cleanup
DS-4041: Update to Servlet Spec version 3.1.0 in all dependencies
2018-10-25 15:02:51 -05:00
Mark H. Wood
9c242087a7 [DS-3433] Silence exceptions when named Session not found or there is no JNDI initial context. 2018-10-25 15:34:21 -04:00
Tim Donohue
d5e22ec1af Merge pull request #2167 from mwoodiupui/DS-3970
[DS-3970] Unused, nonexistent configuration property referenced in confusing startup message
2018-10-25 12:18:58 -05:00
Raf Ponsaerts
af94859404 Added JavaDoc to public methods in new classes where necessary 2018-10-25 14:55:21 +02:00
Raf Ponsaerts
031642ddc1 Made relation.* searchable again 2018-10-24 15:24:03 +02:00
Raf Ponsaerts
b0216cb918 Test fixes and checkstyle fixes 2018-10-24 14:12:23 +02:00
Raf Ponsaerts
f223f1c067 DSpace 7 Entities 2018-10-24 10:24:09 +02:00
Tim Donohue
bd9bd233b7 Merge pull request #2239 from 4Science/inputform-rows
DS-3937 Add support for styling and rows in the submission-forms.xml
2018-10-23 11:49:33 -05:00
Tim Donohue
cb1a35a524 Merge pull request #2243 from mwoodiupui/DS-4031-7x
[DS-4031] Updated link to DRIVER guidelines -- 7_x.
2018-10-18 11:43:59 -05:00
Mark H. Wood
992c775058 [DS-4031] Updated link to DRIVER guidelines. 2018-10-18 09:41:13 -04:00
Andrea Bollini
e92852faca Merge pull request #2215 from mspalti/repositorypatch
DS-4021: Updated patch operations for Item repository and added patch endpoints for EPerson.
2018-10-18 11:28:31 +02:00
Pablo Prieto
819a42b69e Fixed Integration Tests 2018-10-17 23:32:39 -05:00
Terry Brady
826babb48e Merge pull request #2214 from terrywbrady/ds4012
[DS-4012] Support Multiple Dockerfiles in one branch
2018-10-17 11:29:57 -07:00
Andrea Bollini
d55189a4f2 Add javadoc to the matcher class 2018-10-17 16:58:04 +02:00
Tim Donohue
499f496d62 Merge branch 'dependency-cleanup' of github.com:tdonohue/DSpace into dependency-cleanup 2018-10-17 09:54:56 -05:00
Tim Donohue
6dc6102325 Update all web.xml files to use Servlet 3.1. Requires minor reorg in older webapps. 2018-10-17 09:53:46 -05:00
Andrea Bollini
8b0db601b0 Improved javadoc about new submission conf concepts 2018-10-17 16:50:41 +02:00
Michael W Spalti
f9861ec5ca [DS-4021] Corrected minor typo in integration test. 2018-10-15 13:22:43 -07:00
Michael W Spalti
f890f1705c [DS-4021] Updated integration tests.
Merge branch 'repositorypatch' of https://github.com/mspalti/DSpace into repositorypatch
2018-10-15 12:43:11 -07:00
Oliver Goldschmidt
b702582fb2 removes unnecessary import 2018-10-15 17:04:27 +02:00
Oliver Goldschmidt
fa3af00e4d removes unnecessary init method 2018-10-12 16:55:00 +02:00
Tim Donohue
0d59219ead Merge pull request #2232 from antzsch/ds4032-create-eperson-group
Add the ability to create EPerson Group via REST.
2018-10-12 09:47:59 -05:00
Oliver Goldschmidt
d421942321 fixes style issue 2018-10-12 10:10:13 +02:00
Oliver Goldschmidt
c7cde57c3a removing unnecessary settings in test configuration 2018-10-12 09:38:57 +02:00
Oliver Goldschmidt
0c6690aa82 cleaning up 2018-10-12 09:36:15 +02:00
Andrea Bollini
5b43bebf17 Merge pull request #2238 from tantz001/DS-3916
/api/config/submissiondefinitions/traditional/collections should return empty list rather than 204 [was#2189]
2018-10-12 00:34:05 +02:00
Michael W Spalti
837814b596 [DS-4021] Added a bit of IOC that helps to assure consistent checks before applying patch replace operations. 2018-10-11 14:54:29 -07:00
Andrea Bollini
3c0c4565df Merge pull request #2228 from ppmdo/DS-4024
Create top level community via REST [DS-4024]
2018-10-11 23:22:55 +02:00
Bill Tantzen
e2608f79bf return null/204 when endpoints return null (or empty list) and a single item is requested; return empty list/200 when endpoints return null (or empty list) and an array of items is requested. 2018-10-11 11:05:35 -05:00
Tim Donohue
d6d7a620c2 Merge pull request #2187 from 4Science/DS-3580_workspaceitem
DS-3850 Create new submissions from files or identifiers
2018-10-11 08:59:27 -05:00
Bill Tantzen
e64101a5e9 modified two additional ITs reflecting the changes to RestResourceController 2018-10-11 07:41:56 -05:00
Oliver Goldschmidt
ac788aacee fixes style issues in tests 2018-10-11 09:57:54 +02:00
Tim Donohue
4652bb8cab Dependency fixes for OAI-PMH using Servlet API 3.1 2018-10-10 18:32:18 +00:00
Michael W Spalti
ed8f245e7d [DS-4021] Replace patch operations on a non-existent value now result in a PatchBadRequestException.
Added missing license headers.

Added FIXME.
2018-10-10 10:38:01 -07:00
Andrea Bollini
d794c20385 DS-3937 remove unused methods, improve javadoc and testing 2018-10-10 19:29:40 +02:00
Bill Tantzen
77f4b9db6e minor format changes 2018-10-10 11:18:03 -05:00
Bill Tantzen
2f1f45f8a8 /api/config/submissiondefinitions/traditional/collections should return empty list rather than 204 #2189 2018-10-10 11:09:28 -05:00
Terry Brady
4c5b82c95a review comments 2018-10-10 08:28:02 -07:00
Oliver Goldschmidt
50490370d9 introduces tests for OpenSearchController 2018-10-10 16:38:43 +02:00
Andrea Bollini
e58870eb8f Merge branch 'DS-3580_workspaceitem' of https://github.com/4Science/DSpace into inputform-rows 2018-10-10 11:45:02 +02:00
Andrea Bollini
b6a35ebaf7 DS-3580 simplify the interface retrieving the filename from the multipartfile upload
Add additional Javadoc
Better align the interface with the Angular implementation
2018-10-10 11:35:36 +02:00
Michael W Spalti
7e4194b3a4 [DS-4021] Replace patch operations on a non-existent value now result in a PatchBadRequestException.
Added missing license headers.
2018-10-09 15:18:23 -07:00
Michael W Spalti
a9bf1d869d [DS-4021] Patch processing now operates on the rest model and commits changes after successful completion of all patch operations.
Also added new integration tests.

Minor changes to error handling and comments.

[DS-4021] Updated tests and javadocs.

Also updated the string comparison in EPersonRestRespository that triggers the update of the netid after a patch operation is complete.
2018-10-09 11:04:34 -07:00
Stefan
0f0066b0c0 Spilt the createAndRunTest() method in several methods in dependcy of the context what they test and code cleanup. 2018-10-09 19:04:58 +02:00
Andrea Bollini
dc51e4c059 Merge branch 'DS-3580_workspaceitem' of https://github.com/4Science/DSpace into inputform-rows 2018-10-09 19:02:27 +02:00
Pablo Prieto
a2e7069d1c Fixed missing @Test on ITs
Modified CommunityMatcher to use the generic CommunityMetadataMatcher
2018-10-08 23:19:53 -05:00
Pablo Prieto
486b1fb41d Added POST method on Communities endpoint to create a Top-Level Community
Wrote integration tests for admin, anonymous and normal eperson use cases
2018-10-08 23:09:04 -05:00
Andrea Bollini
e4874ae356 Merge branch 'master' of https://github.com/DSpace/DSpace into workspace-IT 2018-10-08 23:20:38 +02:00
Andrea Bollini
2458b5d621 DS-3850 ITs for metadata update, file upload, file update 2018-10-08 22:30:22 +02:00
Andrea Bollini
89ebd2c154 Make LicenseOperation more client friendly 2018-10-08 22:29:31 +02:00
Tim Donohue
3fd7cc903d Fix dependency convergence errors with OAI and SWORDv2 2018-10-08 20:07:44 +00:00
Tim Donohue
d3ee089d2e Update our DummyHttpServletRequest to Servlet Spec 3.1.0 2018-10-08 12:40:07 -05:00
Tim Donohue
447bea2921 Update to using Servlet API spec 3.1.0 in all modules 2018-10-08 17:11:37 +00:00
Tim Donohue
754915b8aa Remove duplicate dependency in dspace-api 2018-10-08 17:01:55 +00:00
Andrea Bollini
4a0b636b3d DS-3850 add ITs for create, bulkcreate, metadata patch 2018-10-07 22:23:40 +02:00
Andrea Bollini
2d2afd886c Set the status when the errors information are available 2018-10-07 22:21:17 +02:00
Andrea Bollini
951d039830 Fix bulk creation via file upload 2018-10-07 22:20:45 +02:00
Andrea Bollini
1bb1fd44a4 Fix javadoc misunderstanding 2018-10-06 21:02:53 +02:00
Andrea Bollini
a8863fd6a0 Add missing method to support bulk creation of objects via file upload 2018-10-06 13:08:58 +02:00
Andrea Bollini
9e85421ab4 Add javadocs 2018-10-06 13:06:47 +02:00
Andrea Bollini
c466d10c6a DS-3850 Integration Test for workspaceitem endpoint (find and delete methods)
Add predictable order to the workflowitem find query (by workspaceItemId instead than item uuid)
2018-10-05 22:36:50 +02:00
Stefan
79b950c8e4 Restrict the endpoint with an @PreAuthorize annotation 2018-10-05 18:28:29 +02:00
Stefan
f432568b31 Cleaning up the code and implement more test cases for the group creation. 2018-10-05 15:29:16 +02:00
Stefan
cc7bcf6007 Add the ability to create EPerson Group via REST. 2018-10-05 12:30:19 +02:00
Pablo Prieto
40ca9f6150 Added URL parameter parsing for Browse Endpoint 2018-10-05 00:21:49 -05:00
Pablo Prieto
267677a023 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3904 2018-10-03 21:01:34 -05:00
Mark H. Wood
8db86e12f8 [DS-4032] Replace 'Boolean' with 'boolean' to avoid NPE. 2018-10-02 14:20:29 -04:00
Michael W Spalti
ef8b0c642d [DS-4021] This commit includes code formatting and comment changes.
Also a few minor modifications to patch operations.

Minor code format changes.

Final code formatting changes for EPersonRestRepositoryIT.
2018-10-02 11:02:51 -07:00
Tim Donohue
a3437d4217 Merge pull request #2188 from atmire/DS-3991_HAL-browser-download
[DS-3991] made sure that the halbrowser now correctly downloads files
2018-10-02 10:04:57 -05:00
Michael W Spalti
1f091bd6bd DS-4021 Reintroduce abstract and implementation classes for patch operations.
Prior to this commit, the factory implementations used only path and value, ignoring the operation name. This commit reintroduces default implementations operations (add, move, remove, replace) and working implementations for eperson and item replace operations. The factory methods are now designed to be used specifically for replace operations. As needed, new factory methods can be added.
2018-10-01 23:16:05 -07:00
Raf Ponsaerts
aacb7b0ee3 [DS-3991] changed the default name of a downloaded file to content in the client.js 2018-10-02 08:09:02 +02:00
Michael W Spalti
ca697e8064 [DS-4021] Added patch method for EPerson.
Implements patch operations for password, canLogin, requireCertificate and netid. Includes integration tests.
2018-10-01 14:04:59 -07:00
Oliver Goldschmidt
f9bfd5ed6d Merge branch 'master' of https://github.com/DSpace/DSpace into dspace7_opensearch 2018-10-01 15:37:29 +02:00
Raf Ponsaerts
7e1ca49bcf [DS-4010] fixed test case 2018-10-01 15:15:31 +02:00
Raf Ponsaerts
06b4e5d12a [DS-4010] added IT tests for the query functionality on the discover endpoint 2018-10-01 13:59:29 +02:00
Michael W Spalti
d51493a1a3 Rolling back indentation changes in ItemRestRepositoryIT.
Reverting indentation changes in ItemRestRepositoryIT.

More updates to indentation.

Corrected line length errors in ItemRestRepositoryIT.

Final formatting updates for ItemRestRepositoryIT.
2018-09-27 18:40:59 -07:00
Michael W Spalti
65c7bbb6f6 Updated respository patch classes and ItemRestRepository. 2018-09-27 13:01:23 -07:00
Terry Brady
0b991a4d13 Create default and test image variants 2018-09-27 07:15:14 -07:00
Terry Brady
e0d10d7eec support mult dockerfiles per branch 2018-09-26 14:34:53 -07:00
Tom Desair
bd464e03f5 DS-3542: Only trust X-Forwared-For headers from trusted proxies 2018-09-26 22:13:03 +02:00
Raf Ponsaerts
47dc9482c6 [DS-4010] added IT test for the discoverQuery with a query parameter containing dc.date.issued 2018-09-25 14:14:51 +02:00
Raf Ponsaerts
df5816dff9 Revert "Revert "[DS-4010] added a catch for the search error and throw illegalarguement instead so that the exception handling picks it up easily and returns a proper error response with headers included""
This reverts commit ea42765849.
2018-09-21 15:25:24 +02:00
Raf Ponsaerts
ea42765849 Revert "[DS-4010] added a catch for the search error and throw illegalarguement instead so that the exception handling picks it up easily and returns a proper error response with headers included"
This reverts commit b192552888.
2018-09-21 14:38:55 +02:00
Raf Ponsaerts
b192552888 [DS-4010] added a catch for the search error and throw illegalarguement instead so that the exception handling picks it up easily and returns a proper error response with headers included 2018-09-21 14:07:01 +02:00
Raf Ponsaerts
aa4f3bb60b [Task 55655] set the status to Bad Request if the query entered wasn't valid and the searchservice threw an exception 2018-09-21 13:20:02 +02:00
Raf Ponsaerts
26a55312b3 [DS-4010] Fixed the tests 2018-09-18 08:49:38 +02:00
Raf Ponsaerts
a73b980955 [DS-4010] removed the comments that don't represent the code anymore 2018-09-17 16:50:01 +02:00
Tim Donohue
b0e076ddb1 Merge pull request #2205 from AlexanderS/DS-3664-master
[DS-3664] ImageMagick: Only execute "identify" on first page
2018-09-17 09:40:29 -05:00
Raf Ponsaerts
b3abd7743c [DS-4010] Removed the escaping on the query parameter for the discover endpoint 2018-09-17 15:58:11 +02:00
Alexander Sulfrian
4f53075317 ImageMagick: Only execute "identify" on first page
The Info object used to get the color format runs "identify" on the supplied
input file. If the file has many pages, this process might require some time.
"identify" supports the same syntax for the input file like the other
ImageMagick tools and we can simply restrict the pages by changing the input
file name.

This fixes DS-3664.
2018-09-17 15:10:33 +02:00
Andrea Bollini
7aed10c1b1 DS-3937 Add support for styling and rows in the submission-forms.xml 2018-09-11 20:45:08 +02:00
Mark H. Wood
0340cd73ad [DS-3990] Add simple unit test. 2018-09-09 17:19:39 -04:00
Mark H. Wood
43d01f283f [DS-3990] Dummy task to test properties and parameters. 2018-09-09 12:40:49 -04:00
Tim Donohue
705e0fabbd Merge pull request #2111 from atmire/DS-3741-hibernate-deprecation-fix-applied-feedback
DS-3741 hibernate deprecation fix applied feedback
2018-09-06 14:28:40 -05:00
Terry Brady
d4dbd3894a fix exist/doesn't exist 2018-09-06 11:23:56 -07:00
Raf Ponsaerts
0c58803a44 [DS-3741] restored the findByMetadataQuery method in a slightly altered version 2018-09-06 14:46:22 +02:00
Mark H. Wood
2c47e9b149 [DS-3990] Satisfy Checkstyle (tested this time)-: 2018-09-06 08:44:06 -04:00
Mark H. Wood
af27fde95b [DS-3990] Satisfy Checkstyle. 2018-09-06 08:42:13 -04:00
Mark H. Wood
e980811d4e [DS-3990] CLI access to task run parameters. 2018-09-06 07:01:46 -04:00
Raf Ponsaerts
349eebb834 [DS-3991] removed the xmlui content disposition threshold property 2018-08-30 07:55:59 +02:00
Raf Ponsaerts
287dce21fc [DS-3991] altered the disposition rules in the BitstreamContentRestController and MultiPartFileSender 2018-08-30 07:55:59 +02:00
Raf Ponsaerts
c56c1d38ef [DS-3991] made sure that the halbrowser now correctly downloads files through the bitstreamcontent repository 2018-08-30 07:55:10 +02:00
Mark H. Wood
173b7f4fce [DS-3990] Invent curation run parameters. 2018-08-28 10:46:00 -04:00
Luigi Andrea Pascarelli
25e3a69b8f DS-3851 Configurable Workflow endpoints 2018-08-27 20:20:24 +02:00
Luigi Andrea Pascarelli
c0066d2a2f DS-3850 Create new submissions from files or identifiers 2018-08-26 10:42:14 +02:00
Tim Donohue
66b89a786d Merge pull request #1976 from atmire/DS-3542_Spring-permission-evaluator
DS-3542 Spring security authorizations 2
2018-08-23 14:26:30 -05:00
Tim Donohue
d43aba5131 Merge pull request #2179 from 4Science/DS-3905_2
DS-3905 Implement a generic uuid lookup endpoint (DSpaceObjectService based)
2018-08-23 12:29:45 -05:00
Raf Ponsaerts
928ae19d1d Applied the feedback 2018-08-23 14:41:54 +02:00
Raf Ponsaerts
02fb1f4077 [DS-3741] removed unecessary import in comments and removed unused parameter of method 2018-08-23 14:41:54 +02:00
Raf Ponsaerts
154177db49 [DS-3741] fixed limit-offset switch in method call 2018-08-23 14:41:54 +02:00
Raf Ponsaerts
d0889f858c [DS-3741] fixed checkstyle 2018-08-23 14:41:54 +02:00
Raf Ponsaerts
ae53acfcb7 [DS-3741] Fixed findByMetadataQuery in ItemDAOImpl 2018-08-23 14:41:54 +02:00
Raf Ponsaerts
07a76d394b [DS-3741] added documentation to the AbstractHibernateDAO class 2018-08-23 14:41:53 +02:00
Raf Ponsaerts
b95a55d3d0 Applied the community feedback regarding the PR 2018-08-23 14:41:53 +02:00
Raf Ponsaerts
a12c22a767 Removed a bunch of unnecessary code in comments 2018-08-23 14:41:53 +02:00
Raf Ponsaerts
a33f5de0df [DS 3741] fixed checkstyle in DAOImpl classes 2018-08-23 14:41:53 +02:00
Tom Desair
db0a898c42 DS-3741: Added dspace-api/target/generated-sources/annotations to Coveralls source directories 2018-08-23 14:41:12 +02:00
Raf Ponsaerts
0491247c6d [DS-3741] fixes after cherry-picking 2018-08-23 14:41:12 +02:00
Raf Ponsaerts
1745640bbc [DS-3741] fixed wrong and/or usage and wrote the last query" 2018-08-23 14:40:32 +02:00
Raf Ponsaerts
877b84fda6 [DS-3741] fixed the two resultTransformer queries 2018-08-23 14:40:09 +02:00
Raf Ponsaerts
6f5b9cddc6 [DS-3741] cleaned up code in comments 2018-08-23 14:40:08 +02:00
Raf Ponsaerts
7385ce5b04 [DS-3741] All DSpace test cases succeed, 3 DAO functions left unwritten 2018-08-23 14:39:24 +02:00
Tom Desair
e69ebcfe82 DS-3741: Changed setTimestamp to setParameter + added subquery example 2018-08-23 14:38:58 +02:00
Raf Ponsaerts
e16857ce9e [DS-3741] fixes after cherry-pick 2018-08-23 14:38:58 +02:00
Andrea Bollini
ccb81d5091 Use the RestModel getTypePlural convenient method 2018-08-22 22:23:33 +02:00
Andrea Bollini
7c691d8086 Add addition test to cover the residual DSpaceObject types 2018-08-22 21:26:18 +02:00
Andrea Bollini
23f4ebc6c2 Move to a DSpaceService lookup strategy (DBMS) 2018-08-22 21:25:55 +02:00
Tom Desair
cad1b5a10e DS-3542: Fixes after rebase 2018-08-22 15:49:33 +02:00
Tom Desair
798264c001 DS-3542: Restore DSpaceRestRepository methods with authorizations checking 2018-08-22 14:34:44 +02:00
Tom Desair
5d257f4423 DS-3542: Correct DSO Admin level check 2018-08-22 14:34:44 +02:00
Tom Desair
93bac51ead DS-3542: Added custom DSpace AuthenticationEntryPoint in order to return 401 status 2018-08-22 14:34:43 +02:00
Tom Desair
44a0f9b2de DS-3542: Renamed EPERSON Spring security grant to AUTHENTICATED 2018-08-22 14:34:43 +02:00
Tom Desair
0dede9eacb DS-3542: Spring Authorization - @Preauthorization 2018-08-22 14:34:33 +02:00
Yana De Pauw
302c877d21 DS-3542: Spring Authorization - @Preauthorization 2018-08-22 14:32:40 +02:00
frederic
295d6d6ba1 DS-3542: Spring permission evaluator for REST API 2018-08-22 14:03:26 +02:00
Tim Donohue
238ede5f9d Merge pull request #2010 from mohideen/patch-1
DS-3885. Minor fix on CommunityServiceImpl.java
2018-08-21 15:57:25 -05:00
Pablo Prieto
c0f31e889f CheckStyle Fixes 2018-08-17 16:01:49 -05:00
Pablo Prieto
cd94bbd0ee Checkstyle errors fixed
Added ITs for startsWith + Scope
2018-08-17 12:15:42 -05:00
Andrea Bollini
14338cc183 DS-3905 Implement a generic uuid lookup endpoint
Refactor common code from the IdentifierRestController in a generic DSpaceObject converter
Added ITs
Add handling of standard Spring Bind exception to conform with REST return code (422) usage
2018-08-17 12:20:34 +02:00
Pablo Prieto
c02a5aa778 Wrote Integration Tests 2018-08-16 18:55:50 -05:00
Pablo Prieto
de29b6af46 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3904 2018-08-16 15:17:19 -05:00
Tim Donohue
3f7e2363c7 Merge pull request #2126 from 4Science/DS-3735
DS-3735 DS-3924 DS-3737 Implement CREATE, DELETE and some search methods for the EPersons endpoint
2018-08-16 15:07:25 -05:00
Pablo Prieto
322460827c Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3904 2018-08-16 00:40:29 -05:00
Pablo Prieto
e25a732e6b Implemented startsWith for Items 2018-08-16 00:35:19 -05:00
Pablo Prieto
cbaad2e714 Implemented method for Browser Entries 2018-08-13 16:52:04 -05:00
Mark H. Wood
7bb8a8e9c4 [DS-3980] Conform to coding standard. 2018-08-13 15:23:18 -04:00
Mark H. Wood
81b41a2b78 [DS-3980] Replace absurd MIME types with 'application/octet-stream'. 2018-08-13 14:42:56 -04:00
Mark H. Wood
07c7fee64f [DS-3970] Remove confusing log message. 2018-08-13 12:55:13 -04:00
Andrea Bollini
0361ed77a5 Use better variable name and remove not thrown exception declaration 2018-08-11 10:08:58 +02:00
Tim Donohue
e65f94da0c Merge pull request #2135 from terrywbradyC9/dockerMaster
[DS-3967] 7x - Migrate Dockerfile to DSpace/DSpace
2018-08-10 09:51:50 -05:00
Tim Donohue
cb3b4d20cd Merge pull request #2163 from atmire/DS-3489_Search-REST-endpoint-Angular-alignment-rebased-on-master
DS-3489: search rest endpoint angular alignment rebased on master
2018-08-09 16:09:35 -05:00
Tim Donohue
063219add8 Merge pull request #2108 from ppmdo/DS-3910
DS-3910 Delete method on item endpoint
2018-08-09 11:03:39 -05:00
Raf Ponsaerts
6dbe089861 [DS-3489] fixed tests and travis failure 2018-08-09 10:22:26 +02:00
Raf Ponsaerts
587a807bec Removed facetLimit checks in the facetEntryMatcher since this is configurable and should never be hardcoded in tests 2018-08-09 10:22:26 +02:00
Raf Ponsaerts
a979392150 [DS-3489] editted the facet limit to be better handable for Angular 2018-08-09 10:22:26 +02:00
Raf Ponsaerts
db6c9faf83 Fixed rebase conflits 2018-08-09 10:22:06 +02:00
Pablo Prieto
84c123a547 Changed createTemplateItem to collection.withTemplateItem() to keep code coherency.
Applied changes to ItemRestRepositoryIT to work using withTemplateItem
2018-08-07 18:21:42 -05:00
Pablo Prieto
a25a046ffa Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3910 2018-08-07 17:46:10 -05:00
Tim Donohue
544536ccef Merge pull request #2158 from Georgetown-University-Libraries/ds3795m
[DS-3795] Manage versions of some buggy transitive dependencies. (for master)
2018-08-07 12:48:43 -05:00
Tim Donohue
ac1ea060ef Merge duplicate dependencies up in Parent POM 2018-08-07 16:48:32 +00:00
Tim Donohue
d5b0b8b43a Merge pull request #2159 from tdonohue/ds3993-master
DS-3933 Updated Pubmed endpoints from http:// to https:// (for master)
2018-08-07 11:35:24 -05:00
Hendrik Geßner
dac12e1233 DS-3933 Updated Pubmed endpoints from http:// to https://. 2018-08-07 15:32:29 +00:00
Tim Donohue
500b2648a1 Merge pull request #2156 from Georgetown-University-Libraries/ds3700m
DS-3700: MediaFilterServiceImpl forgot to close an input stream (for master)
2018-08-07 10:25:12 -05:00
Tim Donohue
99aa4e0cfb Fix dependency convergence issues in new REST API. Add in a few missing changes. 2018-08-07 15:18:23 +00:00
Terry Brady
97a1180f6b fix ver override 2018-08-06 15:45:55 -07:00
Terry Brady
4a604488a7 fix migration/copy errs 2018-08-06 15:35:14 -07:00
Terry Brady
cc6bf1a343 Merge branch 'master' into ds3795m 2018-08-06 15:02:21 -07:00
Terry Brady
19172012b4 port pr2082 2018-08-06 15:00:02 -07:00
Tim Donohue
b159aa901a Merge pull request #2157 from Georgetown-University-Libraries/ds3629m
Ds 3629 listing of all groups misses pagination - XMLUI (for master)
2018-08-06 16:44:48 -05:00
Tim Donohue
a85228bd24 Merge pull request #2059 from MW3000/DS-3693-port-to-master-add-plugin-to-index-filenames-and-file-descriptions-for-files-in-ORIGINAL-bundle
[DS-3693] Port pull request #1838 to master
2018-08-06 16:42:35 -05:00
Tim Donohue
90d0bbccee Merge pull request #2144 from Georgetown-University-Libraries/ds3377m
[DS-3377] Solr queries too long (change search GET requests to POST) (for master)
2018-08-06 16:36:45 -05:00
Tim Donohue
2760c95099 Merge pull request #2155 from Georgetown-University-Libraries/ds3768m
DS-3768 Fixes the harvest solr parse error by (for master)
2018-08-06 16:24:44 -05:00
Tim Donohue
643f0fcde7 Merge pull request #2154 from Georgetown-University-Libraries/ds3310m
[DS-3310] Fix authentication problem in SwordV2 implementation (for master)
2018-08-06 16:19:34 -05:00
Tim Donohue
950c97bf6e Merge pull request #2153 from Georgetown-University-Libraries/ds3856m
DS-3856 - foreignkey-constraint community2community_child_comm_id_fkey (for master)
2018-08-06 16:15:09 -05:00
Tim Donohue
c038d76ced Merge pull request #2151 from Georgetown-University-Libraries/ds3822m
[DS-3822] Don't guess XML structure during ingest (for master)
2018-08-06 16:12:09 -05:00
Tim Donohue
ea9efd7fa3 Merge pull request #2152 from Georgetown-University-Libraries/ds3707m
DS-3707, DS-3715: Fixes to item level embargo/privacy in OAI-PMH (for master)
2018-08-06 16:09:45 -05:00
Tim Donohue
cbd5980368 Merge pull request #2150 from Georgetown-University-Libraries/ds3769m
DS-3769 Set the right hibernate property of … (for master)
2018-08-06 15:48:56 -05:00
Tim Donohue
3c4d5042fb Add in a single missing METHOD.POST 2018-08-06 20:46:20 +00:00
Tim Donohue
74f47de1e2 Add in missing javadocs. Revert small, accidental change. 2018-08-06 20:43:41 +00:00
Terry Brady
1b68a02dd7 Merge branch 'master' into DS-3693-port-to-master-add-plugin-to-index-filenames-and-file-descriptions-for-files-in-ORIGINAL-bundle 2018-08-06 13:23:52 -07:00
Terry Brady
79709ef76a port PR1864 2018-08-06 13:13:23 -07:00
Tim Donohue
21b628a792 Merge pull request #2149 from Georgetown-University-Libraries/ds3702m
DS-3702 & DS-3703: Rebuild the old behavior of bitstreams during vers… (for master)
2018-08-06 15:13:07 -05:00
Terry Brady
c4cf5b3c8d Merge pull request #2054 from tdonohue/DS-3447-ORCID-v2-master-port
DS-3447: ORCID v2 integration (port to master from PR#2039)
2018-08-06 13:08:31 -07:00
Tim Donohue
49947808a2 Merge pull request #2148 from Georgetown-University-Libraries/ds3680m
DS-3681: Refactoring of DSpaceAuthorityIndexer (for master)
2018-08-06 15:00:56 -05:00
Tim Donohue
8bf8a9fa69 Merge pull request #2147 from Georgetown-University-Libraries/ds3616m
DS-3616] Fix nested vocabulary search (master)
2018-08-06 14:51:28 -05:00
Tim Donohue
527dd1f64a Merge pull request #2146 from Georgetown-University-Libraries/ds3522m
DS-3522: Ensure Submission Policies are removed in XMLWorkflow (for master)
2018-08-06 14:46:16 -05:00
Tim Donohue
794dbfd550 Merge pull request #2145 from Georgetown-University-Libraries/ds3498m
DS-3498 quick fix. Disable full text snippets in search results & add warning (for master)
2018-08-06 14:43:12 -05:00
Tim Donohue
64493d24ca Merge pull request #2143 from Georgetown-University-Libraries/ds3332m
[DS-3332] Handle resolver is hardcoded in org.dspace.handle.UpdateHandlePrefix (for master)
2018-08-06 14:23:23 -05:00
Tim Donohue
c65755653b Merge pull request #2142 from Georgetown-University-Libraries/ds2675m
DS-2675: Bugfixing: Jump to value general errors with order (for master)
2018-08-06 14:14:27 -05:00
Terry Brady
f159c70d1c modify method signature 2018-08-06 12:09:56 -07:00
Terry Brady
1ab41bb4d1 checkstyle fix 2018-08-06 12:06:01 -07:00
Terry Brady
b9a7204420 port 1848 to master 2018-08-06 12:02:05 -07:00
Terry Brady
5437f7f8b9 port pr1890 minus jspui 2018-08-06 11:43:45 -07:00
Terry Brady
d396cf3490 checkstyle fix 2018-08-06 11:37:25 -07:00
Terry Brady
0b33907f5e port pr 1910 2018-08-06 11:33:49 -07:00
Terry Brady
0ced11c0af port pr1973 2018-08-06 11:25:22 -07:00
Terry Brady
33edc9530e checkstyle fix 2018-08-06 11:07:58 -07:00
Terry Brady
06ca8809e1 port PR 1867 2018-08-06 10:17:52 -07:00
Terry Brady
15d100050c port 1941 2018-08-03 23:28:33 -07:00
Terry Brady
ebb738e3e2 port pr1891 2018-08-03 23:24:06 -07:00
Terry Brady
9747d051a5 fix checkstyle 2018-08-03 23:18:18 -07:00
Terry Brady
7af1958d7e port pr1883 2018-08-03 23:12:38 -07:00
Terry Brady
fe648a678e port pr1835 2018-08-03 22:57:27 -07:00
Terry Brady
dfd0250ac1 port pr1770 2018-08-03 22:27:32 -07:00
Terry Brady
32399ac00b port pr 1779 2018-08-03 22:23:07 -07:00
Terry Brady
9bcaa07bce checkstyle fix 2018-08-03 22:16:53 -07:00
Terry Brady
c1590ce15e port pr2069 2018-08-03 17:53:03 -07:00
Terry Brady
220c8a5a48 checkstyle fix 2018-08-03 17:47:31 -07:00
Terry Brady
58855cd632 port pr2045 2018-08-03 17:40:56 -07:00
Terry Brady
77d67537f7 port pr1839 minus xmlui 2018-08-03 17:15:23 -07:00
Terry Brady
3eaaa5bb96 port pr1730 minus xmlui 2018-08-03 16:50:22 -07:00
Pablo Prieto
cb7c2519a3 Merge branch 'DS-3910' of https://github.com/ppmdo/DSpace into DS-3910 2018-08-03 16:56:06 -05:00
Pablo Prieto
ef67916563 Added JavaDoc for createTemplateItem 2018-08-03 16:54:56 -05:00
Tim Donohue
3eb16056c6 Merge pull request #2109 from atmire/DS-3489_Search-REST-query-filter-operator-and-facet-prefix
DS-3489: Search API query filter operator and facet prefix
2018-08-03 15:20:52 -05:00
Pablo
c076c99686 Merge branch 'master' into DS-3910 2018-08-02 11:15:11 -05:00
Terry Brady
5ba8bdd42b usage comment for docker local.cfg 2018-08-01 19:03:09 -07:00
Terry Brady
8f61b926bc move Dockerfile 2018-08-01 15:59:31 -07:00
Oliver Goldschmidt
b00bae2c23 improves error display for disabled opensearch and invalid format 2018-08-01 11:13:13 +02:00
Raf Ponsaerts
5b717bfa35 [DS-3489] added and finalized javadocs 2018-07-27 13:11:16 +02:00
Terry Brady
308dbe95e2 add usage 2018-07-25 17:58:15 -07:00
Terry Brady
27545eb088 DSpace 7 Docker migrate 2018-07-25 16:49:06 -07:00
Mark H. Wood
628c1250c2 Merge pull request #2031 from mwoodiupui/DS-3895
[DS-3895] Bitstream size can't be referenced in HQL queries
2018-07-25 11:54:08 -04:00
Oliver Goldschmidt
f3bdbe43cf support enable/disable of OpenSearch module from config file 2018-07-23 10:53:50 +02:00
Oliver Goldschmidt
d903daadce turn on opensearch in local.cfg, adopts new URL path in default configuration 2018-07-23 10:17:18 +02:00
Oliver Goldschmidt
be02e510e2 Merge branch 'master' of https://github.com/DSpace/DSpace into dspace7_opensearch 2018-07-20 19:35:41 +02:00
Oliver Goldschmidt
38f094caa8 adds rpp and start parameter 2018-07-20 19:28:46 +02:00
Raf Ponsaerts
bfac8d1d4b [DS-3489] adding javadocs and addressed a few issues 2018-07-19 15:50:40 +02:00
Oliver Goldschmidt
26d6ca9bac adds first draft of OpenSearchContoller 2018-07-19 12:05:19 +02:00
Andrea Bollini
92845557ff Provide javadoc for public and reusable methods 2018-07-19 12:01:05 +02:00
Andrea Bollini
9214ffa732 Create EPerson (draft) 2018-07-19 11:16:58 +02:00
Andrea Bollini
38a6e7ad9b Implement the delete eperson method 2018-07-19 11:16:58 +02:00
Andrea Bollini
9f2ca2633f IT for delete eperson 2018-07-19 11:16:58 +02:00
Andrea Bollini
ac342b4819 Implement the search methods 2018-07-19 11:16:58 +02:00
Andrea Bollini
a2569fe905 Declare eperson search methods mandatory parameters 2018-07-19 11:16:58 +02:00
Andrea Bollini
e248893e2f Add eperson search methods 2018-07-19 11:16:58 +02:00
Andrea Bollini
353eed6f60 Add IT for eperson search methods 2018-07-19 11:16:58 +02:00
Andrea Bollini
f807cc38a3 Fix authz issue on epersons endpoint 2018-07-19 11:16:58 +02:00
Andrea Bollini
516d6af6f4 Highlight authz issue on epersons endpoint 2018-07-19 11:16:50 +02:00
Pablo Prieto
e55846b212 Minor changes based on review. 2018-07-18 11:41:03 -05:00
Tim Donohue
8fb56be144 Merge pull request #1931 from atmire/DS-3782_upgrade-commons-collections-to-version-4
DS-3782 upgrade commons collections to version 4
2018-07-18 11:01:18 -05:00
Tim Donohue
2ede483e2b Add comment to POM about v3 dependency 2018-07-18 10:34:14 -05:00
Tom Desair
5a9edd1b70 DS-3782: Compilation error 2018-07-18 17:12:04 +02:00
Tom Desair
de33709364 DS-3782: Restore lines that should not be modified 2018-07-18 16:44:41 +02:00
Raf Ponsaerts
8ffbec58ca [DS-3782] Upgrade Commons Collections to version 4 2018-07-18 15:53:11 +02:00
Oliver Goldschmidt
eefb535214 setting DSpace classes to debug mode by default 2018-07-18 10:30:16 +02:00
Andrea Bollini
eb2b4184ef Merge pull request #2064 from mspalti/DS-3909
DS-3909: Adding withdraw, reinstate, and isDiscoverable support to item repository.
2018-07-18 00:01:05 +02:00
Andrea Bollini
c8a08e4bb9 Code clean & include test about authz issues 2018-07-17 19:33:57 +02:00
Andrea Bollini
6b78459b68 Avoid to hide the internal exceptions 2018-07-17 19:32:44 +02:00
Andrea Bollini
7328d49962 Introduce support for withdrawn in ItemBuilder 2018-07-17 19:31:41 +02:00
Andrea Bollini
bf9d63c363 Merge branch 'master' of https://github.com/DSpace/DSpace into DS-3909 2018-07-17 17:29:55 +02:00
Mark H. Wood
ee71a93a53 [DS-3953] Expose list of metadata namespace files as configuration. 2018-07-13 12:42:44 -04:00
Pablo Prieto
23c2f1a7ca Style corrections 2018-07-12 15:50:22 -05:00
Pablo Prieto
6eb2829b4a Amend 2018-07-12 13:28:20 -05:00
Pablo Prieto
005535fcbf Revert "Removed local configurations"
This reverts commit 71347a3faf.
2018-07-12 13:13:52 -05:00
Pablo Prieto
b38aa1723c Merge branch 'DS-3910' of https://github.com/ppmdo/DSpace into DS-3910 2018-07-12 12:55:36 -05:00
Pablo Prieto
71347a3faf Removed local configurations 2018-07-12 12:54:29 -05:00
Pablo Prieto
7b6ce941df Moved createTemplateItem method to CollectionBuilder class.
Correction: WorkspaceItemBuilder extends AbstractBuiilder
2018-07-12 12:46:46 -05:00
Tim Donohue
25a83f3b3f Merge pull request #2025 from 4Science/DS-3892
DS-3892 add the findBySchema name method
2018-07-12 08:58:10 -05:00
Tim Donohue
82de7bb125 Merge pull request #2107 from KingKrimmson/DS-3939-master
DS-3939 OAI-Harvester, skip item and continue if handle is missing
2018-07-09 09:56:21 -05:00
Tom Desair
91218ed36c DS-3489: Fixing tests after rebase part 2 2018-07-04 14:22:09 +02:00
Pablo Prieto
9ab8904bf2 WorskspaceItemBuilder amend 2018-07-02 16:25:36 -05:00
Chris Herron
ddbe928cd3 DS-3939 OAI-Harvester, skip item and continue if handle is missing 2018-07-02 12:45:57 -04:00
Tom Desair
ad1a3310f0 DS-3489: Fixing tests after rebase part 1 2018-07-02 17:31:02 +02:00
Pablo Prieto
fe2030d024 Working Implementation
Wrote additional integration tests
Created WorkspaceItemBuilder
2018-06-29 16:51:11 -05:00
Tom Desair
3dc2024265 DS-3489: Fix test 2018-06-29 17:18:31 +02:00
Tom Desair
4acde3df79 DS-3489: Integration test for facet prefix 2018-06-29 17:01:26 +02:00
Raf Ponsaerts
db0a3cd756 [DS-3489] finished implementing the search query filter operator. Also fixed a not equals issue in standard dspace 2018-06-29 16:42:52 +02:00
Tom Desair
4d0382766c DS-3489: Add support for facet prefix 2018-06-29 16:35:03 +02:00
Raf Ponsaerts
b805baddf5 [DS-3489] currently have most of the functionality, need to export the enum to xml still 2018-06-29 16:34:17 +02:00
Raf Ponsaerts
e98af34e21 [DS-3489] currently have most of the functionality, need to export the enum to xml still 2018-06-29 16:31:22 +02:00
Pablo Prieto
a487fb7d58 Working method to DELETE on /api/core/items
Wrote integration tests
2018-06-28 19:12:24 -05:00
Terry Brady
06ed982031 Merge pull request #1974 from atmire/DS-3819_Return-303-when-Shibboleth-redirect-is-needed
DS-3819: Return HTTP redirect when login URL is supported
2018-06-28 09:57:42 -06:00
Tom Desair
a921a86422 DS-3819: Test fixes 2018-06-28 14:46:02 +02:00
Yana De Pauw
5a1202222f DS-3819: Add button for authentication method with location parameter when multiple authentication methods are present 2018-06-28 13:21:58 +02:00
Tom Desair
55f5571e1d [DS-3819] Revert back to 401 status and move login URL to WWW-Authenticate header 2018-06-28 13:21:57 +02:00
Tom Desair
93549cab24 DS-3819: Correct response code and added Shibboleth Special Groups test 2018-06-28 13:21:54 +02:00
Tom Desair
ecce5fe9b2 DS-3819: Return HTTP redirect when login URL is supported 2018-06-28 13:21:09 +02:00
Pablo Prieto
3a51c7a962 Added method 2018-06-27 19:03:25 -05:00
Andrea Bollini
7d03da0fea DS-3892 refactor common code and align IT class name with our convention 2018-06-22 09:52:04 +02:00
Andrea Bollini
43eda56269 Merge pull request #2077 from 4Science/DS-3838
DS-3838 return 204 for successful logout
2018-06-21 16:56:17 +02:00
Andrea Bollini
f00d31e370 Align comment with the actual code/expectation 2018-06-21 16:05:36 +02:00
Andrea Bollini
b15a0027b7 Merge pull request #2073 from 4Science/minor-fixes
DS-3923 manage null return in Search Methods
2018-06-21 15:51:43 +02:00
Michael W Spalti
52401d0719 [DS-3909] Implements ItemRepository patch method for withdrawal and discoverable (using a proposed helper class).
[DS-3909] Added base class and item implementation for patch requests.

[DS-3090] Added new Spring component for the ItemPatch implementation and autowired it into ItemRestRepository.

[DS-3909] Added new exception for item operation path and corrected a few exception messages.

[DS-3909] Modified integration tests and test builders.

[DS-3909] Integration tests for withdraw and reinstate would not complete without adding REMOVE, ADD, and WRITE permissions to the collection and item mocks.  New builder methods added to set permissions.

[DS-3909] Some cleanup in integration test builder methods.

[DS-3090] Removed unused imports.

[DS-3909] Corrections to patch operation paths and values.

[DS-3909] Updates to exceptions and code documentation.

[DS-3090] Added test for missing value in withdrawal request.

[D-3909] Added exception for missing boolean value in discoverable operations.

[DS-3909] Corrected formatting error.

[DS-3909] Changed default error response for operation processing in AbstractResourcePatch to PatchBadRequestException.

[DS-3909] Code comments and javadoc.

[DS-3909] Minor changes to method visibility and documentation.

[DS-3909] Added copy operation to mirror JsonPatchConverter and change visibility of the sub-class replace method.

[DS-3909] Updating PR change requests.

[DS-3909] Minor corrections to ItemPatch.

[3909] Javadoc updates.

[DS-3909] Removed test code that is not necessary when tests are ran as admin user.

Also added ResourceNotFoundException to controller patch method.

[DS-3909] Minor formating correction.

[DS-3909] Removed unused field from ItemBuilder.
2018-06-16 14:43:51 -07:00
Andrea Bollini
40fc109c7c DS-3838 return 204 for successful logout 2018-06-09 21:29:22 +02:00
Andrea Bollini
d5d2fe0e68 Complete ITs and implementation 2018-06-09 18:06:04 +02:00
Andrea Bollini
18046604a7 Improve support for Parameter in search methods 2018-06-09 18:05:04 +02:00
Andrea Bollini
bc2d9e0706 Fix findBySchema implementation for undefined schema 2018-06-09 16:34:24 +02:00
Andrea Bollini
7f68244c4e Add test for search methods 2018-06-09 16:34:24 +02:00
Andrea Bollini
6b74ef5544 Add priority to force cleanup in a specfic order 2018-06-09 16:34:24 +02:00
Andrea Bollini
a87baf6edb Fix checkstyle issues 2018-06-09 16:34:24 +02:00
Andrea Bollini
7e6d1a58ec DS-3892 add the findBySchema name method 2018-06-09 16:34:23 +02:00
Andrea Bollini
6af5349e74 DS-3923 manage null return in Search Methods 2018-06-01 07:13:08 +02:00
Andrea Bollini
af758212f7 Cleanup license header 2018-06-01 07:13:08 +02:00
Andrea Bollini
a6c1113165 Exclude rebel.xml configuration from license:check 2018-05-31 21:11:51 +02:00
Andrea Bollini
27ee3a13f0 Fix NPE when a valid JWT related to a deleted eperson is presented 2018-05-31 21:11:51 +02:00
Andrea Bollini
7157c43bc1 Fix admin eperson in test 2018-05-31 21:11:36 +02:00
Michael W Spalti
416fc80010 [DS-3909] Corrects UUID bug in RestResourceController. 2018-05-30 13:35:41 -07:00
Raf Ponsaerts
d1f8c56be5 Fixed a bug which caused the query OR without quotes to crash 2018-05-18 11:56:11 +02:00
Martin Walk
388858de14 Adapt integration tests to added search filters 2018-05-15 10:43:06 +02:00
Tim Donohue
e6d5254eff Temporary POM exclusion to avoid dependency conflict 2018-05-14 16:39:15 -05:00
Raf Ponsaerts
5c7e5ee4e2 Added the tests for the facet min/max values on the search/xx endpoint 2018-05-14 16:18:55 +02:00
Martin Walk
e29b72d228 Trigger Travis build 2018-05-14 15:06:07 +02:00
Martin Walk
5970b3ccfa Please the Checkstyle plugin 2018-05-14 14:41:58 +02:00
Martin Walk
5f52704ce5 Try to please the Checkstyle plugin :) 2018-05-14 14:18:21 +02:00
Raf Ponsaerts
7acaa69c95 Implemented the expose min-max on the facets in the search/xx endpoints 2018-05-14 13:50:15 +02:00
Martin Walk
3b62f4de86 Port pull request #1838 to master 2018-05-14 13:48:17 +02:00
Raf Ponsaerts
6b57003e34 Working on the min-max facet implementation 2018-05-14 08:29:52 +02:00
Tim Donohue
032a76ddb8 DS-3447: ORCID v2 integration (port to master from PR#2039) 2018-05-10 16:38:10 -05:00
Tom Desair
e62d63f343 DS-3489: Fix bugs to address test failures 2018-04-30 11:53:51 +02:00
Tom Desair
f2e2d01560 DS-3489: Improvements on /search/discover/facets 2018-04-30 11:53:36 +02:00
Tom Desair
b0e7994520 DS-3489: Fix search result object pagination links 2018-04-30 11:53:36 +02:00
Raf Ponsaerts
bc581e64e0 [DS-3489] updated the /api/discover/search endpoint to be more compatible with angular's expectations 2018-04-30 11:53:27 +02:00
Raf Ponsaerts
519f0a812c [DS-3489] added the facetLimit property to the buildFacetQueries for dates, reversed the order of the returned list to show the oldest pair first 2018-04-30 11:48:00 +02:00
Raf Ponsaerts
e36ded0244 [DS-3489] updated the /api/discover/search endpoint to be more compatible with angular's expectations 2018-04-30 11:47:59 +02:00
Mark H. Wood
24575d8ba1 [DS-3895] Rename Bitstream.getSize() to getSizeBytes(). 2018-04-23 13:29:31 -04:00
Mohamed Mohideen Abdul Rasheed
6d1b695ca5 Minor fix on CommunityServiceImpl.java
Update methods should call clearModified.
2018-03-29 15:46:02 -04:00
Terry W Brady
287cc56476 Port 6x to 7x 2017-07-14 09:46:23 -07:00
1826 changed files with 108089 additions and 37557 deletions

11
.dockerignore Normal file
View File

@@ -0,0 +1,11 @@
.git/
.idea/
.settings/
*/target/
dspace/modules/*/target/
Dockerfile.*
dspace/src/main/docker/dspace-postgres-pgcrypto
dspace/src/main/docker/dspace-postgres-pgcrypto-curl
dspace/src/main/docker/solr
dspace/src/main/docker/README.md
dspace/src/main/docker-compose/

2
.gitignore vendored
View File

@@ -41,4 +41,4 @@ nb-configuration.xml
.DS_Store
##Ignore JRebel project configuration
rebel.xml
rebel.xml

View File

@@ -1,14 +1,15 @@
language: java
sudo: false
dist: trusty
env:
env:
# Give Maven 1GB of memory to work with
- MAVEN_OPTS=-Xmx1024M
jdk:
# DS-3384 Oracle JDK 8 has DocLint enabled by default.
# DS-3384 Oracle JDK has DocLint enabled by default.
# Let's use this to catch any newly introduced DocLint issues.
- oraclejdk8
- oraclejdk11
## Should we run into any problems with oraclejdk8 on Travis, we may try the following workaround.
## https://docs.travis-ci.com/user/languages/java#Testing-Against-Multiple-JDKs
@@ -18,7 +19,6 @@ jdk:
# packages:
# - oracle-java8-installer
# Install prerequisites for building Mirage2 more rapidly
before_install:
# Remove outdated settings.xml from Travis builds. Workaround for https://github.com/travis-ci/travis-ci/issues/4629
- rm ~/.m2/settings.xml
@@ -26,19 +26,21 @@ before_install:
# Skip install stage, as we'll do it below
install: "echo 'Skipping install stage, dependencies will be downloaded during build and test stages.'"
# Two stage Build and Test
# 1. Install & Unit Test APIs
# 2. Assemble DSpace
# Build DSpace and run both Unit and Integration Tests
script:
# 1. [Install & Unit Test] Check source code licenses and run source code Unit Tests
# license:check => Validate all source code license headers
# -Dmaven.test.skip=false => Enable DSpace Unit Tests
# -DskipITs=false => Enable DSpace Integration Tests
# -P !assembly => Skip normal assembly (as it can be memory intensive)
# -B => Maven batch/non-interactive mode (recommended for CI)
# -V => Display Maven version info before build
# -Dsurefire.rerunFailingTestsCount=2 => try again for flakey tests, and keep track of/report on number of retries
- "mvn clean install license:check -Dmaven.test.skip=false -DskipITs=false -P !assembly -B -V -Dsurefire.rerunFailingTestsCount=2"
# 2. [Assemble DSpace] Ensure overlay & assembly process works (from [src]/dspace/)
# -P !assembly => SKIP the actual building of [src]/dspace/dspace-installer (as it can be memory intensive)
- "cd dspace && mvn package -P !assembly -B -V -Dsurefire.rerunFailingTestsCount=2"
# Summary of flags used (below):
# license:check => Validate all source code license headers
# -Dmaven.test.skip=false => Enable DSpace Unit Tests
# -DskipITs=false => Enable DSpace Integration Tests
# -Pdspace-rest => Enable optional dspace-rest module as part of build
# -P !assembly => Skip assembly of "dspace-installer" directory (as it can be memory intensive)
# -B => Maven batch/non-interactive mode (recommended for CI)
# -V => Display Maven version info before build
# -Dsurefire.rerunFailingTestsCount=2 => try again for flakey tests, and keep track of/report on number of retries
- "mvn clean install license:check -Dmaven.test.skip=false -DskipITs=false -Pdspace-rest -P !assembly -B -V -Dsurefire.rerunFailingTestsCount=2"
# After a successful build and test (see 'script'), send code coverage reports to coveralls.io
# These code coverage reports are generated by jacoco-maven-plugin (during test process above).
after_success:
# Run "verify", enabling the "coveralls" profile. This sends our reports to coveralls.io (see coveralls-maven-plugin)
- "cd dspace && mvn verify -P coveralls"

63
Dockerfile Normal file
View File

@@ -0,0 +1,63 @@
# This image will be published as dspace/dspace
# See https://github.com/DSpace/DSpace/tree/master/dspace/src/main/docker for usage details
#
# This version is JDK11 compatible
# - tomcat:8-jdk11
# - ANT 1.10.7
# - maven:3-jdk-11 (see dspace-dependencies)
# - note: default tag for branch: dspace/dspace: dspace/dspace:dspace-7_x
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-install directory will be written to /install
RUN mkdir /install \
&& chown -Rv dspace: /install \
&& chown -Rv dspace: /app
USER dspace
# Copy the DSpace source code into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
COPY dspace/src/main/docker/local.cfg /app/local.cfg
# Build DSpace (note: this build doesn't include the optional, deprecated "dspace-rest" webapp)
# Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
RUN mvn package && \
mv /app/dspace/target/${TARGET_DIR}/* /install && \
mvn clean
# Step 2 - Run Ant Deploy
FROM tomcat:8-jdk11 as ant_build
ARG TARGET_DIR=dspace-installer
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.7
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
RUN ant init_installation update_configs update_code update_webapps
# Step 3 - Run tomcat
# Create a new tomcat image that does not retain the the build directory contents
FROM tomcat:8-jdk11
ENV DSPACE_INSTALL=/dspace
COPY --from=ant_build /dspace $DSPACE_INSTALL
EXPOSE 8080 8009
ENV JAVA_OPTS=-Xmx2000m
# Run the "server" webapp off the /server path (e.g. http://localhost:8080/server/)
RUN ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/server
# If you wish to run "server" webapp off the ROOT path, then comment out the above RUN, and uncomment the below RUN.
# You also MUST update the URL in dspace/src/main/docker/local.cfg
# Please note that server webapp should only run on one path at a time.
#RUN mv /usr/local/tomcat/webapps/ROOT /usr/local/tomcat/webapps/ROOT.bk && \
# ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/ROOT

53
Dockerfile.cli Normal file
View File

@@ -0,0 +1,53 @@
# This image will be published as dspace/dspace-cli
# See https://github.com/DSpace/DSpace/tree/master/dspace/src/main/docker for usage details
#
# This version is JDK11 compatible
# - openjdk:11
# - ANT 1.10.7
# - maven:3-jdk-11 (see dspace-dependencies)
# - note: default tag for branch: dspace/dspace-cli: dspace/dspace-cli:dspace-7_x
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-install directory will be written to /install
RUN mkdir /install \
&& chown -Rv dspace: /install \
&& chown -Rv dspace: /app
USER dspace
# Copy the DSpace source code into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
COPY dspace/src/main/docker/local.cfg /app/local.cfg
# Build DSpace. Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
RUN mvn package && \
mv /app/dspace/target/${TARGET_DIR}/* /install && \
mvn clean
# Step 2 - Run Ant Deploy
FROM openjdk:11 as ant_build
ARG TARGET_DIR=dspace-installer
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.7
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
RUN ant init_installation update_configs update_code
# Step 3 - Run jdk
# Create a new tomcat image that does not retain the the build directory contents
FROM openjdk:11
ENV DSPACE_INSTALL=/dspace
COPY --from=ant_build /dspace $DSPACE_INSTALL
ENV JAVA_OPTS=-Xmx1000m

27
Dockerfile.dependencies Normal file
View File

@@ -0,0 +1,27 @@
# This image will be published as dspace/dspace-dependencies
# The purpose of this image is to make the build for dspace/dspace run faster
#
# This version is JDK11 compatible
# - maven:3-jdk-11
# Step 1 - Run Maven Build
FROM maven:3-jdk-11 as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
RUN useradd dspace \
&& mkdir /home/dspace \
&& chown -Rv dspace: /home/dspace
USER dspace
# Copy the DSpace source code into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
COPY dspace/src/main/docker/local.cfg /app/local.cfg
# Trigger the installation of all maven dependencies
RUN mvn package
# Clear the contents of the /app directory (including all maven builds), so no artifacts remain.
# This ensures when dspace:dspace is built, it will just the Maven local cache (.m2) for dependencies
USER root
RUN rm -rf /app/*

72
Dockerfile.test Normal file
View File

@@ -0,0 +1,72 @@
# This image will be published as dspace/dspace
# See https://github.com/DSpace/DSpace/tree/master/dspace/src/main/docker for usage details
#
# This version is JDK11 compatible
# - tomcat:8-jdk11
# - ANT 1.10.7
# - maven:3-jdk-11 (see dspace-dependencies)
# - note: default tag for branch: dspace/dspace: dspace/dspace:dspace-7_x-test
#
# This image is meant for TESTING/DEVELOPMENT ONLY as it deploys the old v6 REST API under HTTP (not HTTPS)
# Step 1 - Run Maven Build
FROM dspace/dspace-dependencies:dspace-7_x as build
ARG TARGET_DIR=dspace-installer
WORKDIR /app
# The dspace-install directory will be written to /install
RUN mkdir /install \
&& chown -Rv dspace: /install \
&& chown -Rv dspace: /app
USER dspace
# Copy the DSpace source code into the workdir (excluding .dockerignore contents)
ADD --chown=dspace . /app/
COPY dspace/src/main/docker/local.cfg /app/local.cfg
# Build DSpace (including the optional, deprecated "dspace-rest" webapp)
# Copy the dspace-install directory to /install. Clean up the build to keep the docker image small
RUN mvn package -Pdspace-rest && \
mv /app/dspace/target/${TARGET_DIR}/* /install && \
mvn clean
# Step 2 - Run Ant Deploy
FROM tomcat:8-jdk11 as ant_build
ARG TARGET_DIR=dspace-installer
COPY --from=build /install /dspace-src
WORKDIR /dspace-src
# Create the initial install deployment using ANT
ENV ANT_VERSION 1.10.7
ENV ANT_HOME /tmp/ant-$ANT_VERSION
ENV PATH $ANT_HOME/bin:$PATH
RUN mkdir $ANT_HOME && \
wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME
RUN ant init_installation update_configs update_code update_webapps
# Step 3 - Run tomcat
# Create a new tomcat image that does not retain the the build directory contents
FROM tomcat:8-jdk11
ENV DSPACE_INSTALL=/dspace
COPY --from=ant_build /dspace $DSPACE_INSTALL
EXPOSE 8080 8009
ENV JAVA_OPTS=-Xmx2000m
# Run the "server" webapp off the /server path (e.g. http://localhost:8080/server/)
# and the v6.x (deprecated) REST API off the "/rest" path
RUN ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/server && \
ln -s $DSPACE_INSTALL/webapps/rest /usr/local/tomcat/webapps/rest
# If you wish to run "server" webapp off the ROOT path, then comment out the above RUN, and uncomment the below RUN.
# You also MUST update the URL in dspace/src/main/docker/local.cfg
# Please note that server webapp should only run on one path at a time.
#RUN mv /usr/local/tomcat/webapps/ROOT /usr/local/tomcat/webapps/ROOT.bk && \
# ln -s $DSPACE_INSTALL/webapps/server /usr/local/tomcat/webapps/ROOT && \
# ln -s $DSPACE_INSTALL/webapps/rest /usr/local/tomcat/webapps/rest
# Overwrite the v6.x (deprecated) REST API's web.xml, so that we can run it on HTTP (defaults to requiring HTTPS)
COPY dspace/src/main/docker/test/rest_web.xml $DSPACE_INSTALL/webapps/rest/WEB-INF/web.xml
RUN sed -i -e "s|\${dspace.dir}|$DSPACE_INSTALL|" $DSPACE_INSTALL/webapps/rest/WEB-INF/web.xml

View File

@@ -366,7 +366,6 @@ https://wiki.duraspace.org/display/DSPACE/Code+Contribution+Guidelines
* FindBugs-Annotations (com.google.code.findbugs:annotations:3.0.1u2 - http://findbugs.sourceforge.net/)
* MaxMind GeoIP Legacy API (com.maxmind.geoip:geoip-api:1.3.0 - https://github.com/maxmind/geoip-api-java)
* JHighlight (com.uwyn:jhighlight:1.0 - https://jhighlight.dev.java.net/)
* DSpace TM-Extractors Dependency (org.dspace.dependencies:dspace-tm-extractors:1.0.1 - http://projects.dspace.org/dspace-pom/dspace-tm-extractors)
* A Hibernate O/RM Module (org.hibernate:hibernate-core:4.2.21.Final - http://hibernate.org)
* A Hibernate O/RM Module (org.hibernate:hibernate-ehcache:4.2.21.Final - http://hibernate.org)
* Hibernate Commons Annotations (org.hibernate.common:hibernate-commons-annotations:4.0.2.Final - http://hibernate.org)

View File

@@ -3,21 +3,21 @@
[![Build Status](https://travis-ci.org/DSpace/DSpace.png?branch=master)](https://travis-ci.org/DSpace/DSpace)
[DSpace Documentation](https://wiki.duraspace.org/display/DSDOC/) |
[DSpace Documentation](https://wiki.duraspace.org/display/DSDOC/) |
[DSpace Releases](https://github.com/DSpace/DSpace/releases) |
[DSpace Wiki](https://wiki.duraspace.org/display/DSPACE/Home) |
[DSpace Wiki](https://wiki.duraspace.org/display/DSPACE/Home) |
[Support](https://wiki.duraspace.org/display/DSPACE/Support)
DSpace open source software is a turnkey repository application used by more than
DSpace open source software is a turnkey repository application used by more than
2,000 organizations and institutions worldwide to provide durable access to digital resources.
For more information, visit http://www.dspace.org/
***
:warning: **Work on DSpace 7 has begun on our `master` branch.** This means that there is temporarily NO user interface on this `master` branch. DSpace 7 will feature a new, unified [Angular](https://angular.io/) user interface, along with an enhanced, rebuilt REST API. The latest status of this work can be found on the [DSpace 7 UI Working Group](https://wiki.duraspace.org/display/DSPACE/DSpace+7+UI+Working+Group) page. Additionally, the codebases can be found in the following places:
* DSpace 7 REST API work is occurring on the [`master` branch](https://github.com/DSpace/DSpace/tree/master/dspace-spring-rest) of this repository.
* DSpace 7 REST API work is occurring on the [`master` branch](https://github.com/DSpace/DSpace/tree/master/dspace-server-webapp) of this repository.
* The REST Contract is being documented at https://github.com/DSpace/Rest7Contract
* DSpace 7 Angular UI work is occurring at https://github.com/DSpace/dspace-angular
**If you would like to get involved in our DSpace 7 development effort, we welcome new contributors.** Just join one of our meetings or get in touch via Slack. See the [DSpace 7 UI Working Group](https://wiki.duraspace.org/display/DSPACE/DSpace+7+UI+Working+Group) wiki page for more info.
**If you are looking for the ongoing maintenance work for DSpace 6 (or prior releases)**, you can find that work on the corresponding maintenance branch (e.g. [`dspace-6_x`](https://github.com/DSpace/DSpace/tree/dspace-6_x)) in this repository.
@@ -31,18 +31,21 @@ Past releases are all available via GitHub at https://github.com/DSpace/DSpace/r
## Documentation / Installation
Documentation for each release may be viewed online or downloaded via our [Documentation Wiki](https://wiki.duraspace.org/display/DSDOC/).
Documentation for each release may be viewed online or downloaded via our [Documentation Wiki](https://wiki.duraspace.org/display/DSDOC/).
The latest DSpace Installation instructions are available at:
https://wiki.duraspace.org/display/DSDOC6x/Installing+DSpace
Please be aware that, as a Java web application, DSpace requires a database (PostgreSQL or Oracle)
Please be aware that, as a Java web application, DSpace requires a database (PostgreSQL or Oracle)
and a servlet container (usually Tomcat) in order to function.
More information about these and all other prerequisites can be found in the Installation instructions above.
## Running DSpace 7 in Docker
See [Running DSpace 7 with Docker Compose](dspace/src/main/docker-compose/README.md)
## Contributing
DSpace is a community built and supported project. We do not have a centralized development or support team,
DSpace is a community built and supported project. We do not have a centralized development or support team,
but have a dedicated group of volunteers who help us improve the software, documentation, resources, etc.
We welcome contributions of any type. Here's a few basic guides that provide suggestions for contributing to DSpace:
@@ -68,14 +71,65 @@ Great Q&A is also available under the [DSpace tag on Stackoverflow](http://stack
Additional support options are listed at https://wiki.duraspace.org/display/DSPACE/Support
DSpace also has an active service provider network. If you'd rather hire a service provider to
install, upgrade, customize or host DSpace, then we recommend getting in touch with one of our
DSpace also has an active service provider network. If you'd rather hire a service provider to
install, upgrade, customize or host DSpace, then we recommend getting in touch with one of our
[Registered Service Providers](http://www.dspace.org/service-providers).
## Issue Tracker
The DSpace Issue Tracker can be found at: https://jira.duraspace.org/projects/DS/summary
## Testing
### Running Tests
By default, in DSpace, Unit Tests and Integration Tests are disabled. However, they are
run automatically by [Travis CI](https://travis-ci.org/DSpace/DSpace/) for all Pull Requests and code commits.
* How to run both Unit Tests (via `maven-surefire-plugin`) and Integration Tests (via `maven-failsafe-plugin`):
```
# NOTE: while "mvn test" runs Unit Tests,
# Integration Tests only run for "verify" or "install" phases
mvn clean install -Dmaven.test.skip=false -DskipITs=false
```
* How to run just Unit Tests:
```
mvn clean test -Dmaven.test.skip=false
```
* How to run a *single* Unit Test
```
# Run all tests in a specific test class
# NOTE: testClassName is just the class name, do not include package
mvn clean test -Dmaven.test.skip=false -Dtest=[testClassName]
# Run one test method in a specific test class
mvn clean test -Dmaven.test.skip=false -Dtest=[testClassName]#[testMethodName]
```
* How to run Integration Tests (requires running Unit tests too)
```
mvn clean verify -Dmaven.test.skip=false -DskipITs=false
```
* How to run a *single* Integration Test (requires running Unit tests too)
```
# Run all integration tests in a specific test class
# NOTE: Integration Tests only run for "verify" or "install" phases
# NOTE: testClassName is just the class name, do not include package
mvn clean verify -Dmaven.test.skip=false -DskipITs=false -Dit.test=[testClassName]
# Run one test method in a specific test class
mvn clean verify -Dmaven.test.skip=false -DskipITs=false -Dit.test=[testClassName]#[testMethodName]
```
* How to run only tests of a specific DSpace module
```
# Before you can run only one module's tests, other modules may need installing into your ~/.m2
cd [dspace-src]
mvn clean install
# Then, move into a module subdirectory, and run the test command
cd [dspace-src]/dspace-server-webapp
# Choose your test command from the lists above
```
## License
DSpace source code is freely available under a standard [BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause).

25
docker-compose-cli.yml Normal file
View File

@@ -0,0 +1,25 @@
version: "3.7"
services:
dspace-cli:
image: "${DOCKER_OWNER:-dspace}/dspace-cli:${DSPACE_VER:-dspace-7_x}"
container_name: dspace-cli
build:
context: .
dockerfile: Dockerfile.cli
#environment:
volumes:
- ./dspace/src/main/docker-compose/local.cfg:/dspace/config/local.cfg
- assetstore:/dspace/assetstore
entrypoint: /dspace/bin/dspace
command: help
networks:
- dspacenet
tty: true
stdin_open: true
volumes:
assetstore:
networks:
dspacenet:

69
docker-compose.yml Normal file
View File

@@ -0,0 +1,69 @@
version: '3.7'
networks:
dspacenet:
services:
dspace:
container_name: dspace
image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-7_x-test}"
build:
context: .
dockerfile: Dockerfile.test
depends_on:
- dspacedb
networks:
dspacenet:
ports:
- published: 8080
target: 8080
stdin_open: true
tty: true
volumes:
- assetstore:/dspace/assetstore
- ./dspace/src/main/docker-compose/local.cfg:/dspace/config/local.cfg
# Ensure that the database is ready BEFORE starting tomcat
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
# 2. Then, run database migration to init database tables
# 3. Finally, start Tomcat
entrypoint:
- /bin/bash
- '-c'
- |
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate
catalina.sh run
dspacedb:
container_name: dspacedb
environment:
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto
networks:
dspacenet:
ports:
- published: 5432
target: 5432
stdin_open: true
tty: true
volumes:
- pgdata:/pgdata
dspacesolr:
container_name: dspacesolr
image: dspace/dspace-solr
networks:
dspacenet:
ports:
- published: 8983
target: 8983
stdin_open: true
tty: true
volumes:
- solr_authority:/opt/solr/server/solr/authority/data
- solr_oai:/opt/solr/server/solr/oai/data
- solr_search:/opt/solr/server/solr/search/data
- solr_statistics:/opt/solr/server/solr/statistics/data
volumes:
assetstore:
pgdata:
solr_authority:
solr_oai:
solr_search:
solr_statistics:

View File

@@ -1,5 +1,4 @@
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-api</artifactId>
@@ -13,7 +12,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>7.0-SNAPSHOT</version>
<version>7.0-beta1</version>
<relativePath>..</relativePath>
</parent>
@@ -51,6 +50,33 @@
<configuration>
<debug>true</debug>
<showDeprecation>true</showDeprecation>
<annotationProcessorPaths>
<!-- Enable Hibernate's Metamodel Generator to generate metadata model classes
(ending in _ suffix) for more type-safe Criteria queries -->
<path>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</path>
<!-- Enable JAXB -->
<path>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</path>
<!-- Enable Commons Annotations -->
<path>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotation.version}</version>
</path>
<!-- Enable http://errorprone.info -->
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
@@ -81,8 +107,8 @@
<exclude>**/src/test/resources/**</exclude>
<exclude>**/src/test/data/**</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/src/main/resources/rebel.xml</exclude>
<exclude>src/test/data/dspaceFolder/config/spiders/**</exclude>
<exclude>src/main/java/org/apache/solr/handler/extraction/ExtractingParams.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -90,7 +116,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<version>3.0.0</version>
<executions>
<execution>
<phase>validate</phase>
@@ -158,7 +184,6 @@
install of DSpace, against which Tests can be run. -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<configuration>
<outputDirectory>${project.build.directory}/testing</outputDirectory>
<artifactItems>
@@ -193,7 +218,7 @@
(see: http://gmaven.codehaus.org/Executing+Groovy+Code )
We are generating a OS-agnostic version (agnostic.build.dir) of
the ${project.build.directory} property (full path of target dir).
This is needed by the FileWeaver & Surefire plugins (see below)
This is needed by the Surefire & Failsafe plugins (see below)
to initialize the Unit Test environment's dspace.cfg file.
Otherwise, the Unit Test Framework will not work on Windows OS.
This Groovy code was mostly borrowed from:
@@ -202,19 +227,17 @@
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>setproperty</id>
<phase>generate-test-resources
</phase> <!-- XXX I think this should be 'initialize' - MHW -->
<phase>initialize</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
project.properties['agnostic.build.dir'] = project.build.directory.replace(File.separator, '/');
println("Initializing Maven property 'agnostic.build.dir' to: " + project.properties['agnostic.build.dir']);
log.info("Initializing Maven property 'agnostic.build.dir' to: {}", project.properties['agnostic.build.dir']);
</source>
</configuration>
</execution>
@@ -227,6 +250,7 @@
<configuration>
<systemPropertyVariables>
<!-- Specify the dspace.dir to use for test environment -->
<!-- ${agnostic.build.dir} is set dynamically by groovy-maven-plugin above -->
<!-- This system property is loaded by AbstractDSpaceTest to initialize the test environment -->
<dspace.dir>${agnostic.build.dir}/testing/dspace/</dspace.dir>
<!-- Turn off any DSpace logging -->
@@ -235,51 +259,13 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>validate-ALL-xml-and-xsl</id>
<phase>process-test-resources</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
<configuration>
<validationSets>
<!-- validate ALL XML and XSL config files in the testing folder -->
<validationSet>
<dir>${agnostic.build.dir}/testing</dir>
<includes>
<include>**/*.xml</include>
<include>**/*.xsl</include>
<include>**/*.xconf</include>
</includes>
</validationSet>
<!-- validate ALL XML and XSL files throughout the project -->
<validationSet>
<dir>${root.basedir}</dir>
<includes>
<include>**/*.xml</include>
<include>**/*.xsl</include>
<include>**/*.xmap</include>
</includes>
</validationSet>
</validationSets>
</configuration>
</plugin>
<!-- Run Integration Testing! This plugin just kicks off the tests (when enabled). -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- Specify the dspace.dir to use for test environment -->
<!-- ${agnostic.build.dir} is set dynamically by groovy-maven-plugin above -->
<dspace.dir>${agnostic.build.dir}/testing/dspace/</dspace.dir>
<!-- Turn off any DSpace logging -->
<dspace.log.init.disable>true</dspace.log.init.disable>
@@ -293,25 +279,21 @@
</profiles>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>${hibernate-validator.version}</version>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
@@ -326,6 +308,16 @@
<groupId>org.dspace</groupId>
<artifactId>handle</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<exclusions>
<exclusion>
<artifactId>javax.servlet</artifactId>
<groupId>org.eclipse.jetty.orbit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>jargon</artifactId>
@@ -334,37 +326,15 @@
<groupId>org.dspace</groupId>
<artifactId>mets</artifactId>
</dependency>
<dependency>
<groupId>org.dspace.dependencies</groupId>
<artifactId>dspace-tm-extractors</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
@@ -383,8 +353,8 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -400,7 +370,7 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -417,10 +387,6 @@
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
@@ -433,18 +399,6 @@
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
@@ -464,12 +418,6 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
@@ -491,11 +439,6 @@
<groupId>org.dspace</groupId>
<artifactId>dspace-services</artifactId>
</dependency>
<dependency> <!-- Keep jmockit before junit -->
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -516,69 +459,38 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.rometools</groupId>
<artifactId>rome-modules</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>gr.ekt.bte</groupId>
<artifactId>bte-core</artifactId>
<version>0.9.3.5</version>
<exclusions>
<!-- A more recent version is retrieved from another dependency -->
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>gr.ekt.bte</groupId>
<artifactId>bte-io</artifactId>
<version>0.9.3.5</version>
<exclusions>
<!-- A more recent version is retrieved from another dependency -->
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<!-- A more recent version is retrieved from another dependency -->
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${solr.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<groupId>org.apache.solr</groupId>
<artifactId>solr-cell</artifactId>
<version>${solr.client.version}</version>
</dependency>
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
@@ -594,12 +506,6 @@
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>4.10.4</version>
</dependency>
<dependency>
<groupId>com.coverity.security</groupId>
<artifactId>coverity-escapers</artifactId>
@@ -616,7 +522,6 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
@@ -625,11 +530,6 @@
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>jdbm</groupId>
<artifactId>jdbm</artifactId>
@@ -691,19 +591,44 @@
<type>jar</type>
</dependency>
<!-- JAXB API and implementation (no longer bundled as of Java 11) -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<!-- Apache Axiom -->
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<!-- NOTE: SWORDv2 needs 1.2.14, required by Abdera: https://abdera.apache.org/ -->
<version>1.2.14</version>
<version>${axiom.version}</version>
<exclusions>
<!-- Exclude Geronimo as it is NOT necessary when using javax.activation (which we use)
See: https://ws.apache.org/axiom/userguide/ch04.html#d0e732 -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<!-- NOTE: SWORDv2 needs 1.2.14, required by Abdera: https://abdera.apache.org/ -->
<version>1.2.14</version>
<version>${axiom.version}</version>
<exclusions>
<!-- Exclude Geronimo as it is NOT necessary when using javax.activation (which we use)
See: https://ws.apache.org/axiom/userguide/ch04.html#d0e732 -->
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
@@ -714,26 +639,54 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.10.50</version>
<exclusions>
<exclusion>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- S3 also wanted jackson... -->
<!-- For ORCID v2 integration -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<groupId>org.dspace</groupId>
<artifactId>orcid-jaxb-api</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency>
<!-- Used for Solr core export/import -->
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.5</version>
</dependency>
<!-- Email templating -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-matchers</artifactId>
<version>2.6.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.4.0</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,163 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.handler.extraction;
/**
* The various Solr Parameters names to use when extracting content.
**/
public interface ExtractingParams {
/**
* Map all generated attribute names to field names with lowercase and underscores.
*/
public static final String LOWERNAMES = "lowernames";
/**
* if true, ignore TikaException (give up to extract text but index meta data)
*/
public static final String IGNORE_TIKA_EXCEPTION = "ignoreTikaException";
/**
* The param prefix for mapping Tika metadata to Solr fields.
* <p>
* To map a field, add a name like:
* <pre>fmap.title=solr.title</pre>
*
* In this example, the tika "title" metadata value will be added to a Solr field named "solr.title"
*/
public static final String MAP_PREFIX = "fmap.";
/**
* The boost value for the name of the field. The boost can be specified by a name mapping.
* <p>
* For example
* <pre>
* map.title=solr.title
* boost.solr.title=2.5
* </pre>
* will boost the solr.title field for this document by 2.5
*/
public static final String BOOST_PREFIX = "boost.";
/**
* Pass in literal values to be added to the document, as in
* <pre>
* literal.myField=Foo
* </pre>
*/
public static final String LITERALS_PREFIX = "literal.";
/**
* Restrict the extracted parts of a document to be indexed
* by passing in an XPath expression. All content that satisfies the XPath expr.
* will be passed to the {@link org.apache.solr.handler.extraction.SolrContentHandler}.
* <p>
* See Tika's docs for what the extracted document looks like.
*
* @see #CAPTURE_ELEMENTS
*/
public static final String XPATH_EXPRESSION = "xpath";
/**
* Only extract and return the content, do not index it.
*/
public static final String EXTRACT_ONLY = "extractOnly";
/**
* Content output format if extractOnly is true. Default is "xml", alternative is "text".
*/
public static final String EXTRACT_FORMAT = "extractFormat";
/**
* Capture attributes separately according to the name of the element, instead of just adding them to the string
* buffer
*/
public static final String CAPTURE_ATTRIBUTES = "captureAttr";
/**
* Literal field values will by default override other values such as metadata and content. Set this to false to
* revert to pre-4.0 behaviour
*/
public static final String LITERALS_OVERRIDE = "literalsOverride";
/**
* Capture the specified fields (and everything included below it that isn't capture by some other capture field)
* separately from the default. This is different
* then the case of passing in an XPath expression.
* <p>
* The Capture field is based on the localName returned to the
* {@link org.apache.solr.handler.extraction.SolrContentHandler}
* by Tika, not to be confused by the mapped field. The field name can then
* be mapped into the index schema.
* <p>
* For instance, a Tika document may look like:
* <pre>
* &lt;html&gt;
* ...
* &lt;body&gt;
* &lt;p&gt;some text here. &lt;div&gt;more text&lt;/div&gt;&lt;/p&gt;
* Some more text
* &lt;/body&gt;
* </pre>
* By passing in the p tag, you could capture all P tags separately from the rest of the t
* Thus, in the example, the capture of the P tag would be: "some text here. more text"
*/
public static final String CAPTURE_ELEMENTS = "capture";
/**
* The type of the stream. If not specified, Tika will use mime type detection.
*/
public static final String STREAM_TYPE = "stream.type";
/**
* Optional. The file name. If specified, Tika can take this into account while
* guessing the MIME type.
*/
public static final String RESOURCE_NAME = "resource.name";
/**
* Optional. The password for this resource. Will be used instead of the rule based password lookup mechanisms
*/
public static final String RESOURCE_PASSWORD = "resource.password";
/**
* Optional. If specified, the prefix will be prepended to all Metadata, such that it would be possible
* to setup a dynamic field to automatically capture it
*/
public static final String UNKNOWN_FIELD_PREFIX = "uprefix";
/**
* Optional. If specified and the name of a potential field cannot be determined, the default Field specified
* will be used instead.
*/
public static final String DEFAULT_FIELD = "defaultField";
/**
* Optional. If specified, loads the file as a source for password lookups for Tika encrypted documents.
* <p>
* File format is Java properties format with one key=value per line.
* The key is evaluated as a regex against the file name, and the value is the password
* The rules are evaluated top-bottom, i.e. the first match will be used
* If you want a fallback password to be always used, supply a .*=&lt;defaultmypassword&gt; at the end
*/
public static final String PASSWORD_MAP_FILE = "passwordsFile";
}

View File

@@ -17,7 +17,7 @@ import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Community;
import org.dspace.content.factory.ContentServiceFactory;
@@ -180,13 +180,9 @@ public class CommunityFiliator {
// second test - circularity: parent's parents can't include proposed
// child
List<Community> parentDads = parent.getParentCommunities();
for (int i = 0; i < parentDads.size(); i++) {
if (parentDads.get(i).getID().equals(child.getID())) {
System.out
.println("Error, circular parentage - child is parent of parent");
System.exit(1);
}
if (parentDads.contains(child)) {
System.out.println("Error, circular parentage - child is parent of parent");
System.exit(1);
}
// everthing's OK
@@ -210,26 +206,15 @@ public class CommunityFiliator {
throws SQLException, AuthorizeException, IOException {
// verify that child is indeed a child of parent
List<Community> parentKids = parent.getSubcommunities();
boolean isChild = false;
for (int i = 0; i < parentKids.size(); i++) {
if (parentKids.get(i).getID().equals(child.getID())) {
isChild = true;
break;
}
}
if (!isChild) {
System.out
.println("Error, child community not a child of parent community");
if (!parentKids.contains(child)) {
System.out.println("Error, child community not a child of parent community");
System.exit(1);
}
// OK remove the mappings - but leave the community, which will become
// top-level
child.getParentCommunities().remove(parent);
parent.getSubcommunities().remove(child);
child.removeParentCommunity(parent);
parent.removeSubCommunity(child);
communityService.update(c, child);
communityService.update(c, parent);

View File

@@ -15,7 +15,7 @@ import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.I18nUtil;

View File

@@ -21,6 +21,7 @@ import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.NonUniqueMetadataException;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.MetadataFieldService;
@@ -248,7 +249,7 @@ public class MetadataImporter {
// If the schema is not provided default to DC
if (schema == null) {
schema = MetadataSchema.DC_SCHEMA;
schema = MetadataSchemaEnum.DC.getName();
}

View File

@@ -17,7 +17,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.BitstreamFormat;
@@ -47,7 +47,7 @@ public class RegistryLoader {
/**
* log4j category
*/
private static Logger log = Logger.getLogger(RegistryLoader.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(RegistryLoader.class);
protected static BitstreamFormatService bitstreamFormatService = ContentServiceFactory.getInstance()
.getBitstreamFormatService();

View File

@@ -7,12 +7,16 @@
*/
package org.dspace.administer;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -21,12 +25,18 @@ import javax.xml.transform.TransformerException;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.cli.ParseException;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.Item;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.CommunityService;
@@ -34,6 +44,7 @@ import org.dspace.core.Context;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.jdom.Element;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -45,44 +56,51 @@ import org.xml.sax.SAXException;
* an XML file.
*
* The XML file structure needs to be:
* {@code
* <pre>{@code
* <import_structure>
* <community>
* <name>....</name>
* <community>...</community>
* <collection>
* <name>....</name>
* </collection>
* </community>
* <community>
* <name>....</name>
* <community>...</community>
* <collection>
* <name>....</name>
* </collection>
* </community>
* </import_structure>
* }
* it can be arbitrarily deep, and supports all the metadata elements
* }</pre>
* <p>
* It can be arbitrarily deep, and supports all the metadata elements
* that make up the community and collection metadata. See the system
* documentation for more details
* documentation for more details.
*
* @author Richard Jones
*/
public class StructBuilder {
/**
* the output xml document which will contain updated information about the
* imported structure
/** Name of the root element for the document to be imported. */
static final String INPUT_ROOT = "import_structure";
/*
* Name of the root element for the document produced by importing.
* Community and collection elements are annotated with their identifiers.
*/
private static org.jdom.Document xmlOutput = new org.jdom.Document(new Element("imported_structure"));
static final String RESULT_ROOT = "imported_structure";
/**
* a hashtable to hold metadata for the collection being worked on
* A table to hold metadata for the collection being worked on.
*/
private static Map<String, String> collectionMap = new HashMap<String, String>();
private static final Map<String, String> collectionMap = new HashMap<>();
/**
* a hashtable to hold metadata for the community being worked on
* A table to hold metadata for the community being worked on.
*/
private static Map<String, String> communityMap = new HashMap<String, String>();
private static final Map<String, String> communityMap = new HashMap<>();
protected static CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
protected static CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
protected static EPersonService ePersonService = EPersonServiceFactory.getInstance().getEPersonService();
protected static CommunityService communityService
= ContentServiceFactory.getInstance().getCommunityService();
protected static CollectionService collectionService
= ContentServiceFactory.getInstance().getCollectionService();
protected static EPersonService ePersonService
= EPersonServiceFactory.getInstance().getEPersonService();
/**
* Default constructor
@@ -91,63 +109,156 @@ public class StructBuilder {
/**
* Main method to be run from the command line to import a structure into
* DSpace
* DSpacee or export existing structure to a file.The command is of the form:
*
* This is of the form:
* <p>{@code StructBuilder -f [XML source] -e [administrator email] -o [output file]}
*
* {@code StructBuilder -f [xml source] -e [administrator email] -o [output file]}
* <p>to import, or
*
* The output file will contain exactly the same as the source xml document, but
* with the handle for each imported item added as an attribute.
* <p>{@code StructBuilder -x -e [administrator email] -o [output file]}</p>
*
* @param argv the command line arguments given
* @throws Exception if an error occurs
* <p>to export. The output will contain exactly the same as the source XML
* document, but with the Handle for each imported item added as an attribute.
*
*
* @param argv command line arguments.
* @throws ParserConfigurationException passed through.
* @throws SQLException passed through.
* @throws FileNotFoundException if input or output could not be opened.
* @throws TransformerException if the input document is invalid.
*/
public static void main(String[] argv)
throws Exception {
CommandLineParser parser = new PosixParser();
throws ParserConfigurationException, SQLException,
FileNotFoundException, IOException, TransformerException {
// Define command line options.
Options options = new Options();
options.addOption("f", "file", true, "file");
options.addOption("e", "eperson", true, "eperson");
options.addOption("o", "output", true, "output");
options.addOption("h", "help", false, "Print this help message.");
options.addOption("?", "help");
options.addOption("x", "export", false, "Export the current structure as XML.");
CommandLine line = parser.parse(options, argv);
options.addOption(Option.builder("e").longOpt("eperson")
.desc("User who is manipulating the repository's structure.")
.hasArg().argName("eperson").required().build());
String file = null;
String eperson = null;
String output = null;
options.addOption(Option.builder("f").longOpt("file")
.desc("File of new structure information.")
.hasArg().argName("input").build());
if (line.hasOption('f')) {
file = line.getOptionValue('f');
options.addOption(Option.builder("o").longOpt("output")
.desc("File to receive the structure map ('-' for standard out).")
.hasArg().argName("output").required().build());
// Parse the command line.
CommandLineParser parser = new DefaultParser();
CommandLine line = null;
try {
line = parser.parse(options, argv);
} catch (ParseException ex) {
System.err.println(ex.getMessage());
usage(options);
System.exit(1);
}
if (line.hasOption('e')) {
eperson = line.getOptionValue('e');
}
if (line.hasOption('o')) {
output = line.getOptionValue('o');
}
if (output == null || eperson == null || file == null) {
usage();
// If the user asked for help, give it and exit.
if (line.hasOption('h') || line.hasOption('?')) {
giveHelp(options);
System.exit(0);
}
// Otherwise, analyze the command.
// Must be import or export.
if (!(line.hasOption('f') || line.hasOption('x'))) {
giveHelp(options);
System.exit(1);
}
// Open the output stream.
String output = line.getOptionValue('o');
OutputStream outputStream;
if ("-".equals(output)) {
outputStream = System.out;
} else {
outputStream = new FileOutputStream(output);
}
// create a context
Context context = new Context();
// set the context
context.setCurrentUser(ePersonService.findByEmail(context, eperson));
// set the context.
String eperson = line.getOptionValue('e');
try {
context.setCurrentUser(ePersonService.findByEmail(context, eperson));
} catch (SQLException ex) {
System.err.format("That user could not be found: %s%n", ex.getMessage());
System.exit(1);
}
// Export? Import?
if (line.hasOption('x')) { // export
exportStructure(context, outputStream);
} else { // Must be import
String input = line.getOptionValue('f');
if (null == input) {
usage(options);
System.exit(1);
}
InputStream inputStream;
if ("-".equals(input)) {
inputStream = System.in;
} else {
inputStream = new FileInputStream(input);
}
importStructure(context, inputStream, outputStream);
// save changes from import
context.complete();
}
System.exit(0);
}
/**
* Import new Community/Collection structure.
*
* @param context
* @param input XML which describes the new communities and collections.
* @param output input, annotated with the new objects' identifiers.
* @throws IOException
* @throws ParserConfigurationException
* @throws SAXException
* @throws TransformerException
* @throws SQLException
*/
static void importStructure(Context context, InputStream input, OutputStream output)
throws IOException, ParserConfigurationException, SQLException, TransformerException {
// load the XML
Document document = loadXML(file);
Document document = null;
try {
document = loadXML(input);
} catch (IOException ex) {
System.err.format("The input document could not be read: %s%n", ex.getMessage());
System.exit(1);
} catch (SAXException ex) {
System.err.format("The input document could not be parsed: %s%n", ex.getMessage());
System.exit(1);
}
// run the preliminary validation, to be sure that the the XML document
// is properly structured
validate(document);
// is properly structured.
try {
validate(document);
} catch (TransformerException ex) {
System.err.format("The input document is invalid: %s%n", ex.getMessage());
System.exit(1);
}
// Check for 'identifier' attributes -- possibly output by this class.
NodeList identifierNodes = XPathAPI.selectNodeList(document, "//*[@identifier]");
if (identifierNodes.getLength() > 0) {
System.err.println("The input document has 'identifier' attributes, which will be ignored.");
}
// load the mappings into the member variable hashmaps
communityMap.put("name", "name");
@@ -164,62 +275,190 @@ public class StructBuilder {
collectionMap.put("license", "license");
collectionMap.put("provenance", "provenance_description");
// get the top level community list
NodeList first = XPathAPI.selectNodeList(document, "/import_structure/community");
Element[] elements = new Element[]{};
try {
// get the top level community list
NodeList first = XPathAPI.selectNodeList(document, "/import_structure/community");
// run the import starting with the top level communities
Element[] elements = handleCommunities(context, first, null);
// run the import starting with the top level communities
elements = handleCommunities(context, first, null);
} catch (TransformerException ex) {
System.err.format("Input content not understood: %s%n", ex.getMessage());
System.exit(1);
} catch (AuthorizeException ex) {
System.err.format("Not authorized: %s%n", ex.getMessage());
System.exit(1);
}
// generate the output
Element root = xmlOutput.getRootElement();
for (int i = 0; i < elements.length; i++) {
root.addContent(elements[i]);
final Element root = new Element(RESULT_ROOT);
for (Element element : elements) {
root.addContent(element);
}
// finally write the string into the output file
// finally write the string into the output file.
final org.jdom.Document xmlOutput = new org.jdom.Document(root);
try {
BufferedWriter out = new BufferedWriter(new FileWriter(output));
out.write(new XMLOutputter().outputString(xmlOutput));
out.close();
new XMLOutputter().output(xmlOutput, output);
} catch (IOException e) {
System.out.println("Unable to write to output file " + output);
System.exit(0);
System.out.printf("Unable to write to output file %s: %s%n",
output, e.getMessage());
System.exit(1);
}
}
/**
* Add a single community, and its children, to the Document.
*
* @param community
* @return a fragment representing this Community.
*/
private static Element exportACommunity(Community community) {
// Export this Community.
Element element = new Element("community");
element.setAttribute("identifier", community.getHandle());
element.addContent(new Element("name").setText(community.getName()));
element.addContent(new Element("description")
.setText(communityService.getMetadataFirstValue(community,
MetadataSchemaEnum.DC.getName(), "description", "abstract", Item.ANY)));
element.addContent(new Element("intro")
.setText(communityService.getMetadataFirstValue(community,
MetadataSchemaEnum.DC.getName(), "description", null, Item.ANY)));
element.addContent(new Element("copyright")
.setText(communityService.getMetadataFirstValue(community,
MetadataSchemaEnum.DC.getName(), "rights", null, Item.ANY)));
element.addContent(new Element("sidebar")
.setText(communityService.getMetadataFirstValue(community,
MetadataSchemaEnum.DC.getName(), "description", "tableofcontents", Item.ANY)));
// Export this Community's Community children.
for (Community subCommunity : community.getSubcommunities()) {
element.addContent(exportACommunity(subCommunity));
}
context.complete();
// Export this Community's Collection children.
for (Collection collection : community.getCollections()) {
element.addContent(exportACollection(collection));
}
return element;
}
/**
* Output the usage information
* Add a single Collection to the Document.
*
* @param collection
* @return a fragment representing this Collection.
*/
private static void usage() {
System.out.println("Usage: java StructBuilder -f <source XML file> -o <output file> -e <eperson email>");
System.out.println(
"Communities will be created from the top level, and a map of communities to handles will be returned in " +
"the output file");
return;
private static Element exportACollection(Collection collection) {
// Export this Collection.
Element element = new Element("collection");
element.setAttribute("identifier", collection.getHandle());
element.addContent(new Element("name").setText(collection.getName()));
element.addContent(new Element("description")
.setText(collectionService.getMetadataFirstValue(collection,
MetadataSchemaEnum.DC.getName(), "description", "abstract", Item.ANY)));
element.addContent(new Element("intro")
.setText(collectionService.getMetadataFirstValue(collection,
MetadataSchemaEnum.DC.getName(), "description", null, Item.ANY)));
element.addContent(new Element("copyright")
.setText(collectionService.getMetadataFirstValue(collection,
MetadataSchemaEnum.DC.getName(), "rights", null, Item.ANY)));
element.addContent(new Element("sidebar")
.setText(collectionService.getMetadataFirstValue(collection,
MetadataSchemaEnum.DC.getName(), "description", "tableofcontents", Item.ANY)));
element.addContent(new Element("license")
.setText(collectionService.getMetadataFirstValue(collection,
MetadataSchemaEnum.DC.getName(), "rights", "license", Item.ANY)));
// Provenance is special: multivalued
for (MetadataValue value : collectionService.getMetadata(collection,
MetadataSchemaEnum.DC.getName(), "provenance", null, Item.ANY)) {
element.addContent(new Element("provenance")
.setText(value.getValue()));
}
return element;
}
/**
* Validate the XML document. This method does not return, but if validation
* fails it generates an error and ceases execution
* Write out the existing Community/Collection structure.
*/
static void exportStructure(Context context, OutputStream output) {
// Build a document from the Community/Collection hierarchy.
Element rootElement = new Element(INPUT_ROOT); // To be read by importStructure, perhaps
List<Community> communities = null;
try {
communities = communityService.findAllTop(context);
} catch (SQLException ex) {
System.out.printf("Unable to get the list of top-level communities: %s%n",
ex.getMessage());
System.exit(1);
}
for (Community community : communities) {
rootElement.addContent(exportACommunity(community));
}
// Now write the structure out.
org.jdom.Document xmlOutput = new org.jdom.Document(rootElement);
try {
XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
outputter.output(xmlOutput, output);
} catch (IOException e) {
System.out.printf("Unable to write to output file %s: %s%n",
output, e.getMessage());
System.exit(1);
}
}
/**
* Output the usage information.
*/
private static void usage(Options options) {
HelpFormatter helper = new HelpFormatter();
try (PrintWriter writer = new PrintWriter(System.out);) {
helper.printUsage(writer, 80/* FIXME Magic */,
"structure-builder", options);
}
}
/**
* Help the user more.
*/
private static void giveHelp(Options options) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("struct-builder",
"Import or export Community/Collection structure.",
options,
"When importing (-f), communities will be created from the "
+ "top level, and a map of communities to handles will "
+ "be returned in the output file. When exporting (-x),"
+ "the current structure will be written to the map file.",
true);
}
/**
* Validate the XML document. This method returns if the document is valid.
* If validation fails it generates an error and ceases execution.
*
* @param document the XML document object
* @throws TransformerException if transformer error
*/
private static void validate(org.w3c.dom.Document document)
throws TransformerException {
StringBuffer err = new StringBuffer();
StringBuilder err = new StringBuilder();
boolean trip = false;
err.append("The following errors were encountered parsing the source XML\n");
err.append("No changes have been made to the DSpace instance\n\n");
err.append("The following errors were encountered parsing the source XML.\n");
err.append("No changes have been made to the DSpace instance.\n\n");
NodeList first = XPathAPI.selectNodeList(document, "/import_structure/community");
if (first.getLength() == 0) {
err.append("-There are no top level communities in the source document");
err.append("-There are no top level communities in the source document.");
System.out.println(err.toString());
System.exit(0);
System.exit(1);
}
String errs = validateCommunities(first, 1);
@@ -230,13 +469,13 @@ public class StructBuilder {
if (trip) {
System.out.println(err.toString());
System.exit(0);
System.exit(1);
}
}
/**
* Validate the communities section of the XML document. This returns a string
* containing any errors encountered, or null if there were no errors
* containing any errors encountered, or null if there were no errors.
*
* @param communities the NodeList of communities to validate
* @param level the level in the XML document that we are at, for the purposes
@@ -246,7 +485,7 @@ public class StructBuilder {
*/
private static String validateCommunities(NodeList communities, int level)
throws TransformerException {
StringBuffer err = new StringBuffer();
StringBuilder err = new StringBuilder();
boolean trip = false;
String errs = null;
@@ -255,8 +494,9 @@ public class StructBuilder {
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1) {
String pos = Integer.toString(i + 1);
err.append("-The level " + level + " community in position " + pos);
err.append(" does not contain exactly one name field\n");
err.append("-The level ").append(level)
.append(" community in position ").append(pos)
.append(" does not contain exactly one name field.\n");
trip = true;
}
@@ -286,7 +526,7 @@ public class StructBuilder {
/**
* validate the collection section of the XML document. This generates a
* string containing any errors encountered, or returns null if no errors
* string containing any errors encountered, or returns null if no errors.
*
* @param collections a NodeList of collections to validate
* @param level the level in the XML document for the purposes of error reporting
@@ -294,7 +534,7 @@ public class StructBuilder {
*/
private static String validateCollections(NodeList collections, int level)
throws TransformerException {
StringBuffer err = new StringBuffer();
StringBuilder err = new StringBuilder();
boolean trip = false;
String errs = null;
@@ -303,8 +543,9 @@ public class StructBuilder {
NodeList name = XPathAPI.selectNodeList(n, "name");
if (name.getLength() != 1) {
String pos = Integer.toString(i + 1);
err.append("-The level " + level + " collection in position " + pos);
err.append(" does not contain exactly one name field\n");
err.append("-The level ").append(level)
.append(" collection in position ").append(pos)
.append(" does not contain exactly one name field.\n");
trip = true;
}
}
@@ -317,17 +558,17 @@ public class StructBuilder {
}
/**
* Load in the XML from file.
* Load the XML document from input.
*
* @param filename the filename to load from
* @return the DOM representation of the XML file
* @param input the filename to load from.
* @return the DOM representation of the XML input.
*/
private static org.w3c.dom.Document loadXML(String filename)
private static org.w3c.dom.Document loadXML(InputStream input)
throws IOException, ParserConfigurationException, SAXException {
DocumentBuilder builder = DocumentBuilderFactory.newInstance()
.newDocumentBuilder();
org.w3c.dom.Document document = builder.parse(new File(filename));
org.w3c.dom.Document document = builder.parse(input);
return document;
}
@@ -338,7 +579,7 @@ public class StructBuilder {
* @param node the node from which we want to extract the string value
* @return the string value of the node
*/
public static String getStringValue(Node node) {
private static String getStringValue(Node node) {
String value = node.getNodeValue();
if (node.hasChildNodes()) {
@@ -363,7 +604,7 @@ public class StructBuilder {
* created communities (e.g. the handles they have been assigned)
*/
private static Element[] handleCommunities(Context context, NodeList communities, Community parent)
throws TransformerException, SQLException, Exception {
throws TransformerException, SQLException, AuthorizeException {
Element[] elements = new Element[communities.getLength()];
for (int i = 0; i < communities.getLength(); i++) {
@@ -390,12 +631,10 @@ public class StructBuilder {
}
// FIXME: at the moment, if the community already exists by name
// then this will throw a PSQLException on a duplicate key
// violation
// Ideally we'd skip this row and continue to create sub
// communities
// and so forth where they don't exist, but it's proving
// difficult
// then this will throw an SQLException on a duplicate key
// violation.
// Ideally we'd skip this row and continue to create sub communities
// and so forth where they don't exist, but it's proving difficult
// to isolate the community that already exists without hitting
// the database directly.
communityService.update(context, community);
@@ -470,7 +709,7 @@ public class StructBuilder {
* created collections (e.g. the handle)
*/
private static Element[] handleCollections(Context context, NodeList collections, Community parent)
throws TransformerException, SQLException, AuthorizeException, IOException, Exception {
throws TransformerException, SQLException, AuthorizeException {
Element[] elements = new Element[collections.getLength()];
for (int i = 0; i < collections.getLength(); i++) {

View File

@@ -19,6 +19,7 @@ import org.dspace.content.Item;
* @author Stuart Lewis
*/
public class BulkEditChange {
/**
* The item these changes relate to
*/

View File

@@ -27,6 +27,7 @@ import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityValueService;
@@ -34,6 +35,7 @@ import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.authority.Choices;
import org.dspace.content.factory.ContentServiceFactory;
@@ -168,6 +170,9 @@ public class DSpaceCSV implements Serializable {
if ("collection".equals(element)) {
// Store the heading
headings.add(element);
} else if ("rowName".equals(element)) {
// Store the heading
headings.add(element);
} else if ("action".equals(element)) { // Store the action
// Store the heading
headings.add(element);
@@ -198,20 +203,24 @@ public class DSpaceCSV implements Serializable {
}
// Check that the scheme exists
MetadataSchema foundSchema = metadataSchemaService.find(c, metadataSchema);
if (foundSchema == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException.SCHEMA,
columnCounter);
}
if (!StringUtils.equals(metadataSchema, MetadataSchemaEnum.RELATION.getName())) {
MetadataSchema foundSchema = metadataSchemaService.find(c, metadataSchema);
if (foundSchema == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException
.SCHEMA,
columnCounter);
}
// Check that the metadata element exists in the schema
MetadataField foundField = metadataFieldService
.findByElement(c, foundSchema, metadataElement, metadataQualifier);
if (foundField == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException.ELEMENT,
columnCounter);
// Check that the metadata element exists in the schema
MetadataField foundField = metadataFieldService
.findByElement(c, foundSchema, metadataElement, metadataQualifier);
if (foundField == null) {
throw new MetadataImportInvalidHeadingException(clean[0],
MetadataImportInvalidHeadingException
.ELEMENT,
columnCounter);
}
}
// Store the heading

View File

@@ -14,10 +14,14 @@ import java.io.InputStreamReader;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import javax.annotation.Nullable;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
@@ -25,22 +29,33 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityValueService;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Entity;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.Relationship;
import org.dspace.content.RelationshipType;
import org.dspace.content.WorkspaceItem;
import org.dspace.content.authority.Choices;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
import org.dspace.content.service.EntityService;
import org.dspace.content.service.EntityTypeService;
import org.dspace.content.service.InstallItemService;
import org.dspace.content.service.ItemService;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataValueService;
import org.dspace.content.service.RelationshipService;
import org.dspace.content.service.RelationshipTypeService;
import org.dspace.content.service.WorkspaceItemService;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
@@ -89,10 +104,49 @@ public class MetadataImport {
*/
protected static final String AC_PREFIX = "authority.controlled.";
/**
* Map of field:value to csv row number, used to resolve indirect entity target references.
*
* @see #populateRefAndRowMap(DSpaceCSVLine, UUID)
*/
protected Map<String, Set<Integer>> csvRefMap = new HashMap<>();
/**
* Map of csv row number to UUID, used to resolve indirect entity target references.
*
* @see #populateRefAndRowMap(DSpaceCSVLine, UUID)
*/
protected HashMap<Integer, UUID> csvRowMap = new HashMap<>();
/**
* Map of UUIDs to their entity types.
*
* @see #populateRefAndRowMap(DSpaceCSVLine, UUID)
*/
protected static HashMap<UUID, String> entityTypeMap = new HashMap<>();
/**
* Map of UUIDs to their relations that are referenced within any import with their referers.
*
* @see #populateEntityRelationMap(String, String, String)
*/
protected static HashMap<String, HashMap<String, ArrayList<String>>> entityRelationMap = new HashMap<>();
/**
* Collection of errors generated during relation validation process.
*/
protected ArrayList<String> relationValidationErrors = new ArrayList<>();
/**
* Counter of rows proccssed in a CSV.
*/
protected Integer rowCount = 1;
/**
* Logger
*/
protected static final Logger log = Logger.getLogger(MetadataImport.class);
protected static final Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataImport.class);
protected final AuthorityValueService authorityValueService;
@@ -101,6 +155,10 @@ public class MetadataImport {
protected final CollectionService collectionService;
protected final HandleService handleService;
protected final WorkspaceItemService workspaceItemService;
protected final RelationshipTypeService relationshipTypeService;
protected final RelationshipService relationshipService;
protected final EntityTypeService entityTypeService;
protected final EntityService entityService;
/**
* Create an instance of the metadata importer. Requires a context and an array of CSV lines
@@ -120,6 +178,10 @@ public class MetadataImport {
handleService = HandleServiceFactory.getInstance().getHandleService();
authorityValueService = AuthorityServiceFactory.getInstance().getAuthorityValueService();
workspaceItemService = ContentServiceFactory.getInstance().getWorkspaceItemService();
relationshipService = ContentServiceFactory.getInstance().getRelationshipService();
relationshipTypeService = ContentServiceFactory.getInstance().getRelationshipTypeService();
entityTypeService = ContentServiceFactory.getInstance().getEntityTypeService();
entityService = ContentServiceFactory.getInstance().getEntityService();
}
/**
@@ -131,7 +193,7 @@ public class MetadataImport {
* @param workflowNotify If the workflows should be used, whether to send notifications or not
* @param useTemplate Use collection template if create new item
* @return An array of BulkEditChange elements representing the items that have changed
* @throws MetadataImportException if something goes wrong
* @throws MetadataImportException if something goes wrong
*/
public List<BulkEditChange> runImport(boolean change,
boolean useWorkflow,
@@ -146,7 +208,11 @@ public class MetadataImport {
c.setMode(Context.Mode.BATCH_EDIT);
// Process each change
rowCount = 1;
for (DSpaceCSVLine line : toImport) {
// Resolve target references to other items
populateRefAndRowMap(line, line.getID());
line = resolveEntityRefs(line);
// Get the DSpace item to compare with
UUID id = line.getID();
@@ -159,7 +225,7 @@ public class MetadataImport {
WorkflowItem wfItem = null;
Item item = null;
// Is this a new item?
// Is this an existing item?
if (id != null) {
// Get the item
item = itemService.find(c, id);
@@ -196,9 +262,8 @@ public class MetadataImport {
}
}
}
// Compare
compare(item, fromCSV, change, md, whatHasChanged, line);
compareAndUpdate(item, fromCSV, change, md, whatHasChanged, line);
}
}
@@ -259,7 +324,7 @@ public class MetadataImport {
BulkEditChange whatHasChanged = new BulkEditChange();
for (String md : line.keys()) {
// Get the values we already have
if (!"id".equals(md)) {
if (!"id".equals(md) && !"rowName".equals(md)) {
// Get the values from the CSV
String[] fromCSV = line.get(md).toArray(new String[line.get(md).size()]);
@@ -337,14 +402,23 @@ public class MetadataImport {
// Add the metadata to the item
for (BulkEditMetadataValue dcv : whatHasChanged.getAdds()) {
itemService.addMetadata(c, item, dcv.getSchema(),
dcv.getElement(),
dcv.getQualifier(),
dcv.getLanguage(),
dcv.getValue(),
dcv.getAuthority(),
dcv.getConfidence());
if (!StringUtils.equals(dcv.getSchema(), MetadataSchemaEnum.RELATION.getName())) {
itemService.addMetadata(c, item, dcv.getSchema(),
dcv.getElement(),
dcv.getQualifier(),
dcv.getLanguage(),
dcv.getValue(),
dcv.getAuthority(),
dcv.getConfidence());
}
}
//Add relations after all metadata has been processed
for (BulkEditMetadataValue dcv : whatHasChanged.getAdds()) {
if (StringUtils.equals(dcv.getSchema(), MetadataSchemaEnum.RELATION.getName())) {
addRelationship(c, item, dcv.getElement(), dcv.getValue());
}
}
// Should the workflow be used?
if (useWorkflow) {
@@ -368,8 +442,6 @@ public class MetadataImport {
}
}
// Commit changes to the object
// c.commit();
whatHasChanged.setItem(item);
}
@@ -383,6 +455,9 @@ public class MetadataImport {
c.uncacheEntity(wfItem);
c.uncacheEntity(item);
}
populateRefAndRowMap(line, item == null ? null : item.getID());
// keep track of current rows processed
rowCount++;
}
c.setMode(originalMode);
@@ -393,11 +468,14 @@ public class MetadataImport {
}
// Return the changes
if (!change ) {
validateExpressedRelations();
}
return changes;
}
/**
* Compare an item metadata with a line from CSV, and optionally update the item
* Compare an item metadata with a line from CSV, and optionally update the item.
*
* @param item The current item metadata
* @param fromCSV The metadata from the CSV file
@@ -407,10 +485,11 @@ public class MetadataImport {
* @param line line in CSV file
* @throws SQLException if there is a problem accessing a Collection from the database, from its handle
* @throws AuthorizeException if there is an authorization problem with permissions
* @throws MetadataImportException custom exception for error handling within metadataimport
*/
protected void compare(Item item, String[] fromCSV, boolean change,
String md, BulkEditChange changes, DSpaceCSVLine line)
throws SQLException, AuthorizeException {
protected void compareAndUpdate(Item item, String[] fromCSV, boolean change,
String md, BulkEditChange changes, DSpaceCSVLine line)
throws SQLException, AuthorizeException, MetadataImportException {
// Log what metadata element we're looking at
String all = "";
for (String part : fromCSV) {
@@ -420,8 +499,8 @@ public class MetadataImport {
log.debug(LogManager.getHeader(c, "metadata_import",
"item_id=" + item.getID() + ",fromCSV=" + all));
// Don't compare collections or actions
if (("collection".equals(md)) || ("action".equals(md))) {
// Don't compare collections or actions or rowNames
if (("collection".equals(md)) || ("action".equals(md)) || ("rowName".equals(md))) {
return;
}
@@ -583,13 +662,131 @@ public class MetadataImport {
}
}
// Set those values
itemService.clearMetadata(c, item, schema, element, qualifier, language);
itemService.addMetadata(c, item, schema, element, qualifier, language, values, authorities, confidences);
itemService.update(c, item);
if (StringUtils.equals(schema, MetadataSchemaEnum.RELATION.getName())) {
List<RelationshipType> relationshipTypeList = relationshipTypeService
.findByLeftwardOrRightwardTypeName(c, element);
for (RelationshipType relationshipType : relationshipTypeList) {
for (Relationship relationship : relationshipService
.findByItemAndRelationshipType(c, item, relationshipType)) {
relationshipService.delete(c, relationship);
relationshipService.update(c, relationship);
}
}
addRelationships(c, item, element, values);
} else {
itemService.clearMetadata(c, item, schema, element, qualifier, language);
itemService.addMetadata(c, item, schema, element, qualifier,
language, values, authorities, confidences);
itemService.update(c, item);
}
}
}
/**
*
* Adds multiple relationships with a matching typeName to an item.
*
* @param c The relevant DSpace context
* @param item The item to which this metadatavalue belongs to
* @param typeName The element for the metadatavalue
* @param values to iterate over
* @throws SQLException If something goes wrong
* @throws AuthorizeException If something goes wrong
*/
private void addRelationships(Context c, Item item, String typeName, List<String> values)
throws SQLException, AuthorizeException,
MetadataImportException {
for (String value : values) {
addRelationship(c, item, typeName, value);
}
}
/**
* Gets an existing entity from a target reference.
*
* @param context the context to use.
* @param targetReference the target reference which may be a UUID, metadata reference, or rowName reference.
* @return the entity, which is guaranteed to exist.
* @throws MetadataImportException if the target reference is badly formed or refers to a non-existing item.
*/
private Entity getEntity(Context context, String targetReference) throws MetadataImportException {
Entity entity = null;
UUID uuid = resolveEntityRef(context, targetReference);
// At this point, we have a uuid, so we can get an entity
try {
entity = entityService.findByItemId(context, uuid);
if (entity.getItem() == null) {
throw new IllegalArgumentException("No item found in repository with uuid: " + uuid);
}
return entity;
} catch (SQLException sqle) {
throw new MetadataImportException("Unable to find entity using reference: " + targetReference, sqle);
}
}
/**
*
* Creates a relationship for the given item
*
* @param c The relevant DSpace context
* @param item The item that the relationships will be made for
* @param typeName The relationship typeName
* @param value The value for the relationship
* @throws SQLException If something goes wrong
* @throws AuthorizeException If something goes wrong
*/
private void addRelationship(Context c, Item item, String typeName, String value)
throws SQLException, AuthorizeException, MetadataImportException {
if (value.isEmpty()) {
return;
}
boolean left = false;
// Get entity from target reference
Entity relationEntity = getEntity(c, value);
// Get relationship type of entity and item
String relationEntityRelationshipType = itemService.getMetadata(relationEntity.getItem(),
"relationship", "type",
null, Item.ANY).get(0).getValue();
String itemRelationshipType = itemService.getMetadata(item, "relationship", "type",
null, Item.ANY).get(0).getValue();
// Get the correct RelationshipType based on typeName
List<RelationshipType> relType = relationshipTypeService.findByLeftwardOrRightwardTypeName(c, typeName);
RelationshipType foundRelationshipType = matchRelationshipType(relType,
relationEntityRelationshipType, itemRelationshipType, typeName);
if (foundRelationshipType == null) {
throw new MetadataImportException("Error on CSV row " + rowCount + ":" + "\n" +
"No Relationship type found for:\n" +
"Target type: " + relationEntityRelationshipType + "\n" +
"Origin referer type: " + itemRelationshipType + "\n" +
"with typeName: " + typeName);
}
if (foundRelationshipType.getLeftwardType().equalsIgnoreCase(typeName)) {
left = true;
}
// Placeholder items for relation placing
Item leftItem = null;
Item rightItem = null;
if (left) {
leftItem = item;
rightItem = relationEntity.getItem();
} else {
leftItem = relationEntity.getItem();
rightItem = item;
}
// Create the relationship
int leftPlace = relationshipService.findNextLeftPlaceByLeftItem(c, leftItem);
int rightPlace = relationshipService.findNextRightPlaceByRightItem(c, rightItem);
Relationship persistedRelationship = relationshipService.create(c, leftItem, rightItem,
foundRelationshipType, leftPlace, rightPlace);
relationshipService.update(c, persistedRelationship);
}
/**
* Compare changes between an items owning collection and mapped collections
* and what is in the CSV file
@@ -1078,6 +1275,8 @@ public class MetadataImport {
"notify - when adding new items using a workflow, send notification emails");
options.addOption("t", "template", false,
"template - when adding new items, use the collection template (if it exists)");
options.addOption("v", "validate-only", false,
"validate - just validate the csv, don't run the import");
options.addOption("h", "help", false, "help");
// Parse the command line arguments
@@ -1175,7 +1374,9 @@ public class MetadataImport {
MetadataImport importer = new MetadataImport(c, csv);
List<BulkEditChange> changes;
if (!line.hasOption('s')) {
boolean validateOnly = line.hasOption('v');
if (!line.hasOption('s') || validateOnly) {
// See what has changed
try {
changes = importer.runImport(false, useWorkflow, workflowNotify, useTemplate);
@@ -1189,7 +1390,7 @@ public class MetadataImport {
int changeCounter = displayChanges(changes, false);
// If there were changes, ask if we should execute them
if (changeCounter > 0) {
if (!validateOnly && changeCounter > 0) {
try {
// Ask the user if they want to make the changes
System.out.println("\n" + changeCounter + " item(s) will be changed\n");
@@ -1214,7 +1415,7 @@ public class MetadataImport {
try {
// If required, make the change
if (change) {
if (change && !validateOnly) {
try {
// Make the changes
changes = importer.runImport(true, useWorkflow, workflowNotify, useTemplate);
@@ -1226,9 +1427,6 @@ public class MetadataImport {
// Display the changes
displayChanges(changes, true);
// Commit the change to the DB
// c.commit();
}
// Finsh off and tidy up
@@ -1241,4 +1439,418 @@ public class MetadataImport {
System.exit(1);
}
}
/**
* Gets a copy of the given csv line with all entity target references resolved to UUID strings.
* Keys being iterated over represent metadatafields or special columns to be processed.
*
* @param line the csv line to process.
* @return a copy, with all references resolved.
* @throws MetadataImportException if there is an error resolving any entity target reference.
*/
public DSpaceCSVLine resolveEntityRefs(DSpaceCSVLine line) throws MetadataImportException {
DSpaceCSVLine newLine = new DSpaceCSVLine(line.getID());
UUID originId = evaluateOriginId(line.getID());
for (String key : line.keys()) {
// If a key represents a relation field attempt to resolve the target reference from the csvRefMap
if (key.split("\\.")[0].equalsIgnoreCase("relation")) {
if (line.get(key).size() > 0) {
for (String val : line.get(key)) {
// Attempt to resolve the relation target reference
// These can be a UUID, metadata target reference or rowName target reference
String uuid = resolveEntityRef(c, val).toString();
newLine.add(key, uuid);
//Entity refs have been resolved / placeholdered
//Populate the EntityRelationMap
populateEntityRelationMap(uuid, key, originId.toString());
}
}
} else {
if (line.get(key).size() > 1) {
for (String value : line.get(key)) {
newLine.add(key, value);
}
} else {
if (line.get(key).size() > 0) {
newLine.add(key, line.get(key).get(0));
}
}
}
}
return newLine;
}
/**
* Populate the entityRelationMap with all target references and it's asscoiated typeNames
* to their respective origins
*
* @param refUUID the target reference UUID for the relation
* @param relationField the field of the typeNames to relate from
*/
private void populateEntityRelationMap(String refUUID, String relationField, String originId) {
HashMap<String, ArrayList<String>> typeNames = null;
if (entityRelationMap.get(refUUID) == null) {
typeNames = new HashMap<>();
ArrayList<String> originIds = new ArrayList<>();
originIds.add(originId);
typeNames.put(relationField, originIds);
entityRelationMap.put(refUUID, typeNames);
} else {
typeNames = entityRelationMap.get(refUUID);
if (typeNames.get(relationField) == null) {
ArrayList<String> originIds = new ArrayList<>();
originIds.add(originId);
typeNames.put(relationField, originIds);
} else {
ArrayList<String> originIds = typeNames.get(relationField);
originIds.add(originId);
typeNames.put(relationField, originIds);
}
entityRelationMap.put(refUUID, typeNames);
}
}
/**
* Populates the csvRefMap, csvRowMap, and entityTypeMap for the given csv line.
*
* The csvRefMap is an index that keeps track of which rows have a specific value for
* a specific metadata field or the special "rowName" column. This is used to help resolve indirect
* entity target references in the same CSV.
*
* The csvRowMap is a row number to UUID map, and contains an entry for every row that has
* been processed so far which has a known (minted) UUID for its item. This is used to help complete
* the resolution after the row number has been determined.
*
* @param line the csv line.
* @param uuid the uuid of the item, which may be null if it has not been minted yet.
*/
private void populateRefAndRowMap(DSpaceCSVLine line, @Nullable UUID uuid) {
if (uuid != null) {
csvRowMap.put(rowCount, uuid);
} else {
csvRowMap.put(rowCount, new UUID(0, rowCount));
}
for (String key : line.keys()) {
if (key.contains(".") && !key.split("\\.")[0].equalsIgnoreCase("relation") ||
key.equalsIgnoreCase("rowName")) {
for (String value : line.get(key)) {
String valueKey = key + ":" + value;
Set<Integer> rowNums = csvRefMap.get(valueKey);
if (rowNums == null) {
rowNums = new HashSet<>();
csvRefMap.put(valueKey, rowNums);
}
rowNums.add(rowCount);
}
}
//Populate entityTypeMap
if (key.equalsIgnoreCase("relationship.type") && line.get(key).size() > 0) {
if (uuid == null) {
entityTypeMap.put(new UUID(0, rowCount), line.get(key).get(0));
} else {
entityTypeMap.put(uuid, line.get(key).get(0));
}
}
}
}
/**
* Gets the UUID of the item indicated by the given target reference,
* which may be a direct UUID string, a row reference
* of the form rowName:VALUE, or a metadata value reference of the form schema.element[.qualifier]:VALUE.
*
* The reference may refer to a previously-processed item in the CSV or an item in the database.
*
* @param context the context to use.
* @param reference the target reference which may be a UUID, metadata reference, or rowName reference.
* @return the uuid.
* @throws MetadataImportException if the target reference is malformed or ambiguous (refers to multiple items).
*/
private UUID resolveEntityRef(Context context, String reference) throws MetadataImportException {
// value reference
UUID uuid = null;
if (!reference.contains(":")) {
// assume it's a UUID
try {
return UUID.fromString(reference);
} catch (IllegalArgumentException e) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Not a UUID or indirect entity reference: '" + reference + "'");
}
} else if (!reference.startsWith("rowName:") ) { // Not a rowName ref; so it's a metadata value reference
MetadataValueService metadataValueService = ContentServiceFactory.getInstance().getMetadataValueService();
MetadataFieldService metadataFieldService =
ContentServiceFactory.getInstance().getMetadataFieldService();
int i = reference.indexOf(":");
String mfValue = reference.substring(i + 1);
String mf[] = reference.substring(0, i).split("\\.");
if (mf.length < 2) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Bad metadata field in reference: '" + reference
+ "' (expected syntax is schema.element[.qualifier])");
}
String schema = mf[0];
String element = mf[1];
String qualifier = mf.length == 2 ? null : mf[2];
try {
MetadataField mfo = metadataFieldService.findByElement(context, schema, element, qualifier);
Iterator<MetadataValue> mdv = metadataValueService.findByFieldAndValue(context, mfo, mfValue);
if (mdv.hasNext()) {
MetadataValue mdvVal = mdv.next();
uuid = mdvVal.getDSpaceObject().getID();
if (mdv.hasNext()) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Ambiguous reference; multiple matches in db: " + reference);
}
}
} catch (SQLException e) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Error looking up item by metadata reference: " + reference, e);
}
}
// Lookup UUIDs that may have already been processed into the csvRefMap
// See populateRefAndRowMap() for how the csvRefMap is populated
// See getMatchingCSVUUIDs() for how the reference param is sourced from the csvRefMap
Set<UUID> csvUUIDs = getMatchingCSVUUIDs(reference);
if (csvUUIDs.size() > 1) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Ambiguous reference; multiple matches in csv: " + reference);
} else if (csvUUIDs.size() == 1) {
UUID csvUUID = csvUUIDs.iterator().next();
if (csvUUID.equals(uuid)) {
return uuid; // one match from csv and db (same item)
} else if (uuid != null) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"Ambiguous reference; multiple matches in db and csv: " + reference);
} else {
return csvUUID; // one match from csv
}
} else { // size == 0; the reference does not exist throw an error
if (uuid == null) {
throw new MetadataImportException("Error in CSV row " + rowCount + ":\n" +
"No matches found for reference: " + reference
+ "\nKeep in mind you can only reference entries that are listed before " +
"this one within the CSV.");
} else {
return uuid; // one match from db
}
}
}
/**
* Gets the set of matching lines as UUIDs that have already been processed given a metadata value.
*
* @param mdValueRef the metadataValue reference to search for.
* @return the set of matching lines as UUIDs.
*/
private Set<UUID> getMatchingCSVUUIDs(String mdValueRef) {
Set<UUID> set = new HashSet<>();
if (csvRefMap.containsKey(mdValueRef)) {
for (Integer rowNum : csvRefMap.get(mdValueRef)) {
set.add(getUUIDForRow(rowNum));
}
}
return set;
}
/**
* Gets the UUID of the item of a given row in the CSV, if it has been minted.
* If the UUID has not yet been minted, gets a UUID representation of the row
* (a UUID whose numeric value equals the row number).
*
* @param rowNum the row number.
* @return the UUID of the item
*/
private UUID getUUIDForRow(int rowNum) {
if (csvRowMap.containsKey(rowNum)) {
return csvRowMap.get(rowNum);
} else {
return new UUID(0, rowNum);
}
}
/**
* Return a UUID of the origin in process or a placeholder for the origin to be evaluated later
*
* @param originId UUID of the origin
* @return the UUID of the item or UUID placeholder
*/
private UUID evaluateOriginId(@Nullable UUID originId) {
if (originId != null) {
return originId;
} else {
return new UUID(0, rowCount);
}
}
/**
* Validate every relation modification expressed in the CSV.
*
*/
private void validateExpressedRelations() throws MetadataImportException {
for (String targetUUID : entityRelationMap.keySet()) {
String targetType = null;
try {
// Get the type of reference. Attempt lookup in processed map first before looking in archive.
if (entityTypeMap.get(UUID.fromString(targetUUID)) != null) {
targetType = entityTypeService.
findByEntityType(c, entityTypeMap.get(UUID.fromString(targetUUID))).getLabel();
} else {
// Target item may be archived; check there.
// Add to errors if Realtionship.type cannot be derived
Item targetItem = null;
if (itemService.find(c, UUID.fromString(targetUUID)) != null) {
targetItem = itemService.find(c, UUID.fromString(targetUUID));
List<MetadataValue> relTypes = itemService.
getMetadata(targetItem, "relationship", "type", null, Item.ANY);
String relTypeValue = null;
if (relTypes.size() > 0) {
relTypeValue = relTypes.get(0).getValue();
targetType = entityTypeService.findByEntityType(c, relTypeValue).getLabel();
} else {
relationValidationErrors.add("Cannot resolve Entity type for target UUID: " +
targetUUID);
}
} else {
relationValidationErrors.add("Cannot resolve Entity type for target UUID: " +
targetUUID);
}
}
if (targetType == null) {
continue;
}
// Get typeNames for each origin referer of this target.
for (String typeName : entityRelationMap.get(targetUUID).keySet()) {
// Resolve Entity Type for each origin referer.
for (String originRefererUUID : entityRelationMap.get(targetUUID).get(typeName)) {
// Evaluate row number for origin referer.
String originRow = "N/A";
if (csvRowMap.containsValue(UUID.fromString(originRefererUUID))) {
for (int key : csvRowMap.keySet()) {
if (csvRowMap.get(key).toString().equalsIgnoreCase(originRefererUUID)) {
originRow = key + "";
break;
}
}
}
String originType = "";
// Validate target type and origin type pairing with typeName or add to errors.
// Attempt lookup in processed map first before looking in archive.
if (entityTypeMap.get(UUID.fromString(originRefererUUID)) != null) {
originType = entityTypeMap.get(UUID.fromString(originRefererUUID));
validateTypesByTypeByTypeName(targetType, originType, typeName, originRow);
} else {
// Origin item may be archived; check there.
// Add to errors if Realtionship.type cannot be derived.
Item originItem = null;
if (itemService.find(c, UUID.fromString(targetUUID)) != null) {
originItem = itemService.find(c, UUID.fromString(originRefererUUID));
List<MetadataValue> relTypes = itemService.
getMetadata(originItem, "relationship", "type", null, Item.ANY);
String relTypeValue = null;
if (relTypes.size() > 0) {
relTypeValue = relTypes.get(0).getValue();
originType = entityTypeService.findByEntityType(c, relTypeValue).getLabel();
validateTypesByTypeByTypeName(targetType, originType, typeName, originRow);
} else {
relationValidationErrors.add("Error on CSV row " + originRow + ":" + "\n" +
"Cannot resolve Entity type for reference: "
+ originRefererUUID);
}
} else {
relationValidationErrors.add("Error on CSV row " + originRow + ":" + "\n" +
"Cannot resolve Entity type for reference: "
+ originRefererUUID + " in row: " + originRow );
}
}
}
}
} catch (SQLException sqle) {
throw new MetadataImportException("Error interacting with database!", sqle);
}
} // If relationValidationErrors is empty all described relationships are valid.
if (!relationValidationErrors.isEmpty()) {
StringBuilder errors = new StringBuilder();
for (String error : relationValidationErrors) {
errors.append(error + "\n");
}
throw new MetadataImportException("Error validating relationships: \n" + errors);
}
}
/**
* Generates a list of potenital Relationship Types given a typeName and attempts to match the given
* targetType and originType to a Relationship Type in the list.
*
* @param targetType entity type of target.
* @param originType entity type of origin referer.
* @param typeName left or right typeName of the respective Relationship.
* @return the UUID of the item.
*/
private void validateTypesByTypeByTypeName(String targetType, String originType, String typeName, String originRow)
throws MetadataImportException {
try {
RelationshipType foundRelationshipType = null;
List<RelationshipType> relationshipTypeList = relationshipTypeService.
findByLeftwardOrRightwardTypeName(c, typeName.split("\\.")[1]);
// Validate described relationship form the CSV.
foundRelationshipType = matchRelationshipType(relationshipTypeList, targetType, originType, typeName);
if (foundRelationshipType == null) {
relationValidationErrors.add("Error on CSV row " + originRow + ":" + "\n" +
"No Relationship type found for:\n" +
"Target type: " + targetType + "\n" +
"Origin referer type: " + originType + "\n" +
"with typeName: " + typeName + " for type: " + originType);
}
} catch (SQLException sqle) {
throw new MetadataImportException("Error interacting with database!", sqle);
}
}
/**
* Matches two Entity types to a Relationship Type from a set of Relationship Types.
*
* @param relTypes set of Relationship Types.
* @param targetType entity type of target.
* @param originType entity type of origin referer.
* @return null or matched Relationship Type.
*/
private RelationshipType matchRelationshipType(List<RelationshipType> relTypes,
String targetType, String originType, String originTypeName) {
RelationshipType foundRelationshipType = null;
if (originTypeName.split("\\.").length > 1) {
originTypeName = originTypeName.split("\\.")[1];
}
for (RelationshipType relationshipType : relTypes) {
// Is origin type leftward or righward
boolean isLeft = false;
if (relationshipType.getLeftType().getLabel().equalsIgnoreCase(originType)) {
isLeft = true;
}
if (isLeft) {
// Validate typeName reference
if (!relationshipType.getLeftwardType().equalsIgnoreCase(originTypeName)) {
continue;
}
if (relationshipType.getLeftType().getLabel().equalsIgnoreCase(originType) &&
relationshipType.getRightType().getLabel().equalsIgnoreCase(targetType)) {
foundRelationshipType = relationshipType;
}
} else {
if (!relationshipType.getRightwardType().equalsIgnoreCase(originTypeName)) {
continue;
}
if (relationshipType.getLeftType().getLabel().equalsIgnoreCase(targetType) &&
relationshipType.getRightType().getLabel().equalsIgnoreCase(originType)) {
foundRelationshipType = relationshipType;
}
}
}
return foundRelationshipType;
}
}

View File

@@ -23,7 +23,8 @@ import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.checker.BitstreamDispatcher;
import org.dspace.checker.CheckerCommand;
import org.dspace.checker.HandleDispatcher;
@@ -48,7 +49,7 @@ import org.dspace.core.Utils;
* @author Nathan Sarr
*/
public final class ChecksumChecker {
private static final Logger LOG = Logger.getLogger(ChecksumChecker.class);
private static final Logger LOG = LogManager.getLogger(ChecksumChecker.class);
private static final BitstreamService bitstreamService = ContentServiceFactory.getInstance().getBitstreamService();

View File

@@ -272,9 +272,8 @@ public class Harvest {
targetCollection = (Collection) dso;
}
} else {
// not a handle, try and treat it as an integer collection database ID
System.out.println("Looking up by id: " + collectionID + ", parsed as '" + Integer
.parseInt(collectionID) + "', " + "in context: " + context);
// not a handle, try and treat it as an collection database UUID
System.out.println("Looking up by UUID: " + collectionID + ", " + "in context: " + context);
targetCollection = collectionService.find(context, UUID.fromString(collectionID));
}
}
@@ -460,7 +459,7 @@ public class Harvest {
List<String> errors;
System.out.print("Testing basic PMH access: ");
errors = OAIHarvester.verifyOAIharvester(server, set,
errors = harvestedCollectionService.verifyOAIharvester(server, set,
(null != metadataFormat) ? metadataFormat : "dc", false);
if (errors.isEmpty()) {
System.out.println("OK");
@@ -471,7 +470,7 @@ public class Harvest {
}
System.out.print("Testing ORE support: ");
errors = OAIHarvester.verifyOAIharvester(server, set,
errors = harvestedCollectionService.verifyOAIharvester(server, set,
(null != metadataFormat) ? metadataFormat : "dc", true);
if (errors.isEmpty()) {
System.out.println("OK");

View File

@@ -32,8 +32,8 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.mail.MessagingException;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.itemexport.service.ItemExportService;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
@@ -42,7 +42,7 @@ import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.service.BitstreamService;
import org.dspace.content.service.CommunityService;
@@ -98,7 +98,7 @@ public class ItemExportServiceImpl implements ItemExportService {
/**
* log4j logger
*/
private Logger log = Logger.getLogger(ItemExportServiceImpl.class);
private Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemExportServiceImpl.class);
protected ItemExportServiceImpl() {
@@ -214,7 +214,7 @@ public class ItemExportServiceImpl implements ItemExportService {
protected void writeMetadata(Context c, String schema, Item i,
File destDir, boolean migrate) throws Exception {
String filename;
if (schema.equals(MetadataSchema.DC_SCHEMA)) {
if (schema.equals(MetadataSchemaEnum.DC.getName())) {
filename = "dublin_core.xml";
} else {
filename = "metadata_" + schema + ".xml";
@@ -271,9 +271,8 @@ public class ItemExportServiceImpl implements ItemExportService {
("date".equals(metadataField.getElement()) && "accessioned".equals(qualifier)) ||
("date".equals(metadataField.getElement()) && "available".equals(qualifier)) ||
("identifier".equals(metadataField.getElement()) && "uri".equals(qualifier) &&
(dcv.getValue() != null && dcv.getValue().startsWith("http://hdl.handle.net/" +
handleService
.getPrefix() + "/"))) ||
(dcv.getValue() != null && dcv.getValue().startsWith(
handleService.getCanonicalPrefix() + handleService.getPrefix() + "/"))) ||
("description".equals(metadataField.getElement()) && "provenance".equals(qualifier)) ||
("format".equals(metadataField.getElement()) && "extent".equals(qualifier)) ||
("format".equals(metadataField.getElement()) && "mimetype".equals(qualifier))))) {
@@ -547,7 +546,7 @@ public class ItemExportServiceImpl implements ItemExportService {
List<Bitstream> bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams) {
// add up the size
size += bitstream.getSize();
size += bitstream.getSizeBytes();
}
}
items.add(item.getID());
@@ -574,7 +573,7 @@ public class ItemExportServiceImpl implements ItemExportService {
List<Bitstream> bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams) {
// add up the size
size += bitstream.getSize();
size += bitstream.getSizeBytes();
}
}
items.add(item.getID());
@@ -593,7 +592,7 @@ public class ItemExportServiceImpl implements ItemExportService {
List<Bitstream> bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams) {
// add up the size
size += bitstream.getSize();
size += bitstream.getSizeBytes();
}
}
ArrayList<UUID> items = new ArrayList<>();
@@ -930,7 +929,7 @@ public class ItemExportServiceImpl implements ItemExportService {
Locale supportedLocale = I18nUtil.getEPersonLocale(eperson);
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_success"));
email.addRecipient(eperson.getEmail());
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/exportdownload/" + fileName);
email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/exportdownload/" + fileName);
email.addArgument(ConfigurationManager.getProperty("org.dspace.app.itemexport.life.span.hours"));
email.send();
@@ -948,7 +947,7 @@ public class ItemExportServiceImpl implements ItemExportService {
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_error"));
email.addRecipient(eperson.getEmail());
email.addArgument(error);
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/feedback");
email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/feedback");
email.send();
} catch (Exception e) {

View File

@@ -52,13 +52,13 @@ import gr.ekt.bte.core.TransformationSpec;
import gr.ekt.bte.dataloader.FileDataLoader;
import gr.ekt.bteio.generators.DSpaceOutputGenerator;
import gr.ekt.bteio.loaders.OAIPMHDataLoader;
import org.apache.commons.collections.ComparatorUtils;
import org.apache.commons.collections4.ComparatorUtils;
import org.apache.commons.io.FileDeleteStrategy;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.xpath.XPathAPI;
import org.dspace.app.itemimport.service.ItemImportService;
import org.dspace.app.util.LocalSchemaFilenameFilter;
@@ -74,6 +74,7 @@ import org.dspace.content.DSpaceObject;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.WorkspaceItem;
import org.dspace.content.service.BitstreamFormatService;
import org.dspace.content.service.BitstreamService;
@@ -124,7 +125,7 @@ import org.xml.sax.SAXException;
* allow the registration of files (bitstreams) into DSpace.
*/
public class ItemImportServiceImpl implements ItemImportService, InitializingBean {
private final Logger log = Logger.getLogger(ItemImportServiceImpl.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemImportServiceImpl.class);
@Autowired(required = true)
protected AuthorizeService authorizeService;
@@ -677,7 +678,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
Node schemaAttr = metadata.item(0).getAttributes().getNamedItem(
"schema");
if (schemaAttr == null) {
schema = MetadataSchema.DC_SCHEMA;
schema = MetadataSchemaEnum.DC.getName();
} else {
schema = schemaAttr.getNodeValue();
}
@@ -1796,7 +1797,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_error"));
email.addRecipient(eperson.getEmail());
email.addArgument(error);
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/feedback");
email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/feedback");
email.send();
} catch (Exception e) {

View File

@@ -30,7 +30,7 @@ import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.LocalSchemaFilenameFilter;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
@@ -47,7 +47,7 @@ import org.w3c.dom.Document;
* Encapsulates the Item in the context of the DSpace Archive Format
*/
public class ItemArchive {
private static final Logger log = Logger.getLogger(ItemArchive.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(ItemArchive.class);
public static final String DUBLIN_CORE_XML = "dublin_core.xml";

View File

@@ -31,11 +31,12 @@ import org.apache.commons.cli.PosixParser;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.EPersonService;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.handle.service.HandleService;
/**
* Provides some batch editing capabilities for items in DSpace:
@@ -78,6 +79,7 @@ public class ItemUpdate {
protected static final EPersonService epersonService = EPersonServiceFactory.getInstance().getEPersonService();
protected static final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
protected static final HandleService handleService = HandleServiceFactory.getInstance().getHandleService();
static {
filterAliases.put("ORIGINAL", "org.dspace.app.itemupdate.OriginalBitstreamFilter");
@@ -330,10 +332,7 @@ public class ItemUpdate {
iu.setEPerson(context, iu.eperson);
context.turnOffAuthorisationSystem();
HANDLE_PREFIX = ConfigurationManager.getProperty("handle.canonical.prefix");
if (HANDLE_PREFIX == null || HANDLE_PREFIX.length() == 0) {
HANDLE_PREFIX = "http://hdl.handle.net/";
}
HANDLE_PREFIX = handleService.getCanonicalPrefix();
iu.processArchive(context, sourcedir, itemField, metadataIndexName, alterProvenance, isTest);

View File

@@ -28,12 +28,13 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.xpath.XPathAPI;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Item;
import org.dspace.content.MetadataField;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
@@ -189,7 +190,7 @@ public class MetadataUtilities {
NodeList metadata = XPathAPI.selectNodeList(document, "/dublin_core");
Node schemaAttr = metadata.item(0).getAttributes().getNamedItem("schema");
if (schemaAttr == null) {
schema = MetadataSchema.DC_SCHEMA;
schema = MetadataSchemaEnum.DC.getName();
} else {
schema = schemaAttr.getNodeValue();
}

View File

@@ -13,6 +13,12 @@ import java.lang.reflect.Method;
import java.util.List;
import java.util.TreeMap;
import org.apache.commons.cli.ParseException;
import org.apache.log4j.Logger;
import org.dspace.scripts.DSpaceRunnable;
import org.dspace.scripts.factory.ScriptServiceFactory;
import org.dspace.scripts.handler.DSpaceRunnableHandler;
import org.dspace.scripts.handler.impl.CommandLineDSpaceRunnableHandler;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.dspace.services.RequestService;
@@ -27,6 +33,9 @@ import org.jdom.input.SAXBuilder;
* @author Mark Diggory
*/
public class ScriptLauncher {
private static final Logger log = Logger.getLogger(ScriptLauncher.class);
/**
* The service manager kernel
*/
@@ -76,8 +85,9 @@ public class ScriptLauncher {
}
// Look up command in the configuration, and execute.
int status;
status = runOneCommand(commandConfigs, args);
CommandLineDSpaceRunnableHandler commandLineDSpaceRunnableHandler = new CommandLineDSpaceRunnableHandler();
int status = handleScript(args, commandConfigs, commandLineDSpaceRunnableHandler, kernelImpl);
// Destroy the service kernel if it is still alive
if (kernelImpl != null) {
@@ -86,6 +96,50 @@ public class ScriptLauncher {
}
System.exit(status);
}
/**
* This method will take the arguments from a commandline input and it'll find the script that the first argument
* refers to and it'll execute this script.
* It can return a 1 or a 0 depending on whether the script failed or passed respectively
* @param args The arguments for the script and the script as first one in the array
* @param commandConfigs The Document
* @param dSpaceRunnableHandler The DSpaceRunnableHandler for this execution
* @param kernelImpl The relevant DSpaceKernelImpl
* @return A 1 or 0 depending on whether the script failed or passed respectively
*/
public static int handleScript(String[] args, Document commandConfigs,
DSpaceRunnableHandler dSpaceRunnableHandler,
DSpaceKernelImpl kernelImpl) {
int status;
DSpaceRunnable script = ScriptServiceFactory.getInstance().getScriptService().getScriptForName(args[0]);
if (script != null) {
status = executeScript(args, dSpaceRunnableHandler, script);
} else {
status = runOneCommand(commandConfigs, args, kernelImpl);
}
return status;
}
/**
* This method will simply execute the script
* @param args The arguments of the script with the script name as first place in the array
* @param dSpaceRunnableHandler The relevant DSpaceRunnableHandler
* @param script The script to be executed
* @return A 1 or 0 depending on whether the script failed or passed respectively
*/
private static int executeScript(String[] args, DSpaceRunnableHandler dSpaceRunnableHandler,
DSpaceRunnable script) {
try {
script.initialize(args, dSpaceRunnableHandler);
script.run();
return 0;
} catch (ParseException e) {
script.printHelp();
e.printStackTrace();
return 1;
}
}
protected static int runOneCommand(Document commandConfigs, String[] args) {
@@ -98,7 +152,7 @@ public class ScriptLauncher {
* @param commandConfigs Document
* @param args the command line arguments given
*/
public static int runOneCommand(Document commandConfigs, String[] args, DSpaceKernelImpl kernelImpl) {
protected static int runOneCommand(Document commandConfigs, String[] args, DSpaceKernelImpl kernelImpl) {
String request = args[0];
Element root = commandConfigs.getRootElement();
List<Element> commands = root.getChildren("command");

View File

@@ -11,7 +11,7 @@ import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.hssf.extractor.ExcelExtractor;
@@ -36,7 +36,7 @@ import org.dspace.content.Item;
*/
public class ExcelFilter extends MediaFilter {
private static Logger log = Logger.getLogger(ExcelFilter.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ExcelFilter.class);
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";

View File

@@ -143,7 +143,7 @@ public abstract class ImageMagickThumbnailFilter extends MediaFilter {
// PDFs using the CMYK color system can be handled specially if
// profiles are defined
if (cmyk_profile != null && srgb_profile != null) {
Info imageInfo = new Info(f.getAbsolutePath(), true);
Info imageInfo = new Info(f.getAbsolutePath() + s, true);
String imageClass = imageInfo.getImageClass();
if (imageClass.contains("CMYK")) {
op.profile(cmyk_profile);

View File

@@ -22,7 +22,7 @@ import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.dspace.app.mediafilter.factory.MediaFilterServiceFactory;
import org.dspace.app.mediafilter.service.MediaFilterService;
import org.dspace.content.Collection;

View File

@@ -220,7 +220,7 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
} catch (Exception e) {
String handle = myItem.getHandle();
List<Bundle> bundles = myBitstream.getBundles();
long size = myBitstream.getSize();
long size = myBitstream.getSizeBytes();
String checksum = myBitstream.getChecksum() + " (" + myBitstream.getChecksumAlgorithm() + ")";
int assetstore = myBitstream.getStoreNumber();
@@ -310,12 +310,11 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
// get bitstream filename, calculate destination filename
String newName = formatFilter.getFilteredName(source.getName());
Bitstream existingBitstream = null; // is there an existing rendition?
Bundle targetBundle = null; // bundle we're modifying
// check if destination bitstream exists
Bundle existingBundle = null;
Bitstream existingBitstream = null;
List<Bundle> bundles = itemService.getBundles(item, formatFilter.getBundleName());
// check if destination bitstream exists
if (bundles.size() > 0) {
// only finds the last match (FIXME?)
for (Bundle bundle : bundles) {
@@ -323,7 +322,7 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
for (Bitstream bitstream : bitstreams) {
if (bitstream.getName().trim().equals(newName.trim())) {
targetBundle = bundle;
existingBundle = bundle;
existingBitstream = bitstream;
}
}
@@ -345,63 +344,71 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
+ " (item: " + item.getHandle() + ")");
}
InputStream destStream;
try {
System.out.println("File: " + newName);
destStream = formatFilter.getDestinationStream(item, bitstreamService.retrieve(context, source), isVerbose);
System.out.println("File: " + newName);
// start filtering of the bitstream, using try with resource to close all InputStreams properly
try (
// get the source stream
InputStream srcStream = bitstreamService.retrieve(context, source);
// filter the source stream to produce the destination stream
// this is the hard work, check for OutOfMemoryErrors at the end of the try clause.
InputStream destStream = formatFilter.getDestinationStream(item, srcStream, isVerbose);
) {
if (destStream == null) {
if (!isQuiet) {
System.out.println("SKIPPED: bitstream " + source.getID()
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
+ " (item: " + item.getHandle() + ") because filtering was unsuccessful");
}
return false;
}
Bundle targetBundle; // bundle we're modifying
if (bundles.size() < 1) {
// create new bundle if needed
targetBundle = bundleService.create(context, item, formatFilter.getBundleName());
} else {
// take the first match as we already looked out for the correct bundle name
targetBundle = bundles.get(0);
}
// create bitstream to store the filter result
Bitstream b = bitstreamService.create(context, targetBundle, destStream);
// set the name, source and description of the bitstream
b.setName(context, newName);
b.setSource(context, "Written by FormatFilter " + formatFilter.getClass().getName() +
" on " + DCDate.getCurrent() + " (GMT).");
b.setDescription(context, formatFilter.getDescription());
// Set the format of the bitstream
BitstreamFormat bf = bitstreamFormatService.findByShortDescription(context,
formatFilter.getFormatString());
bitstreamService.setFormat(context, b, bf);
bitstreamService.update(context, b);
//Set permissions on the derivative bitstream
//- First remove any existing policies
authorizeService.removeAllPolicies(context, b);
//- Determine if this is a public-derivative format
if (publicFiltersClasses.contains(formatFilter.getClass().getSimpleName())) {
//- Set derivative bitstream to be publicly accessible
Group anonymous = groupService.findByName(context, Group.ANONYMOUS);
authorizeService.addPolicy(context, b, Constants.READ, anonymous);
} else {
//- Inherit policies from the source bitstream
authorizeService.inheritPolicies(context, source, b);
}
//do post-processing of the generated bitstream
formatFilter.postProcessBitstream(context, item, b);
} catch (OutOfMemoryError oome) {
System.out.println("!!! OutOfMemoryError !!!");
return false;
}
// create new bundle if needed
if (bundles.size() < 1) {
targetBundle = bundleService.create(context, item, formatFilter.getBundleName());
} else {
// take the first match
targetBundle = bundles.get(0);
}
Bitstream b = bitstreamService.create(context, targetBundle, destStream);
// Now set the format and name of the bitstream
b.setName(context, newName);
b.setSource(context, "Written by FormatFilter " + formatFilter.getClass().getName() +
" on " + DCDate.getCurrent() + " (GMT).");
b.setDescription(context, formatFilter.getDescription());
// Find the proper format
BitstreamFormat bf = bitstreamFormatService.findByShortDescription(context,
formatFilter.getFormatString());
bitstreamService.setFormat(context, b, bf);
bitstreamService.update(context, b);
//Set permissions on the derivative bitstream
//- First remove any existing policies
authorizeService.removeAllPolicies(context, b);
//- Determine if this is a public-derivative format
if (publicFiltersClasses.contains(formatFilter.getClass().getSimpleName())) {
//- Set derivative bitstream to be publicly accessible
Group anonymous = groupService.findByName(context, Group.ANONYMOUS);
authorizeService.addPolicy(context, b, Constants.READ, anonymous);
} else {
//- Inherit policies from the source bitstream
authorizeService.inheritPolicies(context, source, b);
}
// fixme - set date?
// we are overwriting, so remove old bitstream
if (existingBitstream != null) {
bundleService.removeBitstream(context, targetBundle, existingBitstream);
bundleService.removeBitstream(context, existingBundle, existingBitstream);
}
if (!isQuiet) {
@@ -409,9 +416,6 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
+ " (item: " + item.getHandle() + ") and created '" + newName + "'");
}
//do post-processing of the generated bitstream
formatFilter.postProcessBitstream(context, item, b);
return true;
}

View File

@@ -11,7 +11,9 @@ import java.awt.image.BufferedImage;
import java.io.InputStream;
import javax.imageio.ImageIO;
import org.apache.logging.log4j.Logger;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
import org.apache.pdfbox.rendering.PDFRenderer;
import org.dspace.content.Item;
@@ -26,6 +28,8 @@ import org.dspace.content.Item;
* @author Jason Sherman jsherman@usao.edu
*/
public class PDFBoxThumbnail extends MediaFilter implements SelfRegisterInputFormats {
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PDFBoxThumbnail.class);
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".jpg";
@@ -65,12 +69,19 @@ public class PDFBoxThumbnail extends MediaFilter implements SelfRegisterInputFor
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
PDDocument doc = PDDocument.load(source);
PDFRenderer renderer = new PDFRenderer(doc);
BufferedImage buf = renderer.renderImage(0);
// ImageIO.write(buf, "PNG", new File("custom-render.png"));
doc.close();
BufferedImage buf;
// Render the page image.
try ( PDDocument doc = PDDocument.load(source); ) {
PDFRenderer renderer = new PDFRenderer(doc);
buf = renderer.renderImage(0);
} catch (InvalidPasswordException ex) {
log.error("PDF is encrypted. Cannot create thumbnail (item: {})",
() -> currentItem.getHandle());
return null;
}
// Generate thumbnail derivative and return as IO stream.
JPEGFilter jpegFilter = new JPEGFilter();
return jpegFilter.getThumb(currentItem, buf, verbose);
}

View File

@@ -16,8 +16,9 @@ import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
import org.apache.pdfbox.text.PDFTextStripper;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
@@ -30,7 +31,7 @@ import org.dspace.core.ConfigurationManager;
*/
public class PDFFilter extends MediaFilter {
private static Logger log = Logger.getLogger(PDFFilter.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PDFFilter.class);
@Override
public String getFilteredName(String oldFilename) {
@@ -95,6 +96,10 @@ public class PDFFilter extends MediaFilter {
try {
pdfDoc = PDDocument.load(source);
pts.writeText(pdfDoc, writer);
} catch (InvalidPasswordException ex) {
log.error("PDF is encrypted. Cannot extract text (item: {})",
() -> currentItem.getHandle());
return null;
} finally {
try {
if (pdfDoc != null) {

View File

@@ -10,7 +10,7 @@ package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
@@ -23,7 +23,7 @@ import org.dspace.content.Item;
*/
public class PowerPointFilter extends MediaFilter {
private static Logger log = Logger.getLogger(PowerPointFilter.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PowerPointFilter.class);
@Override
public String getFilteredName(String oldFilename) {

View File

@@ -1,93 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.mediafilter;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger;
import org.dspace.content.Item;
import org.textmining.extraction.TextExtractor;
import org.textmining.extraction.word.WordTextExtractorFactory;
/*
*
* to do: helpful error messages - can't find mediafilter.cfg - can't
* instantiate filter - bitstream format doesn't exist.
*
*/
public class WordFilter extends MediaFilter {
private static Logger log = Logger.getLogger(WordFilter.class);
@Override
public String getFilteredName(String oldFilename) {
return oldFilename + ".txt";
}
/**
* @return String bundle name
*/
@Override
public String getBundleName() {
return "TEXT";
}
/**
* @return String bitstreamformat
*/
@Override
public String getFormatString() {
return "Text";
}
/**
* @return String description
*/
@Override
public String getDescription() {
return "Extracted text";
}
/**
* @param currentItem item
* @param source source input stream
* @param verbose verbose mode
* @return InputStream the resulting input stream
* @throws Exception if error
*/
@Override
public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose)
throws Exception {
// get input stream from bitstream
// pass to filter, get string back
try {
WordTextExtractorFactory factory = new WordTextExtractorFactory();
TextExtractor e = factory.textExtractor(source);
String extractedText = e.getText();
// if verbose flag is set, print out extracted text
// to STDOUT
if (verbose) {
System.out.println(extractedText);
}
// generate an input stream with the extracted text
byte[] textBytes = extractedText.getBytes();
ByteArrayInputStream bais = new ByteArrayInputStream(textBytes);
return bais; // will this work? or will the byte array be out of scope?
} catch (IOException ioe) {
System.out.println("Invalid Word Format");
log.error("Error detected - Word File format not recognized: "
+ ioe.getMessage(), ioe);
throw ioe;
}
}
}

View File

@@ -78,7 +78,7 @@ public class RequestItem implements ReloadableEntity<Integer> {
private Date request_date = null;
@Column(name = "accept_request")
private Boolean accept_request = null;
private boolean accept_request;
/**
* Protected constructor, create object using:
@@ -88,6 +88,7 @@ public class RequestItem implements ReloadableEntity<Integer> {
protected RequestItem() {
}
@Override
public Integer getID() {
return requestitem_id;
}

View File

@@ -9,8 +9,8 @@ package org.dspace.app.requestitem;
import java.sql.SQLException;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Item;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class RequestItemHelpdeskStrategy extends RequestItemSubmitterStrategy {
private Logger log = Logger.getLogger(RequestItemHelpdeskStrategy.class);
private Logger log = org.apache.logging.log4j.LogManager.getLogger(RequestItemHelpdeskStrategy.class);
@Autowired(required = true)
protected EPersonService ePersonService;

View File

@@ -10,7 +10,7 @@ package org.dspace.app.requestitem;
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.dspace.content.Item;
import org.dspace.content.MetadataValue;
import org.dspace.content.service.ItemService;

View File

@@ -10,7 +10,7 @@ package org.dspace.app.requestitem;
import java.sql.SQLException;
import java.util.Date;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.app.requestitem.dao.RequestItemDAO;
import org.dspace.app.requestitem.service.RequestItemService;
import org.dspace.content.Bitstream;
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class RequestItemServiceImpl implements RequestItemService {
private final Logger log = Logger.getLogger(RequestItemServiceImpl.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(RequestItemServiceImpl.class);
@Autowired(required = true)
protected RequestItemDAO requestItemDAO;

View File

@@ -8,13 +8,15 @@
package org.dspace.app.requestitem.dao.impl;
import java.sql.SQLException;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.dspace.app.requestitem.RequestItem;
import org.dspace.app.requestitem.RequestItem_;
import org.dspace.app.requestitem.dao.RequestItemDAO;
import org.dspace.core.AbstractHibernateDAO;
import org.dspace.core.Context;
import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
/**
* Hibernate implementation of the Database Access Object interface class for the RequestItem object.
@@ -30,9 +32,12 @@ public class RequestItemDAOImpl extends AbstractHibernateDAO<RequestItem> implem
@Override
public RequestItem findByToken(Context context, String token) throws SQLException {
Criteria criteria = createCriteria(context, RequestItem.class);
criteria.add(Restrictions.eq("token", token));
return uniqueResult(criteria);
CriteriaBuilder criteriaBuilder = getCriteriaBuilder(context);
CriteriaQuery criteriaQuery = getCriteriaQuery(criteriaBuilder, RequestItem.class);
Root<RequestItem> requestItemRoot = criteriaQuery.from(RequestItem.class);
criteriaQuery.select(requestItemRoot);
criteriaQuery.where(criteriaBuilder.equal(requestItemRoot.get(RequestItem_.token), token));
return uniqueResult(context, criteriaQuery, false, RequestItem.class, -1, -1);
}

View File

@@ -15,8 +15,8 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.sfx.service.SFXFileReaderService;
import org.dspace.content.DCPersonName;
import org.dspace.content.Item;
@@ -58,7 +58,7 @@ public class SFXFileReaderServiceImpl implements SFXFileReaderService {
/**
* log4j logger
*/
private final Logger log = Logger.getLogger(SFXFileReaderServiceImpl.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(SFXFileReaderServiceImpl.class);
protected SFXFileReaderServiceImpl() {
}

View File

@@ -15,6 +15,9 @@ import java.util.List;
* @author Andrea Bollini
*/
public class SHERPAPublisher {
private String id;
private String name;
private String alias;
@@ -49,7 +52,7 @@ public class SHERPAPublisher {
private String dateupdated;
public SHERPAPublisher(String name, String alias, String homeurl,
public SHERPAPublisher(String id, String name, String alias, String homeurl,
String prearchiving, List<String> prerestriction,
String postarchiving, List<String> postrestriction,
String pubarchiving, List<String> pubrestriction,
@@ -57,6 +60,8 @@ public class SHERPAPublisher {
String paidaccessname, String paidaccessnotes,
List<String[]> copyright, String romeocolour, String datedded,
String dateupdated) {
this.id = id;
this.name = name;
this.alias = alias;
@@ -160,4 +165,11 @@ public class SHERPAPublisher {
return dateupdated;
}
/**
* Generic getter for the id
* @return the id value of this SHERPAPublisher
*/
public String getId() {
return id;
}
}

View File

@@ -13,7 +13,8 @@ import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -24,7 +25,9 @@ import org.w3c.dom.Element;
* @author Andrea Bollini
*/
public class SHERPAResponse {
private boolean error;
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPAResponse.class);
private int numHits;
private String message;
@@ -57,12 +60,13 @@ public class SHERPAResponse {
Element publishersElement = XMLUtils.getSingleElement(xmlRoot,
"publishers");
message = XMLUtils.getElementValue(headersElement, "message");
if (StringUtils.isNotBlank(message)) {
error = true;
return;
String numhitsString = XMLUtils.getElementValue(headersElement, "numhits");
if (StringUtils.isNotBlank(numhitsString)) {
numHits = Integer.parseInt(numhitsString);
} else {
numHits = 0;
}
message = XMLUtils.getElementValue(headersElement, "message");
license = XMLUtils.getElementValue(headersElement, "license");
licenseURL = XMLUtils.getElementValue(headersElement, "licenseurl");
@@ -112,9 +116,8 @@ public class SHERPAResponse {
Element copyrightlinksElement = XMLUtils.getSingleElement(
publisherElement, "copyrightlinks");
publishers
.add(new SHERPAPublisher(XMLUtils.getElementValue(
.add(new SHERPAPublisher(publisherElement.getAttribute("id"), XMLUtils.getElementValue(
publisherElement, "name"),
XMLUtils.getElementValue(publisherElement,
"alias"), XMLUtils.getElementValue(
@@ -162,17 +165,12 @@ public class SHERPAResponse {
}
}
} catch (Exception e) {
error = true;
log.error("Error parsing SHERPA API Response", e);
}
}
public SHERPAResponse(String message) {
this.message = message;
this.error = true;
}
public boolean isError() {
return error;
}
public String getMessage() {
@@ -198,4 +196,8 @@ public class SHERPAResponse {
public List<SHERPAPublisher> getPublishers() {
return publishers;
}
public int getNumHits() {
return numHits;
}
}

View File

@@ -7,7 +7,7 @@
*/
package org.dspace.app.sherpa;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@@ -16,7 +16,7 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.core.ConfigurationManager;
public class SHERPAService {
@@ -29,7 +29,7 @@ public class SHERPAService {
/**
* log4j category
*/
private static final Logger log = Logger.getLogger(SHERPAService.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPAService.class);
public SHERPAService() {
HttpClientBuilder builder = HttpClientBuilder.create();

View File

@@ -11,8 +11,8 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.app.sherpa.SHERPAResponse;
import org.dspace.app.sherpa.SHERPAService;
import org.dspace.content.Item;
@@ -27,7 +27,7 @@ public class SHERPASubmitService {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(SHERPASubmitService.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SHERPASubmitService.class);
public void setConfiguration(SHERPASubmitConfigurationService configuration) {
this.configuration = configuration;

View File

@@ -27,9 +27,9 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.Item;
@@ -52,7 +52,7 @@ public class GenerateSitemaps {
/**
* Logger
*/
private static Logger log = Logger.getLogger(GenerateSitemaps.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(GenerateSitemaps.class);
private static final CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
private static final CollectionService collectionService =
@@ -152,11 +152,11 @@ public class GenerateSitemaps {
*/
public static void generateSitemaps(boolean makeHTMLMap,
boolean makeSitemapOrg) throws SQLException, IOException {
String sitemapStem = configurationService.getProperty("dspace.url")
String sitemapStem = configurationService.getProperty("dspace.ui.url")
+ "/sitemap";
String htmlMapStem = configurationService.getProperty("dspace.url")
String htmlMapStem = configurationService.getProperty("dspace.ui.url")
+ "/htmlmap";
String handleURLStem = configurationService.getProperty("dspace.url")
String handleURLStem = configurationService.getProperty("dspace.ui.url")
+ "/handle/";
File outputDir = new File(configurationService.getProperty("sitemap.dir"));
@@ -293,7 +293,7 @@ public class GenerateSitemaps {
.getProperty("http.proxy.port"));
}
String sitemapURL = configurationService.getProperty("dspace.url")
String sitemapURL = configurationService.getProperty("dspace.ui.url")
+ "/sitemap";
URL url = new URL(engineURL + URLEncoder.encode(sitemapURL, "UTF-8"));

View File

@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.core.Utils;
import org.dspace.discovery.DiscoverQuery;
import org.dspace.discovery.SearchServiceException;
import org.dspace.discovery.SearchUtils;
@@ -581,9 +582,9 @@ public class LogAnalyser {
}
// now do the host name and url lookup
hostName = ConfigurationManager.getProperty("dspace.hostname").trim();
hostName = Utils.getHostName(ConfigurationManager.getProperty("dspace.ui.url"));
name = ConfigurationManager.getProperty("dspace.name").trim();
url = ConfigurationManager.getProperty("dspace.url").trim();
url = ConfigurationManager.getProperty("dspace.ui.url").trim();
if ((url != null) && (!url.endsWith("/"))) {
url = url + "/";
}

View File

@@ -28,7 +28,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.dspace.content.Item;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.content.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
@@ -763,9 +763,10 @@ public class ReportGenerator {
// build the referece
// FIXME: here we have blurred the line between content and presentation
// and it should probably be un-blurred
List<MetadataValue> title = itemService.getMetadata(item, MetadataSchema.DC_SCHEMA, "title", null, Item.ANY);
List<MetadataValue> title = itemService.getMetadata(item, MetadataSchemaEnum.DC.getName(),
"title", null, Item.ANY);
List<MetadataValue> author = itemService
.getMetadata(item, MetadataSchema.DC_SCHEMA, "contributor", "author", Item.ANY);
.getMetadata(item, MetadataSchemaEnum.DC.getName(), "contributor", "author", Item.ANY);
StringBuffer authors = new StringBuffer();
if (author.size() > 0) {

View File

@@ -15,7 +15,7 @@ package org.dspace.app.statistics;
*
* @author Richard Jones
*/
public class Stat implements Comparable {
public class Stat implements Comparable<Stat> {
// FIXME: this class is functional but a bit messy, and should be neatened
// up and completed
@@ -132,17 +132,17 @@ public class Stat implements Comparable {
/**
* compare the current object to the given object returning -1 if o is less
* than the current object, 0 if they are the same, and +1 if o is greater
* than the current object.
* Compare the current Stat to the given Stat returning -1 if o is less
* than the current Stat, 0 if they are the same, and +1 if o is greater
* than the current Stat.
*
* @param o the object to compare to the current one
* @param stat the Stat object to compare to the current one
* @return +1, 0, -1 if o is less than, equal to, or greater than the
* current object value.
*/
@Override
public int compareTo(Object o) {
int objectValue = ((Stat) o).getValue();
public int compareTo(Stat stat) {
int objectValue = stat.getValue();
if (objectValue < this.getValue()) {
return -1;

View File

@@ -21,7 +21,7 @@ import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.dspace.core.ConfigurationManager;
/**

View File

@@ -50,16 +50,16 @@ abstract public class AbstractDSpaceWebapp
/**
* Construct a particular kind of DSpace application.
*
* @param kind what kind of application is this? (XMLUI, JSPUI, etc.)
* @param kind what kind of application is this?
*/
public AbstractDSpaceWebapp(String kind) {
this.kind = kind;
started = new Date();
url = ConfigurationManager.getProperty("dspace.url");
url = ConfigurationManager.getProperty("dspace.ui.url");
if (null == url) {
throw new IllegalStateException("dspace.url is undefined");
throw new IllegalStateException("dspace.ui.url is undefined");
}
}

View File

@@ -34,12 +34,6 @@ import org.dspace.core.Context;
*/
public class AuthorizeUtil {
private static final AuthorizeService authorizeService =
AuthorizeServiceFactory.getInstance().getAuthorizeService();
private static final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
private static final CollectionService collectionService =
ContentServiceFactory.getInstance().getCollectionService();
/**
* Default constructor
*/
@@ -95,8 +89,9 @@ public class AuthorizeUtil {
*/
public static void authorizeManageItemPolicy(Context context, Item item)
throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canItemAdminManagePolicies()) {
authorizeService.authorizeAction(context, item, Constants.ADMIN);
AuthorizeServiceFactory.getInstance().getAuthorizeService().authorizeAction(context, item, Constants.ADMIN);
} else if (AuthorizeConfiguration.canCollectionAdminManageItemPolicies()) {
authorizeService.authorizeAction(context, item
.getOwningCollection(), Constants.ADMIN);
@@ -124,6 +119,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageCollectionPolicy(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCollectionAdminManagePolicies()) {
authorizeService.authorizeAction(context, collection,
Constants.ADMIN);
@@ -151,6 +147,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageCommunityPolicy(Context context,
Community community) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCommunityAdminManagePolicies()) {
authorizeService.authorizeAction(context, community,
Constants.ADMIN);
@@ -171,6 +168,7 @@ public class AuthorizeUtil {
*/
public static void requireAdminRole(Context context)
throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (!authorizeService.isAdmin(context)) {
throw new AuthorizeException(
"Only system admin are allowed to perform this action");
@@ -191,6 +189,8 @@ public class AuthorizeUtil {
*/
public static void authorizeManageCCLicense(Context context, Item item)
throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
ItemService itemService = ContentServiceFactory.getInstance().getItemService();
try {
authorizeService.authorizeAction(context, item, Constants.ADD);
authorizeService.authorizeAction(context, item, Constants.REMOVE);
@@ -224,6 +224,8 @@ public class AuthorizeUtil {
*/
public static void authorizeManageTemplateItem(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
boolean isAuthorized = collectionService.canEditBoolean(context, collection, false);
if (!isAuthorized
@@ -258,6 +260,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageSubmittersGroup(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCollectionAdminManageSubmitters()) {
authorizeService.authorizeAction(context, collection,
Constants.ADMIN);
@@ -285,6 +288,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageWorkflowsGroup(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCollectionAdminManageWorkflows()) {
authorizeService.authorizeAction(context, collection,
Constants.ADMIN);
@@ -313,6 +317,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageAdminGroup(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCollectionAdminManageAdminGroup()) {
authorizeService.authorizeAction(context, collection,
Constants.ADMIN);
@@ -341,6 +346,7 @@ public class AuthorizeUtil {
*/
public static void authorizeRemoveAdminGroup(Context context,
Collection collection) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
List<Community> parentCommunities = collection.getCommunities();
if (AuthorizeConfiguration
.canCommunityAdminManageCollectionAdminGroup()
@@ -368,6 +374,7 @@ public class AuthorizeUtil {
*/
public static void authorizeManageAdminGroup(Context context,
Community community) throws AuthorizeException, SQLException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCommunityAdminManageAdminGroup()) {
authorizeService.authorizeAction(context, community,
Constants.ADMIN);
@@ -392,6 +399,7 @@ public class AuthorizeUtil {
*/
public static void authorizeRemoveAdminGroup(Context context,
Community community) throws SQLException, AuthorizeException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
List<Community> parentCommunities = community.getParentCommunities();
Community parentCommunity = null;
if (0 < parentCommunities.size()) {
@@ -458,6 +466,7 @@ public class AuthorizeUtil {
public static void authorizeWithdrawItem(Context context, Item item)
throws SQLException, AuthorizeException {
boolean authorized = false;
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
if (AuthorizeConfiguration.canCollectionAdminPerformItemWithdrawn()) {
authorized = authorizeService.authorizeActionBoolean(context, item
.getOwningCollection(), Constants.ADMIN);
@@ -492,6 +501,7 @@ public class AuthorizeUtil {
*/
public static void authorizeReinstateItem(Context context, Item item)
throws SQLException, AuthorizeException {
AuthorizeService authorizeService = AuthorizeServiceFactory.getInstance().getAuthorizeService();
List<Collection> colls = item.getCollections();
for (Collection coll : colls) {

View File

@@ -0,0 +1,58 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.util;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import org.dspace.core.Context;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.dspace.services.CachingService;
/**
* List all EhCache CacheManager and Cache instances.
*
* <p>This is a debugging tool, not used in the daily operation of DSpace.
* Just run it from the installed instance using
* {@code bin/dspace dsrun org.dspace.app.util.CacheSnooper}
* to check that the cache configuration is what you expect it to be,
* given your configuration.
*
* <p>This was created to prove a specific cache configuration patch,
* but I leave it here in the hope that it may be useful to others.
*
* @author Mark H. Wood <mwood@iupui.edu>
*/
public class CacheSnooper {
private CacheSnooper() { }
public static void main(String[] argv) {
// Ensure that the DSpace kernel is started.
DSpaceKernelImpl kernel = DSpaceKernelInit.getKernel(null);
// Ensure that the services cache manager is started.
CachingService serviceCaches = kernel.getServiceManager()
.getServiceByName(null, CachingService.class);
// Ensure that the database layer is started.
Context ctx = new Context();
// List those caches!
for (CacheManager manager : CacheManager.ALL_CACHE_MANAGERS) {
System.out.format("CacheManager: %s%n", manager);
for (String cacheName : manager.getCacheNames()) {
Cache cache = manager.getCache(cacheName);
System.out.format(" Cache: '%s'; maxHeap: %d; maxDisk: %d%n",
cacheName,
cache.getCacheConfiguration().getMaxEntriesLocalHeap(),
cache.getCacheConfiguration().getMaxEntriesLocalDisk());
}
}
}
}

View File

@@ -13,8 +13,8 @@ import java.util.Map;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.apache.commons.lang.StringUtils;
import org.dspace.content.MetadataSchema;
import org.apache.commons.lang3.StringUtils;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.core.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -63,6 +63,12 @@ public class DCInput {
*/
private String label = null;
/**
* a style instruction to apply to the input. The exact way to use the style value is UI depending that receive the
* value from the REST API as is
*/
private String style = null;
/**
* the input type
*/
@@ -83,6 +89,11 @@ public class DCInput {
*/
private boolean repeatable = false;
/**
* should name-variants be used?
*/
private boolean nameVariants = false;
/**
* 'hint' text to display
*/
@@ -128,6 +139,12 @@ public class DCInput {
*/
private List<String> typeBind = null;
private boolean isRelationshipField = false;
private boolean isMetadataField = false;
private String relationshipType = null;
private String searchConfiguration = null;
private String filter;
/**
* The scope of the input sets, this restricts hidden metadata fields from
* view during workflow processing.
@@ -154,7 +171,7 @@ public class DCInput {
// Default the schema to dublin core
dcSchema = fieldMap.get("dc-schema");
if (dcSchema == null) {
dcSchema = MetadataSchema.DC_SCHEMA;
dcSchema = MetadataSchemaEnum.DC.getName();
}
//check if the input have a language tag
@@ -171,6 +188,9 @@ public class DCInput {
String repStr = fieldMap.get("repeatable");
repeatable = "true".equalsIgnoreCase(repStr)
|| "yes".equalsIgnoreCase(repStr);
String nameVariantsString = fieldMap.get("name-variants");
nameVariants = (StringUtils.isNotBlank(nameVariantsString)) ?
nameVariantsString.equalsIgnoreCase("true") : false;
label = fieldMap.get("label");
inputType = fieldMap.get("input-type");
// these types are list-controlled
@@ -199,7 +219,12 @@ public class DCInput {
typeBind.add(type.trim());
}
}
style = fieldMap.get("style");
isRelationshipField = fieldMap.containsKey("relationship-type");
isMetadataField = fieldMap.containsKey("dc-schema");
relationshipType = fieldMap.get("relationship-type");
searchConfiguration = fieldMap.get("search-configuration");
filter = fieldMap.get("filter");
}
/**
@@ -252,6 +277,15 @@ public class DCInput {
return isRepeatable();
}
/**
* Get the nameVariants flag for this row
*
* @return the nameVariants flag
*/
public boolean areNameVariantsAllowed() {
return nameVariants;
}
/**
* Get the input type for this row
*
@@ -262,7 +296,7 @@ public class DCInput {
}
/**
* Get the DC element for this form row.
* Get the DC element for this form field.
*
* @return the DC element
*/
@@ -271,7 +305,7 @@ public class DCInput {
}
/**
* Get the DC namespace prefix for this form row.
* Get the DC namespace prefix for this form field.
*
* @return the DC namespace prefix
*/
@@ -290,7 +324,7 @@ public class DCInput {
}
/**
* Is there a required string for this form row?
* Is there a required string for this form field?
*
* @return true if a required string is set
*/
@@ -299,7 +333,7 @@ public class DCInput {
}
/**
* Get the DC qualifier for this form row.
* Get the DC qualifier for this form field.
*
* @return the DC qualifier
*/
@@ -308,7 +342,7 @@ public class DCInput {
}
/**
* Get the language for this form row.
* Get the language for this form field.
*
* @return the language state
*/
@@ -317,7 +351,7 @@ public class DCInput {
}
/**
* Get the hint for this form row, formatted for an HTML table
* Get the hint for this form field
*
* @return the hints
*/
@@ -326,7 +360,7 @@ public class DCInput {
}
/**
* Get the label for this form row.
* Get the label for this form field.
*
* @return the label
*/
@@ -334,6 +368,15 @@ public class DCInput {
return label;
}
/**
* Get the style for this form field
*
* @return the style
*/
public String getStyle() {
return style;
}
/**
* Get the name of the pairs type
*
@@ -466,6 +509,18 @@ public class DCInput {
return Utils.standardize(this.getSchema(), this.getElement(), this.getQualifier(), ".");
}
public String getRelationshipType() {
return relationshipType;
}
public String getSearchConfiguration() {
return searchConfiguration;
}
public String getFilter() {
return filter;
}
public boolean isQualdropValue() {
if ("qualdrop_value".equals(getInputType())) {
return true;
@@ -490,4 +545,22 @@ public class DCInput {
return true;
}
/**
* Verify whether the current field contains an entity relationship
* This also implies a relationship type is defined for this field
* The field can contain both an entity relationship and a metadata field simultaneously
*/
public boolean isRelationshipField() {
return isRelationshipField;
}
/**
* Verify whether the current field contains a metadata field
* This also implies a field type is defined for this field
* The field can contain both an entity relationship and a metadata field simultaneously
*/
public boolean isMetadataField() {
return isMetadataField;
}
}

View File

@@ -25,25 +25,26 @@ public class DCInputSet {
/**
* the inputs ordered by row position
*/
private DCInput[] inputs = null;
private DCInput[][] inputs = null;
/**
* constructor
*
* @param formName form name
* @param headings
* @param mandatoryFlags
* @param fields fields
* @param rows the rows
* @param listMap map
*/
public DCInputSet(String formName,
List<Map<String, String>> fields, Map<String, List<String>> listMap) {
public DCInputSet(String formName, List<List<Map<String, String>>> rows, Map<String, List<String>> listMap) {
this.formName = formName;
this.inputs = new DCInput[fields.size()];
this.inputs = new DCInput[rows.size()][];
for (int i = 0; i < inputs.length; i++) {
Map<String, String> field = fields.get(i);
inputs[i] = new DCInput(field, listMap);
List<Map<String, String>> fields = rows.get(i);
inputs[i] = new DCInput[fields.size()];
for (int j = 0; j < inputs[i].length; j++) {
Map<String, String> field = rows.get(i).get(j);
inputs[i][j] = new DCInput(field, listMap);
}
}
}
@@ -71,7 +72,7 @@ public class DCInputSet {
* @return an array containing the fields
*/
public DCInput[] getFields() {
public DCInput[][] getFields() {
return inputs;
}
@@ -104,10 +105,12 @@ public class DCInputSet {
*/
public boolean isFieldPresent(String fieldName) {
for (int i = 0; i < inputs.length; i++) {
DCInput field = inputs[i];
String fullName = field.getFieldName();
if (fullName.equals(fieldName)) {
return true;
for (int j = 0; j < inputs[i].length; j++) {
DCInput field = inputs[i][j];
String fullName = field.getFieldName();
if (fullName.equals(fieldName)) {
return true;
}
}
}
return false;
@@ -127,11 +130,13 @@ public class DCInputSet {
documentType = "";
}
for (int i = 0; i < inputs.length; i++) {
DCInput field = inputs[i];
String fullName = field.getFieldName();
if (fullName.equals(fieldName)) {
if (field.isAllowedFor(documentType)) {
return true;
for (int j = 0; j < inputs[i].length; j++) {
DCInput field = inputs[i][j];
String fullName = field.getFieldName();
if (fullName.equals(fieldName)) {
if (field.isAllowedFor(documentType)) {
return true;
}
}
}
}

View File

@@ -21,7 +21,7 @@ import javax.xml.parsers.FactoryConfigurationError;
import org.apache.commons.lang3.StringUtils;
import org.dspace.content.Collection;
import org.dspace.content.MetadataSchema;
import org.dspace.content.MetadataSchemaEnum;
import org.dspace.core.Utils;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.w3c.dom.Document;
@@ -74,7 +74,7 @@ public class DCInputsReader {
* Reference to the forms definitions map, computed from the forms
* definition file
*/
private Map<String, List<Map<String, String>>> formDefns = null;
private Map<String, List<List<Map<String, String>>>> formDefns = null;
/**
* Reference to the value-pairs map, computed from the forms definition file
@@ -115,7 +115,7 @@ public class DCInputsReader {
private void buildInputs(String fileName)
throws DCInputsReaderException {
formDefns = new HashMap<String, List<Map<String, String>>>();
formDefns = new HashMap<String, List<List<Map<String, String>>>>();
valuePairs = new HashMap<String, List<String>>();
String uri = "file:" + new File(fileName).getAbsolutePath();
@@ -212,7 +212,7 @@ public class DCInputsReader {
return lastInputSet;
}
// cache miss - construct new DCInputSet
List<Map<String, String>> pages = formDefns.get(formName);
List<List<Map<String, String>>> pages = formDefns.get(formName);
if (pages == null) {
throw new DCInputsReaderException("Missing the " + formName + " form");
}
@@ -292,8 +292,8 @@ public class DCInputsReader {
/**
* Process the form-definitions section of the XML file. Each element is
* formed thusly: <form name="formname">...pages...</form> Each pages
* subsection is formed: <page number="#"> ...fields... </page> Each field
* formed thusly: <form name="formname">...row...</form> Each rows
* subsection is formed: <row> ...fields... </row> Each field
* is formed from: dc-element, dc-qualifier, label, hint, input-type name,
* required text, and repeatable flag.
*/
@@ -311,26 +311,24 @@ public class DCInputsReader {
if (formName == null) {
throw new SAXException("form element has no name attribute");
}
List<Map<String, String>> fields = new ArrayList<Map<String, String>>(); // the form contains fields
formDefns.put(formName, fields);
List<List<Map<String, String>>> rows = new ArrayList<List<Map<String, String>>>(); // the form
// contains rows of fields
formDefns.put(formName, rows);
NodeList pl = nd.getChildNodes();
int lenpg = pl.getLength();
for (int j = 0; j < lenpg; j++) {
Node npg = pl.item(j);
if (npg.getNodeName().equals("field")) {
// process each field definition
Map<String, String> field = new HashMap<String, String>();
processField(formName, npg, field);
fields.add(field);
// we omit the duplicate validation, allowing multiple
// fields definition for
// the same metadata and different visibility/type-bind
if (npg.getNodeName().equals("row")) {
List<Map<String, String>> fields = new ArrayList<Map<String, String>>(); // the fields in the
// row
// process each row definition
processRow(formName, j, npg, fields);
rows.add(fields);
}
}
// sanity check number of fields
if (fields.size() < 1) {
throw new DCInputsReaderException("Form " + formName + " has no fields");
if (rows.size() < 1) {
throw new DCInputsReaderException("Form " + formName + " has no rows");
}
}
}
@@ -339,6 +337,52 @@ public class DCInputsReader {
}
}
/**
* Process parts of a row
*/
private void processRow(String formName, int rowIdx, Node n, List<Map<String, String>> fields)
throws SAXException, DCInputsReaderException {
NodeList pl = n.getChildNodes();
int lenpg = pl.getLength();
for (int j = 0; j < lenpg; j++) {
Node npg = pl.item(j);
if (npg.getNodeName().equals("field")) {
// process each field definition
Map<String, String> field = new HashMap<String, String>();
processField(formName, npg, field);
fields.add(field);
String key = field.get(PAIR_TYPE_NAME);
if (StringUtils
.isNotBlank(key)) {
String schema = field.get("dc-schema");
String element = field.get("dc-element");
String qualifier = field
.get("dc-qualifier");
String metadataField = schema + "."
+ element;
if (StringUtils.isNotBlank(qualifier)) {
metadataField += "." + qualifier;
}
}
// we omit the duplicate validation, allowing multiple
// fields definition for
// the same metadata and different visibility/type-bind
} else if (StringUtils.equalsIgnoreCase(npg.getNodeName(), "relation-field")) {
Map<String, String> relationField = new HashMap<>();
processField(formName, npg, relationField);
fields.add(relationField);
}
}
// sanity check number of fields
if (fields.size() < 1) {
throw new DCInputsReaderException("Form " + formName + "row " + rowIdx + " has no fields");
}
}
/**
* Process parts of a field
* At the end, make sure that input-types 'qualdrop_value' and
@@ -356,19 +400,7 @@ public class DCInputsReader {
String value = getValue(nd);
field.put(tagName, value);
if (tagName.equals("input-type")) {
if (value.equals("dropdown")
|| value.equals("qualdrop_value")
|| value.equals("list")) {
String pairTypeName = getAttribute(nd, PAIR_TYPE_NAME);
if (pairTypeName == null) {
throw new SAXException("Form " + formName + ", field " +
field.get("dc-element") +
"." + field.get("dc-qualifier") +
" has no name attribute");
} else {
field.put(PAIR_TYPE_NAME, pairTypeName);
}
}
handleInputTypeTagName(formName, field, nd, value);
} else if (tagName.equals("vocabulary")) {
String closedVocabularyString = getAttribute(nd, "closed");
field.put("closedVocabulary", closedVocabularyString);
@@ -384,17 +416,30 @@ public class DCInputsReader {
field.put(PAIR_TYPE_NAME, pairTypeName);
}
}
} else if (StringUtils.equalsIgnoreCase(tagName, "linked-metadata-field")) {
for (int j = 0; j < nd.getChildNodes().getLength(); j ++) {
Node nestedNode = nd.getChildNodes().item(j);
String nestedTagName = nestedNode.getNodeName();
String nestedValue = getValue(nestedNode);
field.put(nestedTagName, nestedValue);
if (nestedTagName.equals("input-type")) {
handleInputTypeTagName(formName, field, nestedNode, nestedValue);
}
}
}
}
}
String missing = null;
if (field.get("dc-element") == null) {
String nodeName = n.getNodeName();
if (field.get("dc-element") == null &&
(nodeName.equals("field") || field.containsKey("linked-metadata-field"))) {
missing = "dc-element";
}
if (field.get("label") == null) {
missing = "label";
}
if (field.get("input-type") == null) {
if (field.get("input-type") == null &&
(nodeName.equals("field") || field.containsKey("linked-metadata-field"))) {
missing = "input-type";
}
if (missing != null) {
@@ -402,7 +447,7 @@ public class DCInputsReader {
throw new SAXException(msg);
}
String type = field.get("input-type");
if (type.equals("twobox") || type.equals("qualdrop_value")) {
if (StringUtils.isNotBlank(type) && (type.equals("twobox") || type.equals("qualdrop_value"))) {
String rpt = field.get("repeatable");
if ((rpt == null) ||
((!rpt.equalsIgnoreCase("yes")) &&
@@ -413,6 +458,23 @@ public class DCInputsReader {
}
}
private void handleInputTypeTagName(String formName, Map<String, String> field, Node nd, String value)
throws SAXException {
if (value.equals("dropdown")
|| value.equals("qualdrop_value")
|| value.equals("list")) {
String pairTypeName = getAttribute(nd, PAIR_TYPE_NAME);
if (pairTypeName == null) {
throw new SAXException("Form " + formName + ", field " +
field.get("dc-element") +
"." + field.get("dc-qualifier") +
" has no name attribute");
} else {
field.put(PAIR_TYPE_NAME, pairTypeName);
}
}
}
/**
* Check that this is the only field with the name dc-element.dc-qualifier
* If there is a duplicate, return an error message, else return null;
@@ -424,7 +486,7 @@ public class DCInputsReader {
String elem = field.get("dc-element");
String qual = field.get("dc-qualifier");
if ((schema == null) || (schema.equals(""))) {
schema = MetadataSchema.DC_SCHEMA;
schema = MetadataSchemaEnum.DC.getName();
}
String schemaTest;
@@ -434,7 +496,7 @@ public class DCInputsReader {
Map<String, String> fld = pg.get(j);
if ((fld.get("dc-schema") == null) ||
((fld.get("dc-schema")).equals(""))) {
schemaTest = MetadataSchema.DC_SCHEMA;
schemaTest = MetadataSchemaEnum.DC.getName();
} else {
schemaTest = fld.get("dc-schema");
}
@@ -537,26 +599,29 @@ public class DCInputsReader {
Iterator<String> ki = formDefns.keySet().iterator();
while (ki.hasNext()) {
String idName = ki.next();
List<Map<String, String>> fields = formDefns.get(idName);
for (int i = 0; i < fields.size(); i++) {
Map<String, String> fld = fields.get(i);
// verify reference in certain input types
String type = fld.get("input-type");
if (type.equals("dropdown")
|| type.equals("qualdrop_value")
|| type.equals("list")) {
String pairsName = fld.get(PAIR_TYPE_NAME);
List<String> v = valuePairs.get(pairsName);
if (v == null) {
String errString = "Cannot find value pairs for " + pairsName;
throw new DCInputsReaderException(errString);
List<List<Map<String, String>>> rows = formDefns.get(idName);
for (int j = 0; j < rows.size(); j++) {
List<Map<String, String>> fields = rows.get(j);
for (int i = 0; i < fields.size(); i++) {
Map<String, String> fld = fields.get(i);
// verify reference in certain input types
String type = fld.get("input-type");
if (StringUtils.isNotBlank(type) && (type.equals("dropdown")
|| type.equals("qualdrop_value")
|| type.equals("list"))) {
String pairsName = fld.get(PAIR_TYPE_NAME);
List<String> v = valuePairs.get(pairsName);
if (v == null) {
String errString = "Cannot find value pairs for " + pairsName;
throw new DCInputsReaderException(errString);
}
}
}
// we omit the "required" and "visibility" validation, provided this must be checked in the
// processing class
// only when it makes sense (if the field isn't visible means that it is not applicable, therefore it
// can't be required)
// we omit the "required" and "visibility" validation, provided this must be checked in the
// processing class
// only when it makes sense (if the field isn't visible means that it is not applicable,
// therefore it can't be required)
}
}
}
}
@@ -639,4 +704,5 @@ public class DCInputsReader {
}
throw new DCInputsReaderException("No field configuration found!");
}
}

View File

@@ -16,14 +16,14 @@ import java.util.Enumeration;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
/**
* Class to initialize / cleanup resources used by DSpace when the web application
* is started or stopped.
*/
public class DSpaceContextListener implements ServletContextListener {
private static Logger log = Logger.getLogger(DSpaceContextListener.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceContextListener.class);
/**
* Initialize any resources required by the application.

View File

@@ -1,299 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.util;
import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import org.apache.commons.lang.time.DateUtils;
import org.apache.log4j.FileAppender;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.spi.LoggingEvent;
/**
* Special log appender for log4j. Adds the current date (ie. year-mon) to
* the end of the file name, so that rolling on to the next log is simply
* a case of starting a new one - no renaming of old logs.
*
* This is advisable if you are using Windows, and have multiple applications
* (ie. dspace, dspace-oai, dspace-sword) that all want to write to the same log file,
* as each would otherwise try to rename the old files during rollover.
*
* An example log4j.properties (one log per month, retains three months of logs)
*
* log4j.rootCategory=INFO, A1
* log4j.appender.A1=org.dspace.app.util.DailyFileAppender
* log4j.appender.A1.File=@@log.dir@@/dspace.log
* log4j.appender.A1.DatePattern=yyyy-MM
* log4j.appender.A1.MaxLogs=3
* log4j.appender.A1.layout=org.apache.log4j.PatternLayout
* log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n
*/
public class DailyFileAppender extends FileAppender {
/**
* The fixed date pattern to be used if one is not specified.
*/
private static final String DATE_PATTERN = "yyyy-MM-dd";
/**
* The folder under which daily folders are created. This can be a absolute path
* or relative path also.
* e.g. JavaLogs/CPRILog or F:/LogFiles/CPRILog
*/
private String mstrFileName;
/**
* Used internally and contains the name of the date derived from current system date.
*/
private Date mstrDate = new Date(System.currentTimeMillis());
/**
* Holds the user specified DatePattern,
*/
private String mstrDatePattern = DATE_PATTERN;
private boolean mMonthOnly = false;
/**
* The date formatter object used for parsing the user specified DatePattern.
*/
private SimpleDateFormat mobjSDF;
private boolean mWithHostName = false;
private int mMaxLogs = 0;
/**
* Default constructor. This is required as the appender class is dynamically
* loaded.
*/
public DailyFileAppender() {
super();
}
/* (non-Javadoc)
* @see org.apache.log4j.FileAppender#activateOptions()
*/
@Override
public void activateOptions() {
setFileName();
cleanupOldFiles();
super.activateOptions();
}
/*------------------------------------------------------------------------------
* Getters
*----------------------------------------------------------------------------*/
public String getDatePattern() {
return this.mstrDatePattern;
}
@Override
public String getFile() {
return this.mstrFileName;
}
public boolean getWithHost() {
return mWithHostName;
}
public int getMaxLogs() {
return mMaxLogs;
}
/*------------------------------------------------------------------------------
* Setters
*----------------------------------------------------------------------------*/
public void setDatePattern(String pstrPattern) {
this.mstrDatePattern = checkPattern(pstrPattern);
if (mstrDatePattern.contains("dd") || mstrDatePattern.contains("DD")) {
mMonthOnly = false;
} else {
mMonthOnly = true;
}
}
@Override
public void setFile(String file) {
// Trim spaces from both ends. The users probably does not want
// trailing spaces in file names.
String val = file.trim();
mstrFileName = val;
}
public void setWithHost(boolean wh) {
mWithHostName = wh;
}
public void setMaxLogs(int ml) {
mMaxLogs = ml;
}
/*------------------------------------------------------------------------------
* Methods
*----------------------------------------------------------------------------*/
/* (non-Javadoc)
* @see org.apache.log4j.WriterAppender#subAppend(org.apache.log4j.spi.LoggingEvent)
*/
@Override
protected void subAppend(LoggingEvent pobjEvent) {
Date dtNow = new Date(System.currentTimeMillis());
boolean rollover = false;
if (mMonthOnly) {
Calendar now = Calendar.getInstance();
Calendar cur = Calendar.getInstance();
now.setTime(dtNow);
cur.setTime(mstrDate);
rollover = !(now.get(Calendar.YEAR) == cur.get(Calendar.YEAR) && now.get(Calendar.MONTH) == cur
.get(Calendar.MONTH));
} else {
rollover = !(DateUtils.isSameDay(dtNow, mstrDate));
}
if (rollover) {
try {
rollOver(dtNow);
} catch (IOException IOEx) {
LogLog.error("rollOver() failed!", IOEx);
}
}
super.subAppend(pobjEvent);
}
/*------------------------------------------------------------------------------
* Helpers
*----------------------------------------------------------------------------*/
/**
* The helper function to validate the DatePattern.
*
* @param pstrPattern The DatePattern to be validated.
* @return The validated date pattern or defautlt DATE_PATTERN
*/
private String checkPattern(String pstrPattern) {
String strRet = null;
SimpleDateFormat objFmt = new SimpleDateFormat(DATE_PATTERN);
try {
this.mobjSDF = new SimpleDateFormat(pstrPattern);
strRet = pstrPattern;
} catch (NullPointerException NPExIgnore) {
LogLog.error("Invalid DatePattern " + pstrPattern, NPExIgnore);
this.mobjSDF = objFmt;
strRet = DATE_PATTERN;
} catch (IllegalArgumentException IlArgExIgnore) {
LogLog.error("Invalid DatePattern " + pstrPattern, IlArgExIgnore);
this.mobjSDF = objFmt;
strRet = DATE_PATTERN;
} finally {
objFmt = null;
}
return strRet;
}
/**
* This function is responsible for performing the actual file rollover.
*
* @param pstrName The name of the new folder based on current system date.
* @throws IOException if IO error
*/
private static boolean deletingFiles = false;
private void cleanupOldFiles() {
// If we need to delete log files
if (mMaxLogs > 0 && !deletingFiles) {
deletingFiles = true;
// Determine the final file extension with the hostname
String hostFileExt = null;
try {
hostFileExt = "." + java.net.InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
LogLog.error("Unable to retrieve host name");
}
try {
// Array to hold the logs we are going to keep
File[] logsToKeep = new File[mMaxLogs];
// Get a 'master' file handle, and the parent directory from it
File logMaster = new File(mstrFileName);
File logDir = logMaster.getParentFile();
if (logDir.isDirectory()) {
// Iterate all the files in that directory
File[] logArr = logDir.listFiles();
for (File curLog : logArr) {
LogLog.debug("Comparing '" + curLog.getAbsolutePath() + "' to '" + mstrFileName + "'");
String name = curLog.getAbsolutePath();
// First, see if we are not using hostname, or the log file ends with this host
if (!mWithHostName || (hostFileExt != null && name.endsWith(hostFileExt))) {
// Check that the file is indeed one we want (contains the master file name)
if (name.contains(mstrFileName)) {
// Iterate through the array of logs we are keeping
for (int i = 0; curLog != null && i < logsToKeep.length; i++) {
// Have we exhausted the 'to keep' array?
if (logsToKeep[i] == null) {
// Empty space, retain this log file
logsToKeep[i] = curLog;
curLog = null;
} else if (logsToKeep[i].getName().compareTo(curLog.getName()) < 0) {
// If the 'kept' file is older than the current one
// Replace tested entry with current file
File temp = logsToKeep[i];
logsToKeep[i] = curLog;
curLog = temp;
}
}
// If we have a 'current' entry at this point, it's a log we don't want
if (curLog != null) {
LogLog.debug("Deleting log " + curLog.getName());
if (!curLog.delete()) {
LogLog.error("Unable to delete log file");
}
}
}
}
}
}
} catch (Exception e) {
// Don't worry about exceptions
} finally {
deletingFiles = false;
}
}
}
private void rollOver(Date dtNow) throws IOException {
mstrDate = dtNow;
setFileName();
this.setFile(fileName, true, bufferedIO, bufferSize);
cleanupOldFiles();
}
private void setFileName() {
fileName = mstrFileName + "." + mobjSDF.format(mstrDate);
if (mWithHostName) {
try {
fileName += "." + java.net.InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
LogLog.error("Unable to retrieve host name");
}
}
}
}

View File

@@ -12,7 +12,7 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Bitstream;
import org.dspace.content.BitstreamFormat;
import org.dspace.content.factory.ContentServiceFactory;
@@ -24,7 +24,7 @@ import org.dspace.core.Context;
*/
public class GoogleBitstreamComparator implements Comparator<Bitstream> {
private final static Logger log = Logger.getLogger(GoogleBitstreamComparator.class);
private final static Logger log = org.apache.logging.log4j.LogManager.getLogger(GoogleBitstreamComparator.class);
HashMap<String, Integer> priorityMap = new HashMap<>();
@@ -86,7 +86,7 @@ public class GoogleBitstreamComparator implements Comparator<Bitstream> {
if (priority1 > priority2) {
return 1;
} else if (priority1 == priority2) {
if (b1.getSize() <= b2.getSize()) {
if (b1.getSizeBytes() <= b2.getSizeBytes()) {
return 1;
} else {
return -1;

View File

@@ -26,7 +26,7 @@ import java.util.Properties;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.authorize.factory.AuthorizeServiceFactory;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
@@ -51,7 +51,7 @@ import org.jdom.Element;
@SuppressWarnings("deprecation")
public class GoogleMetadata {
private final static Logger log = Logger.getLogger(GoogleMetadata.class);
private final static Logger log = org.apache.logging.log4j.LogManager.getLogger(GoogleMetadata.class);
protected static final String GOOGLE_PREFIX = "google.";
@@ -889,7 +889,7 @@ public class GoogleMetadata {
Bitstream bitstream = findLinkableFulltext(item);
if (bitstream != null) {
StringBuilder path = new StringBuilder();
path.append(ConfigurationManager.getProperty("dspace.url"));
path.append(ConfigurationManager.getProperty("dspace.ui.url"));
if (item.getHandle() != null) {
path.append("/bitstream/");

View File

@@ -121,20 +121,24 @@ public class IndexVersion {
}
// Open this index directory in Lucene
Directory indexDir = FSDirectory.open(dir);
Directory indexDir = FSDirectory.open(dir.toPath());
// Get info on the Lucene segment file(s) in index directory
SegmentInfos sis = new SegmentInfos();
SegmentInfos sis;
try {
sis.read(indexDir);
sis = SegmentInfos.readLatestCommit(indexDir);
} catch (IOException ie) {
// Wrap default IOException, providing more info about which directory cannot be read
throw new IOException("Could not read Lucene segments files in " + dir.getAbsolutePath(), ie);
}
if (null == sis) {
throw new IOException("Could not read Lucene segments files in " + dir.getAbsolutePath());
}
// If we have a valid Solr index dir, but it has no existing segments
// then just return an empty string. It's a valid but empty index.
if (sis != null && sis.size() == 0) {
if (sis.size() == 0) {
return "";
}

View File

@@ -0,0 +1,245 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.util;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.EntityType;
import org.dspace.content.RelationshipType;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.EntityTypeService;
import org.dspace.content.service.RelationshipService;
import org.dspace.content.service.RelationshipTypeService;
import org.dspace.core.Context;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
* This script is used to initialize the database with a set of relationshiptypes that are written
* in an xml file that is given to this script.
* This XML file needs to have a proper XML structure and needs to define the variables of the RelationshipType object
*/
public class InitializeEntities {
private final static Logger log = LogManager.getLogger();
private RelationshipTypeService relationshipTypeService;
private RelationshipService relationshipService;
private EntityTypeService entityTypeService;
private InitializeEntities() {
relationshipTypeService = ContentServiceFactory.getInstance().getRelationshipTypeService();
relationshipService = ContentServiceFactory.getInstance().getRelationshipService();
entityTypeService = ContentServiceFactory.getInstance().getEntityTypeService();
}
/**
* The main method for this script
*
* @param argv The commandline arguments given with this command
* @throws SQLException If something goes wrong with the database
* @throws AuthorizeException If something goes wrong with permissions
* @throws ParseException If something goes wrong with the parsing
*/
public static void main(String[] argv) throws SQLException, AuthorizeException, ParseException {
InitializeEntities initializeEntities = new InitializeEntities();
CommandLineParser parser = new PosixParser();
Options options = createCommandLineOptions();
CommandLine line = parser.parse(options,argv);
String fileLocation = getFileLocationFromCommandLine(line);
checkHelpEntered(options, line);
initializeEntities.run(fileLocation);
}
private static void checkHelpEntered(Options options, CommandLine line) {
if (line.hasOption("h")) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("Intialize Entities", options);
System.exit(0);
}
}
private static String getFileLocationFromCommandLine(CommandLine line) {
String query = line.getOptionValue("f");
if (StringUtils.isEmpty(query)) {
System.out.println("No file location was entered");
log.info("No file location was entered");
System.exit(1);
}
return query;
}
protected static Options createCommandLineOptions() {
Options options = new Options();
options.addOption("f", "file", true, "the location for the file containing the xml data");
return options;
}
private void run(String fileLocation) throws SQLException, AuthorizeException {
Context context = new Context();
context.turnOffAuthorisationSystem();
this.parseXMLToRelations(context, fileLocation);
context.complete();
}
private void parseXMLToRelations(Context context, String fileLocation) throws AuthorizeException {
try {
File fXmlFile = new File(fileLocation);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = null;
dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
doc.getDocumentElement().normalize();
NodeList nList = doc.getElementsByTagName("type");
List<RelationshipType> relationshipTypes = new LinkedList<>();
for (int i = 0; i < nList.getLength(); i++) {
Node nNode = nList.item(i);
if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;
String leftType = eElement.getElementsByTagName("leftType").item(0).getTextContent();
String rightType = eElement.getElementsByTagName("rightType").item(0).getTextContent();
String leftwardType = eElement.getElementsByTagName("leftwardType").item(0).getTextContent();
String rightwardType = eElement.getElementsByTagName("rightwardType").item(0).getTextContent();
Node copyToLeftNode = eElement.getElementsByTagName("copyToLeft").item(0);
Boolean copyToLeft;
if (copyToLeftNode == null) {
copyToLeft = false;
} else {
copyToLeft = Boolean.valueOf(copyToLeftNode.getTextContent());
}
Node copyToRightNode = eElement.getElementsByTagName("copyToRight").item(0);
Boolean copyToRight;
if (copyToRightNode == null) {
copyToRight = false;
} else {
copyToRight = Boolean.valueOf(copyToRightNode.getTextContent());
}
NodeList leftCardinalityList = eElement.getElementsByTagName("leftCardinality");
NodeList rightCardinalityList = eElement.getElementsByTagName("rightCardinality");
String leftCardinalityMin = "";
String leftCardinalityMax = "";
String rightCardinalityMin = "";
String rightCardinalityMax = "";
for (int j = 0; j < leftCardinalityList.getLength(); j++) {
Node node = leftCardinalityList.item(j);
leftCardinalityMin = getString(leftCardinalityMin,(Element) node, "min");
leftCardinalityMax = getString(leftCardinalityMax,(Element) node, "max");
}
for (int j = 0; j < rightCardinalityList.getLength(); j++) {
Node node = rightCardinalityList.item(j);
rightCardinalityMin = getString(rightCardinalityMin,(Element) node, "min");
rightCardinalityMax = getString(rightCardinalityMax,(Element) node, "max");
}
populateRelationshipType(context, leftType, rightType, leftwardType, rightwardType,
leftCardinalityMin, leftCardinalityMax,
rightCardinalityMin, rightCardinalityMax, copyToLeft, copyToRight);
}
}
} catch (ParserConfigurationException | SAXException | IOException | SQLException e) {
log.error("An error occurred while parsing the XML file to relations", e);
}
}
private String getString(String leftCardinalityMin,Element node, String minOrMax) {
if (node.getElementsByTagName(minOrMax).getLength() > 0) {
leftCardinalityMin = node.getElementsByTagName(minOrMax).item(0).getTextContent();
}
return leftCardinalityMin;
}
private void populateRelationshipType(Context context, String leftType, String rightType, String leftwardType,
String rightwardType, String leftCardinalityMin, String leftCardinalityMax,
String rightCardinalityMin, String rightCardinalityMax,
Boolean copyToLeft, Boolean copyToRight)
throws SQLException, AuthorizeException {
EntityType leftEntityType = entityTypeService.findByEntityType(context,leftType);
if (leftEntityType == null) {
leftEntityType = entityTypeService.create(context, leftType);
}
EntityType rightEntityType = entityTypeService.findByEntityType(context, rightType);
if (rightEntityType == null) {
rightEntityType = entityTypeService.create(context, rightType);
}
Integer leftCardinalityMinInteger;
Integer leftCardinalityMaxInteger;
Integer rightCardinalityMinInteger;
Integer rightCardinalityMaxInteger;
if (StringUtils.isNotBlank(leftCardinalityMin)) {
leftCardinalityMinInteger = Integer.parseInt(leftCardinalityMin);
} else {
leftCardinalityMinInteger = null;
}
if (StringUtils.isNotBlank(leftCardinalityMax)) {
leftCardinalityMaxInteger = Integer.parseInt(leftCardinalityMax);
} else {
leftCardinalityMaxInteger = null;
}
if (StringUtils.isNotBlank(rightCardinalityMin)) {
rightCardinalityMinInteger = Integer.parseInt(rightCardinalityMin);
} else {
rightCardinalityMinInteger = null;
}
if (StringUtils.isNotBlank(rightCardinalityMax)) {
rightCardinalityMaxInteger = Integer.parseInt(rightCardinalityMax);
} else {
rightCardinalityMaxInteger = null;
}
RelationshipType relationshipType = relationshipTypeService
.findbyTypesAndTypeName(context, leftEntityType, rightEntityType, leftwardType, rightwardType);
if (relationshipType == null) {
relationshipTypeService.create(context, leftEntityType, rightEntityType, leftwardType, rightwardType,
leftCardinalityMinInteger, leftCardinalityMaxInteger,
rightCardinalityMinInteger, rightCardinalityMaxInteger,
copyToLeft, copyToRight);
} else {
relationshipType.setCopyToLeft(copyToLeft);
relationshipType.setCopyToRight(copyToRight);
relationshipType.setLeftMinCardinality(leftCardinalityMinInteger);
relationshipType.setLeftMaxCardinality(leftCardinalityMaxInteger);
relationshipType.setRightMinCardinality(rightCardinalityMinInteger);
relationshipType.setRightMaxCardinality(rightCardinalityMaxInteger);
relationshipTypeService.update(context, relationshipType);
}
}
}

View File

@@ -14,7 +14,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.service.MetadataExposureService;
import org.dspace.authorize.service.AuthorizeService;
import org.dspace.core.Context;
@@ -58,7 +58,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* @version $Revision: 3734 $
*/
public class MetadataExposureServiceImpl implements MetadataExposureService {
protected Logger log = Logger.getLogger(MetadataExposureServiceImpl.class);
protected Logger log = org.apache.logging.log4j.LogManager.getLogger(MetadataExposureServiceImpl.class);
protected Map<String, Set<String>> hiddenElementSets = null;
protected Map<String, Map<String, Set<String>>> hiddenElementMaps = null;

View File

@@ -20,11 +20,13 @@ import com.sun.syndication.feed.module.opensearch.OpenSearchModule;
import com.sun.syndication.feed.module.opensearch.entity.OSQuery;
import com.sun.syndication.feed.module.opensearch.impl.OpenSearchModuleImpl;
import com.sun.syndication.io.FeedException;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.service.OpenSearchService;
import org.dspace.content.DSpaceObject;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.discovery.IndexableObject;
import org.dspace.handle.service.HandleService;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -33,7 +35,6 @@ import org.jdom.JDOMException;
import org.jdom.Namespace;
import org.jdom.output.DOMOutputter;
import org.jdom.output.XMLOutputter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.w3c.dom.Document;
@@ -53,20 +54,14 @@ import org.w3c.dom.Document;
*
* @author Richard Rodgers
*/
public class OpenSearchServiceImpl implements OpenSearchService, InitializingBean {
private static final Logger log = Logger.getLogger(OpenSearchServiceImpl.class);
public class OpenSearchServiceImpl implements OpenSearchService {
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(OpenSearchServiceImpl.class);
// are open search queries enabled?
protected boolean enabled = false;
// supported results formats
protected List<String> formats = null;
// Namespaces used
protected final String osNs = "http://a9.com/-/spec/opensearch/1.1/";
// base search UI URL
protected String uiUrl = null;
// base search service URL
protected String svcUrl = null;
@Autowired(required = true)
protected ConfigurationService configurationService;
@Autowired(required = true)
protected HandleService handleService;
@@ -75,25 +70,35 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
}
@Override
public void afterPropertiesSet() throws Exception {
ConfigurationService config = DSpaceServicesFactory.getInstance().getConfigurationService();
enabled = config.getBooleanProperty("websvc.opensearch.enable");
svcUrl = config.getProperty("dspace.url") + "/" +
config.getProperty("websvc.opensearch.svccontext");
uiUrl = config.getProperty("dspace.url") + "/" +
config.getProperty("websvc.opensearch.uicontext");
// read rest of config info if enabled
formats = new ArrayList<String>();
if (enabled) {
String[] fmts = config.getArrayProperty("websvc.opensearch.formats");
public List<String> getFormats() {
List<String> formats = new ArrayList<>();
// read formats only if enabled
if (isEnabled()) {
String[] fmts = configurationService.getArrayProperty("websvc.opensearch.formats");
formats = Arrays.asList(fmts);
}
return formats;
}
@Override
public List<String> getFormats() {
return formats;
public boolean isEnabled() {
return configurationService.getBooleanProperty("websvc.opensearch.enable");
}
/**
* Get base search service URL (websvc.opensearch.svccontext)
*/
protected String getBaseSearchServiceURL() {
return configurationService.getProperty("dspace.server.url") + "/" +
configurationService.getProperty("websvc.opensearch.svccontext");
}
/**
* Get base search UI URL (websvc.opensearch.uicontext)
*/
protected String getBaseSearchUIURL() {
return configurationService.getProperty("dspace.server.url") + "/" +
configurationService.getProperty("websvc.opensearch.uicontext");
}
@Override
@@ -115,7 +120,7 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
@Override
public String getResultsString(Context context, String format, String query, int totalResults, int start,
int pageSize,
DSpaceObject scope, List<DSpaceObject> results,
IndexableObject scope, List<IndexableObject> results,
Map<String, String> labels) throws IOException {
try {
return getResults(context, format, query, totalResults, start, pageSize, scope, results, labels)
@@ -129,7 +134,7 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
@Override
public Document getResultsDoc(Context context, String format, String query, int totalResults, int start,
int pageSize,
DSpaceObject scope, List<DSpaceObject> results, Map<String, String> labels)
IndexableObject scope, List<IndexableObject> results, Map<String, String> labels)
throws IOException {
try {
return getResults(context, format, query, totalResults, start, pageSize, scope, results, labels)
@@ -141,8 +146,8 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
}
protected SyndicationFeed getResults(Context context, String format, String query, int totalResults, int start,
int pageSize,
DSpaceObject scope, List<DSpaceObject> results, Map<String, String> labels) {
int pageSize, IndexableObject scope,
List<IndexableObject> results, Map<String, String> labels) {
// Encode results in requested format
if ("rss".equals(format)) {
format = "rss_2.0";
@@ -221,13 +226,13 @@ public class OpenSearchServiceImpl implements OpenSearchService, InitializingBea
root.addContent(fav);
}
// service URLs
for (String format : formats) {
for (String format : getFormats()) {
Element url = new Element("Url", ns).setAttribute("type", getContentType(format));
StringBuilder template = new StringBuilder();
if ("html".equals(format)) {
template.append(uiUrl);
template.append(getBaseSearchUIURL());
} else {
template.append(svcUrl);
template.append(getBaseSearchServiceURL());
}
template.append("?query={searchTerms}");
if (!"html".equals(format)) {

View File

@@ -11,7 +11,7 @@ import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.CollectionService;
@@ -28,7 +28,7 @@ import org.springframework.util.StopWatch;
* Invocation: dsrun org.dspace.app.util.OptimizeSelectCollection
*/
public class OptimizeSelectCollection {
private static final Logger log = Logger.getLogger(OptimizeSelectCollection.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(OptimizeSelectCollection.class);
private static Context context;
private static ArrayList<EPerson> brokenPeople;

View File

@@ -12,7 +12,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
/**
* Class representing a single Item Submission config definition, organized into
@@ -44,7 +44,7 @@ public class SubmissionConfig implements Serializable {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(SubmissionConfig.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SubmissionConfig.class);
/**
* Constructs a new Submission Configuration object, based on the XML

View File

@@ -19,7 +19,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.core.Context;
@@ -71,7 +71,7 @@ public class SubmissionConfigReader {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(SubmissionConfigReader.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(SubmissionConfigReader.class);
/**
* The fully qualified pathname of the directory containing the Item Submission Configuration file

View File

@@ -34,9 +34,9 @@ import com.sun.syndication.feed.synd.SyndPerson;
import com.sun.syndication.feed.synd.SyndPersonImpl;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedOutput;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
@@ -50,8 +50,11 @@ import org.dspace.content.service.CollectionService;
import org.dspace.content.service.CommunityService;
import org.dspace.content.service.ItemService;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.discovery.IndexableObject;
import org.dspace.discovery.indexobject.IndexableCollection;
import org.dspace.discovery.indexobject.IndexableCommunity;
import org.dspace.discovery.indexobject.IndexableItem;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -69,7 +72,7 @@ import org.w3c.dom.Document;
* @author Larry Stone
*/
public class SyndicationFeed {
protected final Logger log = Logger.getLogger(SyndicationFeed.class);
protected final Logger log = org.apache.logging.log4j.LogManager.getLogger(SyndicationFeed.class);
/**
@@ -179,12 +182,12 @@ public class SyndicationFeed {
*
* @param request request
* @param context context
* @param dso DSpaceObject
* @param dso the scope
* @param items array of objects
* @param labels label map
*/
public void populate(HttpServletRequest request, Context context, DSpaceObject dso,
List<? extends DSpaceObject> items, Map<String, String> labels) {
public void populate(HttpServletRequest request, Context context, IndexableObject dso,
List<IndexableObject> items, Map<String, String> labels) {
String logoURL = null;
String objectURL = null;
String defaultTitle = null;
@@ -199,8 +202,8 @@ public class SyndicationFeed {
logoURL = ConfigurationManager.getProperty("webui.feed.logo.url");
} else {
Bitstream logo = null;
if (dso.getType() == Constants.COLLECTION) {
Collection col = (Collection) dso;
if (dso instanceof IndexableCollection) {
Collection col = ((IndexableCollection) dso).getIndexedObject();
defaultTitle = col.getName();
feed.setDescription(collectionService.getMetadata(col, "short_description"));
logo = col.getLogo();
@@ -208,8 +211,9 @@ public class SyndicationFeed {
if (cols != null && cols.length() > 1 && cols.contains(col.getHandle())) {
podcastFeed = true;
}
} else if (dso.getType() == Constants.COMMUNITY) {
Community comm = (Community) dso;
objectURL = resolveURL(request, col);
} else if (dso instanceof IndexableCommunity) {
Community comm = ((IndexableCommunity) dso).getIndexedObject();
defaultTitle = comm.getName();
feed.setDescription(communityService.getMetadata(comm, "short_description"));
logo = comm.getLogo();
@@ -217,8 +221,9 @@ public class SyndicationFeed {
if (comms != null && comms.length() > 1 && comms.contains(comm.getHandle())) {
podcastFeed = true;
}
objectURL = resolveURL(request, comm);
}
objectURL = resolveURL(request, dso);
if (logo != null) {
logoURL = urlOfBitstream(request, logo);
}
@@ -247,11 +252,11 @@ public class SyndicationFeed {
// add entries for items
if (items != null) {
List<SyndEntry> entries = new ArrayList<SyndEntry>();
for (DSpaceObject itemDSO : items) {
if (itemDSO.getType() != Constants.ITEM) {
for (IndexableObject idxObj : items) {
if (!(idxObj instanceof IndexableItem)) {
continue;
}
Item item = (Item) itemDSO;
Item item = ((IndexableItem) idxObj).getIndexedObject();
boolean hasDate = false;
SyndEntry entry = new SyndEntryImpl();
entries.add(entry);
@@ -366,7 +371,7 @@ public class SyndicationFeed {
if (ArrayUtils.contains(podcastableMIMETypes, mime)) {
SyndEnclosure enc = new SyndEnclosureImpl();
enc.setType(bit.getFormat(context).getMIMEType());
enc.setLength(bit.getSize());
enc.setLength(bit.getSizeBytes());
enc.setUrl(urlOfBitstream(request, bit));
enclosures.add(enc);
} else {
@@ -526,11 +531,9 @@ public class SyndicationFeed {
if (dso == null) {
if (baseURL == null) {
if (request == null) {
baseURL = ConfigurationManager.getProperty("dspace.url");
baseURL = ConfigurationManager.getProperty("dspace.ui.url");
} else {
baseURL = (request.isSecure()) ? "https://" : "http://";
baseURL += ConfigurationManager.getProperty("dspace.hostname");
baseURL += ":" + request.getServerPort();
baseURL = ConfigurationManager.getProperty("dspace.ui.url");
baseURL += request.getContextPath();
}
}

View File

@@ -22,9 +22,9 @@ import java.util.Set;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.Item;
import org.dspace.content.MetadataValue;
@@ -44,7 +44,7 @@ public class Util {
// cache for source version result
private static String sourceVersion = null;
private static Logger log = Logger.getLogger(Util.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(Util.class);
/**
* Default constructor. Must be protected as org.dspace.xmlworkflow.WorkflowUtils extends it
@@ -360,9 +360,13 @@ public class Util {
InputStream cis = null;
try {
cis = Util.class.getResourceAsStream("/META-INF/maven/org.dspace/dspace-api/pom.properties");
if (cis == null) {
// pom.properties will not exist when running tests
return "unknown";
}
constants.load(cis);
} catch (Exception e) {
log.error(e.getMessage(), e);
log.error("Could not open dspace-api's pom.properties", e);
} finally {
if (cis != null) {
try {
@@ -418,11 +422,12 @@ public class Util {
List<DCInputSet> inputSets = inputsReader.getInputsByCollectionHandle(col_handle);
// Replace the values of Metadatum[] with the correct ones in case
// of
// controlled vocabularies
String currentField = Utils.standardize(schema, element, qualifier, ".");
for (DCInputSet inputSet : inputSets) {
// Replace the values of Metadatum[] with the correct ones in case
// of
// controlled vocabularies
String currentField = Utils.standardize(schema, element, qualifier, ".");
if (inputSet != null) {
@@ -430,19 +435,20 @@ public class Util {
for (int p = 0; p < fieldsNums; p++) {
DCInput[] inputs = inputSet.getFields();
DCInput[][] inputs = inputSet.getFields();
if (inputs != null) {
for (int i = 0; i < inputs.length; i++) {
String inputField = Utils.standardize(inputs[i].getSchema(), inputs[i].getElement(),
inputs[i].getQualifier(), ".");
if (currentField.equals(inputField)) {
myInputs = inputs[i];
myInputsFound = true;
break;
for (int j = 0; j < inputs[i].length; j++) {
String inputField = Utils
.standardize(inputs[i][j].getSchema(), inputs[i][j].getElement(),
inputs[i][j].getQualifier(), ".");
if (currentField.equals(inputField)) {
myInputs = inputs[i][j];
myInputsFound = true;
break;
}
}
}
}
@@ -471,6 +477,26 @@ public class Util {
return toReturn;
}
/**
* Split a list in an array of i sub-lists uniformly sized
*
* @param idsList the list to split
* @param i the number of sublists to return
*
* @return an array of sub-lists of fixed size
*/
public static <T> List<T>[] splitList(List<T> idsList, int i) {
int setmin = idsList.size() / i;
List<T>[] result = new List[i];
int offset = 0;
for (int idx = 0; idx < i - 1; idx++) {
result[idx] = idsList.subList(offset, offset + setmin);
offset += setmin;
}
result[i - 1] = idsList.subList(offset, idsList.size());
return result;
}
public static List<String> differenceInSubmissionFields(Collection fromCollection, Collection toCollection)
throws DCInputsReaderException {
DCInputsReader reader = new DCInputsReader();
@@ -480,13 +506,17 @@ public class Util {
Set<String> fromFieldName = new HashSet<>();
Set<String> toFieldName = new HashSet<>();
for (DCInputSet ff : from) {
for (DCInput fdc : ff.getFields()) {
fromFieldName.add(fdc.getFieldName());
for (DCInput[] fdcrow : ff.getFields()) {
for (DCInput fdc : fdcrow) {
fromFieldName.add(fdc.getFieldName());
}
}
}
for (DCInputSet tt : to) {
for (DCInput tdc : tt.getFields()) {
toFieldName.add(tdc.getFieldName());
for (DCInput[] tdcrow : tt.getFields()) {
for (DCInput tdc : tdcrow) {
toFieldName.add(tdc.getFieldName());
}
}
}

View File

@@ -18,7 +18,7 @@ import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpHead;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.app.util.dao.WebAppDAO;
import org.dspace.app.util.service.WebAppService;
import org.dspace.core.Context;
@@ -33,7 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class WebAppServiceImpl implements WebAppService {
private final Logger log = Logger.getLogger(WebAppServiceImpl.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(WebAppServiceImpl.class);
@Autowired(required = true)
protected WebAppDAO webAppDAO;

View File

@@ -11,7 +11,7 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

View File

@@ -14,6 +14,7 @@ import java.util.Map;
import org.dspace.content.DSpaceObject;
import org.dspace.core.Context;
import org.dspace.discovery.IndexableObject;
import org.w3c.dom.Document;
/**
@@ -41,6 +42,13 @@ public interface OpenSearchService {
*/
public List<String> getFormats();
/**
* Determine if the module is active
*
* @return boolean indicator if the OpenSearch module is enabled or not
*/
public boolean isEnabled();
/**
* Returns a mime-type associated with passed format
*
@@ -76,7 +84,7 @@ public interface OpenSearchService {
* @param totalResults - the hit count
* @param start - start result index
* @param pageSize - page size
* @param scope - search scope, null or community/collection handle
* @param scope - search scope, null or the community/collection
* @param results the retreived DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
@@ -84,7 +92,7 @@ public interface OpenSearchService {
*/
public String getResultsString(Context context, String format, String query, int totalResults, int start,
int pageSize,
DSpaceObject scope, List<DSpaceObject> results,
IndexableObject scope, List<IndexableObject> results,
Map<String, String> labels) throws IOException;
/**
@@ -96,7 +104,7 @@ public interface OpenSearchService {
* @param totalResults - the hit count
* @param start - start result index
* @param pageSize - page size
* @param scope - search scope, null or community/collection handle
* @param scope - search scope, null or the community/collection
* @param results the retreived DSpace objects satisfying search
* @param labels labels to apply - format specific
* @return formatted search results
@@ -104,7 +112,7 @@ public interface OpenSearchService {
*/
public Document getResultsDoc(Context context, String format, String query, int totalResults, int start,
int pageSize,
DSpaceObject scope, List<DSpaceObject> results, Map<String, String> labels)
IndexableObject scope, List<IndexableObject> results, Map<String, String> labels)
throws IOException;
public DSpaceObject resolveScope(Context context, String scope) throws SQLException;

View File

@@ -210,4 +210,10 @@ public interface AuthenticationMethod {
public String loginPageURL(Context context,
HttpServletRequest request,
HttpServletResponse response);
/**
* Returns a short name that uniquely identifies this authentication method
* @return The authentication method name
*/
public String getName();
}

View File

@@ -9,6 +9,7 @@ package org.dspace.authenticate;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -16,15 +17,15 @@ import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.ListUtils;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
import org.apache.logging.log4j.Logger;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.core.factory.CoreServiceFactory;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.eperson.factory.EPersonServiceFactory;
import org.dspace.eperson.service.GroupService;
import org.dspace.service.ClientInfoService;
import org.dspace.services.factory.DSpaceServicesFactory;
/**
@@ -49,7 +50,7 @@ public class IPAuthentication implements AuthenticationMethod {
/**
* Our logger
*/
private static Logger log = Logger.getLogger(IPAuthentication.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(IPAuthentication.class);
/**
* Whether to look for x-forwarded headers for logging IP addresses
@@ -67,6 +68,7 @@ public class IPAuthentication implements AuthenticationMethod {
protected List<IPMatcher> ipNegativeMatchers;
protected GroupService groupService;
protected ClientInfoService clientInfoService;
/**
@@ -91,6 +93,7 @@ public class IPAuthentication implements AuthenticationMethod {
ipMatcherGroupIDs = new HashMap<>();
ipMatcherGroupNames = new HashMap<>();
groupService = EPersonServiceFactory.getInstance().getGroupService();
clientInfoService = CoreServiceFactory.getInstance().getClientInfoService();
List<String> propNames = DSpaceServicesFactory.getInstance().getConfigurationService()
.getPropertyKeys("authentication-ip");
@@ -164,23 +167,12 @@ public class IPAuthentication implements AuthenticationMethod {
public List<Group> getSpecialGroups(Context context, HttpServletRequest request)
throws SQLException {
if (request == null) {
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
List<Group> groups = new ArrayList<Group>();
// Get the user's IP address
String addr = request.getRemoteAddr();
if (useProxies == null) {
useProxies = ConfigurationManager.getBooleanProperty("useProxies", false);
}
if (useProxies && request.getHeader("X-Forwarded-For") != null) {
/* This header is a comma delimited list */
for (String xfip : request.getHeader("X-Forwarded-For").split(",")) {
if (!request.getHeader("X-Forwarded-For").contains(addr)) {
addr = xfip.trim();
}
}
}
String addr = clientInfoService.getClientIp(request);
for (IPMatcher ipm : ipMatchers) {
try {
@@ -276,4 +268,9 @@ public class IPAuthentication implements AuthenticationMethod {
HttpServletResponse response) {
return null;
}
@Override
public String getName() {
return "ip";
}
}

View File

@@ -10,7 +10,7 @@ package org.dspace.authenticate;
import java.net.Inet6Address;
import java.net.UnknownHostException;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
/**
* <p>
@@ -38,7 +38,7 @@ import org.apache.log4j.Logger;
* @version $Revision$
*/
public class IPMatcher {
private static Logger log = Logger.getLogger(IPMatcher.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(IPMatcher.class);
/**
* Network to match

View File

@@ -10,6 +10,7 @@ package org.dspace.authenticate;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
import javax.naming.NamingEnumeration;
@@ -27,9 +28,8 @@ import javax.naming.ldap.StartTlsResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
import org.dspace.authenticate.service.AuthenticationService;
import org.dspace.authorize.AuthorizeException;
@@ -61,7 +61,7 @@ public class LDAPAuthentication
/**
* log4j category
*/
private static Logger log = Logger.getLogger(LDAPAuthentication.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(LDAPAuthentication.class);
protected AuthenticationService authenticationService = AuthenticateServiceFactory.getInstance()
.getAuthenticationService();
@@ -136,7 +136,7 @@ public class LDAPAuthentication
log.warn(LogManager.getHeader(context,
"ldap_specialgroup",
"Group defined in login.specialgroup does not exist"));
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
} else {
return Arrays.asList(ldapGroup);
}
@@ -145,7 +145,7 @@ public class LDAPAuthentication
} catch (Exception npe) {
// The user is not an LDAP user, so we don't need to worry about them
}
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
/*
@@ -639,6 +639,11 @@ public class LDAPAuthentication
return null;
}
@Override
public String getName() {
return "ldap";
}
/*
* Add authenticated users to the group defined in dspace.cfg by
* the authentication-ldap.login.groupmap.* key.

View File

@@ -9,13 +9,13 @@ package org.dspace.authenticate;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson;
@@ -49,7 +49,7 @@ public class PasswordAuthentication
/**
* log4j category
*/
private static Logger log = Logger.getLogger(PasswordAuthentication.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(PasswordAuthentication.class);
/**
@@ -151,7 +151,7 @@ public class PasswordAuthentication
"password_specialgroup",
"Group defined in modules/authentication-password.cfg login" +
".specialgroup does not exist"));
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
} else {
return Arrays.asList(specialGroup);
}
@@ -160,7 +160,7 @@ public class PasswordAuthentication
} catch (Exception e) {
log.error(LogManager.getHeader(context, "getSpecialGroups", ""), e);
}
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
/**
@@ -242,4 +242,9 @@ public class PasswordAuthentication
HttpServletResponse response) {
return null;
}
@Override
public String getName() {
return "password";
}
}

View File

@@ -12,6 +12,7 @@ import java.net.URLEncoder;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -22,9 +23,8 @@ import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.MetadataField;
@@ -70,7 +70,7 @@ public class ShibAuthentication implements AuthenticationMethod {
/**
* log4j category
*/
private static Logger log = Logger.getLogger(ShibAuthentication.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(ShibAuthentication.class);
/**
* Additional metadata mappings
@@ -288,7 +288,7 @@ public class ShibAuthentication implements AuthenticationMethod {
if (request == null ||
context.getCurrentUser() == null ||
request.getSession().getAttribute("shib.authenticated") == null) {
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
// If we have already calculated the special groups then return them.
@@ -404,7 +404,7 @@ public class ShibAuthentication implements AuthenticationMethod {
return new ArrayList<>(groups);
} catch (Throwable t) {
log.error("Unable to validate any sepcial groups this user may belong too because of an exception.", t);
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
}
@@ -538,6 +538,11 @@ public class ShibAuthentication implements AuthenticationMethod {
}
}
@Override
public String getName() {
return "shibboleth";
}
/**
* Identify an existing EPerson based upon the shibboleth attributes provided on
* the request object. There are three cases where this can occurr, each as

View File

@@ -21,6 +21,7 @@ import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.StringTokenizer;
@@ -28,9 +29,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authenticate.factory.AuthenticateServiceFactory;
import org.dspace.authenticate.service.AuthenticationService;
import org.dspace.authorize.AuthorizeException;
@@ -105,7 +105,7 @@ public class X509Authentication implements AuthenticationMethod {
/**
* log4j category
*/
private static Logger log = Logger.getLogger(X509Authentication.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(X509Authentication.class);
/**
* public key of CA to check client certs against.
@@ -442,7 +442,7 @@ public class X509Authentication implements AuthenticationMethod {
public List<Group> getSpecialGroups(Context context, HttpServletRequest request)
throws SQLException {
if (request == null) {
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
Boolean authenticated = false;
@@ -472,7 +472,7 @@ public class X509Authentication implements AuthenticationMethod {
return groups;
}
return ListUtils.EMPTY_LIST;
return Collections.EMPTY_LIST;
}
/**
@@ -589,4 +589,9 @@ public class X509Authentication implements AuthenticationMethod {
HttpServletResponse response) {
return loginPageURL;
}
@Override
public String getName() {
return "x509";
}
}

View File

@@ -7,6 +7,7 @@
*/
package org.dspace.authority;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;
@@ -22,7 +23,8 @@ import org.apache.solr.client.solrj.response.QueryResponse;
*/
public interface AuthoritySearchService {
public QueryResponse search(SolrQuery query) throws SolrServerException, MalformedURLException;
public QueryResponse search(SolrQuery query)
throws SolrServerException, MalformedURLException, IOException;
public List<String> getAllIndexedMetadataFields() throws Exception;

View File

@@ -46,16 +46,10 @@ public class AuthorityServiceImpl implements AuthorityService {
}
for (AuthorityIndexerInterface indexerInterface : indexers) {
indexerInterface.init(context, item);
while (indexerInterface.hasMore()) {
AuthorityValue authorityValue = indexerInterface.nextValue();
if (authorityValue != null) {
indexingService.indexContent(authorityValue, true);
}
List<AuthorityValue> authorityValues = indexerInterface.getAuthorityValues(context , item);
for (AuthorityValue authorityValue : authorityValues) {
indexingService.indexContent(authorityValue);
}
//Close up
indexerInterface.close();
}
//Commit to our server
indexingService.commit();

View File

@@ -12,10 +12,11 @@ import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.response.FacetField;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrInputDocument;
@@ -30,7 +31,7 @@ import org.dspace.core.ConfigurationManager;
*/
public class AuthoritySolrServiceImpl implements AuthorityIndexingService, AuthoritySearchService {
private static final Logger log = Logger.getLogger(AuthoritySolrServiceImpl.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthoritySolrServiceImpl.class);
protected AuthoritySolrServiceImpl() {
@@ -39,28 +40,31 @@ public class AuthoritySolrServiceImpl implements AuthorityIndexingService, Autho
/**
* Non-Static CommonsHttpSolrServer for processing indexing events.
*/
protected HttpSolrServer solr = null;
protected SolrClient solr = null;
protected HttpSolrServer getSolr() throws MalformedURLException, SolrServerException {
protected SolrClient getSolr()
throws MalformedURLException, SolrServerException, IOException {
if (solr == null) {
String solrService = ConfigurationManager.getProperty("solr.authority.server");
log.debug("Solr authority URL: " + solrService);
solr = new HttpSolrServer(solrService);
solr.setBaseURL(solrService);
HttpSolrClient solrServer = new HttpSolrClient.Builder(solrService).build();
solrServer.setBaseURL(solrService);
SolrQuery solrQuery = new SolrQuery().setQuery("*:*");
solr.query(solrQuery);
solrServer.query(solrQuery);
solr = solrServer;
}
return solr;
}
@Override
public void indexContent(AuthorityValue value, boolean force) {
public void indexContent(AuthorityValue value) {
SolrInputDocument doc = value.getSolrInputDocument();
try {
@@ -129,7 +133,8 @@ public class AuthoritySolrServiceImpl implements AuthorityIndexingService, Autho
}
@Override
public QueryResponse search(SolrQuery query) throws SolrServerException, MalformedURLException {
public QueryResponse search(SolrQuery query)
throws SolrServerException, MalformedURLException, IOException {
return getSolr().query(query);
}

View File

@@ -12,7 +12,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
/**
* This class contains a list of active authority types.
@@ -32,7 +32,7 @@ public class AuthorityTypes {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(AuthorityTypes.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityTypes.class);
protected List<AuthorityValue> types = new ArrayList<AuthorityValue>();

View File

@@ -8,14 +8,15 @@
package org.dspace.authority;
import java.sql.SQLException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrInputDocument;
import org.dspace.authorize.AuthorizeException;
@@ -23,6 +24,7 @@ import org.dspace.content.Item;
import org.dspace.content.MetadataValue;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.core.Context;
import org.dspace.util.SolrUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
@@ -34,8 +36,6 @@ import org.joda.time.format.ISODateTimeFormat;
* @author Mark Diggory (markd at atmire dot com)
*/
public class AuthorityValue {
/**
* The id of the record in solr
*/
@@ -150,12 +150,13 @@ public class AuthorityValue {
public SolrInputDocument getSolrInputDocument() {
SolrInputDocument doc = new SolrInputDocument();
DateFormat solrDateFormatter = SolrUtils.getDateFormatter();
doc.addField("id", getId());
doc.addField("field", getField());
doc.addField("value", getValue());
doc.addField("deleted", isDeleted());
doc.addField("creation_date", getCreationDate());
doc.addField("last_modified_date", getLastModified());
doc.addField("creation_date", solrDateFormatter.format(getCreationDate()));
doc.addField("last_modified_date", solrDateFormatter.format(getLastModified()));
doc.addField("authority_type", getAuthorityType());
return doc;
}
@@ -196,12 +197,12 @@ public class AuthorityValue {
* @return map
*/
public Map<String, String> choiceSelectMap() {
return new HashMap<String, String>();
return new HashMap<>();
}
public List<DateTimeFormatter> getDateFormatters() {
List<DateTimeFormatter> list = new ArrayList<DateTimeFormatter>();
List<DateTimeFormatter> list = new ArrayList<>();
list.add(ISODateTimeFormat.dateTime());
list.add(ISODateTimeFormat.dateTimeNoMillis());
return list;
@@ -234,7 +235,7 @@ public class AuthorityValue {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(AuthorityValue.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityValue.class);
@Override
public String toString() {

View File

@@ -13,8 +13,8 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrDocument;
@@ -34,7 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class AuthorityValueServiceImpl implements AuthorityValueService {
private final Logger log = Logger.getLogger(AuthorityValueServiceImpl.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityValueServiceImpl.class);
@Autowired(required = true)
protected AuthorityTypes authorityTypes;

View File

@@ -11,9 +11,9 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrInputDocument;
@@ -140,8 +140,8 @@ public class PersonAuthorityValue extends AuthorityValue {
@Override
public void setValues(SolrDocument document) {
super.setValues(document);
this.firstName = ObjectUtils.toString(document.getFieldValue("first_name"));
this.lastName = ObjectUtils.toString(document.getFieldValue("last_name"));
this.firstName = Objects.toString(document.getFieldValue("first_name"), "");
this.lastName = Objects.toString(document.getFieldValue("last_name"), "");
nameVariants = new ArrayList<String>();
Collection<Object> document_name_variant = document.getFieldValues("name_variant");
if (document_name_variant != null) {

View File

@@ -0,0 +1,20 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.authority;
import java.util.List;
/**
* @author Jonas Van Goolen (jonas at atmire dot com)
*/
public interface SolrAuthorityInterface {
List<AuthorityValue> queryAuthorities(String text, int max);
AuthorityValue queryAuthorityID(String id);
}

View File

@@ -19,7 +19,7 @@ import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityValueService;
import org.dspace.content.Item;
@@ -40,7 +40,7 @@ public class UpdateAuthorities {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(UpdateAuthorities.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(UpdateAuthorities.class);
protected PrintWriter print = null;

View File

@@ -35,6 +35,7 @@ public abstract class AuthorityServiceFactory {
public abstract AuthorityService getAuthorityService();
public abstract List<AuthorityIndexerInterface> getAuthorityIndexers();
public static AuthorityServiceFactory getInstance() {

View File

@@ -12,7 +12,7 @@ import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityService;
import org.dspace.content.DSpaceObject;
@@ -33,7 +33,7 @@ import org.dspace.event.Event;
*/
public class AuthorityConsumer implements Consumer {
private final Logger log = Logger.getLogger(AuthorityConsumer.class);
private final Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityConsumer.class);
/**
* A set of all item IDs installed which need their authority updated

View File

@@ -8,13 +8,17 @@
package org.dspace.authority.indexer;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.factory.AuthorityServiceFactory;
import org.dspace.authority.service.AuthorityService;
import org.dspace.content.Item;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.ItemService;
import org.dspace.core.Context;
/**
@@ -25,7 +29,7 @@ import org.dspace.core.Context;
*/
public class AuthorityIndexClient {
private static Logger log = Logger.getLogger(AuthorityIndexClient.class);
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(AuthorityIndexClient.class);
protected static final AuthorityService authorityService =
AuthorityServiceFactory.getInstance().getAuthorityService();
@@ -33,6 +37,8 @@ public class AuthorityIndexClient {
AuthorityServiceFactory.getInstance().getAuthorityIndexingService();
protected static final List<AuthorityIndexerInterface> indexers =
AuthorityServiceFactory.getInstance().getAuthorityIndexers();
protected static final ItemService itemService =
ContentServiceFactory.getInstance().getItemService();
/**
* Default constructor
@@ -64,15 +70,17 @@ public class AuthorityIndexClient {
for (AuthorityIndexerInterface indexerInterface : indexers) {
log.info("Initialize " + indexerInterface.getClass().getName());
System.out.println("Initialize " + indexerInterface.getClass().getName());
indexerInterface.init(context, true);
while (indexerInterface.hasMore()) {
AuthorityValue authorityValue = indexerInterface.nextValue();
if (authorityValue != null) {
Iterator<Item> allItems = itemService.findAll(context);
Map<String, AuthorityValue> authorityCache = new HashMap<>();
while (allItems.hasNext()) {
Item item = allItems.next();
List<AuthorityValue> authorityValues = indexerInterface.getAuthorityValues(
context, item, authorityCache);
for (AuthorityValue authorityValue : authorityValues) {
toIndexValues.put(authorityValue.getId(), authorityValue);
}
context.uncacheEntity(item);
}
//Close up
indexerInterface.close();
}
@@ -82,7 +90,7 @@ public class AuthorityIndexClient {
log.info("Writing new data");
System.out.println("Writing new data");
for (String id : toIndexValues.keySet()) {
indexingService.indexContent(toIndexValues.get(id), true);
indexingService.indexContent(toIndexValues.get(id));
indexingService.commit();
}

View File

@@ -9,6 +9,8 @@
package org.dspace.authority.indexer;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.dspace.authority.AuthorityValue;
import org.dspace.authorize.AuthorizeException;
@@ -23,17 +25,10 @@ import org.dspace.core.Context;
*/
public interface AuthorityIndexerInterface {
public void init(Context context, Item item);
public void init(Context context, boolean useCache);
public void init(Context context);
public AuthorityValue nextValue();
public boolean hasMore() throws SQLException, AuthorizeException;
public void close();
public List<AuthorityValue> getAuthorityValues(Context context, Item item)
throws SQLException, AuthorizeException;
public List<AuthorityValue> getAuthorityValues(Context context, Item item, Map<String, AuthorityValue> cache)
throws SQLException, AuthorizeException;
public boolean isConfiguredProperly();
}

View File

@@ -19,7 +19,7 @@ import org.dspace.authority.AuthorityValue;
public interface AuthorityIndexingService {
public void indexContent(AuthorityValue value, boolean force);
public void indexContent(AuthorityValue value);
public void cleanIndex() throws Exception;

View File

@@ -9,14 +9,12 @@ package org.dspace.authority.indexer;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.service.AuthorityValueService;
import org.dspace.authorize.AuthorizeException;
@@ -31,12 +29,13 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* DSpaceAuthorityIndexer is used in IndexClient, which is called by the AuthorityConsumer and the indexing-script.
* <p>
* An instance of DSpaceAuthorityIndexer is bound to a list of items.
* This can be one item or all items too depending on the init() method.
* The DSpaceAuthorityIndexer will return a list of all authority values for a
* given item. It will return an authority value for all metadata fields defined
* in dspace.conf with 'authority.author.indexer.field'.
* <p>
* DSpaceAuthorityIndexer lets you iterate over each metadata value
* for each metadata field defined in dspace.cfg with 'authority.author.indexer.field'
* for each item in the list.
* You have to call getAuthorityValues for every Item you want to index. But you
* can supply an optional cache, to save the mapping from the metadata value to
* the new authority values for metadata fields without an authority key.
* <p>
*
* @author Antoine Snyers (antoine at atmire.com)
@@ -46,25 +45,16 @@ import org.springframework.beans.factory.annotation.Autowired;
*/
public class DSpaceAuthorityIndexer implements AuthorityIndexerInterface, InitializingBean {
private static final Logger log = Logger.getLogger(DSpaceAuthorityIndexer.class);
private static final Logger log = org.apache.logging.log4j.LogManager.getLogger(DSpaceAuthorityIndexer.class);
protected Iterator<Item> itemIterator;
protected Item currentItem;
/**
* The list of metadata fields which are to be indexed *
*/
protected List<String> metadataFields;
protected int currentFieldIndex;
protected int currentMetadataIndex;
protected AuthorityValue nextValue;
protected Context context;
@Autowired(required = true)
protected AuthorityValueService authorityValueService;
@Autowired(required = true)
protected ItemService itemService;
protected boolean useCache;
protected Map<String, AuthorityValue> cache;
@Autowired(required = true)
protected ConfigurationService configurationService;
@@ -80,146 +70,83 @@ public class DSpaceAuthorityIndexer implements AuthorityIndexerInterface, Initia
}
}
@Override
public void init(Context context, Item item) {
ArrayList<Item> itemList = new ArrayList<>();
itemList.add(item);
this.itemIterator = itemList.iterator();
currentItem = this.itemIterator.next();
initialize(context);
public List<AuthorityValue> getAuthorityValues(Context context, Item item)
throws SQLException, AuthorizeException {
return getAuthorityValues(context, item, null);
}
@Override
public void init(Context context) {
init(context, false);
}
@Override
public void init(Context context, boolean useCache) {
try {
this.itemIterator = itemService.findAll(context);
currentItem = this.itemIterator.next();
} catch (SQLException e) {
log.error("Error while retrieving all items in the metadata indexer");
}
initialize(context);
this.useCache = useCache;
}
protected void initialize(Context context) {
this.context = context;
currentFieldIndex = 0;
currentMetadataIndex = 0;
useCache = false;
cache = new HashMap<>();
}
@Override
public AuthorityValue nextValue() {
return nextValue;
}
@Override
public boolean hasMore() throws SQLException, AuthorizeException {
if (currentItem == null) {
return false;
}
// 1. iterate over the metadata values
String metadataField = metadataFields.get(currentFieldIndex);
List<MetadataValue> values = itemService.getMetadataByMetadataString(currentItem, metadataField);
if (currentMetadataIndex < values.size()) {
prepareNextValue(metadataField, values.get(currentMetadataIndex));
currentMetadataIndex++;
return true;
} else {
// 2. iterate over the metadata fields
if ((currentFieldIndex + 1) < metadataFields.size()) {
currentFieldIndex++;
//Reset our current metadata index since we are moving to another field
currentMetadataIndex = 0;
return hasMore();
} else {
// 3. iterate over the items
if (itemIterator.hasNext()) {
currentItem = itemIterator.next();
//Reset our current field index
currentFieldIndex = 0;
//Reset our current metadata index
currentMetadataIndex = 0;
} else {
currentItem = null;
public List<AuthorityValue> getAuthorityValues(Context context, Item item, Map<String, AuthorityValue> cache)
throws SQLException, AuthorizeException {
List<AuthorityValue> values = new ArrayList<>();
for (String metadataField : metadataFields) {
List<MetadataValue> metadataValues = itemService.getMetadataByMetadataString(item, metadataField);
for (MetadataValue metadataValue : metadataValues) {
String content = metadataValue.getValue();
String authorityKey = metadataValue.getAuthority();
// We only want to update our item IF our UUID is not present
// or if we need to generate one.
boolean requiresItemUpdate = StringUtils.isBlank(authorityKey) ||
StringUtils.startsWith(authorityKey, AuthorityValueService.GENERATE);
AuthorityValue value = null;
if (StringUtils.isBlank(authorityKey) && cache != null) {
// This is a value currently without an authority. So query
// the cache, if an authority is found for the exact value.
value = cache.get(content);
}
if (value == null) {
value = getAuthorityValue(context, metadataField, content,authorityKey);
}
if (value != null) {
if (requiresItemUpdate) {
value.updateItem(context, item, metadataValue);
try {
itemService.update(context, item);
} catch (Exception e) {
log.error("Error creating a metadatavalue's authority", e);
}
}
if (cache != null) {
cache.put(content, value);
}
values.add(value);
} else {
log.error("Error getting an authority value for " +
"the metadata value \"" + content + "\" " +
"in the field \"" + metadataField + "\" " +
"of the item " + item.getHandle());
}
return hasMore();
}
}
return values;
}
/**
* This method looks at the authority of a metadata.
* This method looks at the authority of a metadata value.
* If the authority can be found in solr, that value is reused.
* Otherwise a new authority value will be generated that will be indexed in solr.
*
* If the authority starts with AuthorityValueGenerator.GENERATE, a specific type of AuthorityValue will be
* generated.
* Depending on the type this may involve querying an external REST service
*
* @param context Current DSpace context
* @param metadataField Is one of the fields defined in dspace.cfg to be indexed.
* @param value Is one of the values of the given metadataField in one of the items being indexed.
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @param metadataContent Content of the current metadata value.
* @param metadataAuthorityKey Existing authority of the metadata value.
*/
protected void prepareNextValue(String metadataField, MetadataValue value) throws SQLException, AuthorizeException {
nextValue = null;
String content = value.getValue();
String authorityKey = value.getAuthority();
//We only want to update our item IF our UUID is not present or if we need to generate one.
boolean requiresItemUpdate = StringUtils.isBlank(authorityKey) || StringUtils
.startsWith(authorityKey, AuthorityValueService.GENERATE);
if (StringUtils.isNotBlank(authorityKey) && !authorityKey.startsWith(AuthorityValueService.GENERATE)) {
// !uid.startsWith(AuthorityValueGenerator.GENERATE) is not strictly necessary here but it prevents
// exceptions in solr
nextValue = authorityValueService.findByUID(context, authorityKey);
}
if (nextValue == null && StringUtils.isBlank(authorityKey) && useCache) {
// A metadata without authority is being indexed
// If there is an exact match in the cache, reuse it rather than adding a new one.
AuthorityValue cachedAuthorityValue = cache.get(content);
if (cachedAuthorityValue != null) {
nextValue = cachedAuthorityValue;
private AuthorityValue getAuthorityValue(Context context, String metadataField,
String metadataContent, String metadataAuthorityKey) {
if (StringUtils.isNotBlank(metadataAuthorityKey) &&
!metadataAuthorityKey.startsWith(AuthorityValueService.GENERATE)) {
// !uid.startsWith(AuthorityValueGenerator.GENERATE) is not strictly
// necessary here but it prevents exceptions in solr
AuthorityValue value = authorityValueService.findByUID(context, metadataAuthorityKey);
if (value != null) {
return value;
}
}
if (nextValue == null) {
nextValue = authorityValueService
.generate(context, authorityKey, content, metadataField.replaceAll("\\.", "_"));
}
if (nextValue != null && requiresItemUpdate) {
nextValue.updateItem(context, currentItem, value);
try {
itemService.update(context, currentItem);
} catch (Exception e) {
log.error("Error creating a metadatavalue's authority", e);
}
}
if (useCache) {
cache.put(content, nextValue);
}
}
@Override
public void close() {
itemIterator = null;
cache.clear();
return authorityValueService.generate(context, metadataAuthorityKey,
metadataContent, metadataField.replaceAll("\\.", "_"));
}
@Override

View File

@@ -1,87 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.authority.orcid;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.orcid.model.Bio;
import org.dspace.authority.orcid.model.Work;
import org.dspace.authority.orcid.xml.XMLtoBio;
import org.dspace.authority.orcid.xml.XMLtoWork;
import org.dspace.authority.rest.RestSource;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.w3c.dom.Document;
/**
* @author Antoine Snyers (antoine at atmire.com)
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
*/
public class Orcid extends RestSource {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(Orcid.class);
private static Orcid orcid;
public static Orcid getOrcid() {
if (orcid == null) {
orcid = DSpaceServicesFactory.getInstance().getServiceManager()
.getServiceByName("OrcidSource", Orcid.class);
}
return orcid;
}
private Orcid(String url) {
super(url);
}
public Bio getBio(String id) {
Document bioDocument = restConnector.get(id + "/orcid-bio");
XMLtoBio converter = new XMLtoBio();
Bio bio = converter.convert(bioDocument).get(0);
bio.setOrcid(id);
return bio;
}
public List<Work> getWorks(String id) {
Document document = restConnector.get(id + "/orcid-works");
XMLtoWork converter = new XMLtoWork();
return converter.convert(document);
}
public List<Bio> queryBio(String name, int start, int rows) {
Document bioDocument = restConnector
.get("search/orcid-bio?q=" + URLEncoder.encode("\"" + name + "\"") + "&start=" + start + "&rows=" + rows);
XMLtoBio converter = new XMLtoBio();
return converter.convert(bioDocument);
}
@Override
public List<AuthorityValue> queryAuthorities(String text, int max) {
List<Bio> bios = queryBio(text, 0, max);
List<AuthorityValue> authorities = new ArrayList<AuthorityValue>();
for (Bio bio : bios) {
authorities.add(OrcidAuthorityValue.create(bio));
}
return authorities;
}
@Override
public AuthorityValue queryAuthorityID(String id) {
Bio bio = getBio(id);
return OrcidAuthorityValue.create(bio);
}
}

View File

@@ -1,328 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.authority.orcid;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrInputDocument;
import org.dspace.authority.AuthorityValue;
import org.dspace.authority.AuthorityValueServiceImpl;
import org.dspace.authority.PersonAuthorityValue;
import org.dspace.authority.orcid.model.Bio;
import org.dspace.authority.orcid.model.BioExternalIdentifier;
import org.dspace.authority.orcid.model.BioName;
import org.dspace.authority.orcid.model.BioResearcherUrl;
/**
* @author Antoine Snyers (antoine at atmire.com)
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
*/
public class OrcidAuthorityValue extends PersonAuthorityValue {
/**
* log4j logger
*/
private static Logger log = Logger.getLogger(OrcidAuthorityValue.class);
private String orcid_id;
private Map<String, List<String>> otherMetadata = new HashMap<String, List<String>>();
private boolean update; // used in setValues(Bio bio)
/**
* Creates an instance of OrcidAuthorityValue with only uninitialized fields.
* This is meant to be filled in with values from an existing record.
* To create a brand new OrcidAuthorityValue, use create()
*/
public OrcidAuthorityValue() {
}
public OrcidAuthorityValue(SolrDocument document) {
super(document);
}
public String getOrcid_id() {
return orcid_id;
}
public void setOrcid_id(String orcid_id) {
this.orcid_id = orcid_id;
}
public Map<String, List<String>> getOtherMetadata() {
return otherMetadata;
}
public void addOtherMetadata(String label, String data) {
List<String> strings = otherMetadata.get(label);
if (strings == null) {
strings = new ArrayList<String>();
}
strings.add(data);
otherMetadata.put(label, strings);
}
@Override
public SolrInputDocument getSolrInputDocument() {
SolrInputDocument doc = super.getSolrInputDocument();
if (StringUtils.isNotBlank(getOrcid_id())) {
doc.addField("orcid_id", getOrcid_id());
}
for (String t : otherMetadata.keySet()) {
List<String> data = otherMetadata.get(t);
for (String data_entry : data) {
doc.addField("label_" + t, data_entry);
}
}
return doc;
}
@Override
public void setValues(SolrDocument document) {
super.setValues(document);
this.orcid_id = String.valueOf(document.getFieldValue("orcid_id"));
otherMetadata = new HashMap<String, List<String>>();
for (String fieldName : document.getFieldNames()) {
String labelPrefix = "label_";
if (fieldName.startsWith(labelPrefix)) {
String label = fieldName.substring(labelPrefix.length());
List<String> list = new ArrayList<String>();
Collection<Object> fieldValues = document.getFieldValues(fieldName);
for (Object o : fieldValues) {
list.add(String.valueOf(o));
}
otherMetadata.put(label, list);
}
}
}
public static OrcidAuthorityValue create() {
OrcidAuthorityValue orcidAuthorityValue = new OrcidAuthorityValue();
orcidAuthorityValue.setId(UUID.randomUUID().toString());
orcidAuthorityValue.updateLastModifiedDate();
orcidAuthorityValue.setCreationDate(new Date());
return orcidAuthorityValue;
}
/**
* Create an authority based on a given orcid bio
*
* @param bio Bio
* @return OrcidAuthorityValue
*/
public static OrcidAuthorityValue create(Bio bio) {
OrcidAuthorityValue authority = OrcidAuthorityValue.create();
authority.setValues(bio);
return authority;
}
public boolean setValues(Bio bio) {
BioName name = bio.getName();
if (updateValue(bio.getOrcid(), getOrcid_id())) {
setOrcid_id(bio.getOrcid());
}
if (updateValue(name.getFamilyName(), getLastName())) {
setLastName(name.getFamilyName());
}
if (updateValue(name.getGivenNames(), getFirstName())) {
setFirstName(name.getGivenNames());
}
if (StringUtils.isNotBlank(name.getCreditName())) {
if (!getNameVariants().contains(name.getCreditName())) {
addNameVariant(name.getCreditName());
update = true;
}
}
for (String otherName : name.getOtherNames()) {
if (!getNameVariants().contains(otherName)) {
addNameVariant(otherName);
update = true;
}
}
if (updateOtherMetadata("country", bio.getCountry())) {
addOtherMetadata("country", bio.getCountry());
}
for (String keyword : bio.getKeywords()) {
if (updateOtherMetadata("keyword", keyword)) {
addOtherMetadata("keyword", keyword);
}
}
for (BioExternalIdentifier externalIdentifier : bio.getBioExternalIdentifiers()) {
if (updateOtherMetadata("external_identifier", externalIdentifier.toString())) {
addOtherMetadata("external_identifier", externalIdentifier.toString());
}
}
for (BioResearcherUrl researcherUrl : bio.getResearcherUrls()) {
if (updateOtherMetadata("researcher_url", researcherUrl.toString())) {
addOtherMetadata("researcher_url", researcherUrl.toString());
}
}
if (updateOtherMetadata("biography", bio.getBiography())) {
addOtherMetadata("biography", bio.getBiography());
}
setValue(getName());
if (update) {
update();
}
boolean result = update;
update = false;
return result;
}
private boolean updateOtherMetadata(String label, String data) {
List<String> strings = getOtherMetadata().get(label);
boolean update;
if (strings == null) {
update = StringUtils.isNotBlank(data);
} else {
update = !strings.contains(data);
}
if (update) {
this.update = true;
}
return update;
}
private boolean updateValue(String incoming, String resident) {
boolean update = StringUtils.isNotBlank(incoming) && !incoming.equals(resident);
if (update) {
this.update = true;
}
return update;
}
@Override
public Map<String, String> choiceSelectMap() {
Map<String, String> map = super.choiceSelectMap();
map.put("orcid", getOrcid_id());
return map;
}
@Override
public String getAuthorityType() {
return "orcid";
}
@Override
public String generateString() {
String generateString = AuthorityValueServiceImpl.GENERATE + getAuthorityType() + AuthorityValueServiceImpl
.SPLIT;
if (StringUtils.isNotBlank(getOrcid_id())) {
generateString += getOrcid_id();
}
return generateString;
}
@Override
public AuthorityValue newInstance(String info) {
AuthorityValue authorityValue = null;
if (StringUtils.isNotBlank(info)) {
Orcid orcid = Orcid.getOrcid();
authorityValue = orcid.queryAuthorityID(info);
} else {
authorityValue = OrcidAuthorityValue.create();
}
return authorityValue;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrcidAuthorityValue that = (OrcidAuthorityValue) o;
if (orcid_id != null ? !orcid_id.equals(that.orcid_id) : that.orcid_id != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
return orcid_id != null ? orcid_id.hashCode() : 0;
}
@Override
public boolean hasTheSameInformationAs(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.hasTheSameInformationAs(o)) {
return false;
}
OrcidAuthorityValue that = (OrcidAuthorityValue) o;
if (orcid_id != null ? !orcid_id.equals(that.orcid_id) : that.orcid_id != null) {
return false;
}
for (String key : otherMetadata.keySet()) {
if (otherMetadata.get(key) != null) {
List<String> metadata = otherMetadata.get(key);
List<String> otherMetadata = that.otherMetadata.get(key);
if (otherMetadata == null) {
return false;
} else {
HashSet<String> metadataSet = new HashSet<String>(metadata);
HashSet<String> otherMetadataSet = new HashSet<String>(otherMetadata);
if (!metadataSet.equals(otherMetadataSet)) {
return false;
}
}
} else {
if (that.otherMetadata.get(key) != null) {
return false;
}
}
}
return true;
}
}

View File

@@ -1,112 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.authority.orcid.model;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* @author Antoine Snyers (antoine at atmire.com)
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
*/
public class Bio {
protected String orcid;
protected BioName name;
protected String country;
protected Set<String> keywords;
protected Set<BioExternalIdentifier> bioExternalIdentifiers;
protected Set<BioResearcherUrl> researcherUrls;
protected String biography;
public Bio() {
this.name = new BioName();
keywords = new LinkedHashSet<String>();
bioExternalIdentifiers = new LinkedHashSet<BioExternalIdentifier>();
researcherUrls = new LinkedHashSet<BioResearcherUrl>();
}
public String getOrcid() {
return orcid;
}
public void setOrcid(String orcid) {
this.orcid = orcid;
}
public BioName getName() {
return name;
}
public void setName(BioName name) {
this.name = name;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public Set<String> getKeywords() {
return keywords;
}
public void addKeyword(String keyword) {
this.keywords.add(keyword);
}
public Set<BioExternalIdentifier> getBioExternalIdentifiers() {
return bioExternalIdentifiers;
}
public void addExternalIdentifier(BioExternalIdentifier externalReference) {
bioExternalIdentifiers.add(externalReference);
}
public Set<BioResearcherUrl> getResearcherUrls() {
return researcherUrls;
}
public void addResearcherUrl(BioResearcherUrl researcherUrl) {
researcherUrls.add(researcherUrl);
}
public String getBiography() {
return biography;
}
public void setBiography(String biography) {
this.biography = biography;
}
@Override
public String toString() {
return "Bio{" +
"orcid='" + orcid + '\'' +
", name=" + name +
", country='" + country + '\'' +
", keywords=" + keywords +
", bioExternalIdentifiers=" + bioExternalIdentifiers +
", researcherUrls=" + researcherUrls +
", biography='" + biography + '\'' +
'}';
}
}

View File

@@ -1,108 +0,0 @@
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.authority.orcid.model;
/**
* @author Antoine Snyers (antoine at atmire.com)
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
*/
public class BioExternalIdentifier {
protected String id_orcid;
protected String id_common_name;
protected String id_reference;
protected String id_url;
public BioExternalIdentifier(String id_orcid, String id_common_name, String id_reference, String id_url) {
this.id_orcid = id_orcid;
this.id_common_name = id_common_name;
this.id_reference = id_reference;
this.id_url = id_url;
}
public String getId_orcid() {
return id_orcid;
}
public void setId_orcid(String id_orcid) {
this.id_orcid = id_orcid;
}
public String getId_common_name() {
return id_common_name;
}
public void setId_common_name(String id_common_name) {
this.id_common_name = id_common_name;
}
public String getId_reference() {
return id_reference;
}
public void setId_reference(String id_reference) {
this.id_reference = id_reference;
}
public String getId_url() {
return id_url;
}
public void setId_url(String id_url) {
this.id_url = id_url;
}
@Override
public String toString() {
return "BioExternalIdentifier{" +
"id_orcid='" + id_orcid + '\'' +
", id_common_name='" + id_common_name + '\'' +
", id_reference='" + id_reference + '\'' +
", id_url='" + id_url + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BioExternalIdentifier that = (BioExternalIdentifier) o;
if (id_common_name != null ? !id_common_name.equals(that.id_common_name) : that.id_common_name != null) {
return false;
}
if (id_orcid != null ? !id_orcid.equals(that.id_orcid) : that.id_orcid != null) {
return false;
}
if (id_reference != null ? !id_reference.equals(that.id_reference) : that.id_reference != null) {
return false;
}
if (id_url != null ? !id_url.equals(that.id_url) : that.id_url != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = id_orcid != null ? id_orcid.hashCode() : 0;
result = 31 * result + (id_common_name != null ? id_common_name.hashCode() : 0);
result = 31 * result + (id_reference != null ? id_reference.hashCode() : 0);
result = 31 * result + (id_url != null ? id_url.hashCode() : 0);
return result;
}
}

Some files were not shown because too many files have changed in this diff Show More